[Bug build/28780] --disable-default-pie doesn't work

hjl.tools at gmail dot com sourceware-bugzilla@sourceware.org
Sat Jan 15 19:39:48 GMT 2022


https://sourceware.org/bugzilla/show_bug.cgi?id=28780

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #1)
> One problem is
> 
> commit 91e92272caefad4b6156572fc41671dcbd93afe5
> Author: Fangrui Song <maskray@google.com>
> Date:   Fri Sep 24 09:36:32 2021 -0700
> 
>     i386: Port elf_machine_{load_address,dynamic} from x86-64
>     
>     This drops reliance on _GLOBAL_OFFSET_TABLE_[0] being the link-time
>     address of _DYNAMIC.
>     
>     The code sequence length does not change.
>     
>     Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
> 
> and
> 
> commit b37b75d269883a2c553bb7019a813094eb4e2dd1
> Author: Fangrui Song <maskray@google.com>
> Date:   Tue Aug 17 10:45:57 2021 -0700
> 
>     x86_64: Simplify elf_machine_{load_address,dynamic}
>     
>     and drop reliance on _GLOBAL_OFFSET_TABLE_[0] being the link-time
>     address of _DYNAMIC. &__ehdr_start is a better way to get the load
> address.
>     
>     Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
> 
> replaced _GLOBAL_OFFSET_TABLE_ reference with _DYNAMIC.  But linker won't
> define _DYNAMIC for non-PIE static.  "gcc -static" leads to undefined
> _DYNAMIC error.

Ignore this.  The problem is elsewhere.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list