This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] elf: Apply attribute_relro to pointers in elf/dl-minimal.c


* 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]