This is the mail archive of the glibc-bugs@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]

[Bug dynamic-link/22638] static pie binaries are broken on sparc due to use of memcpy(behind IFUNC redirector) in __libc_start_tls()


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

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Sergei Trofimovich from comment #3)
> I tried on today's glibc-master.
> 
> When glibc is built it builds 'elf/sln' static binary (and then uses it
> during 'make install'). For a gcc built as --enable-default-pie it means any
> '-static'-linked binary is static pie, right?

No.

Static PIE:

[hjl@gnu-6 build-x86_64-linux]$ file elf/sln
elf/sln: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux),
dynamically linked, for GNU/Linux 3.2.0,
BuildID[sha1]=302eae0a4e160373b3b498b93c48e122c09fcbfa, with debug_info, not
stripped
[hjl@gnu-6 build-x86_64-linux]$ ldd elf/sln
        statically linked
[hjl@gnu-6 build-x86_64-linux]$ 

Static:

[hjl@gnu-6 build-x86_64-linux]$ file elf/sln
elf/sln: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically
linked, for GNU/Linux 3.2.0,
BuildID[sha1]=e0283eeb59e4726f916872bd6a4f49f8628205da, with debug_info, not
stripped
[hjl@gnu-6 build-x86_64-linux]$ ldd elf/sln
        not a dynamic executable
[hjl@gnu-6 build-x86_64-linux]$ 

The difference is "shared object" vs "executable".

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

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