New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lld fails to link kernel modules on FreeBSD/arm: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment #32770
Comments
ping on the reproduction tarball :-) |
I noticed something similar in another build. Taking a look. |
At least in the case I hit it was just "-z text" being the default. Can you try passing "-z notext"? |
Indeed, I am able to link the arm kernel modules with -z notext, and for kernel modules applying .text relocations is not unreasonable. |
Yes, a -z text .so is probably the most convenient format for a loadable module that is never shared. |
For reference, addressed in FreeBSD here: https://svnweb.freebsd.org/changeset/base/320179 |
I've now run basic sanity tests with an LLD-linked FreeBSD kernel and modules on BeagleBone black and everything seems fine. root@beaglebone:~ # readelf --string-dump=.comment |
Extended Description
Bug created for tracking - reproduction tarball will be added.
While linking the FreeBSD/arm kernel modules the linking fails with errors of the form:
ld -m armelf_fbsd -Bshareable -d -warn-common -o accf_data.ko.full accf_data.kld
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment
The text was updated successfully, but these errors were encountered: