When is /usr/lib/ldscripts/* used?

Goswin von Brederlow goswin-v-b@web.de
Wed Apr 23 21:33:00 GMT 2008


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



More information about the Binutils mailing list