[PATCH] elf: Apply attribute_relro to pointers in elf/dl-minimal.c
Florian Weimer
fw@deneb.enyo.de
Sun Mar 1 09:34:00 GMT 2020
* Florian Weimer:
> I don't know much about alpha unfortunately. Running this
>
> $ objdump -d --reloc /lib/ld-linux.so.2 | grep -E 'lda\s.*gp,'
>
> on a default build (not mainline, so successful) gives me what I
> assume are GP-relative load instructions ranging from
>
> 9ff4: 40 80 bd 23 lda gp,-32704(gp)
>
> to
>
> a040: f4 7f bd 23 lda gp,32756(gp)
>
> That seems to be rather close to the 64 KiB displacement that alpha
> apparently supports.
The above isn't correct. These instructions are half of the gp
register setup. There are more bits available in a different
instruction.
I still beleive this is a current toolchain limitation. I tried
linking with -Wl,--no-relax and also skipping the librtld.os stage,
but this didn't fix this. I think we have no choice but to drop -fpic
at this point and use -fPIC.
More information about the Libc-alpha
mailing list