[Bug target/18206] New: -dynamic-linker option seems to be badly named, broken and undocumented

ratmice at yahoo dot com gcc-bugzilla@gcc.gnu.org
Thu Oct 28 19:42:00 GMT 2004


only tested this under 3.3.4/4.0 but it seems to go back a few years.

it will pass -dynamic-linker to cc1 also.

and seems to have been noticed before
http://gcc.gnu.org/ml/gcc/2000-10/msg00437.html

from what i can tell it suppresses the passing of -dynamic-linker to ld
(ignoring that it gets sent to cc1.) To use an alternative dynamic-linker you 
can do something like


cd /tmp
cp /lib/ld-linux.so.2 . 
echo 'main(){}' >foo.c
gcc -v -dynamic-linker -Wl,-dynamic-linker /tmp/ld-linux.so.2 foo.c
readelf -l a.out | grep -A1 INTERP

not sure whether this particular usage of it should be limited to a custom spec 
with -specs=... but i expected it to accept an option that overrides the default
-dynamic-linker sent to ld

-- 
           Summary: -dynamic-linker option seems to be badly named, broken
                    and undocumented
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ratmice at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i386-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18206



More information about the Gcc-bugs mailing list