Closed Bug 628988 Opened 13 years ago Closed 13 years ago

Fix-up symbol tables after elfhack

Categories

(Firefox Build System :: General, defect)

All
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla2.0b11

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(2 files)

elfhack currently slightly breaks symbol tables, though not in a very impacting way: mostly, section references are wrong, and some symbols related to sections might have the wrong address. These information are normally not used by other software, but it would still be better if the symbol table was fixed up.
This forces the test binary to reference and call a symbol from the library, in case future changes entirely break the symbol table. Currently, the symbol table is not broken enough that it is a problem.
Attachment #507114 - Flags: review?(tglek)
Attachment #507114 - Flags: review?(tglek) → review+
I'm not sure but I wonder if this has to do with the following braking my mozilla 64-bit builds in Ubuntu (gcc-4.4.real (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5): 

/home/bengt-erik/mozilla-central/src/build/unix/elfhack/test.c:116: warning: (this will be reported only once per input file)
c++ -o elfhack -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long -fno-strict-aliasing -fshort-wchar -pthread -pipe -fexceptions  -DNDEBUG -DTRIMMED -Os -freorder-blocks -fomit-frame-pointer   host_elf.o host_elfhack.o  
c++ -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long -fno-strict-aliasing -fshort-wchar -pthread -pipe -fexceptions  -DNDEBUG -DTRIMMED -Os -freorder-blocks -fomit-frame-pointer  -fPIC -shared -Wl,-z,defs -Wl,-h,test.so -o test.so test.o
rm -f test.so.bak
/home/bengt-erik/mozilla-central/src/ff-opt/build/unix/elfhack/elfhack -b test.so
make[6]: *** [test.so] Segmenteringsfel //Segmentaion fault//
make[6]: *** Tar bort filen "test.so" //Removing file "test.so"//
make[6]: Lämnar //Leave// katalogen "/home/bengt-erik/mozilla-central/src/ff-opt/build/unix/elfhack"
make[5]: *** [libs] Fel 2 /Error 2/
make[5]: Lämnar //Leave// katalogen "/home/bengt-erik/mozilla-central/src/ff-opt/build/unix"
make[4]: *** [libs] Fel 2 //Error 2//

However, 32-bit builds in Fedora 14 (gcc 4.5.1) works fine.
More likely to be related to bug 628618
Yes, I agree, it is bug 628618.
Attachment #507402 - Flags: review?(tglek) → review+
Attachment #507402 - Flags: approval2.0?
This fixes the symbol tables to have updated values wrt what elfhack changes in the binaries. It was pushed to try in ceae7158f7f6.
Attachment #507402 - Flags: approval2.0? → approval2.0+
Attachment #507114 - Flags: approval2.0?
Attachment #507114 - Flags: approval2.0? → approval2.0+
http://hg.mozilla.org/mozilla-central/rev/abb349de09a0
http://hg.mozilla.org/mozilla-central/rev/47939414eff6
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b11
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: