[Bug gold/13597] New: Broken sysv-style hash table when --hash-style=both

2012-01-16 Thread kito at 0xlab dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=13597

 Bug #: 13597
   Summary: Broken sysv-style hash table when --hash-style=both
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
AssignedTo: i...@airs.com
ReportedBy: k...@0xlab.org
CC: ccout...@google.com
Classification: Unclassified


Created attachment 6159
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6159
Verify tools

The gold linker would generate broken sysv-style hash table when
--hash-style=both

attach is our verify tools, it's include pre-build so file, link by ld.gold and
ld.bfd. and the verify tool are only support 32-bit only now.


Tool usage
# ./elf-verify-hash libtest.bfd.so
verify '_edata'...pass
verify 'f'...pass
verify '_end'...pass
verify '__bss_start'...pass
verify '_init'...pass
verify '_fini'...pass
 
# pass mean the lookup result of gnu-style & sysv hash are same

# ./elf-verify-hash libtest.gold.so
verify 'f'...SysV-style: 0 GNU-style: 4
 ^^
# if lookup result are different, the tool will print the lookup result
verify '_edata'...pass
verify '_end'...SysV-style: 0 GNU-style: 6
verify '_init'...pass
verify '__bss_start'...pass
verify '_fini'...pass

-- 
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/13597] Broken sysv-style hash table when --hash-style=both

2012-01-16 Thread kito at 0xlab dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=13597

--- Comment #1 from Kito Cheng  2012-01-16 12:47:14 UTC 
---
Generate by gold --hash-style=sysv
SysV Hash table header
  nbuckets : 3
  buckets : 0x1216dc8
  chains : 0x1216dd4
buckets 0 : 
   sym : _edata
   sym : f
   sym : _Jv_RegisterClasses
   sym : _init
   sym : __gmon_start__
   sym : 
buckets 1 : 
   sym : _end
   sym : _fini
   sym : 
buckets 2 : 
   sym : __bss_start
   sym : __cxa_finalize
   sym : 

Generate by gold --hash-style=both
SysV Hash table header
  nbuckets : 3
  buckets : 0xf2eea8
  chains : 0xf2eeb4
buckets 0 : 
   sym : _init
   sym : _end
   sym : _edata
   sym : __cxa_finalize
   sym : __gmon_start__
   sym : 
buckets 1 : 
   sym : _fini
   sym : _Jv_RegisterClasses
   sym : 
buckets 2 : 
   sym : __bss_start
   sym : f
   sym :

-- 
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/13597] Broken sysv-style hash table when --hash-style=both

2012-01-16 Thread kito at 0xlab dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=13597

--- Comment #2 from Kito Cheng  2012-01-16 12:54:08 UTC 
---
Hey, it's seem the string table are rearranged after sysv-hash table generated.

Generate by gold --hash-style=sysv
SysV Hash table header
  nbuckets : 3
  buckets : 0x5a6dc8
  chains : 0x5a6dd4
buckets 0 : 
   sym : _edata (7)
^^^ index
   sym : f (6)
   sym : _Jv_RegisterClasses (5)
   sym : _init (2)
   sym : __gmon_start__ (1)
   sym :  (0)
buckets 1 : 
   sym : _end (9)
   sym : _fini (3)
   sym :  (0)
buckets 2 : 
   sym : __bss_start (8)
   sym : __cxa_finalize (4)
   sym :  (0)

Generate by gold --hash-style=both
SysV Hash table header
  nbuckets : 3
  buckets : 0x643ea8
  chains : 0x643eb4
buckets 0 : 
   sym : _init (7)
   sym : _end (6)
   sym : _edata (5)
   sym : __cxa_finalize (2)
   sym : __gmon_start__ (1)
   sym :  (0)
buckets 1 : 
   sym : _fini (9)
   sym : _Jv_RegisterClasses (3)
   sym :  (0)
buckets 2 : 
   sym : __bss_start (8)
   sym : f (4)
   sym :  (0)

-- 
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/13597] Broken sysv-style hash table when --hash-style=both

2012-01-17 Thread kito at 0xlab dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=13597

--- Comment #3 from Kito Cheng  2012-01-17 20:39:01 UTC 
---
Created attachment 6161
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6161
Reorder the output order between .gnu.hash and .hash

The root cause seem the gold::Dynobj::create_gnu_hash_table will
change the dynsym_index,

so this patch just reorder the symbol table generate order to
guarantee the gold::Dynobj::create_elf_hash_table get correct
dynsym_index.

However it's will change the section order between .hash and
.gnu.hash, any suggestion ?

-- 
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/13597] Broken sysv-style hash table when --hash-style=both

2012-01-18 Thread kito at 0xlab dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=13597

--- Comment #5 from Kito Cheng  2012-01-18 08:41:02 UTC 
---
Created attachment 6162
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6162
Reorder the output order between .gnu.hash and .hash v2

Add comment above creating hash table

Create GNU-sytle hash table first since string table index will 
change during creating GNU-sytle hash table. It's will break 
the SysV-sytle hash table since SysV-style hash table contain
out-of-date string table index.

-- 
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/13597] Broken sysv-style hash table when --hash-style=both

2012-01-20 Thread kito at 0xlab dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=13597

Kito Cheng  changed:

   What|Removed |Added

 CC||iant at google 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/12244] 416.gamess in SPEC CPU 2006 is miscompiled by LTO with gold

2012-01-20 Thread kito at 0xlab dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=12244

Kito Cheng  changed:

   What|Removed |Added

 CC||iant at google dot com,
   ||kito at 0xlab dot org

-- 
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/13322] ARM/Thumb interwork stubs should appear in some way in the symbol table

2012-01-20 Thread kito at 0xlab dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=13322

Kito Cheng  changed:

   What|Removed |Added

 CC||kito at 0xlab dot org

-- 
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/13597] Broken sysv-style hash table when --hash-style=both

2012-01-20 Thread kito at 0xlab dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=13597

Kito Cheng  changed:

   What|Removed |Added

 CC||kito at 0xlab dot org

-- 
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/13322] ARM/Thumb interwork stubs should appear in some way in the symbol table

2012-01-20 Thread kito at 0xlab dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=13322

Kito Cheng  changed:

   What|Removed |Added

 CC|kito at 0xlab dot org   |

-- 
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