This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
When is /usr/lib/ldscripts/* used?
- From: Goswin von Brederlow <goswin-v-b at web dot de>
- To: Binutils <binutils at sourceware dot org>
- Date: Wed, 23 Apr 2008 22:43:16 +0200
- Subject: When is /usr/lib/ldscripts/* used?
Hi,
under Debian the binutils package contains linker scripts like
mrvn@frosties:~% cat /usr/lib/ldscripts/elf_i386.x
/* Default linker script, for normal executables */
OUTPUT_FORMAT("elf32-i386", "elf32-i386",
"elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
SEARCH_DIR("/usr/i386-linux-gnu/lib32"); SEARCH_DIR("/usr/local/lib32"); SEARCH_DIR("/lib32"); SEARCH_DIR("/usr/lib32"); SEARCH_DIR("/usr/i386-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
SECTIONS
{
...
but when I strace a gcc or ld run the most I see is a
stat("/usr/lib/ldscripts"). ld never opens any of those linker
scripts.
How do these scripts work if nothing ever uses them? I know they do
get generated during build but what for?
MfG
Goswin