Bug 537857 part 1 - Remove dead symbols in linker (original patch from tglek). r=ted

This commit is contained in:
Mike Hommey 2011-06-28 08:25:48 +02:00
parent ed19567f60
commit 966d4403d7

View File

@ -1544,8 +1544,10 @@ if test "$GNU_CC"; then
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
DSO_LDOPTS='-shared'
if test "$GCC_USE_GNU_LD"; then
# Don't allow undefined symbols in libraries
DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs"
# Don't allow undefined symbols in libraries, and remove dead symbols
DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs -Wl,--gc-sections"
CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections"
fi
WARNINGS_AS_ERRORS='-Werror'
DSO_CFLAGS=''