[Bug ld/18421] hppa/parisc ld: read-only segment has dynamic relocations

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

--- Comment #6 from Alan Modra amodra at gmail dot com ---
Created attachment 8319
  -- https://sourceware.org/bugzilla/attachment.cgi?id=8319action=edit
glibc fix

This should fix it, but I'm too rusty on hppa to be trusted.

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