This is the mail archive of the mailing list for the binutils 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]

Question on ld and --exclude-libs

Hi All,

I hope this is the last question. Thanks for bearing with me.

>From ld/ChangeLog-0203, it appears --exclude-libs first appeared
(Smith's 05/2002 comments).

In ld/ChangeLog-2004, it appears --exclude-libs was tuned (and the PE
target was removed) (Jacobowitz's 10/2004 comments).

Conservatively, I believe that makes --exclude-libs available in Binutils 2.12.

I'm trying to hide as many symbols as possible
(, and I'm using --exclude-libs,ALL
as part of the procedure:

    GNU_LD212_OR_LATER = $(shell $(LD) -v 2>&1 \
        | $(EGREP) -i -c "^gnu ld version (2.1[2-9]|[2-9][0-9])")
    ifneq ($(GNU_LD212_OR_LATER),0)
      LDFLAGS +=	-Wl,--exclude-libs,ALL

FreeBSD 8.2 results:
$ ld --version
GNU ld version 2.15 [FreeBSD] 2004-05-23
$ gmake
g++ -g2 -ggdb -O0 <SNIP Objects> -L/usr/local/lib -L/usr/lib
-Wl,-z,nodlopen -Wl,--exclude-libs,ALL -Wl,-z,relro -Wl,-z,now -shared
/usr/bin/ld: unrecognized option '--exclude-libs'
/usr/bin/ld: use the --help option for usage information

Question: FreeBSD's ld is 2.15, so it should contain --exclude-libs.
Can anyone pinpoint where I went wrong? Or should I focus on using
--exclude_libs with -fvisibility (since that's what I am using it
for), and target a Binutils from the GCC 4.0 era (to side step the
FreeBSD issue).

Thanks in advance,

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