#
# GNU binutils >= 2.36 no longer merges duplicate input sections
# into a common output one, as a result they end up in multiple instances.
# This can lead to unpredictable behavior in practice.
#
# Fortunately this specific 10-years old linker script is no longer needed nowadays,
# since the modern bfd linker works just fine without it.
#
diff -Nrup mozilla/toolkit/library/StaticXULComponents.ld mozilla-OK/toolkit/library/StaticXULComponents.ld
--- mozilla/toolkit/library/StaticXULComponents.ld 2022-06-08 22:10:29.000000000 +0300
+++ mozilla-OK/toolkit/library/StaticXULComponents.ld 1970-01-01 03:00:00.000000000 +0300
@@ -1,7 +0,0 @@
-SECTIONS {
- .data.rel.ro : {
- PROVIDE_HIDDEN(__start_kPStaticModules = .);
- *(kPStaticModules)
- PROVIDE_HIDDEN(__stop_kPStaticModules = .);
- }
-}
diff -Nrup mozilla/toolkit/library/moz.build mozilla-OK/toolkit/library/moz.build
--- mozilla/toolkit/library/moz.build 2023-11-07 00:01:28.000000000 +0300
+++ mozilla-OK/toolkit/library/moz.build 2023-11-29 20:50:21.534599238 +0300
@@ -52,17 +52,6 @@ def Libxul(name, output_category=None):
]
RCINCLUDE = '/toolkit/library/xulrunner.rc'
- # 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.
- if CONFIG['OS_TARGET'] not in ('OpenBSD', 'WINNT') and \
- CONFIG['LINKER_KIND'] == 'bfd':
- LDFLAGS += [TOPSRCDIR + '/toolkit/library/StaticXULComponents.ld']
-
Libxul_defines()
if CONFIG['MOZ_NEEDS_LIBATOMIC']: