Bug 515700
Summary: | Unable to compile due to symbol defined in discarded section | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jan Horak <jhorak> | ||||
Component: | binutils | Assignee: | Nick Clifton <nickc> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | urgent | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | rawhide | CC: | aph, caillon, dcantrell, drepper, jakub, jan.kratochvil, jason, langel, nickc, notting, pnemade, stransky | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-08-06 22:22:49 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 507676, 515772 | ||||||
Attachments: |
|
Description
Jan Horak
2009-08-05 12:34:46 UTC
Same problem for openjdk: http://koji.fedoraproject.org/koji/taskinfo?taskID=1583668 This seems to be a problem with strip -g on libxpcomglue_s.a and STB_GNU_UNIQUE objects. At least, when libxpcomglue_s.a isn't stripped, it works fine, when it is, it reports these errors. I'll attach a testcase, with: binutils-2.19.51.0.14-30.fc12.x86_64 elfutils-0.142-1.fc12.x86_64 gcc-4.4.1-3.x86_64 I get: First link lib.so First strip -g Second link `nsISupports::COMTypeInfo<int>::kIID' referenced in section `.data.rel.ro' of lib.a(libnsGenericFactory.o): defined in discarded section `.rodata._ZN11nsISupports11COMTypeInfoIiE4kIIDE[nsISupports::COMTypeInfo<int>::kIID]' of lib.a(libnsGenericFactory.o) `nsISupports::COMTypeInfo<int>::kIID' referenced in section `.data.rel.ro' of lib.a(libnsGenericFactory.o): defined in discarded section `.rodata._ZN11nsISupports11COMTypeInfoIiE4kIIDE[nsISupports::COMTypeInfo<int>::kIID]' of lib.a(libnsGenericFactory.o) `nsISupports::COMTypeInfo<int>::kIID' referenced in section `.data.rel.ro' of lib.a(libnsThreadUtils.o): defined in discarded section `.rodata._ZN11nsISupports11COMTypeInfoIiE4kIIDE[nsISupports::COMTypeInfo<int>::kIID]' of lib.a(libnsThreadUtils.o) collect2: ld returned 1 exit status ls: cannot access lib.so: No such file or directory First eu-strip -g ./test.sh: line 19: 22183 Segmentation fault eu-strip -g lib.a Third link lib.so Second strip -g Fourth link lib.so ./test.sh: line 39: 22328 Segmentation fault eu-strip -g lib.a Created attachment 356414 [details] gnu_unique_test.tar.bz2 Marked as Alpha 11 blocker. Simpler testcase: cat > x.C <<\EOF template <class T> struct A { static const int a; }; template <class T> const int A<T>::a = 16; #ifdef BAR # define foo bar #endif const int *foo (int i) { static const int *t[] = { &A<int>::a, __null }; return t[i]; } EOF g++ -fpic -c -O2 -o x.o x.C g++ -fpic -c -O2 -o y.o x.C -DBAR gcc -shared -nostdlib -o x.so x.o y.o; echo $? cp -a y.o z.o strip -g z.o gcc -shared -nostdlib -o x.so x.o z.o; echo $? And one where gcc isn't involved: cat > x.s <<\EOF .section .data.rel.ro,"aw",@progbits .align 16 .type _ZZ3fooiE1t, @object .size _ZZ3fooiE1t, 16 _ZZ3fooiE1t: .quad _ZN1AIiE1aE .quad 0 .weak _ZN1AIiE1aE .section .rodata._ZN1AIiE1aE,"aG",@progbits,_ZN1AIiE1aE,comdat .align 4 .type _ZN1AIiE1aE, @gnu_unique_object .size _ZN1AIiE1aE, 4 _ZN1AIiE1aE: .long 16 .section .note.GNU-stack,"",@progbits EOF sed 's/foo/bar/g' x.s > y.s as -o x.o x.s as -o y.o y.s ld -shared -nostdlib -o x.so x.o y.o; echo $? cp -a y.o z.o strip -g z.o ld -shared -nostdlib -o x.so x.o z.o; echo $? Fixed binutils built in rawhide, now xulrunner needs to be rebuilt with those binutils. build is: binutils-2.19.51.0.14-31 This appears to be tagged for the alpha, closing. |