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: PING: [PATCH] Add --enable-static-pie to build static PIE


On 10/5/17, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
> On 05/10/17 14:11, H.J. Lu wrote:
>> On 9/29/17, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> I submitted patches for other targets to address obvious issues with
>>> static
>>> PIE.  Build results of build-many-glibcs.py with --enable-static-pie
>>> with
>>> all
>>> patches for static PIE applied are
>>>
>>> PASS: glibcs-aarch64_be-linux-gnu build
>>> PASS: glibcs-aarch64-linux-gnu build
>
> can you tell me the binutils version used?
> building fails with recent binutils master:
>
> builddir/libc.a(dl-reloc-static-pie.o): In function `elf_get_dynamic_info':
> srcdir/elf/get-dynamic-info.h:73:(.text+0x4c): relocation truncated to fit:
> R_AARCH64_ADR_PREL_PG_HI21 against
> symbol `_dl_main_map' defined in .data.rel.local section in
> builddir/libc.a(dl-support.o)
> srcdir/elf/get-dynamic-info.h:70:(.text+0x50): relocation truncated to fit:
> R_AARCH64_ADR_PREL_PG_HI21 against
> symbol `_dl_main_map' defined in .data.rel.local section in
> builddir/libc.a(dl-support.o)
>
> and
>
> $ objdump -t builddir/elf/dl-support.o
> ...
> 0000000000000000 g     O .data.rel.local	0000000000000468 .hidden
> _dl_main_map
> ...
> $ objdump -r builddir/elf/dl-reloc-static-pie.o
> ...
> 000000000000004c R_AARCH64_ADR_PREL_PG_HI21
> _dl_main_map+0x000000037ffffa40
> 0000000000000050 R_AARCH64_ADR_PREL_PG_HI21
> _dl_main_map+0x000000037ffff1e0
> ...
>
> those offsets look wrong, i'll need to investigate
>
>

Did you mean addend?  In any case, I checked a workaround
into hjl/pie/static.  Please give it a try,

-- 
H.J.


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