Re: Need help on reducing linker issue

2010-11-22 Thread Alan Modra
On Mon, Nov 22, 2010 at 01:54:58PM +0100, Roger Jeurninck wrote:
 I'm running into build behaviour which might be caused by a
 non-deterministic GNU linker?!

This could be caused by ld reading uninitialised memory.  A tool like
valgrind is useful in tracking down such things.  What version of GNU
ld?

-- 
Alan Modra
Australia Development Lab, IBM

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


[Bug gas/12240] offset can't be used as label in Intel syntax

2010-11-22 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12240

--- Comment #1 from H.J. Lu hjl.tools at gmail dot com 2010-11-22 16:58:35 
UTC ---
None of the following operators can be used as label:

{ and, O_bit_and, 2 },
{ eq, O_eq, 2 },
{ ge, O_ge, 2 },
{ gt, O_gt, 2 },
{ le, O_le, 2 },
{ lt, O_lt, 2 },
{ mod, O_modulus, 2 },
{ ne, O_ne, 2 },
{ not, O_bit_not, 1 },
{ offset, O_offset, 1 },
{ or, O_bit_inclusive_or, 2 },
{ shl, O_left_shift, 2 },
{ short, O_short, 1 },
{ shr, O_right_shift, 2 },
{ xor, O_bit_exclusive_or, 2 },

-- 
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
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12253] New: .eh_frame_hdr not properly sorted with mixed .eh_frame encodings

2010-11-22 Thread ro at TechFak dot Uni-Bielefeld.DE
http://sourceware.org/bugzilla/show_bug.cgi?id=12253

   Summary: .eh_frame_hdr not properly sorted with mixed .eh_frame
encodings
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sources.redhat.com
ReportedBy: r...@techfak.uni-bielefeld.de
CC: ja...@redhat.com
  Host: i386-pc-solaris2.11
Target: i386-pc-solaris2.11
 Build: i386-pc-solaris2.11


I'm currently working to have the libgcc unwinder use dl_iterate_phdr which was
introduced in Solaris 11 build 135.  When trying a GCC mainline bootstrap with
CVS gas and ld, I saw that the 32-bit libffi unwind tests and all 32-bit
libjava
execution tests failed.

Ultimately, I found that both failures have the same root cause: gld creates a
.eh_frame_hdr section where the search table isn't properly sorted, which
breaks
unwind-dw2-fde-glibc.c which does a binary search of that table.

The problem can be illustrated with the following example:

$ cat func.cc
extern int i;

void
func (void)
{
  i++;
}
$ gcc -c -O2 -fPIC -Dfunc=datarel func.cc -o datarel.o
$ gcc -c -O2 -Dfunc=pcrel func.cc -o pcrel.o
$ elfdump -u datarel.o|grep enc
   code pointer encoding: 0x30 [ datarel ]
$ elfdump -u pcrel.o|grep enc
   code pointer encoding: 0x1b [ sdata4  pcrel ]
$ gcc -shared -o shlib.so datarel.o pcrel.o 
$ elfdump -u shlib.o
shlib.so: .eh_frame_hdr: index[1]: invalid sort order

Unwind Section: .eh_frame_hdr
Frame Header:
  Version: 1
  FramePtrEnc: [ sdata4  pcrel ] FramePtr: 0x1458
  FdeCntEnc:   [ udata4 ]FdeCnt: 2
  TableEnc:[ sdata4  datarel ] 
  Binary Search Table:
  InitialLocFdeLoc
0x03d00x149c
0x03c50x1470


I'm using the Solaris elfdump command since it both shows the search table,
which readelf cannot currently do, and even complains about the unsorted
.eh_frame_hdr.

While I can workaround the issue in libffi where the pcrel encoding only
occurs in a single handwritten assembler file (libffi/src/x86/sysv.S), this
should be fixed.

-- 
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
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12253] .eh_frame_hdr not properly sorted with mixed .eh_frame encodings

2010-11-22 Thread ro at TechFak dot Uni-Bielefeld.DE
http://sourceware.org/bugzilla/show_bug.cgi?id=12253

--- Comment #1 from Rainer Orth ro at TechFak dot Uni-Bielefeld.DE 2010-11-22 
17:52:07 UTC ---
Created attachment 5134
  -- http://sourceware.org/bugzilla/attachment.cgi?id=5134
testcase

-- 
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
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/4907] readelf doesn't dump .eh_frame_hdr section

2010-11-22 Thread ro at TechFak dot Uni-Bielefeld.DE
http://sourceware.org/bugzilla/show_bug.cgi?id=4907

Rainer Orth ro at TechFak dot Uni-Bielefeld.DE changed:

   What|Removed |Added

 CC||ro at TechFak dot
   ||Uni-Bielefeld.DE

--- Comment #5 from Rainer Orth ro at TechFak dot Uni-Bielefeld.DE 2010-11-22 
17:58:32 UTC ---
I could have used this facility while investigating PR ld/12253 and similar
Sun ld bugs.  Sun elfdump -u provides this facility and proved quite useful
here.

-- 
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
http://lists.gnu.org/mailman/listinfo/bug-binutils


Re: Need help on reducing linker issue

2010-11-22 Thread Alan Modra
On Mon, Nov 22, 2010 at 02:34:29PM +0100, Roger Jeurninck wrote:
 the version which we use is 2.17.

That's over 4 years old!  We are about to release 2.21.  I recall
fixing one uninitialised memory bug in that time.  There were likely
others too.

-- 
Alan Modra
Australia Development Lab, IBM

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