diff --git a/config/expandlibs_exec.py b/config/expandlibs_exec.py index c053430229..fe9a7f6ebb 100644 --- a/config/expandlibs_exec.py +++ b/config/expandlibs_exec.py @@ -45,6 +45,7 @@ SECTION_INSERT_BEFORE = [ ('.text', '.fini'), ('.rodata', '.rodata1'), ('.data.rel.ro', '.dynamic'), + ('.kPStaticModules', '.data.rel.ro'), ('.data', '.data1'), ] diff --git a/toolkit/library/StaticXULComponents.ld b/toolkit/library/StaticXULComponents.ld deleted file mode 100644 index e4fe728134..0000000000 --- a/toolkit/library/StaticXULComponents.ld +++ /dev/null @@ -1,5 +0,0 @@ -SECTIONS { - .data.rel.ro : { - *(.kPStaticModules) - } -} diff --git a/toolkit/library/libxul.mk b/toolkit/library/libxul.mk index f9fbe9edcc..01a4048700 100644 --- a/toolkit/library/libxul.mk +++ b/toolkit/library/libxul.mk @@ -39,21 +39,6 @@ ifeq ($(OS_ARCH),SunOS) OS_LDFLAGS += -Wl,-z,defs endif -# BFD ld doesn't create multiple PT_LOADs as usual when an unknown section -# exists. Using an implicit linker script to make it fold that section in -# .data.rel.ro makes it create multiple PT_LOADs. That implicit linker -# script however makes gold misbehave, first because it doesn't like that -# the linker script is given after crtbegin.o, and even past that, replaces -# the default section rules with those from the script instead of -# supplementing them. Which leads to a lib with a huge load of sections. -ifneq (OpenBSD,$(OS_TARGET)) -ifneq (WINNT,$(OS_TARGET)) -ifdef LD_IS_BFD -OS_LDFLAGS += $(topsrcdir)/toolkit/library/StaticXULComponents.ld -endif -endif -endif - ifdef _MSC_VER get_first_and_last = dumpbin -exports $1 | grep _NSModule@@ | sort -k 3 | sed -n 's/^.*?\([^@]*\)@@.*$$/\1/;1p;$$p' else