[Bug ld/16787] LD gives wrong error messages

2014-04-08 Thread ma.jiang at zte dot com.cn
https://sourceware.org/bugzilla/show_bug.cgi?id=16787

--- Comment #9 from ma.jiang at zte dot com.cn ---
Created attachment 7541
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7541&action=edit
glibc libs

-- 
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/16787] LD gives wrong error messages

2014-04-08 Thread ma.jiang at zte dot com.cn
https://sourceware.org/bugzilla/show_bug.cgi?id=16787

--- Comment #8 from ma.jiang at zte dot com.cn ---
(In reply to Nick Clifton from comment #6)
> Hi Ma,

> Please could you upload the libc.a and libg.a files that you are
> using.  I have tried to find some on the net, but so far I have failed. :-(
> Cheers
> Nick

Hi Nick,
   I have uploaded the two libs. You could also use the testcase uploaded by
H.J. Lu, which does not need a special libc. Sorry to waste so much time on
these trivial things. I thought glibc was easy to get...

-- 
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/16787] LD gives wrong error messages

2014-04-08 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16787

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

-- 
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/16787] LD gives wrong error messages

2014-04-08 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16787

H.J. Lu  changed:

   What|Removed |Added

 Status|WAITING |NEW

-- 
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/16787] LD gives wrong error messages

2014-04-08 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16787

H.J. Lu  changed:

   What|Removed |Added

   Attachment #7512|0   |1
is obsolete||
   Attachment #7523|0   |1
is obsolete||

--- Comment #7 from H.J. Lu  ---
Created attachment 7540
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7540&action=edit
A testcase

[hjl@gnu-6 pr16787]$ make
gcc -B./ -g   -c -o t1.o t1.c
gcc -B./ -g   -c -o t3.o t3.c
ld -r -o t13.o t1.o t3.o
gcc -B./ -g   -c -o tt.o tt.c
gcc -B./ -g   -c -o t2.o t2.c
gcc -B./  -o x t13.o tt.o t2.o
t13.o: In function `t1':
/export/home/hjl/bugs/binutils/pr16787/t1.c:2: warning: foobar
t13.o: In function `t3':
(.text+0x1a): undefined reference to `udf'
collect2: error: ld returned 1 exit status
make: *** [x] Error 1
[hjl@gnu-6 pr16787]$

-- 
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/16821] x86_64 PE/COFF: ld truncates addresses of symbols from linker scripts to 32 bit

2014-04-08 Thread yselkowitz at cygwin dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16821

Cygwin/X maintainer  changed:

   What|Removed |Added

 CC||yselkowitz at cygwin dot com

-- 
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/16821] New: x86_64 PE/COFF: ld truncates addresses of symbols from linker scripts to 32 bit

2014-04-08 Thread corinna at vinschen dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=16821

Bug ID: 16821
   Summary: x86_64 PE/COFF: ld truncates addresses of symbols from
linker scripts to 32 bit
   Product: binutils
   Version: 2.25 (HEAD)
Status: NEW
  Severity: critical
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: corinna at vinschen dot de

I just encountered a serious bug while building the Cygwin DLL for
x86_64-pc-cygwin, which I never noticed before (*blush*):

The Cygwin DLL is built to be located at the address 0x1:8004,
so it's not located in the lower 32 bits area, but just a tad bit
higher.  It's also using its own linker script.

When I tried to access __image_base__ from the DLL itself, I found
to my surprise that __image_base__ was not 0x1:8004, but instead
0x0:8004000, so it's truncated to 32 bit.

The only time __image_base__ occurs in the script is to compute the
start of the .text segment:

  .text  __image_base__ + __section_alignment__  :
  { ... }

Further investigation showed that four more symbols were affected:

  .rdata ALIGN(__section_alignment__) :
  {
*(.rdata)
*(SORT(.rdata$*))
*(.rdata_cygwin_nocopy)
__rt_psrelocs_start = .;
*(.rdata_runtime_pseudo_reloc)
__rt_psrelocs_end = .;

  }
  __rt_psrelocs_size = __rt_psrelocs_end - __rt_psrelocs_start;
  ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
  __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
  ___RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;
  __RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;

In this piece of the script, the symbols ___RUNTIME_PSEUDO_RELOC_LIST__
and __RUNTIME_PSEUDO_RELOC_LIST__ have an address which is truncated
to 32 bit.  If I change this code to

  .rdata ALIGN(__section_alignment__) :
  {
*(.rdata)
*(SORT(.rdata$*))
*(.rdata_cygwin_nocopy)
___RUNTIME_PSEUDO_RELOC_LIST__ = .;
__RUNTIME_PSEUDO_RELOC_LIST__ = .;
*(.rdata_runtime_pseudo_reloc)
___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
__RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
  }

the address of the two symbols is correct.

Additionally there are two symbols which are defined with the ABSOLUTE
macro:

_SYM (_cygheap_start) = ABSOLUTE(.);
[...]
_SYM (_cygheap_end) = ABSOLUTE(.);

Both symbols have the correct address, but again truncated to 32 bit.
If I change the script to not use ABSOLUTE

_SYM (_cygheap_start) = .;
[...]
_SYM (_cygheap_end) = .;

the 64 bit addresses are correct.

So it appears that during certain computations in ld, the addresses of
symbols are truncated to 32 bit values.

Given that x86_64 Cygwin executables are located at 0x1:0004 by
default, this means that *ALL* Cygwin executables are affected by this bug.

Any chance to fix this ASAP?


Thanks,
Corinna

-- 
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/16787] LD gives wrong error messages

2014-04-08 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16787

--- Comment #6 from Nick Clifton  ---
Hi Ma,

  Please could you upload the libc.a and libg.a files that you are using.  I
have tried to find some on the net, but so far I have failed. :-(

Cheers
  Nick

-- 
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/16787] LD gives wrong error messages

2014-04-08 Thread ma.jiang at zte dot com.cn
https://sourceware.org/bugzilla/show_bug.cgi?id=16787

--- Comment #5 from ma.jiang at zte dot com.cn ---
Hi Nick,
   I'm using the 2.24 release.I tried to get the current mainline sources, but
I found it was too hart to get them(when working in windows and behind a stupid
firewall)...
   The toolchain you used have no definitions for "getgrgid", that is the
reason why you do not get the same error as me.Could you find a glibc
toolchain? As my first mail said, the warning for "getgrgid" is critical. I can
reproduce this bug on gcc4.5.2+binutils2.21+glibc2.13 and
gcc4.8.2+binutils2.24+glibc2.18.

-- 
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/16788] Gold produces unbootable Linux kernel

2014-04-08 Thread markus at trippelsdorf dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=16788

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #20 from Markus Trippelsdorf  ---
Undebuggable heisenbug. Closing.

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