[Bug gas/18423] call *foo@GOT+200(%eax) is misassembled

2015-05-16 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18423

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from H.J. Lu hjl.tools at gmail dot com ---
It is done on purpose:

  case BFD_RELOC_386_GOT32:
  case BFD_RELOC_X86_64_GOT32:
value = 0; /* Fully resolved at runtime.  No addend.  */
break;

-- 
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/18421] hppa/parisc ld: read-only segment has dynamic relocations

2015-05-16 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18421

Alan Modra amodra at gmail dot com changed:

   What|Removed |Added

 CC||amodra at gmail dot com

--- Comment #2 from Alan Modra amodra at gmail dot com ---
I tried to recreate this using an old hppa gcc I had (from 2001, it's been a
long time!)
gcc/xgcc -Bgcc/ -S conftest.c
~/build/gas/hppa-linux/gas/as-new -o conftest.o conftest.s
~/build/gas/hppa-linux/ld/ld-new -o conftest -z text -pie -o conftest
conftest.o

The link succeeded, no sign of dynamic relocations in .PARISC.unwind.  readelf
shows the expected R_PARISC_SEGREL32 relocs in conftest.o.

From a quick glance over elf32-hppa.c it looks to me like R_PARISC_SEGREL32
indeed should not be made dynamic.  So I'm wondering if debian hppa-ld has some
added features?

-- 
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/17689] PIE copy relocations handling broken with ld.bfd

2015-05-16 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17689

--- Comment #4 from cvs-commit at gcc dot gnu.org cvs-commit at gcc dot 
gnu.org ---
The master branch has been updated by H.J. Lu h...@sourceware.org:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=25070364b0ce33eed46aa5d78ebebbec6accec7e

commit 25070364b0ce33eed46aa5d78ebebbec6accec7e
Author: H.J. Lu hjl.to...@gmail.com
Date:   Sat May 16 07:00:21 2015 -0700

Don't generate PLT relocations for now binding

There is no need for PLT relocations with -z now. We can use GOT
relocations, which take less space, instead and replace 16-byte .plt
entres with 8-byte .plt.got entries.

bfd/

* elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
for now binding.
(elf_i386_allocate_dynrelocs): Use .plt.got section for now
binding.
* elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
section for now binding.
(elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
binding.

ld/testsuite/

* ld-i386/i386.exp: Run PR ld/17689 tests with -z now.
* ld-x86-64/x86-64.exp: Likewise
* ld-i386/pr17689now.rd: New file.
* ld-x86-64/pr17689now.rd: Likewise

-- 
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 gas/18423] New: call *foo@GOT+200(%eax) is misassembled

2015-05-16 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18423

Bug ID: 18423
   Summary: call *foo@GOT+200(%eax) is misassembled
   Product: binutils
   Version: 2.26 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

[hjl@gnu-tools-1 got-1]$ cat x.S
call *foo@GOT+200(%eax)
[hjl@gnu-tools-1 got-1]$ make
gcc -B./ -m32 -fno-lto-c -o x.o x.S
./objdump -dwr x.o

x.o: file format elf32-i386


Disassembly of section .text:

 .text:
   0:   ff 90 00 00 00 00   call   *0x0(%eax)   2: R_386_GOT32  foo
  ^^^ No addend for 200
[hjl@gnu-tools-1 got-1]$

-- 
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 binutils/18420] New: Segfault in readelf with --unwind option

2015-05-16 Thread duretsimon73 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18420

Bug ID: 18420
   Summary: Segfault in readelf with --unwind option
   Product: binutils
   Version: 2.25
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: duretsimon73 at gmail dot com
  Target Milestone: ---

Created attachment 8318
  -- https://sourceware.org/bugzilla/attachment.cgi?id=8318action=edit
ELF 32-bit MSB executable, IA-64, version 1, dynamically linked, interpreter
/usr/lib/hpux32/uld.so:/usr/lib/hpux32/dld.so, stripped, too many notes (256)

Hello,

the attached file cause a segfault on readelf when used with --unwind option
(or --all)

Here are information about the crash :


GNU readelf (GNU Binutils) 2.25.51.20150516
Copyright (C) 2015 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.


Program received signal SIGSEGV, Segmentation fault.
[--registers---]
RAX: 0x6ed001 
RBX: 0x6ed000 
RCX: 0x0 
RDX: 0x2d ('-')
RSI: 0x77bd3970 -- 0x0 
RDI: 0x77bd2740 -- 0xfbad2a84 
RBP: 0x0 
RSP: 0x7fffe400 -- 0xd ('\r')
RIP: 0x425b9f (unw_decode_p2_p5+255:  movzx  ebp,BYTE PTR [rbx])
R8 : 0x77bd3970 -- 0x0 
R9 : 0x77fc4700 (0x77fc4700)
R10: 0x97 
R11: 0x246 
R12: 0xaaab 
R13: 0x117db4 
R14: 0x6a70b8 -- 0x100100d8de0300 
R15: 0x34 ('4')
EFLAGS: 0x10206 (carry PARITY adjust zero sign trap INTERRUPT direction
overflow)
[-code-]
   0x425b93 unw_decode_p2_p5+243: nopDWORD PTR [rax+rax*1+0x0]
   0x425b98 unw_decode_p2_p5+248: learax,[rbx+0x1]
   0x425b9c unw_decode_p2_p5+252: test   r13,r13
