[Bug gold/14533] New: large (88M) ICC compiled .obj files inside .a archive confuse / error the gold linker

2012-08-30 Thread bsergean at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14533

 Bug #: 14533
   Summary: large (88M) ICC compiled .obj files inside .a archive
confuse / error the gold linker
   Product: binutils
   Version: 2.23 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
AssignedTo: i...@airs.com
ReportedBy: bserg...@gmail.com
CC: ccout...@google.com
Classification: Unclassified


I'm trying to port some of my company code to work with the gold linker.
I got the gcc build working perfectly, but when building with icc-12 (intel
compiler), I get an error when linking something that links against a static
archive (.a) that contains one object (.o) file with some section that are
apparently larger than the spec. That .o is 88M large, and is built with
debugging symbols.

This might be an ICC bug, but the BFD linker happily link the resulting binary,
so I wonder if this is rather a gold bug / improvement.

How can I move forward with that ? I don't have the error log right now (will
post it tomorrow), but can I do some operations (with say objdump) on that .o
file so you guys can troubleshoot the problem ?

Best,
- Benjamin

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/14533] large (88M) ICC compiled .obj files inside .a archive confuse / error the gold linker

2012-08-30 Thread bsergean at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14533

Benjamin Sergeant  changed:

   What|Removed |Added

 Target||x86_64-pc-linux-gnu

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10955] Invalid LTOFF22X -> GPREL22 relaxation

2012-08-30 Thread bsergean at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10955

Benjamin Sergeant  changed:

   What|Removed |Added

 CC||bsergean at gmail dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/14533] large (88M) ICC compiled .obj files inside .a archive confuse / error the gold linker

2012-08-30 Thread bsergean at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14533

Benjamin Sergeant  changed:

   What|Removed |Added

 CC||bsergean at gmail dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/14533] large (88M) ICC compiled .obj files inside .a archive confuse / error the gold linker

2012-08-31 Thread bsergean at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14533

--- Comment #2 from Benjamin Sergeant  2012-08-31 
17:14:34 UTC ---
1) If I strip the .obj file the error seems to go away.

2) Here's the error.

/tmp/gold-dev/bin/ld: libsomething.a(AnObjectFile.o): invalid string offset
25281974 >= 48 for section `.shstrtab'
/tmp/gold-dev/bin/ld: libsomething.a(AnObjectFile.o): invalid string offset 79
>= 48 for section `(null)'
/tmp/gold-dev/bin/ld: libsomething.a(AnObjectFile.o): invalid string offset
25281974 >= 48 for section `.shstrtab'
/tmp/gold-dev/bin/ld: libsomething.a(AnObjectFile.o): invalid string offset 79
>= 48 for section `(null)'
libsomething.a: member libsomething.a(AnObjectFile.o) in archive is not an
object
~   
What's funny is that I don't get that last error "is not an object" if I try to 
make a shared lib from just that object.

So maybe there's something weird with how (1) we create the .a (ranlib) or with
how gold parse the .a.

Here's what readelf says about that symbol.

ELF Header:
  Magic:   7f 45 4c 46 02 01 01 03 00 00 00 00 00 00 00 00 
  Class: ELF64
  Data:  2's complement, little endian
  Version:   1 (current)
  OS/ABI:UNIX - Linux
  ABI Version:   0
  Type:  REL (Relocatable file)
  Machine:   Advanced Micro Devices X86-64
  Version:   0x1
  Entry point address:   0x0
  Start of program headers:  0 (bytes into file)
  Start of section headers:  85864776 (bytes into file)
  Flags: 0x0
  Size of this header:   64 (bytes)
  Size of program headers:   0 (bytes)
  Number of program headers: 0
  Size of section headers:   64 (bytes)
  Number of section headers: 0 (92838)
  Section header string table index: 65535 (66722)


If I tries to make a shared lib from that object file, here's what I get

/tmp$ /tmp/gold-dev/bin/ld.gold -shared -o /tmp/caca.so AnObjectFile.o |& head
/tmp/gold-dev/bin/ld.gold: error: AnObjectFile.o: section name section has
wrong type: 4
/tmp/gold-dev/bin/ld.gold: error: AnObjectFile.o: symbol table name section has
wrong type: 4
/tmp/gold-dev/bin/ld.gold: error: AnObjectFile.o: bad section name offset for
section 1: 79
/tmp/gold-dev/bin/ld.gold: error: AnObjectFile.o: extended index for symbol
70238 out of range: 92838
/tmp/gold-dev/bin/ld.gold: error: AnObjectFile.o: extended index for symbol
70239 out of range: 92839
/tmp/gold-dev/bin/ld.gold: error: AnObjectFile.o: extended index for symbol
70240 out of range: 92840
/tmp/gold-dev/bin/ld.gold: error: AnObjectFile.o: extended index for symbol
70241 out of range: 92841


How can I help further with troubleshooting that ?
Can I add some debugging option to the linker ?
Can I extract just a piece of that .obj file, or obfuscate it so I can
upload / attach it to Bugzilla ?

Thanks !!

ps:
I haven't done any serious benchmark yet on the impact of linking with gold but
on a large lib that we have (330M), linking with gold was 2.5x faster (5s to
2s), and we have many of those libs.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/14533] large (88M) ICC compiled .obj files inside .a archive confuse / error the gold linker

2012-08-31 Thread bsergean at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14533

--- Comment #4 from Benjamin Sergeant  2012-08-31 
17:42:16 UTC ---
Found that when I googled for "large section ICC bug" 
http://sourceware.org/bugzilla/show_bug.cgi?id=5900

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/14533] large (88M) ICC compiled .obj files inside .a archive confuse / error the gold linker

2012-08-31 Thread bsergean at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14533

--- Comment #8 from Benjamin Sergeant  2012-08-31 
18:26:36 UTC ---
OK. So basically we're out of luck and we need to fix the program that
generated that .obj file, right ?

I'm gonna dig in our code base and see how that .obj file is generated. Thanks
for all the help !

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/15910] New: Support --default-symver in the gold linker

2013-08-29 Thread bsergean at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15910

Bug ID: 15910
   Summary: Support --default-symver in the gold linker
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ian at airs dot com
  Reporter: bsergean at gmail dot com
CC: ccoutant at google dot com

Hi there,

Are there any plans on supporting the BFD --default-symver option in gold ?
I cannot build our code base with gold right now because that feature is
missing
and some module in our code base requires that option.

Thanks !
- Benjamin

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils