Last Comment Bug 675618 - Crash during startup on ARM when linked with recent GNU ld
: Crash during startup on ARM when linked with recent GNU ld
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Other Branch
: ARM Linux
: -- normal (vote)
: mozilla8
Assigned To: Mike Hommey [:glandium]
:
Mentors:
Depends on:
Blocks: 537857
  Show dependency treegraph
 
Reported: 2011-08-01 07:26 PDT by Mike Hommey [:glandium]
Modified: 2011-08-31 05:22 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
affected


Attachments
Work around recent ARM GNU ld bug with -fdata-sections and variables names starting with "stub" leading to crash (1.13 KB, patch)
2011-08-01 07:29 PDT, Mike Hommey [:glandium]
no flags Details | Diff | Review
Compile pldhash as C++ (7.32 KB, patch)
2011-08-08 09:04 PDT, Mike Hommey [:glandium]
benjamin: review+
Details | Diff | Review

Description Mike Hommey [:glandium] 2011-08-01 07:26:01 PDT
Thanks to this GNU ld bug: http://sourceware.org/bugzilla/show_bug.cgi?id=13049 , building with a recent GNU ld (>= 2.21.1 are affected for sure, not sure about older ones ; 2.19 is definitely not affected) on ARM leads to a crash.
Comment 1 Mike Hommey [:glandium] 2011-08-01 07:29:37 PDT
Created attachment 549783 [details] [diff] [review]
Work around recent ARM GNU ld bug with -fdata-sections and variables names starting with "stub" leading to crash

A workaround is to avoid using variables with a name starting with "stub".

js/src/jsdhash.cpp has the same variable name, but as it is compiled as C++, its name is mangled and thus doesn't start with "stub".
Comment 2 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-08-01 20:06:28 PDT
Can we use gold for this?
Comment 3 Mike Hommey [:glandium] 2011-08-01 23:03:10 PDT
(In reply to comment #2)
> Can we use gold for this?

It's not only a problem for us. It's a problem for those that use GNU ld on ARM.
Comment 4 Benjamin Smedberg [:bsmedberg] 2011-08-08 08:01:34 PDT
Comment on attachment 549783 [details] [diff] [review]
Work around recent ARM GNU ld bug with -fdata-sections and variables names starting with "stub" leading to crash

Since pldhash is jsdhash, can we just compile it as C++ and move on?
Comment 5 Mike Hommey [:glandium] 2011-08-08 09:04:18 PDT
Created attachment 551473 [details] [diff] [review]
Compile pldhash as C++

> Since pldhash is jsdhash, can we just compile it as C++ and move on?

We can.
Comment 7 :Ehsan Akhgari (busy, don't ask for review please) 2011-08-09 11:49:36 PDT
http://hg.mozilla.org/mozilla-central/rev/3d20269baeee
Comment 8 Daniel Holbert [:dholbert] 2011-08-09 12:55:08 PDT
For the record, this requires a clobber to build successfully, or else you'll get errors like:
> make[8]: *** No rule to make target `pldhash.c', needed by `pldhash.o'.  Stop.

(noting here in case any devs / projec-branch-owners encounter this error and do a bugzilla search to see if it's reported anywhere)

Note You need to log in before you can comment on or make changes to this bug.