If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

elfhack fails with llvm LTO

RESOLVED FIXED in mozilla2.0b12

Status

()

Core
Build Config
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: espindola, Assigned: glandium)

Tracking

unspecified
mozilla2.0b12
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

Created attachment 514253 [details]
build/unix/elfhack/test.o

A build with both LTO and elfhack fails at

/home/espindola/tmpfs/objdir-lto-clang/build/unix/elfhack/elfhack -b test.so
test.so: No gain. Aborting
Created attachment 514254 [details]
build/unix/elfhack/test.so
(Assignee)

Comment 2

7 years ago
Turns out it's the same problem as the other bug
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 635961
(Assignee)

Comment 3

7 years ago
I have to retract, it looks like it's different. If I remove the relro section, it still says No gain.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
(Assignee)

Comment 4

7 years ago
Ah, this is an interesting case where test.so is too optimized and doesn't exhibit the patterns that are expected to show up from the source... In the present case, there are no relocations...
(Assignee)

Updated

7 years ago
Assignee: nobody → mh+mozilla
Created attachment 514295 [details] [diff] [review]
Use -O0 and pass LDFLAGS
(Assignee)

Comment 6

7 years ago
Created attachment 514296 [details] [diff] [review]
Avoid elfhack failure with llvm

There are two different things mixed in this patch, but they are two one-liners:
- the rule to build the dummy binary works for gcc but not for clang because of missing flags
- the test library is over-optimized by clang/gold, and ends up not containing most of the code from test.c, making the testcase not contain what we expect it to. Forcing to build at the lowest optimization level avoids surprises.
Attachment #514296 - Flags: review?(khuey)
(Assignee)

Updated

7 years ago
Attachment #514295 - Attachment is obsolete: true
Attachment #514296 - Flags: review?(khuey) → review+
(Assignee)

Comment 7

7 years ago
Comment on attachment 514296 [details] [diff] [review]
Avoid elfhack failure with llvm

See comment 6. No risk.
Attachment #514296 - Flags: approval2.0?
Comment on attachment 514296 [details] [diff] [review]
Avoid elfhack failure with llvm

if this causes so much as a blip on the tinderbox radar, it comes out until after 4.
Attachment #514296 - Flags: approval2.0? → approval2.0+
(Assignee)

Comment 9

7 years ago
http://hg.mozilla.org/mozilla-central/rev/494662b968c2
Status: REOPENED → RESOLVED
Last Resolved: 7 years ago7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b12
You need to log in before you can comment on or make changes to this bug.