= 0x425b9f unw_decode_p2_p5+255: movzx  ebp,BYTE PTR [rbx]
   0x425ba2 unw_decode_p2_p5+258: movrbx,rax
   0x425ba5 unw_decode_p2_p5+261: jne0x425be0 unw_decode_p2_p5+320
   0x425ba7 unw_decode_p2_p5+263: movecx,r13d
   0x425baa unw_decode_p2_p5+266: movzx  edx,bpl
[stack-]
| 0x7fffe400 -- 0xd ('\r')
0008| 0x7fffe408 -- 0x77883139 (printf+153:  addrsp,0xd8)
0016| 0x7fffe410 -- 0x7fffe4e0 -- 0x1 
0024| 0x7fffe418 -- 0x300018 
0032| 0x7fffe420 -- 0x7fffe4f0 -- 0x77003162 
0040| 0x7fffe428 -- 0x7fffe430 -- 0x43f859 -- 0x726f746f4d007270
('pr')
0048| 0x7fffe430 -- 0x43f859 -- 0x726f746f4d007270 ('pr')
0056| 0x7fffe438 -- 0x448ae3 -- 0x53444e5f52003150 ('P1')
[--]
Legend: code, data, rodata, value
Stopped reason: SIGSEGV
0x00425b9f in unw_decode_p2_p5 (dp=optimized out, code=optimized
out, arg=optimized out) at unwind-ia64.c:780
780 UNW_DEC_SPILL_MASK (P4, dp, arg);

gdb-peda$ bt
#0  0x00425b9f in unw_decode_p2_p5 (dp=optimized out, code=optimized
out, arg=optimized out) at unwind-ia64.c:780
#1  0x004118e9 in dump_ia64_unwind (aux=optimized out) at
readelf.c:6738
#2  ia64_process_unwind (file=0x77bd2740 _IO_2_1_stdout_) at
readelf.c:7019
#3  0x00423e63 in process_unwind (file=0x67f010) at readelf.c:8435
#4  process_object (file_name=file_name@entry=0x7fffeb80 ./pown/file,
file=file@entry=0x67f010) at readelf.c:16015
#5  0x00401d41 in process_file (file_name=0x7fffeb80 ./pown/file)
at readelf.c:16397
#6  main (argc=0x3, argv=0x7fffe898) at readelf.c:16468
#7  0x77854800 in __libc_start_main () from /usr/lib/libc.so.6
#8  0x00401f19 in _start ()

Best regards,
Tosh

-- 
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/18421] hppa/parisc ld: read-only segment has dynamic relocations

2015-05-16 Thread deller at gmx dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=18421

--- Comment #1 from Helge Deller deller at gmx dot de ---
This bug shows up when trying to compile iceweasel on debian/hppa with the -pie
compiler option. Full log is here:
http://buildd.debian-ports.org/status/fetch.php?pkg=iceweaselarch=hppaver=38.0-1stamp=1431559094

-- 
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/18421] hppa/parisc ld: read-only segment has dynamic relocations

2015-05-16 Thread dave.anglin at bell dot net
https://sourceware.org/bugzilla/show_bug.cgi?id=18421

--- Comment #4 from dave.anglin at bell dot net ---
On 2015-05-16, at 7:05 AM, deller at gmx dot de wrote:

 Output of:
 readelf -r conftest
 
 Relocation section '.rela.PARISC.unwind' at offset 0x140 contains 2 entries:
 Offset InfoTypeSym.Value  Sym. Name + Addend
   0131 R_PARISC_SEGREL32    .text + 0
 0004  0131 R_PARISC_SEGREL32    .text + 18

Possibly, this has to do with following lines in emulparams/hppalinux.sh:

OTHER_READONLY_SECTIONS=
  .PARISC.unwind ${RELOCATING-0} : { *(.PARISC.unwind) }

--
John David Anglin   dave.ang...@bell.net

-- 
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/18421] hppa/parisc ld: read-only segment has dynamic relocations

2015-05-16 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18421

Alan Modra amodra at gmail dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #5 from Alan Modra amodra at gmail dot com ---
I built myself a new toolchain.  The problem relocations in the binary are
these:

0670  0d02 R_PARISC_DIR21L10f4   $global$ + 0
0674  0d06 R_PARISC_DIR14R10f4   $global$ + 0
0b98  0b41 R_PARISC_PLABEL32  08a4   main + 0
0b9c  0741 R_PARISC_PLABEL32    
__libc_start_main@GLIBC_2.2 + 0
0ba0  0241 R_PARISC_PLABEL32  0aa4   __libc_csu_fini + 0
0ba4  0841 R_PARISC_PLABEL32  09f8   __libc_csu_init + 0

They come from Scrt1.o which looks like it isn't PIC.  Not a linker problem,
but a glibc one.

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