failure to link libxul, sections overlapping with ld script

RESOLVED FIXED in mozilla34

Status

defect
RESOLVED FIXED
5 years ago
Last year

People

(Reporter: gaston, Assigned: gaston)

Tracking

unspecified
mozilla34
x86_64
OpenBSD
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Assignee

Description

5 years ago
Since some days, (probably because of code bloat/addition) i cant link libxul anymore, ld blows with:

    INPUT("../StaticXULComponentsEnd/StaticXULComponentsEnd.o")

/usr/bin/ld: section .text [000000000082b9d0 -> 0000000002d16c33] overlaps section .data.rel.ro [000000000177de90 -> 000000000177e057]
clang-3.5: error: linker command failed with exit code 1 (use -v to see invocation)
/src/mozilla-central/config/rules.mk:873: recipe for target 'libxul.so.1.0' failed


happens both with clang and gcc 4.8, still using our beloved crusty ld 2.15. Yeah, i know.
removing the linker script added in 938437 seem to workaround the issue...

+ifneq (OpenBSD,$(OS_TARGET))
 ifdef LD_IS_BFD
 EXTRA_DSO_LDOPTS += $(topsrcdir)/toolkit/library/StaticXULComponents.ld
 endif
+endif
Assignee

Updated

5 years ago
Depends on: 938437
Assignee

Comment 1

5 years ago
Mike, any opinion on this ? Since i have to deal with old binutils, would that be an appropriate workaround ?
Flags: needinfo?(mh+mozilla)
What does readelf -sl libxul.so look with that workaround?
Flags: needinfo?(mh+mozilla)
Assignee

Comment 3

5 years ago
output is a bit huge, so here's a logfile gzipped.
What it's doing is quite horrible, but at least, it's not as bad as what a more recent BFD ld does on linux...
Assignee

Comment 5

5 years ago
I could make it check on the ld/binutils version, but i can only test 2.15 on OpenBSD, so lets asssume OpenBSD for now.
Attachment #8476500 - Flags: review?(mh+mozilla)
Attachment #8476500 - Flags: review?(mh+mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/7cb633f637af
Assignee: nobody → landry
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34

Updated

Last year
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.