[Bug ld/30743] FAIL: ld-elf/now-3 for hppa64-*-linux* target

2024-04-13 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30743

--- Comment #8 from John David Anglin  ---
Created attachment 15463
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15463=edit
Patch to fix flags on hppa64-linux

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30743] FAIL: ld-elf/now-3 for hppa64-*-linux* target

2024-04-12 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30743

--- Comment #6 from John David Anglin  ---
Probably, the issue is caused by this code in elf64-hppa.c:

  /* Force DT_FLAGS to always be set.
 Required by HPUX 11.00 patch PHSS_26559.  */
  if (!add_dynamic_entry (DT_FLAGS, (info)->flags))
return false;

Maybe this should be limited to HPUX?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31503] [hppa] Unsupported 14-bit PA 2.0 relocations for 32-bit (narrow) mode (elf32-hppa.c)

2024-04-01 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31503

John David Anglin  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #15 from John David Anglin  ---
Fixed on trunk.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31503] [hppa] Unsupported 14-bit PA 2.0 relocations for 32-bit (narrow) mode (elf32-hppa.c)

2024-04-01 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31503

--- Comment #13 from John David Anglin  ---
Patch:
https://sourceware.org/pipermail/binutils/2024-April/133261.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31503] [hppa] Unsupported 14-bit PA 2.0 relocations for 32-bit (narrow) mode (elf32-hppa.c)

2024-03-29 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31503

John David Anglin  changed:

   What|Removed |Added

  Attachment #15439|0   |1
is obsolete||

--- Comment #12 from John David Anglin  ---
Created attachment 15446
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15446=edit
Patch

Fixes alignment of .data.

Maybe the alignment for .data could be done in elf.sc so a new script
isn't required?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31503] [hppa] Unsupported 14-bit PA 2.0 relocations for 32-bit (narrow) mode (elf32-hppa.c)

2024-03-28 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31503

John David Anglin  changed:

   What|Removed |Added

 CC||amodra at gmail dot com

--- Comment #6 from John David Anglin  ---
This fails to align $global$ value under all circumstances:

diff --git a/ld/emulparams/hppalinux.sh b/ld/emulparams/hppalinux.sh
index 7892df9130d..f302606360a 100644
--- a/ld/emulparams/hppalinux.sh
+++ b/ld/emulparams/hppalinux.sh
@@ -25,7 +25,7 @@ NOP=0x08000240
 START="_start"
 OTHER_READONLY_SECTIONS="
   .PARISC.unwind ${RELOCATING-0} : { *(.PARISC.unwind) }"
-DATA_START_SYMBOLS='PROVIDE ($global$ = .);'
+DATA_START_SYMBOLS='PROVIDE ($global$ = (. + 7) & ~ 7);'
 DATA_PLT=
 PLT_BEFORE_GOT=
 GENERATE_SHLIB_SCRIPT=yes

Will try aligning .data.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31503] [hppa] Unsupported 14-bit PA 2.0 relocations for 32-bit (narrow) mode (elf32-hppa.c)

2024-03-27 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31503

John David Anglin  changed:

   What|Removed |Added

  Attachment #15436|0   |1
is obsolete||

--- Comment #5 from John David Anglin  ---
Created attachment 15439
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15439=edit
Patch

This version fixes corrects previous patch.

There still be issues with $global$ not being 8-byte aligned.  It is
provided by: DATA_START_SYMBOLS='PROVIDE ($global$ = .);'

I added a hack to elf_hppa_fake_sections to increase alignment of the
.data section to 8 bytes minimum.  I now see an alignment of 8 for .data
in .o files.  But the alignment of .data may get reduced to 4 in final
link when a .o file contains comdat groups.  Not sure why.  Is there a
better way to align .data?

This doesn't happen if I align .data to 8 in elf.sc.  But this would
affect all users.  I guess I could use a separate script for 32-bit
elf hppa but I would like to avoid this if possible.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31503] [hppa] Unsupported 14-bit PA 2.0 relocations for 32-bit (narrow) mode (elf32-hppa.c)

2024-03-25 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31503

John David Anglin  changed:

   What|Removed |Added

  Attachment #15432|0   |1
is obsolete||

--- Comment #4 from John David Anglin  ---
Created attachment 15436
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15436=edit
Patch

Update original patch to check whether symbolic displacements are valid.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31503] [hppa] Unsupported 14-bit PA 2.0 relocations for 32-bit (narrow) mode (elf32-hppa.c)

2024-03-23 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31503

--- Comment #3 from John David Anglin  ---
Created attachment 15432
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15432=edit
Patch

Fixes testcase.

I think elf64-hppa.c is also broken in a similar way.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31503] [hppa] Unsupported 14-bit PA 2.0 relocations for 32-bit (narrow) mode (elf32-hppa.c)

2024-03-23 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31503

--- Comment #2 from John David Anglin  ---
Created attachment 15431
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15431=edit
Assembly file

Attached is an assembly file demonstrating the problem.  It's derived
from the assembly output at -O1 for the gcc.c-torture/execute/packed-aligned.c
test.

I changed this code

addil LR'g_expect-$global$,%r27
fstd %fr22,RR'g_expect-$global$(%r1)

in main to

addil LR'g_expect-$global$,%r27
fstd %fr22,RR'g_expect-$global$(%r1)
ldo RR'g_expect-$global$(%r1),%r1
fstd %fr22,0(%r1)

so I could see what was happening to the symbolic relocation in the fstd
instruction.

This is the code in the final executable:

   10574:   2b 60 00 00 addil L%0,dp,r1
   10578:   70 36 00 20 std r22,10(r1)
   1057c:   34 21 00 20 ldo 10(r1),r1
   10580:   2c 20 12 16 fstd fr22,0(r1)

The fstd instruction has changed to a std instruction.

In the .o object file, we have:

  7c:   2b 60 00 00 addil L%0,dp,r1
  80:   70 36 00 02 fstd fr22,0(r1)
  84:   34 21 00 00 ldo 0(r1),r1
  88:   2c 20 12 16 fstd fr22,0(r1)

We have the following relocations:

007c R_PARISC_DPREL21L  g_expect
0080 R_PARISC_DPREL14R  g_expect
0084 R_PARISC_DPREL14R  g_expect

The format 3 (im10a) variants of ldd and fldd differ in bit 30.  ldd has a
0 and fldd a 1.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31503] [hppa] Unsupported 14-bit PA 2.0 relocations for 32-bit (narrow) mode (elf32-hppa.c)

2024-03-18 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31503

--- Comment #1 from John David Anglin  ---
It appears gas always generates R_PARISC_DPREL14 for dp relative relocations
in loads and stores.  This gives us format 14 and hppa_rebuild_insn gives

case 14:
  return (insn & ~ 0x3fff) | re_assemble_14 (value);

This clears the least significant three bits of the insn, so it will
clobber the t field at bit 30 in a fldw instruction.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31503] New: [hppa] Unsupported 14-bit PA 2.0 relocations for 32-bit (narrow) mode (elf32-hppa.c)

2024-03-16 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31503

Bug ID: 31503
   Summary: [hppa] Unsupported 14-bit PA 2.0 relocations for
32-bit (narrow) mode (elf32-hppa.c)
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---

elf32-hppa.c lacks support for several 14-bit PA 2.0 relocations (e.g.,
DPREL14WR and DPREL14DR).  Primarily, support is lacking for floating
point loads and stores with long displacements.  We lack both non-pic
and pic relocations.

Details can be found in the "Processor-Specific ELF Supplement for PA-RISC":
https://www.google.com/url?sa=t=web=j=89978449=https://refspecs.linuxfoundation.org/elf/elf-pa.pdf=2ahUKEwjzx8bvkvmEAxU_5ckDHbCQCLYQFnoECBQQAQ=AOvVaw3MBtDH0Qd2IHQpBF_3vBbN

Because of the lack of support for these relocations, gcc must block
generation of both integer and floating-point instructions that potentially
use these relocations before the reload pass completes.  This results in
an extra addil instruction to compute each memory address.  After reload,
it is possible to remove the extra addil when we have an integer move but
this results in less optimal code than would be generated if symbolic
references could be handled before reload.  Not sure if addil removal is
actually supported.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/2958] FAIL: copy with setting section flags 3

2024-03-14 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=2958

John David Anglin  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #1 from John David Anglin  ---
Fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25315] `__tcf_0' referenced in section `.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev.cst4' of mode_query_balls_distances.o: defined in discarded section `.text.__tcf_0[_ZNK6com

2024-02-28 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25315

John David Anglin  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #19 from John David Anglin  ---
Fixed by gcc change.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31148] Segmentation fault in bfd/elf32-hppa.c

2023-12-15 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31148

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from John David Anglin  ---
Fixed on master.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31148] New: Segmentation fault in bfd/elf32-hppa.c

2023-12-12 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31148

Bug ID: 31148
   Summary: Segmentation fault in bfd/elf32-hppa.c
   Product: binutils
   Version: 2.42 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---

Executing on host: sh -c {gcc -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/  
-
L=/home/dave/opt/test/hppa-unknown-linux-gnu/lib -L=/home/dave/opt/test/lib
-L=/
usr/local/lib -L=/lib -L=/usr/lib  -o tmpdir/vp.so -shared -Wl,-z,notext
-Wl,--c
ompress-debug-sections=zlib-gabi tmpdir/sh1p.o tmpdir/sh2p.o 2>&1}  /dev/null
ld
.tmp (timeout = 300)
spawn [open ...]
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new: tmpdir/sh1p.o: in function
`visi
bility_checkfunptr':
/home/dave/gnu/binutils/src/ld/testsuite/ld-vsb/sh1.c:216:(.text+0x194):
undefin
ed reference to `visibility'
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new: tmpdir/sh1p.o: in function
`visi
bility_check':
/home/dave/gnu/binutils/src/ld/testsuite/ld-vsb/sh1.c:221:(.text+0x1b8):
undefin
ed reference to `visibility'
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new: tmpdir/sh1p.o: in function
`visi
bility_checkvarptr':
/home/dave/gnu/binutils/src/ld/testsuite/ld-vsb/sh1.c:277:(.text+0x1e4):
undefin
ed reference to `visibility_var'
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new:
/home/dave/gnu/binutils/src/ld/t
estsuite/ld-vsb/sh1.c:277:(.text+0x1e8): undefined reference to
`visibility_var'
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new: tmpdir/sh1p.o: in function
`visi
bility_checkvar':
/home/dave/gnu/binutils/src/ld/testsuite/ld-vsb/sh1.c:282:(.text+0x1fc):
undefin
ed reference to `visibility_var'
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new:
/home/dave/gnu/binutils/src/ld/t
estsuite/ld-vsb/sh1.c:282:(.text+0x200): undefined reference to
`visibility_var'
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new: tmpdir/sh1p.o: in function
`visi
bility_varptr':
/home/dave/gnu/binutils/src/ld/testsuite/ld-vsb/sh1.c:303:(.text+0x214):
undefin
ed reference to `visibility_var'
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new:
tmpdir/sh1p.o:/home/dave/gnu/bin
utils/src/ld/testsuite/ld-vsb/sh1.c:304: more undefined references to
`visibilit
y_var' follow
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new: tmpdir/sh1p.o: in function
`.LC9
':
sh1.c:(.data.rel.ro+0x10): undefined reference to `visibility'
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core
dumped
compilation terminated.
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new: tmpdir/sh1p.o: in function
`visibility_checkfunptr':
/home/dave/gnu/binutils/src/ld/testsuite/ld-vsb/sh1.c:216:(.text+0x194):
undefined reference to `visibility'
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new: tmpdir/sh1p.o: in function
`visibility_check':
/home/dave/gnu/binutils/src/ld/testsuite/ld-vsb/sh1.c:221:(.text+0x1b8):
undefined reference to `visibility'
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new: tmpdir/sh1p.o: in function
`visibility_checkvarptr':
/home/dave/gnu/binutils/src/ld/testsuite/ld-vsb/sh1.c:277:(.text+0x1e4):
undefined reference to `visibility_var'
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new:
/home/dave/gnu/binutils/src/ld/testsuite/ld-vsb/sh1.c:277:(.text+0x1e8):
undefined reference to `visibility_var'
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new: tmpdir/sh1p.o: in function
`visibility_checkvar':
/home/dave/gnu/binutils/src/ld/testsuite/ld-vsb/sh1.c:282:(.text+0x1fc):
undefined reference to `visibility_var'
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new:
/home/dave/gnu/binutils/src/ld/testsuite/ld-vsb/sh1.c:282:(.text+0x200):
undefined reference to `visibility_var'
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new: tmpdir/sh1p.o: in function
`visibility_varptr':
/home/dave/gnu/binutils/src/ld/testsuite/ld-vsb/sh1.c:303:(.text+0x214):
undefined reference to `visibility_var'
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new:
tmpdir/sh1p.o:/home/dave/gnu/binutils/src/ld/testsuite/ld-vsb/sh1.c:304: more
undefined references to `visibility_var' follow
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new: tmpdir/sh1p.o: in function
`.LC9':
sh1.c:(.data.rel.ro+0x10): undefined reference to `visibility'
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core
dumped
compilation terminated.
PASS: visibility (hidden_undef)

dave@mx3210:~/gnu/binutils/objdir$ gdb -c ./ld/core
/home/dave/gnu/binutils/objdir/ld/.libs/ld-new
GNU gdb (Debian 13.2-1) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "hppa-linux-gnu".
Type "show configuration" for 

[Bug ld/31120] ld-scripts/fill2 fails when bfd_vma is 32 bits

2023-12-11 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31120

John David Anglin  changed:

   What|Removed |Added

 CC||danglin at gcc dot gnu.org

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30732] ld: 'ELF weak (alias)' tests fail on hppa

2023-08-14 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30732

--- Comment #15 from John David Anglin  ---
dave@mx3210:~/gnu/binutils/objdir/ld$ gdb tmpdir/alias
GNU gdb (Debian 13.2-1) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "hppa-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from tmpdir/alias...
(gdb) p/x psym1
$1 = 0x11198
(gdb) x/d psym1
0x11198 : 0
(gdb) break main
Breakpoint 1 at 0x10410: file
/home/dave/gnu/binutils/src/ld/testsuite/ld-elfweak/aliasmain.c, line 8.
(gdb) r
Starting program: /home/dave/gnu/binutils/objdir/ld/tmpdir/alias
warning: Unable to find libthread_db matching inferior's thread library, thread
debugging will not be available.

Breakpoint 1, 0x00010410 in main ()
at /home/dave/gnu/binutils/src/ld/testsuite/ld-elfweak/aliasmain.c:8
8   {
(gdb) info shared
>FromTo  Syms Read   Shared Object Library
0xfae4cec0  0xfae72494  Yes (*) /lib/ld.so.1
0xfaa5741c  0xfaa576f8  Yes tmpdir/alias.so
0xfa28b560  0xfa3e2404  Yes (*) /lib/hppa-linux-gnu/libc.so.6
(*): Shared library is missing debugging information.
(gdb) x/d psym1
0x11198 : 123
(gdb) c
Continuing.
value via psym1: 123, via psym2: 123, strong 123
[Inferior 1 (process 32061) exited normally]

dave@mx3210:~/gnu/binutils/objdir/ld$ nm tmpdir/alias
000105d4 t $$dyncall
0000 D $global$
0001100c d .LC0
00010744 r .Lpmain
00011010 d _DYNAMIC
00011184 A _GLOBAL_OFFSET_TABLE_
0001074c R _IO_stdin_used
 w _ITM_deregisterTMCloneTable
 w _ITM_registerTMCloneTable
00010828 r __FRAME_END__
000c D __TMC_END__
00010148 r __abi_tag
00011198 B __bss_start
000105e8 T __canonicalize_funcptr_for_compare
0000 D __data_start
0001058c t __do_global_dtors_aux
00011008 d __do_global_dtors_aux_fini_array_entry
0004 D __dso_handle
00011004 d __frame_dummy_init_array_entry
 w __gmon_start__
 U __libc_start_main@GLIBC_2.34
00011198 D _edata
000111a8 B _end
00010740 t _end_fini
000103dc t _end_init
00010724 T _fini
000103c4 T _init
00010458 T _start
0001119c b completed.0
0000 W data_start
000104f0 t deregister_tm_clones
000111a0 b fixup_plabel.0
000105c0 t frame_dummy
000104a0 t gmon_initializer
00010408 T main
ffec a mrp_slot
 U printf@GLIBC_2.2
0008 D psym1
000c D psym2
ffec a r31_slot
00010534 t register_tm_clones
fff0 a sr0_slot
00011198 B strongsym
00011198 V weaksym1
00011198 V weaksym2

I suspect you have a binding issue in ld.so.1.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30744] New: FAIL: ld-elf/pr19539 for hppa64-*-linux*

2023-08-10 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30744

Bug ID: 30744
   Summary: FAIL: ld-elf/pr19539 for hppa64-*-linux*
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
Target: hppa64-*-linux*

/home/dave/gnu/binutils/objdir64/ld/../gas/as-new  --defsym ALIGN=3-o
tmpdir
/start.o /home/dave/gnu/binutils/src/ld/testsuite/ld-elf/start.s
Executing on host: sh -c {/home/dave/gnu/binutils/objdir64/ld/../gas/as-new 
--d
efsym ALIGN=3-o tmpdir/start.o
/home/dave/gnu/binutils/src/ld/testsuite/ld-e
lf/start.s 2>&1}  /dev/null dump.tmp (timeout = 300)
spawn [open ...]
/home/dave/gnu/binutils/objdir64/ld/../gas/as-new  --defsym ALIGN=3-o
tmpdir
/pr19539.o /home/dave/gnu/binutils/src/ld/testsuite/ld-elf/pr19539.s
Executing on host: sh -c {/home/dave/gnu/binutils/objdir64/ld/../gas/as-new 
--d
efsym ALIGN=3-o tmpdir/pr19539.o
/home/dave/gnu/binutils/src/ld/testsuite/ld
-elf/pr19539.s 2>&1}  /dev/null dump.tmp (timeout = 300)
spawn [open ...]
./ld-new   -L/home/dave/gnu/binutils/src/ld/testsuite/ld-elf  -pie -T pr19539.t
--warn-textrel -o tmpdir/dump tmpdir/start.o tmpdir/pr19539.o
Executing on host: sh -c {./ld-new  
-L/home/dave/gnu/binutils/src/ld/testsuite/
ld-elf  -pie -T pr19539.t --warn-textrel -o tmpdir/dump tmpdir/start.o
tmpdir/pr
19539.o  2>&1}  /dev/null dump.tmp (timeout = 300)
spawn [open ...]
succeeded with: <>, expected: <.*: creating DT_TEXTREL in a PIE>
FAIL: ld-elf/pr19539

The expected warning is not generated.

dave@mx3210:~/gnu/binutils/objdir64/ld$ ../binutils/readelf --dyn-syms --wide
tmpdir/dump

Symbol table '.dynsym' contains 2 entries:
   Num:Value  Size TypeBind   Vis  Ndx Name
 0:  0 NOTYPE  LOCAL  DEFAULT  UND
 1:  0 NOTYPE  LOCAL  DEFAULT  UND foo

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30743] New: FAIL: ld-elf/now-3 for hppa64-*-linux* target

2023-08-10 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30743

Bug ID: 30743
   Summary: FAIL: ld-elf/now-3 for hppa64-*-linux* target
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa*-*-linux*
Target: hppa64-*-linux*
 Build: hppa*-*-linux*

/home/dave/gnu/binutils/objdir64/ld/../gas/as-new  --defsym ALIGN=3-o
tmpdir
/start.o /home/dave/gnu/binutils/src/ld/testsuite/ld-elf/start.s
Executing on host: sh -c {/home/dave/gnu/binutils/objdir64/ld/../gas/as-new 
--d
efsym ALIGN=3-o tmpdir/start.o
/home/dave/gnu/binutils/src/ld/testsuite/ld-e
lf/start.s 2>&1}  /dev/null dump.tmp (timeout = 300)
spawn [open ...]
./ld-new   -L/home/dave/gnu/binutils/src/ld/testsuite/ld-elf  -shared -z now
--d
isable-new-dtags -o tmpdir/dump tmpdir/start.o
Executing on host: sh -c {./ld-new  
-L/home/dave/gnu/binutils/src/ld/testsuite/
ld-elf  -shared -z now --disable-new-dtags -o tmpdir/dump tmpdir/start.o  2>&1}
 /dev/null dump.tmp (timeout = 300)
spawn [open ...]
/home/dave/gnu/binutils/objdir64/ld/../binutils/readelf  -d -W tmpdir/dump >
tmpdir/dump.out
Executing on host: sh -c
{/home/dave/gnu/binutils/objdir64/ld/../binutils/readelf  -d -W tmpdir/dump >
tmpdir/dump.out 2>dump.tmp}  /dev/null  (timeout = 300)
spawn [open ...]
fail if no difference
FAIL: ld-elf/now-3

dave@mx3210:~/gnu/binutils/objdir64/ld/tmpdir$ cat dump.out

Dynamic section at offset 0xe8 contains 12 entries:
  TagType Name/Value
 0x0004 (HASH)   0x1f8
 0x6ef5 (GNU_HASH)   0x228
 0x0005 (STRTAB) 0x2f0
 0x0006 (SYMTAB) 0x260
 0x000a (STRSZ)  15 (bytes)
 0x000b (SYMENT) 24 (bytes)
 0x6001 (HP_DLD_FLAGS)   0
 0x001e (FLAGS)  BIND_NOW
 0x0003 (PLTGOT) 0x1308
 0x0018 (BIND_NOW)
 0x6ffb (FLAGS_1)Flags: NOW
 0x (NULL)   0x0

I believe the FLAGS line is incorrect.

dave@mx3210:~/gnu/binutils/src/ld/testsuite/ld-elf$ cat now-3.d
#source: start.s
#readelf: -d -W
#ld: -shared -z now --disable-new-dtags
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: ![check_shared_lib_support]

#failif
#...
 0x[0-9a-f]+ +\(FLAGS\) +BIND_NOW
#pass

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30732] ld: 'ELF weak (alias)' tests fail on hppa

2023-08-09 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30732

--- Comment #10 from John David Anglin  ---
The ld test results for --target=hppa64-linux-gnu are:

FAIL: ld-elf/now-3
FAIL: ld-elf/pr19539
FAIL: ld-elf/pr19698
FAIL: PR ld/22269
FAIL: PR ld/22269 (-z dynamic-undefined-weak)
FAIL: Discarded dynamic relocation section
XPASS: relocatable with script
FAIL: DT_TEXTREL in shared lib
FAIL: DT_TEXTREL map file warning
FAIL: pr20995

So, the "relocatable with script" test result is changed from PASS to XPASS.

Need to review other test results.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30732] ld: 'ELF weak (alias)' tests fail on hppa

2023-08-08 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30732

--- Comment #3 from John David Anglin  ---
I see for GNU ld (GNU Binutils) 2.41.50.20230808:
XFAIL: relocatable with script
UNSUPPORTED: SHF_GNU_RETAIN 7a
PASS: ELF weak (alias)

Is the segmentation fault in the ELF weak test reproducible?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30078] New: FAIL: merge4

2023-02-03 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30078

Bug ID: 30078
   Summary: FAIL: merge4
   Product: binutils
   Version: 2.41 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa*-*-linux*
Target: hppa*-*-linux*
 Build: hppa*-*-linux*

gcc  -B/home/dave/gnu/gdb/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/gdb/src/ld/tests
uite/ld-elf -g -O2   -c -g -O2 -fno-lto  -c
/home/dave/gnu/gdb/src/ld/testsuite/
ld-elf/merge4a.c -o tmpdir/merge4a.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/gdb/objdir/ld/tmpdir/ld/
-I/home
/dave/gnu/gdb/src/ld/testsuite/ld-elf -g -O2   -c -g -O2 -fno-lto  -c
/home/dave
/gnu/gdb/src/ld/testsuite/ld-elf/merge4a.c -o tmpdir/merge4a.o 2>&1}  /dev/null
ld.tmp (timeout = 300)
spawn [open ...]
gcc  -B/home/dave/gnu/gdb/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/gdb/src/ld/tests
uite/ld-elf -g -O2   -c -g -O2 -fno-lto  -c
/home/dave/gnu/gdb/src/ld/testsuite/
ld-elf/merge4b.s -o tmpdir/merge4b.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/gdb/objdir/ld/tmpdir/ld/
-I/home
/dave/gnu/gdb/src/ld/testsuite/ld-elf -g -O2   -c -g -O2 -fno-lto  -c
/home/dave
/gnu/gdb/src/ld/testsuite/ld-elf/merge4b.s -o tmpdir/merge4b.o 2>&1}  /dev/null
ld.tmp (timeout = 300)
spawn [open ...]
gcc -B/home/dave/gnu/gdb/objdir/ld/tmpdir/ld/  
-L=/home/dave/opt/gnu/hppa-unkno
wn-linux-gnu/lib -L=/home/dave/opt/gnu/lib -L=/usr/local/lib -L=/lib
-L=/usr/lib
  -o tmpdir/merge4   -L/home/dave/gnu/gdb/src/ld/testsuite/ld-elf 
tmpdir/merge4
a.o tmpdir/merge4b.o
Executing on host: sh -c {gcc -B/home/dave/gnu/gdb/objdir/ld/tmpdir/ld/  
-L=/home/dave/opt/gnu/hppa-unknown-linux-gnu/lib -L=/home/dave/opt/gnu/lib
-L=/usr/local/lib -L=/lib -L=/usr/lib  -o tmpdir/merge4  
-L/home/dave/gnu/gdb/src/ld/testsuite/ld-elf  tmpdir/merge4a.o tmpdir/merge4b.o
 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
Running: tmpdir/merge4 > tmpdir/merge4.out
1: foobar
2: whatever
3: blabla
regexp_diff match failure
regexp "^2: $"
line   "2: whatever"
FAIL: merge4

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/29828] New: error: conflicting types for 'wait'

2022-11-25 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29828

Bug ID: 29828
   Summary: error: conflicting types for 'wait'
   Product: binutils
   Version: 2.40 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa2.0w-hp-hpux11.11
Target: hppa2.0w-hp-hpux11.11
 Build: hppa2.0w-hp-hpux11.11

make[2]: Entering directory '/home/dave/gnu/binutils/objdir/libsframe'
make  testsuite/libsframe.decode/be-flipping
testsuite/libsframe.decode/frecnt-1
 testsuite/libsframe.decode/frecnt-2 testsuite/libsframe.encode/encode-1
make[3]: Entering directory '/home/dave/gnu/binutils/objdir/libsframe'
gcc -DHAVE_CONFIG_H -I. -I../../src/libsframe  -I../../src/libsframe/../include
-Wall  -Wall -Wextra -Wwrite-strings -Wmissing-format-attribute
-Wstrict-prototy
pes -Wmissing-prototypes -O2 -g -MT
testsuite/libsframe.decode/testsuite_lib
sframe_decode_be_flipping-be-flipping.o -MD -MP -MF
testsuite/libsframe.decode/.
deps/testsuite_libsframe_decode_be_flipping-be-flipping.Tpo -c -o
testsuite/libs
frame.decode/testsuite_libsframe_decode_be_flipping-be-flipping.o `test -f
'test
suite/libsframe.decode/be-flipping.c' || echo
'../../src/libsframe/'`testsuite/l
ibsframe.decode/be-flipping.c
In file included from
../../src/libsframe/testsuite/libsframe.decode/be-flipping
.c:28:
/opt/gnu/include/dejagnu.h:48:1: error: conflicting types for 'wait'
   48 | wait (void)
  | ^~~~
In file included from
/home/opt/gnu/gcc/gcc-10/lib/gcc/hppa2.0w-hp-hpux11.11/10.
3.1/include-fixed/stdlib.h:307,
 from
../../src/libsframe/testsuite/libsframe.decode/be-flipping
.c:21:
/usr/include/sys/wait.h:74:21: note: previous declaration of 'wait' was here
   74 |extern pid_t wait(int *);
  | ^~~~
make[3]: *** [Makefile:733:
testsuite/libsframe.decode/testsuite_libsframe_decod
e_be_flipping-be-flipping.o] Error 1
make[3]: Target 'testsuite/libsframe.decode/be-flipping' not remade because of
e
rrors.

In dejagnu.h, we have:

void
wait (void)
{
#ifdef _DEJAGNU_WAIT_
  fd_set rfds;
  struct timeval tv;

  FD_ZERO ();
  tv.tv_sec = 0;
  tv.tv_usec = 1;

  select (0, , NULL, NULL, );
#endif
}

In fixed stdlib.h, we have:
#ifdef _INCLUDE_XOPEN_SOURCE_EXTENDED
# include  /* For required W* macros */

Seems like a dejagnu bug but latest version is installed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29802] Segmentation fault in _bfd_elf_strtab_add

2022-11-19 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29802

--- Comment #7 from John David Anglin  ---
Created attachment 14469
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14469=edit
sincos_table.s

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29802] Segmentation fault in _bfd_elf_strtab_add

2022-11-19 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29802

--- Comment #6 from John David Anglin  ---
bash-5.1$ readelf -x 15 ./math/.libs/sincos_table.o

Hex dump of section '.strtab':
  0x 0073696e 636f735f 7461626c 652e6300 .sincos_table.c.
  0x0010 5f5f7369 6e636f73 715f7461 626c6500 __sincosq_table.

sincos_table.o was assembled with gas.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29802] Segmentation fault in _bfd_elf_strtab_add

2022-11-19 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29802

--- Comment #5 from John David Anglin  ---
libtool: link: /home/dave/gnu/gcc/objdir64/./gcc/xgcc
-B/home/dave/gnu/gcc/objdi
r64/./gcc/ -B/opt/gnu64/gcc_gld/gcc-13/hppa64-hp-hpux11.11/bin/
-B/opt/gnu64/gcc
_gld/gcc-13/hppa64-hp-hpux11.11/lib/ -isystem
/opt/gnu64/gcc_gld/gcc-13/hppa64-h
p-hpux11.11/include -isystem
/opt/gnu64/gcc_gld/gcc-13/hppa64-hp-hpux11.11/sys-i
nclude-shared  math/.libs/x2y2m1q.o math/.libs/acoshq.o math/.libs/fmodq.o
m
ath/.libs/acosq.o math/.libs/frexpq.o math/.libs/rem_pio2q.o
math/.libs/asinhq.o
 math/.libs/hypotq.o math/.libs/remainderq.o math/.libs/asinq.o
math/.libs/rintq
.o math/.libs/atan2q.o math/.libs/isinfq.o math/.libs/roundq.o
math/.libs/atanhq
.o math/.libs/isnanq.o math/.libs/scalblnq.o math/.libs/atanq.o
math/.libs/j0q.o math/.libs/scalbnq.o math/.libs/cbrtq.o math/.libs/j1q.o
math/.libs/signbitq.o math/.libs/ceilq.o math/.libs/jnq.o
math/.libs/sincos_table.o math/.libs/complex.o math/.libs/ldexpq.o
math/.libs/sincosq.o math/.libs/copysignq.o math/.libs/lgammaq.o
math/.libs/sincosq_kernel.o math/.libs/coshq.o math/.libs/llroundq.o
math/.libs/sinhq.o math/.libs/cosq.o math/.libs/log10q.o math/.libs/sinq.o
math/.libs/cosq_kernel.o math/.libs/log1pq.o math/.libs/sinq_kernel.o
math/.libs/erfq.o math/.libs/logq.o math/.libs/sqrtq.o math/.libs/expm1q.o
math/.libs/lroundq.o math/.libs/tanhq.o math/.libs/expq.o math/.libs/modfq.o
math/.libs/tanq.o math/.libs/fabsq.o math/.libs/nanq.o math/.libs/tgammaq.o
math/.libs/finiteq.o math/.libs/nextafterq.o math/.libs/truncq.o
math/.libs/floorq.o math/.libs/powq.o math/.libs/fmaq.o math/.libs/logbq.o
math/.libs/exp2q.o math/.libs/issignalingq.o math/.libs/lgammaq_neg.o
math/.libs/lgammaq_product.o math/.libs/tanq_kernel.o
math/.libs/tgammaq_product.o math/.libs/casinhq_kernel.o math/.libs/cacoshq.o
math/.libs/cacosq.o math/.libs/casinhq.o math/.libs/casinq.o
math/.libs/catanhq.o math/.libs/catanq.o math/.libs/cimagq.o math/.libs/conjq.o
math/.libs/cprojq.o math/.libs/crealq.o math/.libs/fdimq.o math/.libs/fmaxq.o
math/.libs/fminq.o math/.libs/ilogbq.o math/.libs/llrintq.o math/.libs/log2q.o
math/.libs/lrintq.o math/.libs/nearbyintq.o math/.libs/remquoq.o
math/.libs/ccoshq.o math/.libs/cexpq.o math/.libs/clog10q.o math/.libs/clogq.o
math/.libs/csinq.o math/.libs/csinhq.o math/.libs/csqrtq.o math/.libs/ctanq.o
math/.libs/ctanhq.o printf/.libs/addmul_1.o printf/.libs/add_n.o
printf/.libs/cmp.o printf/.libs/divrem.o printf/.libs/flt1282mpn.o
printf/.libs/fpioconst.o printf/.libs/lshift.o printf/.libs/mul_1.o
printf/.libs/mul_n.o printf/.libs/mul.o printf/.libs/printf_fphex.o
printf/.libs/printf_fp.o printf/.libs/quadmath-printf.o printf/.libs/rshift.o
printf/.libs/submul_1.o printf/.libs/sub_n.o strtod/.libs/strtoflt128.o
strtod/.libs/mpn2flt128.o strtod/.libs/tens_in_limb.o   -lm -lc 
-Wl,--version-script=../../../gcc/libquadmath/quadmath.map   -Wl,-soname
-Wl,libquadmath.sl.0 -o .libs/libquadmath.sl.0.0
/opt/gnu64/bin/ld: warning: /lib/pa20_64/libm.sl has a section extending past
end of file
/opt/gnu64/bin/ld: /lib/pa20_64/libm.sl: .dynsym local symbol at index 0 (>=
sh_info of 0)
/opt/gnu64/bin/ld: /lib/pa20_64/libm.sl: .dynsym local symbol at index 1 (>=
sh_info of 0)
/opt/gnu64/bin/ld: /lib/pa20_64/libm.sl: .dynsym local symbol at index 2 (>=
sh_info of 0)
/opt/gnu64/bin/ld: /lib/pa20_64/libm.sl: .dynsym local symbol at index 3 (>=
sh_info of 0)
/opt/gnu64/bin/ld: warning: /lib/pa20_64/libc.sl has a section extending past
end of file
/opt/gnu64/bin/ld: /lib/pa20_64/libc.sl: .dynsym local symbol at index 0 (>=
sh_info of 0)
/opt/gnu64/bin/ld: /lib/pa20_64/libc.sl: .dynsym local symbol at index 1 (>=
sh_info of 0)
/opt/gnu64/bin/ld: /lib/pa20_64/libc.sl: .dynsym local symbol at index 2 (>=
sh_info of 0)
/opt/gnu64/bin/ld: /lib/pa20_64/libc.sl: .dynsym local symbol at index 3 (>=
sh_info of 0)
/opt/gnu64/bin/ld: math/.libs/sincos_table.o: invalid string offset 58 >= 32
for section `.strtab'
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core
dumped
compilation terminated.
make[3]: *** [Makefile:829: libquadmath.la] Error 1

(gdb) frame 1
#1  0x400fa1b4 in bfd_elf_link_record_local_dynamic_symbol (
info=0x80010001b238 , input_bfd=0x8001001db158,
input_indx=44) at ../../src/bfd/elflink.c:841
841   dynstr_index = _bfd_elf_strtab_add (dynstr, name, false);
(gdb) p *entry
$1 = {next = 0x0, input_bfd = 0x0, input_indx = 0, dynindx = 0, isym = {
st_value = 64, st_size = 0, st_name = 58, st_info = 0 '\000',
st_other = 0 '\000', st_target_internal = 0 '\000', st_shndx = 4}}

bash-5.1$ readelf -at
./hppa64-hp-hpux11.11/libquadmath/math/.libs/sincos_table.o
ELF Header:
  Magic:   7f 45 4c 46 02 02 01 01 01 00 00 00 00 00 00 00
  Class: ELF64
  Data:  2's complement, big endian
  Version:   1 (current)
  OS/ABI:UNIX - HP-UX

[Bug ld/29802] Segmentation fault in _bfd_elf_strtab_add

2022-11-18 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29802

--- Comment #4 from John David Anglin  ---
Created attachment 14463
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14463=edit
Patch

For reference, I have this patch installed to fix a problem with OTHER_SYMBOLS.
The symbols __SYSTEM_ID through __TLS_PREALLOC_DTV_A are undefined in crt0.o.
HP ld provides these.

The symbols __SYSTEM_ID_D through __systab are undefined in libc.sl. HP ld
does not provide them. It ignores them. My understanding is they are likely
set by the kernel. I provided them because GNU ld default behavior is to
error on undefined shared library symbols.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29802] New: Segmentation fault in _bfd_elf_strtab_add

2022-11-17 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29802

Bug ID: 29802
   Summary: Segmentation fault in _bfd_elf_strtab_add
   Product: binutils
   Version: 2.39
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa64-hp-hpux11.11
Target: hppa64-hp-hpux11.11
 Build: hppa64-hp-hpux11.11

I've been working on getting 64-bit GNU ld on hppa64-hpux to work with
gcc. I hit a segmentation fault linking libquadmath in _bfd_elf_strtab_add:

bash-5.1$ gdb -c core /opt/gnu64/bin/ld
GNU gdb (GDB) 7.11.50.20160723-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "hppa64-hp-hpux11.11".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/gnu64/bin/ld...done.
[New ]

warning: Private mapping of shared library text was not specified
by the executable; setting a breakpoint in a shared library which
is not privately mapped will not work.  See the HP-UX 11i v3 chatr
manpage for methods to privately map shared library text.
Unable to modify dynamic linker flags.
(gdb) bt
#0  0x4010cf7c in _bfd_elf_strtab_add (tab=0x800100050228,
str=0x0, copy=false) at ../../src/bfd/elf-strtab.c:150
#1  0x400fa1b4 in bfd_elf_link_record_local_dynamic_symbol (
info=0x80010001b238 , input_bfd=0x8001001db158,
input_indx=-9223372032559480280) at ../../src/bfd/elflink.c:841
#2  0x400cfeb4 in allocate_global_data_dlt (eh=0x8001001db158,
data=0x800100050228) at ../../src/bfd/elf64-hppa.c:974
#3  0x400bcb50 in bfd_link_hash_traverse (htab=0x80010004e888,
func=0x800100050228, info=0x0) at ../../src/bfd/linker.c:671
#4  0x400d119c in elf_link_hash_traverse (info=0x83ffbfff21e8,
f=, table=0x800100050228) at ../../src/bfd/elf-bfd.h:749
#5  elf64_hppa_size_dynamic_sections (output_bfd=0x0, info=0x8001001db158)
at ../../src/bfd/elf64-hppa.c:1702
#6  0x401000f0 in bfd_elf_size_dynamic_sections (
output_bfd=0x80010001b238 , soname=,
rpath=0x0, filter_shlib=0x0, audit=0x0, depaudit=0x0,
auxiliary_filters=, info=0x800100050228,
sinterpptr=) at ../../src/bfd/elflink.c:7398
#7  0x400ac5f4 in ldelf_before_allocation (
audit=0x80010001b238  "\300,\001H\004@A\206",
depaudit=,
default_interpreter_name=0x ) at ../../src/ld/ldelf.c:1835
#8  0x400a8048 in gldelf64hppa_before_allocation () at eelf64hppa.c:102
#9  0x400a06d8 in ldemul_before_allocation ()
at ../../src/ld/ldemul.c:96
#10 0x40096fb4 in lang_process () at ../../src/ld/ldlang.c:8318
#11 0x4017b8e8 in main (argc=, argv=)
at ../../src/ld/ldmain.c:497

Problem is str=0x0. If I return 0 when str is NULL, libquadmath will link
successfully. Whether it works is another matter. Probably, there's a better
fix.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29263] /usr/bin/ld: warning: /usr/lib/gcc/hppa-linux-gnu/11/../../../hppa-linux-gnu/crtn.o: missing .note.GNU-stack section implies executable stack

2022-06-19 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29263

--- Comment #1 from John David Anglin  ---
dave@mx3210:~/gnu/binutils/src$ ld --version
GNU ld (GNU Binutils for Debian) 2.38.50.20220615

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29263] New: /usr/bin/ld: warning: /usr/lib/gcc/hppa-linux-gnu/11/../../../hppa-linux-gnu/crtn.o: missing .note.GNU-stack section implies executable stack

2022-06-19 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29263

Bug ID: 29263
   Summary: /usr/bin/ld: warning:
/usr/lib/gcc/hppa-linux-gnu/11/../../../hppa-linux-gnu
/crtn.o: missing .note.GNU-stack section implies
executable stack
   Product: binutils
   Version: 2.39 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
CC: nickc at sourceware dot org
  Target Milestone: ---
  Host: hppa*-*-linux*
Target: hppa*-*-linux*
 Build: hppa*-*-linux*

int main(void) { return 0; }

dave@mx3210:~/shmat$ gcc main.c
/usr/bin/ld: warning:
/usr/lib/gcc/hppa-linux-gnu/11/../../../hppa-linux-gnu/crtn.o: missing
.note.GNU-stack section implies executable stack
/usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future
version of the linker
/usr/bin/ld: warning: a.out has a LOAD segment with RWX permissions

The first warning seems bogus as crtn.o is not an executable file.

On hppa-linux with kernel v5.18 and later, we don't need an executable
stack for signal support but we still need it for gcc nested functions.

As far as I can tell, an executable stack is still the default in glibc
for many targets.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/27442] FAIL: Local ifunc-using executable does not contain R_*_IRELATIVE relocation

2021-11-26 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27442

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from John David Anglin  ---
Fixed on trunk.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call

2021-05-19 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25599

John David Anglin  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #7 from John David Anglin  ---
Patch applied to master.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/27443] FAIL: pr25355.o

2021-03-12 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27443

--- Comment #3 from John David Anglin  ---
dave@mx3210:~/gnu/binutils/objdir/ld$
/home/dave/gnu/binutils/objdir/ld/../binutils/nm-new --plugin
/home/dave/opt/test/libexec/gcc/hppa-linux-gnu/10.0.0/liblto_plugin.so
tmpdir/pr25355.o > dump.out
dave@mx3210:~/gnu/binutils/objdir/ld$ cat dump.out
 T nm_test_var
 T nm_test_var2

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/27442] FAIL: Local ifunc-using executable does not contain R_*_IRELATIVE relocation

2021-02-19 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27442

John David Anglin  changed:

   What|Removed |Added

   Host||hppa-unknown-linux-gnu
  Build||hppa-unknown-linux-gnu
 Target||hppa-unknown-linux-gnu

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/27443] New: FAIL: pr25355.o

2021-02-19 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27443

Bug ID: 27443
   Summary: FAIL: pr25355.o
   Product: binutils
   Version: 2.37 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu

gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/sr
c/ld/testsuite/ld-plugin -g -O2   -c -g -O2 -fno-lto -flto -fno-common
-fno-fat-
lto-objects -c /home/dave/gnu/binutils/src/ld/testsuite/ld-plugin/pr25355.c -o
t
mpdir/pr25355.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I
/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin -g -O2   -c -g -O2 -fno-lto
-
flto -fno-common -fno-fat-lto-objects -c
/home/dave/gnu/binutils/src/ld/testsuit
e/ld-plugin/pr25355.c -o tmpdir/pr25355.o 2>&1}  /dev/null ld.tmp (timeout =
300
)
spawn [open ...]
/home/dave/gnu/binutils/objdir/ld/../binutils/nm-new --plugin
/home/dave/opt/tes
t/libexec/gcc/hppa-linux-gnu/10.0.0/liblto_plugin.so tmpdir/pr25355.o >
dump.out
extra regexps in /home/dave/gnu/binutils/src/ld/testsuite/ld-plugin/pr25355.d
st
arting with "^[0-9a-f]+ [BS] _?nm_test_var$"
EOF from dump.out
FAIL: pr25355.o

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/27442] New: FAIL: Local ifunc-using executable does not contain R_*_IRELATIVE relocation

2021-02-19 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27442

Bug ID: 27442
   Summary: FAIL: Local ifunc-using executable does not contain
R_*_IRELATIVE relocation
   Product: binutils
   Version: 2.37 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---

gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/sr
c/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fPIC -c
/home/dave/gnu/binutils/sr
c/ld/testsuite/ld-ifunc/prog.c -o tmpdir/shared_prog.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I
/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fPIC -c
/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/prog.c -o
tmpdir/shared_prog.o
 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/sr
c/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fno-PIE -c
/home/dave/gnu/binutils
/src/ld/testsuite/ld-ifunc/prog.c -o tmpdir/static_prog.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I
/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fno-PIE
-c /home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/prog.c -o
tmpdir/static_pro
g.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/sr
c/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fPIC -DWITH_IFUNC -c
/home/dave/gn
u/binutils/src/ld/testsuite/ld-ifunc/lib.c -o tmpdir/shared_ifunc.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I
/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fPIC
-DW
ITH_IFUNC -c /home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/lib.c -o
tmpdir/s
hared_ifunc.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/sr
c/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fno-PIE -DWITH_IFUNC -c
/home/dave
/gnu/binutils/src/ld/testsuite/ld-ifunc/lib.c -o tmpdir/static_ifunc.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I
/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fno-PIE
-DWITH_IFUNC -c /home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/lib.c -o
tmpdi
r/static_ifunc.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c
-DWITHOUT_IFUNC -c /home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/lib.c -o
tmpdir/static_noifunc.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c
-DWITHOUT_IFUNC -c /home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/lib.c -o
tmpdir/static_noifunc.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
/home/dave/gnu/binutils/objdir/ld/../gas/as-new  
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc   -o tmpdir/empty.o
/home/dave/gnu/binutils/src/ld/testsuite/ld-elf/empty.s
Executing on host: sh -c {/home/dave/gnu/binutils/objdir/ld/../gas/as-new  
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc   -o tmpdir/empty.o
/home/dave/gnu/binutils/src/ld/testsuite/ld-elf/empty.s 2>&1}  /dev/null ld.tmp
(timeout = 300)
spawn [open ...]
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -c
/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/test-1.c -o tmpdir/test-1.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -c
/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/test-1.c -o tmpdir/test-1.o
2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -fPIC -c
-c /home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/test-2.c -o
tmpdir/test-2.o
spawn [open ...]
./ld-new   -o tmpdir/libshared_ifunc.so -shared tmpdir/shared_ifunc.o
Executing on host: sh -c {./ld-new   -o tmpdir/libshared_ifunc.so -shared
tmpdir/shared_ifunc.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
/home/dave/gnu/binutils/objdir/ld/../binutils/ar   rc tmpdir/libifunc.a
tmpdir/static_ifunc.o
Executing on host: sh -c {/home/dave/gnu/binutils/objdir/ld/../binutils/ar   rc
tmpdir/libifunc.a tmpdir/static_ifunc.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]

gcc -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/  
-L=/home/dave/opt/test/hppa-unknown-linux-gnu/lib -L=/home/dav

[Bug binutils/26356] FAIL: objcopy --reverse-bytes

2020-08-27 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26356

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from John David Anglin  ---
Fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26357] Building binutils with plugins enabled breaks ar/ranlib symbol table on 32-bit HP-UX

2020-08-23 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26357

John David Anglin  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #4 from John David Anglin  ---
Fixed on master.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26356] FAIL: objcopy --reverse-bytes

2020-08-20 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26356

John David Anglin  changed:

   What|Removed |Added

  Attachment #12755|0   |1
is obsolete||

--- Comment #5 from John David Anglin  ---
Created attachment 12785
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12785=edit
Patch to fix dollar-sign quoting for binutils tests

The get_standard_section_names proc returns section names on the SOM target
that are already.  This can't be changed without breaking various gas tests.
Double quoting results in an incorrect command.

This change removes any existing dollar-sign quotes before re-quoting.

Still working on problems in som.c.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26349] FAIL: binutils-all/pr25543

2020-08-18 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26349

--- Comment #3 from John David Anglin  ---
Created attachment 12778
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12778=edit
Patch to fix C99 format issue on hppa-hpux host

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26350] FAIL: Multibyte symbol names

2020-08-18 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26350

John David Anglin  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #3 from John David Anglin  ---
Duplicate of 26349 (C99 format problem).

*** This bug has been marked as a duplicate of bug 26349 ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26349] FAIL: binutils-all/pr25543

2020-08-18 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26349

--- Comment #2 from John David Anglin  ---
*** Bug 26350 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26356] FAIL: objcopy --reverse-bytes

2020-08-11 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26356

--- Comment #4 from John David Anglin  ---
Hi Alan,

You are correct.  som_bfd_copy_private_section_data() is called once for the
subspace $DATA$.  This code is problematic:

  /* Reparent if necessary.  */
  if (som_section_data (osection)->copy_data->container)
som_section_data (osection)->copy_data->container =
  som_section_data (osection)->copy_data->container->output_section;

After the memcpy, som_section_data (osection)->copy_data->container points to
the asection for $PRIVATE$.

som_section_data(osection)->copy_data->container->output_section is NULL.

Setting som_section_data (osection)->copy_data->container to NULL causes the
segmentation fault in som_is_space().  It is inlined in som_prep_headers().
osection no longer points to a valid space or subspace.  isection pointed
to a valid subspace.

If som_is_space() and som_is_subspace() are modified to return false when
the container is NULL, the output doesn't contain $PRIVATE$ and $DATA$, and
the test fails.

I'm thinking we need to copy both the containing space for $DATA$ and $DATA$.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26356] FAIL: objcopy --reverse-bytes

2020-08-10 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26356

--- Comment #2 from John David Anglin  ---
There is this function som_bfd_copy_private_section_data() which is never
called but it looks like it should be called when objcopy is run.  This is the
reason
container is NULL in the output section.  It never got copied from the input.

>From the ChangeLogs, it looks like it used to be called.

Alan, do you have a suggestion on what to change so it is called?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26357] Building binutils with plugins enabled breaks ar/ranlib symbol table on 32-bit HP-UX

2020-08-10 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26357

--- Comment #2 from John David Anglin  ---
Created attachment 12759
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12759=edit
Patch

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26356] FAIL: objcopy --reverse-bytes

2020-08-09 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26356

--- Comment #1 from John David Anglin  ---
Created attachment 12755
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12755=edit
Patch

The change to som.c fix the segmentation fault running objcopy.  However, I'm
not sure that this isn't just papering over a higher level problem.

After this I found we had an extra backslash before the the '$' characters in
$DATA$. I revised the get_standard_section_names proc to work around this.

After this, the pr23633 started to fail so I xfailed it on som.

The reversed-bytes test still doesn't pass. $DATA$ turns into a space.  It
should be a subspace in $PRIVATE$.

The "objcopy object (simple copy)" fails here:
tmpdir/bintest.o tmpdir/copy.o differ: char 168, line 1

I believe this is because the 'O' bit gets set in $LIT$ and $MILLICODE$:

-bash-4.4$ odump -subspaces tmpdir/bintest.o

Subspace dictionary for tmpdir/bintest.o:

Sub Sp AC RDCLQIOENKT Key Loc/Init InitLn  StartLen  Align Fixups Name

  0  0 2c ...L0.O  24 01ec 10  10  80   4 $CODE$
  1  0 2c ...L0..  16 01fc 00  00  84   0 $LIT$
  2  0 2c ...L0..   8 01fc 00  00  84   0
$MILLICODE$
  3  1 1f ...L1..  24 01fc 08  08  84   1 $DATA$
  4  1 1f ...L1..  80  00  00  8   -1   0 $BSS$

-bash-4.4$ odump -subspaces tmpdir/copy.o

Subspace dictionary for tmpdir/copy.o:

Sub Sp AC RDCLQIOENKT Key Loc/Init InitLn  StartLen  Align Fixups Name

  0  0 2c ...L0.O  24 01ec 08  08  80   1 $CODE$
  1  0 2c ...L0.O  16 01f4 00  00  8   -1   0 $LIT$
  2  0 2c ...L0.O   8 01f4 00  00  8   -1   0
$MILLICODE$
  3  1 1f ...L1..  24 01f4 00  00  8   -1   0 $DATA$
  4  1 1f ...L1..  80  00  00  8   -1   0 $BSS$

The O bit indicates code only (no literal data), so it is incorrectly set by
objcopy.

There's also differences in fixup indexes and counts.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gas/26359] New: FAIL: .xstabs

2020-08-09 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26359

Bug ID: 26359
   Summary: FAIL: .xstabs
   Product: binutils
   Version: 2.36 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa2.0w-hp-hpux11.11
Target: hppa2.0w-hp-hpux11.11
 Build: hppa2.0w-hp-hpux11.11

Executing on host: sh -c {../as-new   
/mnt/gnu/binutils/src/gas/testsuite/gas/a
ll/pr23938.s 2>&1}  /dev/null gas.out (timeout = 300)
spawn [open ...]
/mnt/gnu/binutils/src/gas/testsuite/gas/all/pr23938.s: Assembler messages:
/mnt/gnu/binutils/src/gas/testsuite/gas/all/pr23938.s:2: Internal error in
obj_s
om_init_stab_section at ../../src/gas/config/obj-som.c:247.
Please report this bug.
/mnt/gnu/binutils/src/gas/testsuite/gas/all/pr23938.s: Assembler messages:
/mnt/gnu/binutils/src/gas/testsuite/gas/all/pr23938.s:2: Internal error in
obj_s
om_init_stab_section at ../../src/gas/config/obj-som.c:247.
Please report this bug.
FAIL: .xstabs

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26357] New: Building binutils with plugins enabled breaks ar/ranlib symbol table on 32-bit HP-UX

2020-08-08 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26357

Bug ID: 26357
   Summary: Building binutils with plugins enabled breaks
ar/ranlib symbol table on 32-bit HP-UX
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa2.0w-hp-hpux11.11
Target: hppa2.0w-hp-hpux11.11
 Build: hppa2.0w-hp-hpux11.11

../src/configure --prefix=/opt/gnu --disable-nls --disable-gdb

-bash-4.4$ cd binutils
-bash-4.4$ ./ar r libx.a *.o
./ar: creating libx.a
-bash-4.4$ /usr/ccs/bin/nm libx.a

nm:  addr2line.o:  bad magic

nm:  ar.o:  bad magic

nm:  arlex.o:  bad magic

nm:  arparse.o:  bad magic

nm:  arsup.o:  bad magic

nm:  bfdtest1.o:  bad magic

nm:  bfdtest2.o:  bad magic

nm:  binemul.o:  bad magic

nm:  binutils_tg.o:  bad magic

nm:  bucomm.o:  bad magic

nm:  cxxfilt.o:  bad magic

nm:  debug.o:  bad magic

nm:  dwarf.o:  bad magic

nm:  elfcomm.o:  bad magic

nm:  elfedit.o:  bad magic

nm:  emul_vanilla.o:  bad magic

nm:  filemode.o:  bad magic

nm:  is-ranlib.o:  bad magic

nm:  is-strip.o:  bad magic

nm:  nm.o:  bad magic

nm:  not-ranlib.o:  bad magic

nm:  not-strip.o:  bad magic

nm:  objcopy.o:  bad magic

nm:  objdump.o:  bad magic

nm:  prdbg.o:  bad magic

nm:  rdcoff.o:  bad magic

nm:  rddbg.o:  bad magic

nm:  readelf.o:  bad magic

nm:  rename.o:  bad magic

nm:  size.o:  bad magic

nm:  stabs.o:  bad magic

nm:  strings.o:  bad magic

nm:  sysinfo.o:  bad magic

nm:  syslex_wrap.o:  bad magic

nm:  testglue.o:  bad magic

nm:  unwind-ia64.o:  bad magic

nm:  version.o:  bad magic

nm:  wrstabs.o:  bad magic
-bash-4.4$ file addr2line.o
addr2line.o:PA-RISC1.1 relocatable object

It appears the symbol table is created using magic value for an elf archive. 
This doesn't bother GNU nm, etc, but HP ld can't link executables using
these archives.

--disable-plugins works around the issue but this is not obvious.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26356] New: FAIL: objcopy --reverse-bytes

2020-08-08 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26356

Bug ID: 26356
   Summary: FAIL: objcopy --reverse-bytes
   Product: binutils
   Version: 2.35
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa2.0w-hp-hpux11.11
Target: hppa2.0w-hp-hpux11.11
 Build: hppa2.0w-hp-hpux11.11

/mnt/gnu/binutils/objdir/binutils/objcopy  -j \$DATA\$ --reverse-bytes=4
tmpdir/
bintest.o tmpdir/bintest.o-reversed
Executing on host: /mnt/gnu/binutils/objdir/binutils/objcopy  -j \\$DATA\\$
--re
verse-bytes=4 tmpdir/bintest.o tmpdir/bintest.o-reversed   (timeout = 300)
spawn failed

Program causes segmentation fault.

-bash-4.4$ ./objcopy -j \$DATA\$ --reverse-bytes objcopy.o xxx.o
./objcopy: number of bytes to reverse must be positive and even
-bash-4.4$ ./objcopy -j \$DATA\$ --reverse-bytes=4 objcopy.o xxx.o
Segmentation fault (core dumped)
-bash-4.4$ gdb -c core objcopy
GNU gdb (GDB) 7.9.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "hppa2.0w-hp-hpux11.11".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from objcopy...done.
[New process 6052895]

warning: Private mapping of shared library text was not specified
by the executable; setting a breakpoint in a shared library which
is not privately mapped will not work.  See the HP-UX 11i v3 chatr
manpage for methods to privately map shared library text.
Unable to write __dld_flags.
(gdb) bt
#0  som_prep_headers (abfd=0x40014108) at ../../src/bfd/som.c:2678
#1  0x00047fd8 in som_set_section_contents (abfd=0x40014108, section=0x0,
location=0x40027150, offset=0, count=2320) at ../../src/bfd/som.c:5711
#2  0x00036c58 in bfd_set_section_contents (abfd=0x40014108,
section=0x40023fd0, location=0x40027150, offset=0, count=2320)
at ../../src/bfd/section.c:1520
#3  0x00010ca4 in copy_section (ibfd=0x, isection=0x40020e08,
obfdarg=0x40014108) at ../../src/binutils/objcopy.c:4430
#4  0x00036a4c in bfd_map_over_sections (abfd=0x40013048,
operation=@0x400093ca: 0x109c8 , user_storage=0x40014108)
at ../../src/bfd/section.c:1379
#5  0x00012a24 in copy_object (ibfd=0x40013048, obfd=0x40014108,
input_arch=0x4002ff00) at ../../src/binutils/objcopy.c:3266
#6  0x000141fc in copy_file (input_filename=0x7eff0026 "objcopy.o",
output_filename=0x7eff0030 "xxx.o", input_target=0x40014108 "@\002/\240@",
output_target=0x89384 <__PRETTY_FUNCTION__.10416+24> "som", input_arch=0x0)
at ../../src/binutils/objcopy.c:3831
#7  0x00016d5c in main (argc=1818324583, argv=0x6f70742f)
at ../../src/binutils/objcopy.c:5892
(gdb) disass $pc-16,$pc+16
Dump of assembler code from 0x464bc to 0x464dc:
   0x000464bc :   cmpib,=,n 0,ret0,0x465a4

   0x000464c0 :   ldw 4(ret0),ret0
   0x000464c4 :   cmpb,= r3,ret0,0x465bc

   0x000464c8 :   ldo 40(ret0),ret0
=> 0x000464cc :   ldw 0(ret0),ret0
   0x000464d0 :   cmpb,= r3,ret0,0x465bc

   0x000464d4 :   copy r8,r25
   0x000464d8 :   b,l 0x353d8 ,rp
End of assembler dump.
(gdb) p/x $ret0
$1 = 0x40

static bfd_boolean
som_is_space (asection *section)
{
  /* If no copy data is available, then it's neither a space nor a
 subspace.  */
  if (som_section_data (section)->copy_data == NULL)
return FALSE;

  /* If the containing space isn't the same as the given section,
 then this isn't a space.  */
  if (som_section_data (section)->copy_data->container != section
  && (som_section_data (section)->copy_data->container->output_section
  != section))
return FALSE;

  /* OK.  Must be a space.  */
  return TRUE;
}

Looks like som_section_data (section)->copy_data->container is NULL.

This bug has been around for some time.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26350] New: FAIL: Multibyte symbol names

2020-08-07 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26350

Bug ID: 26350
   Summary: FAIL: Multibyte symbol names
   Product: binutils
   Version: 2.35
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa64-hp-hpux11.11
Target: hppa64-hp-hpux11.11
 Build: hppa64-hp-hpux11.11

sed -e 's/^[ ]*.comm \([^,]*\),\(.*\)/\1 .comm \2/' <
/mnt/gnu/binutils/src/
gas/testsuite/gas/elf/syms.s > tmpdir/asm.s
Executing on host: sh -c {sed -e 's/^[   ]*.comm \([^,]*\),\(.*\)/\1 .comm \2/'
< /mnt/gnu/binutils/src/gas/testsuite/gas/elf/syms.s > tmpdir/asm.s}   
(timeout
 = 300)
spawn sh -c sed -e 's/^[ ]*.comm \([^,]*\),\(.*\)/\1 .comm \2/' <
/mnt/gnu/binutils/src/gas/testsuite/gas/elf/syms.s > tmpdir/asm.s
../as-new -o tmpdir/syms.o tmpdir/asm.s
Executing on host: sh -c {../as-new -o tmpdir/syms.o tmpdir/asm.s 2>&1} 
/dev/null dump.tmp (timeout = 300)
spawn [open ...]
/mnt/gnu/binutils/objdir64/gas/testsuite/../../binutils/readelf  -S -s -p
.strtab tmpdir/syms.o > tmpdir/dump.out
Executing on host: sh -c
{/mnt/gnu/binutils/objdir64/gas/testsuite/../../binutils/readelf  -S -s -p
.strtab tmpdir/syms.o > tmpdir/dump.out 2>dump.tmp}  /dev/null  (timeout = 300)
spawn [open ...]
extra regexps in /mnt/gnu/binutils/src/gas/testsuite/gas/elf/syms.d starting
with "^  \[..\]  sy.*mbol$"
EOF from tmpdir/dump.out
FAIL: Multibyte symbol names

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26349] New: FAIL: binutils-all/pr25543

2020-08-07 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26349

Bug ID: 26349
   Summary: FAIL: binutils-all/pr25543
   Product: binutils
   Version: 2.35
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa64-hp-hpux11.11
Target: hppa64-hp-hpux11.11
 Build: hppa64-hp-hpux11.11

sed -e 's/^[ ]*.comm \([^,]*\),\(.*\)/\1 .comm \2/' <
/mnt/gnu/binutils/src/binutils/testsuite/binutils-all/pr25543.s > tmpdir/asm.s
Executing on host: sh -c {sed -e 's/^[   ]*.comm \([^,]*\),\(.*\)/\1 .comm \2/'
< /mnt/gnu/binutils/src/binutils/testsuite/binutils-all/pr25543.s >
tmpdir/asm.s}(timeout = 300)
spawn sh -c sed -e 's/^[ ]*.comm \([^,]*\),\(.*\)/\1 .comm \2/' <
/mnt/gnu/binutils/src/binutils/testsuite/binutils-all/pr25543.s > tmpdir/asm.s
/mnt/gnu/binutils/objdir64/binutils/../gas/as-new -o tmpdir/pr25543.o
tmpdir/asm.s
Executing on host: sh -c {/mnt/gnu/binutils/objdir64/binutils/../gas/as-new
-o tmpdir/pr25543.o tmpdir/asm.s 2>&1}  /dev/null dump.tmp (timeout = 300)
spawn [open ...]
/mnt/gnu/binutils/objdir64/binutils/readelf  -p.data tmpdir/pr25543.o >
tmpdir/dump.out
Executing on host: sh -c {/mnt/gnu/binutils/objdir64/binutils/readelf  -p.data
tmpdir/pr25543.o > tmpdir/dump.out 2>dump.tmp}  /dev/null  (timeout = 300)
spawn [open ...]
regexp_diff match failure
regexp "^  \[ 0\]  line1 : This is a line without a newline at the end$"
line   "  [tx]  line1 : This is a line without a newline at the end"
regexp_diff match failure
regexp "^  \[34\]  line2 : This is a line with a newline at the end\\n$"
line   "  [tx]  line2 : This is a line with a newline at the end\n"
regexp_diff match failure
regexp "^  \[66\]  line3 : This is a line with a \\n$"
line   "  [tx]  line3 : This is a line with a \n"
regexp_diff match failure
regexp "^  \[9b\]  line4 : This is a line with a \^Mcontrol character$"
line   "  [tx]  line4 : This is a line with a ^Mcontrol character"
regexp_diff match failure
regexp "^  \[cd\]  line6 : The previous line was empty\\n$"
line   "  [tx]  line6 : The previous line was empty\n"
FAIL: binutils-all/pr25543

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call

2020-04-14 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25599

John David Anglin  changed:

   What|Removed |Added

 CC||danglin at gcc dot gnu.org

--- Comment #2 from John David Anglin  ---
For some reason my responses to Nick's questions bounced.

Documentation on ia64 relocs is here:
https://refspecs.linuxfoundation.org/elf/IA64-SysV-psABI.pdf

On 2020-04-08 8:57 a.m., nickc at redhat dot com wrote:
>   I am afraid that I am totally unfamiliar with the IA64 ABI, so if my
>   questions below do not make sense, then please forgive me:
>
>   1.  Is it the case that all instances of the PCREL60B reloc are wrong
>   or is it only under certain circumstances ?  If it is under
>   certain circumstances, then what are they ?

I believe the issue applies to all instances.  The reloc just isn't tested.

>
>   2.  Are other, similar relocs affected ?

I believe the PCREL21B works properly.

>
>   3.  Does this problem only apply to the HP-UX targeted version of the
>   IA64 assembler, or does it apply to other versions too ?  eg
>   ia64-linux, ia64-netbsd, etc.

HP-UX ld handles calls to "weak" functions differently from GNU ld.  The big
difference is calls to "weak" functions don't go through the PLT.  Currently,
calls to weak functions use the PCREL21B relocation.

When gcc switched to building with g++, this resulted in the gcc build using
weak functions.  There's no garbage collection in the HP linker (i.e., linkonce
support), so some calls ended up exceeding the maximum branch distance of the
PCREL21B relocation.  This is a particular problem when stage1 is built
with -O0.  The cc1 and cc1plus binaries are huge.

Given the above, the simplest solution seemed to be to add a long call feature
using the PCREL60B relocation.  However, Peter found that the GNU tools don't
appear to handle the relocation correctly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25315] `__tcf_0' referenced in section `.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev.cst4' of mode_query_balls_distances.o: defined in discarded section `.text.__tcf_0[_ZNK6com

2020-01-04 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25315

--- Comment #17 from John David Anglin  ---
Links:

https://gcc.gnu.org/viewcvs?rev=279824=gcc=rev
https://gcc.gnu.org/viewcvs?rev=279823=gcc=rev

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25315] `__tcf_0' referenced in section `.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev.cst4' of mode_query_balls_distances.o: defined in discarded section `.text.__tcf_0[_ZNK6com

2020-01-01 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25315

--- Comment #16 from John David Anglin  ---
I committed a gcc change to trunk and gcc-9 to put references to function
labels in COMDAT groups in .data.rel.ro.local.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25315] `__tcf_0' referenced in section `.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev.cst4' of mode_query_balls_distances.o: defined in discarded section `.text.__tcf_0[_ZNK6com

2019-12-31 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25315

--- Comment #15 from John David Anglin  ---
I tend to think the linker should provide a mechanism to ignore or fixup
references to discarded sections on a symbol basis.  Doing it on a section
basis seems somewhat imprecise.

If there isn't a reasonably simple way to implement the above, I think it would
be better if I change gcc to put PLABEL32 (and DIR32) references to functions
in COMDAT groups back into ".data.rel.ro.local".

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25327] New: FAIL: Run pr20276

2019-12-30 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25327

Bug ID: 25327
   Summary: FAIL: Run pr20276
   Product: binutils
   Version: 2.34 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu

With gcc-10:

gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/sr
c/ld/testsuite/ld-plugin -g -O2   -c -g -O2 -flto -O2 -c
/home/dave/gnu/binutils
/src/ld/testsuite/ld-plugin/dummy.c -o tmpdir/dummy.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I
/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin -g -O2   -c -g -O2 -flto -O2
-c /home/dave/gnu/binutils/src/ld/testsuite/ld-plugin/dummy.c -o tmpdir/dummy.o
2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/  
-L=/home/dave/opt/test/hppa
-unknown-linux-gnu/lib -L=/home/dave/opt/test/lib -L=/usr/local/lib -L=/lib
-L=/
usr/lib  -o tmpdir/pr20276 
-L/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin
 -O2 -flto tmpdir/pr20276a.o tmpdir/pr20276b.o tmpdir/dummy.o
Executing on host: sh -c {gcc -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/  
-L=/home/dave/opt/test/hppa-unknown-linux-gnu/lib -L=/home/dave/opt/test/lib
-L=/usr/local/lib -L=/lib -L=/usr/lib  -o tmpdir/pr20276 
-L/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin -O2 -flto
tmpdir/pr20276a.o tmpdir/pr20276b.o tmpdir/dummy.o  2>&1}  /dev/null ld.tmp
(timeout = 300)
spawn [open ...]
/home/dave/gnu/binutils/objdir/ld/.libs/lt-ld-new: tmpdir/pr20276b.o (symbol
from plugin): in function `global_var':
(.text+0x0): multiple definition of `global_var';
tmpdir/pr20276a.o:/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin/pr20276a.c:3:
first defined here
collect2: error: ld returned 1 exit status
/home/dave/gnu/binutils/objdir/ld/.libs/lt-ld-new: tmpdir/pr20276b.o (symbol
from plugin): in function `global_var':
(.text+0x0): multiple definition of `global_var';
tmpdir/pr20276a.o:/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin/pr20276a.c:3:
first defined here
collect2: error: ld returned 1 exit status
FAIL: Run pr20276
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin -g -O2   -c -g -O2 -flto
-O2 -c /home/dave/gnu/binutils/src/ld/testsuite/ld-plugin/dummy.c -o
tmpdir/dummy.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin -g -O2   -c -g -O2 -flto
-O2 -c /home/dave/gnu/binutils/src/ld/testsuite/ld-plugin/dummy.c -o
tmpdir/dummy.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/  
-L=/home/dave/opt/test/hppa-unknown-linux-gnu/lib -L=/home/dave/opt/test/lib
-L=/usr/local/lib -L=/lib -L=/usr/lib  -o tmpdir/pr20267a 
-L/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin -O2 -flto
tmpdir/pr20267a.o tmpdir/libpr20267a.a tmpdir/dummy.o
Executing on host: sh -c {gcc -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/  
-L=/home/dave/opt/test/hppa-unknown-linux-gnu/lib -L=/home/dave/opt/test/lib
-L=/usr/local/lib -L=/lib -L=/usr/lib  -o tmpdir/pr20267a 
-L/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin -O2 -flto
tmpdir/pr20267a.o tmpdir/libpr20267a.a tmpdir/dummy.o  2>&1}  /dev/null ld.tmp
(timeout = 300)
spawn [open ...]
Running: tmpdir/pr20267a > tmpdir/pr20267a.out
child killed: SIGABRT
FAIL: Run pr20267a
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin -g -O2   -c -g -O2 -flto
-O2 -c /home/dave/gnu/binutils/src/ld/testsuite/ld-plugin/dummy.c -o
tmpdir/dummy.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin -g -O2   -c -g -O2 -flto
-O2 -c /home/dave/gnu/binutils/src/ld/testsuite/ld-plugin/dummy.c -o
tmpdir/dummy.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/  
-L=/home/dave/opt/test/hppa-unknown-linux-gnu/lib -L=/home/dave/opt/test/lib
-L=/usr/local/lib -L=/lib -L=/usr/lib  -o tmpdir/pr20267b 
-L/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin -O2 -flto
tmpdir/pr20267a.o tmpdir/libpr20267b.a tmpdir/dummy.o
Executing on host: sh -c {gcc -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/  
-L=/home/dave/opt/test/hppa-unknown-linux-gnu/lib -L=/home/dave/opt/test/lib
-L=/usr/local/lib -L=/lib -L=/usr/lib  -o tmpdir/pr20267b 
-L/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin -O2 -flto
tmpdir/pr20267a.o tmpdir/libpr20267b.a tmpdir/dummy.o  2>&1}  /dev/null ld.tmp
(timeout = 300)
spawn [open ...]
Running: tmpdir/pr20267b > tmpdir/pr20267b.out
c

[Bug ld/25326] New: FAIL: Run pr19579

2019-12-30 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25326

Bug ID: 25326
   Summary: FAIL: Run pr19579
   Product: binutils
   Version: 2.34 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu

With gcc-10:

Executing on host: sh -c {gcc -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/  
-
L=/home/dave/opt/test/hppa-unknown-linux-gnu/lib -L=/home/dave/opt/test/lib
-L=/
usr/local/lib -L=/lib -L=/usr/lib  -o tmpdir/pr19579 
-L/home/dave/gnu/binutils/
src/ld/testsuite/ld-elf -pie -Wl,--no-as-needed,-z,text tmpdir/pr19579a.o
tmpdir
/libpr19579.so tmpdir/dummy.o  2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
Running: tmpdir/pr19579 > tmpdir/pr19579.out
diff tmpdir/pr19579.out
/home/dave/gnu/binutils/src/ld/testsuite/ld-elf/pass.out
0a1
> PASS
child process exited abnormally
FAIL: Run pr19579

Similar fail:
FAIL: Run pr19579 (-z now)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25285] FAIL: Run with libfunc1.so comm1.o with GCC 10

2019-12-30 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25285

John David Anglin  changed:

   What|Removed |Added

 CC||danglin at gcc dot gnu.org

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25315] `__tcf_0' referenced in section `.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev.cst4' of mode_query_balls_distances.o: defined in discarded section `.text.__tcf_0[_ZNK6com

2019-12-30 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25315

--- Comment #13 from John David Anglin  ---
Created attachment 12156
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12156=edit
Patch

It would be better if we only ignored deleted PLABEL32 relocations to discarded
COMDAT functions.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25315] `__tcf_0' referenced in section `.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev.cst4' of mode_query_balls_distances.o: defined in discarded section `.text.__tcf_0[_ZNK6com

2019-12-30 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25315

--- Comment #12 from John David Anglin  ---
Created attachment 12155
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12155=edit
Buggy patch

With the patch, we now get plabels in .rodata comdat sections with same key as
the function.  However, this creates a problem with local references to the
plabel.

.section   
.text._ZN7Dsymbol8isNspaceEv,"axG",@progbits,_ZN7Dsymbol8isNspaceEv,comdat
.align 4
.weak   _ZN7Dsymbol8isNspaceEv
.type   _ZN7Dsymbol8isNspaceEv, @function
_ZN7Dsymbol8isNspaceEv:
.PROC
.CALLINFO FRAME=0,NO_CALLS
.ENTRY
.LVL12:
.LFB641:
.loc 2 247 21 is_stmt 1 view -0
.cfi_startproc
.loc 2 247 34 view .LVU35
.loc 2 247 46 is_stmt 0 view .LVU36
bv %r0(%r2)
ldi 0,%r28
.EXIT
.PROCEND
.cfi_endproc
.LFE641:
.size   _ZN7Dsymbol8isNspaceEv, .-_ZN7Dsymbol8isNspaceEv


.section   
.rodata._ZN7Dsymbol8isNspaceEv,"aG",@progbits,_ZN7Dsymbol8isNspaceEv,comdat
.align 4
.LC14:
.word   P%_ZN7Dsymbol8isNspaceEv


ldil LR'.LC14,%r28
ldo RR'.LC14(%r28),%r28
bl __canonicalize_funcptr_for_compare,%r2
.LVL218:
ldw 0(%r28),%r26


It seems to me that we have to leave the plabel, make sure it's null when it
refers to a discarded function, and suppress the error in ld.  Otherwise, the
linker would need to patch the above sequence into three nop instructions and
a ldi 0,%r28.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25315] `__tcf_0' referenced in section `.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev.cst4' of mode_query_balls_distances.o: defined in discarded section `.text.__tcf_0[_ZNK6com

2019-12-30 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25315

John David Anglin  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #11 from John David Anglin  ---
Gcc fix suggested in comment 8 has problems:

/home/dave/gnu/gcc/objdir/./prev-gcc/xg++
-B/home/dave/gnu/gcc/objdir/./prev-gcc
/ -B/home/dave/opt/gnu/gcc/gcc-10/hppa-linux-gnu/bin/ -nostdinc++
-B/home/dave/g
nu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/src/.libs
-B/home/dave/gnu/gcc/ob
jdir/prev-hppa-linux-gnu/libstdc++-v3/libsupc++/.libs 
-I/home/dave/gnu/gcc/objd
ir/prev-hppa-linux-gnu/libstdc++-v3/include/hppa-linux-gnu 
-I/home/dave/gnu/gcc
/objdir/prev-hppa-linux-gnu/libstdc++-v3/include 
-I/home/dave/gnu/gcc/gcc/libst
dc++-v3/libsupc++
-L/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/s
rc/.libs
-L/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/libsupc++/
.libs -no-pie   -g -O2 -fno-checking -DIN_GCC -fno-exceptions -fno-rtti
-fas
ynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wn
o-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-W
no-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror  
-DHAVE_CONFI
G_H -static-libstdc++ -static-libgcc  -o d21 \
d/aav.o d/access.o d/aliasthis.o d/apply.o d/argtypes.o d/arrayop.o
d/at
trib.o d/blockexit.o d/canthrow.o d/checkedint.o d/clone.o d/cond.o
d/constfold.
o d/cppmangle.o d/ctfeexpr.o d/dcast.o d/dclass.o d/declaration.o
d/delegatize.o
 d/denum.o d/dimport.o d/dinterpret.o d/dmacro.o d/dmangle.o d/dmodule.o
d/doc.o
 d/dscope.o d/dstruct.o d/dsymbol.o d/dtemplate.o d/dversion.o d/entity.o
d/esca
pe.o d/expression.o d/expressionsem.o d/file.o d/filename.o d/func.o d/hdrgen.o
d/iasm.o d/iasmgcc.o d/identifier.o d/imphint.o d/init.o d/initsem.o
d/intrange.
o d/json.o d/lexer.o d/mtype.o d/nogc.o d/nspace.o d/objc.o d/opover.o
d/optimiz
e.o d/outbuffer.o d/parse.o d/rmem.o d/rootobject.o d/safe.o d/sapply.o
d/sideef
fect.o d/speller.o d/statement.o d/statementsem.o d/staticassert.o
d/staticcond.
o d/stringtable.o d/tokens.o d/traits.o d/typesem.o d/utf.o d/utils.o d/id.o
d/i
mpcnvtab.o d/d-attribs.o d/d-builtins.o d/d-codegen.o d/d-convert.o
d/d-diagnost
ic.o d/d-frontend.o d/d-incpath.o d/d-lang.o d/d-longdouble.o d/d-target.o
d/dec
l.o d/expr.o d/imports.o d/intrinsics.o d/modules.o d/runtime.o d/toir.o
d/typei
nfo.o d/types.o glibc-d.o pa-d.o attribs.o libbackend.a main.o
libcommon-target.
a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a
../l
ibcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a
.
./libdecnumber/libdecnumber.a  -lisl -lmpc -lmpfr -lgmp -rdynamic -ldl 
-L./../z
lib -lz -lzstd
`.LC14' referenced in section `.text' of d/declaration.o: defined in discarded
section `.rodata._ZN7Dsymbol8isNspaceEv[_ZN7Dsymbol8isNspaceEv]' of
d/declaration.o
`.LC14' referenced in section `.text' of d/declaration.o: defined in discarded
section `.rodata._ZN7Dsymbol8isNspaceEv[_ZN7Dsymbol8isNspaceEv]' of
d/declaration.o

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25315] `__tcf_0' referenced in section `.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev.cst4' of mode_query_balls_distances.o: defined in discarded section `.text.__tcf_0[_ZNK6com

2019-12-29 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25315

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from John David Anglin  ---
Testing gcc fix.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25315] `__tcf_0' referenced in section `.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev.cst4' of mode_query_balls_distances.o: defined in discarded section `.text.__tcf_0[_ZNK6com

2019-12-29 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25315

--- Comment #9 from John David Anglin  ---
Okay, it appears to me we need to do something special in
elf_select_rtx_section.  Otherwise, plabels end up in the section selected by
mergeable_constant_section().

dave@atlas:~/gnu/gcc/gcc/gcc/config/pa$ svn diff .
Index: pa-linux.h
===
--- pa-linux.h  (revision 279757)
+++ pa-linux.h  (working copy)
@@ -130,6 +130,9 @@
 }  \
   while (0)

+#undef TARGET_ASM_SELECT_RTX_SECTION
+#define TARGET_ASM_SELECT_RTX_SECTION pa_elf_select_rtx_section
+
 #undef TARGET_GAS
 #define TARGET_GAS 1

Index: pa.c
===
--- pa.c(revision 279757)
+++ pa.c(working copy)
@@ -203,6 +203,7 @@
 static bool pa_modes_tieable_p (machine_mode, machine_mode);
 static bool pa_can_change_mode_class (machine_mode, machine_mode,
reg_class_t);
 static HOST_WIDE_INT pa_starting_frame_offset (void);
+static section* pa_elf_select_rtx_section(machine_mode, rtx, unsigned
HOST_WIDE_INT) ATTRIBUTE_UNUSED;

 /* The following extra sections are only used for SOM.  */
 static GTY(()) section *som_readonly_data_section;
@@ -9838,6 +9839,16 @@
 return data_section;
 }

+static section *
+pa_elf_select_rtx_section (machine_mode mode, rtx x,
+  unsigned HOST_WIDE_INT align)
+{
+  if (function_label_operand (x, VOIDmode))
+return get_variable_section (SYMBOL_REF_DECL (x), true);
+
+  return default_elf_select_rtx_section (mode, x, align);
+}
+
 /* Implement pa_reloc_rw_mask.  */

 static int

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25315] `__tcf_0' referenced in section `.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev.cst4' of mode_query_balls_distances.o: defined in discarded section `.text.__tcf_0[_ZNK6com

2019-12-27 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25315

--- Comment #7 from John David Anglin  ---
This problem has occurred before.  The work around applied to
elf_hppa_action_discarded() was to fix the following gcc bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67834

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25315] `__tcf_0' referenced in section `.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev.cst4' of mode_query_balls_distances.o: defined in discarded section `.text.__tcf_0[_ZNK6com

2019-12-26 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25315

--- Comment #3 from John David Anglin  ---
I guess we need to adjust elf_hppa_action_discarded():

/* What to do when ld finds relocations against symbols defined in
   discarded sections.  */

static unsigned int
elf_hppa_action_discarded (asection *sec)
{
  /* Ignore relocations in .data.rel.ro.local.  This section can contain
 PLABEL32 relocations to functions in discarded COMDAT groups.  */
  if (strcmp (".data.rel.ro.local", sec->name) == 0)
return 0;

  if (strcmp (".PARISC.unwind", sec->name) == 0)
return 0;

  return _bfd_elf_default_action_discarded (sec);
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25315] `__tcf_0' referenced in section `.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev.cst4' of mode_query_balls_distances.o: defined in discarded section `.text.__tcf_0[_ZNK6com

2019-12-26 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25315

--- Comment #2 from John David Anglin  ---
It is used in _ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev:

.section   
.text._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11
Ev,"axG",@progbits,_ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev,comdat
.align 4
.weak   _ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev
.type   _ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev, @function
_ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev:
.PROC
.CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=11
.ENTRY

...

addil LR'__dso_handle-$global$,%r27
ldil LR'.LC34,%r28
ldo RR'.LC34(%r28),%r28
ldi 0,%r25
ldo RR'__dso_handle-$global$(%r1),%r24
bl __cxa_atexit,%r2
.LVL2503:
ldw 0(%r28),%r26

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25315] `__tcf_0' referenced in section `.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev.cst4' of mode_query_balls_distances.o: defined in discarded section `.text.__tcf_0[_ZNK6com

2019-12-26 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25315

--- Comment #1 from John David Anglin  ---
__tcf_0 is defined in a comdat section, but the symbol is local.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/25315] New: `__tcf_0' referenced in section `.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev.cst4' of mode_query_balls_distances.o: defined in discarded section `.text.__tcf_0[_ZN

2019-12-25 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25315

Bug ID: 25315
   Summary: `__tcf_0' referenced in section
`.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5
cxx11Ev.cst4' of mode_query_balls_distances.o: defined
in discarded section
`.text.__tcf_0[_ZNK6common26ChainResidueAtomDescriptor
3strB5cxx11Ev]' of mode_query_balls_dis
   Product: binutils
   Version: 2.33
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
CC: deller at gmx dot de
  Target Milestone: ---
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu

The Debian voronota package fails to build on hppa-linux with gcc-9:
https://buildd.debian.org/status/fetch.php?pkg=voronota=hppa=1.20.2710-1=1577116832=0

I'm unsure whether this is a gcc or binutils issue.  I am fairly sure this
problem was introduced by a change to pa_reloc_rw_mask().  We now allow relocs
in read-only data in non-pic code.  However, it seems a section can be
discarded even though there is a plabel reference to it.

.section   
.text.__tcf_0,"axG",@progbits,_ZNK6common26ChainResidueAtomDescriptor3strB5cxx11Ev,comdat
.align 4
.type   __tcf_0, @function
__tcf_0:
.PROC
.CALLINFO FRAME=64,CALLS,SAVE_RP,ENTRY_GR=4
.ENTRY
.LFB4043:
.loc 2 371 120 is_stmt 1 view -0
.cfi_startproc
stw %r2,-20(%r30)


.section   
.rodata._ZNK6common26ChainResidueAtomDescriptor3strB5cxx
11Ev.cst4,"aM",@progbits,4
.align 4
.LC33:
.word   P%_ZN6common26ChainResidueAtomDescriptor12MarkerNamingD1Ev
.align 4
.LC34:
.word   P%__tcf_0
.align 4
.LC35:
.word  
P%_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED1Ev

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gas/25121] tc-hppa.c:1371:23: error: implicit conversion from 'enum el f_hppa_reloc_type' to 'bfd_reloc_code_real_type'

2019-10-26 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25121

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from John David Anglin  ---
Fixed on master.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gas/25121] tc-hppa.c:1371:23: error: implicit conversion from 'enum el f_hppa_reloc_type' to 'bfd_reloc_code_real_type'

2019-10-20 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25121

--- Comment #1 from John David Anglin  ---
Created attachment 12046
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12046=edit
Patch

Patch fixes build but maybe there is a better solution.

-- 
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/25121] New: tc-hppa.c:1371:23: error: implicit conversion from 'enum el f_hppa_reloc_type' to 'bfd_reloc_code_real_type'

2019-10-20 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25121

Bug ID: 25121
   Summary: tc-hppa.c:1371:23: error: implicit conversion from
'enum el f_hppa_reloc_type' to
'bfd_reloc_code_real_type'
   Product: binutils
   Version: 2.34 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu

I see the following errors building with gcc trunk:

gcc -DHAVE_CONFIG_H -I. -I../../src/gas  -I. -I../../src/gas -I../bfd
-I../../sr
c/gas/config -I../../src/gas/../include -I../../src/gas/..
-I../../src/gas/../bf
d -DLOCALEDIR="\"/home/dave/opt/test/share/locale\""  -W -Wall
-Wstrict-prototyp
es -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror -Wwrite-strings
-I
../../src/gas/../zlib -g -O2 -MT config/tc-hppa.o -MD -MP -MF $depbase.Tpo -c
-o
 config/tc-hppa.o ../../src/gas/config/tc-hppa.c &&\
mv -f $depbase.Tpo $depbase.Po
../../src/gas/config/tc-hppa.c: In function 'tc_gen_reloc':
../../src/gas/config/tc-hppa.c:1371:23: error: implicit conversion from 'enum
el
f_hppa_reloc_type' to 'bfd_reloc_code_real_type' {aka 'enum
bfd_reloc_code_real'
} [-Werror=enum-conversion]
 1371 |   fixp->fx_r_type = R_HPPA_PCREL_CALL;
  |   ^
../../src/gas/config/tc-hppa.c:1376:15: error: implicit conversion from
'bfd_rel
oc_code_real_type' {aka 'enum bfd_reloc_code_real'} to 'elf_hppa_reloc_type'
[-W
error=enum-conversion]
 1376 |   fixp->fx_r_type,
  |   ^~~
../../src/gas/config/tc-hppa.c: In function 'md_assemble':
../../src/gas/config/tc-hppa.c:5790:13: error: implicit conversion from
'reloc_type' {aka 'enum elf_hppa_reloc_type'} to 'bfd_reloc_code_real_type'
{aka 'enum bfd_reloc_code_real'} [-Werror=enum-conversion]
 5790 | the_insn.reloc, the_insn.field_selector,
  | ^~
../../src/gas/config/tc-hppa.c: In function 'hppa_fix_adjustable':
../../src/gas/config/tc-hppa.c:8320:52: error: implicit conversion from
'bfd_reloc_code_real_type' {aka 'enum bfd_reloc_code_real'} to
'elf_hppa_reloc_type' [-Werror=enum-conversion]
 8320 |   code = elf_hppa_reloc_final_type (stdoutput, fixp->fx_r_type,
  |^~~
cc1: all warnings being treated as errors
make[4]: *** [Makefile:1229: config/tc-hppa.o] Error 1
make[4]: Leaving directory '/home/dave/gnu/binutils/objdir/gas'
make[3]: *** [Makefile:1274: all-recursive] Error 1
make[3]: Leaving directory '/home/dave/gnu/binutils/objdir/gas'
make[2]: *** [Makefile:816: all] Error 2
make[2]: Leaving directory '/home/dave/gnu/binutils/objdir/gas'
make[1]: *** [Makefile:4907: all-gas] Error 2
make[1]: Leaving directory '/home/dave/gnu/binutils/objdir'

-- 
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/25110] FAIL: --gc-sections with __start_SECTIONNAME

2019-10-19 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25110

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from John David Anglin  ---
Fixed on trunk.

-- 
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/25110] FAIL: --gc-sections with __start_SECTIONNAME

2019-10-16 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25110

--- Comment #6 from John David Anglin  ---
The "possible fix" works for me.

-- 
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/25110] FAIL: --gc-sections with __start_SECTIONNAME

2019-10-16 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25110

--- Comment #5 from John David Anglin  ---
Created attachment 12043
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12043=edit
Patch

This is a horrible hack to avoid $$dyncall being called when using gcc-9 and
gcc-10, but I wasn't able to figure out a way to cause the test to link against
libgcc.

-- 
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/25110] New: FAIL: --gc-sections with __start_SECTIONNAME

2019-10-15 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25110

Bug ID: 25110
   Summary: FAIL: --gc-sections with __start_SECTIONNAME
   Product: binutils
   Version: 2.34 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu

gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-gc -g -O2   -g -O2
-ffunction-sections -fdata-sections -O0 -c
/home/dave/gnu/binutils/src/ld/testsuite/ld-gc/pr19161-1.c -o
tmpdir/pr19161-1.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-gc -g -O2   -g -O2
-ffunction-sections -fdata-sections -O0 -c
/home/dave/gnu/binutils/src/ld/testsuite/ld-gc/pr19161-1.c -o
tmpdir/pr19161-1.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-gc -g -O2   -g -O2
-ffunction-sections -fdata-sections -O0 -c
/home/dave/gnu/binutils/src/ld/testsuite/ld-gc/pr19161-2.c -o
tmpdir/pr19161-2.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-gc -g -O2   -g -O2
-ffunction-sections -fdata-sections -O0 -c
/home/dave/gnu/binutils/src/ld/testsuite/ld-gc/pr19161-2.c -o
tmpdir/pr19161-2.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
/home/dave/gnu/binutils/objdir/ld/../gas/as-new -o tmpdir/dummy.o
/home/dave/gnu/binutils/src/ld/testsuite/ld-gc/dummy.s
Executing on host: sh -c {/home/dave/gnu/binutils/objdir/ld/../gas/as-new
-o tmpdir/dummy.o /home/dave/gnu/binutils/src/ld/testsuite/ld-gc/dummy.s 2>&1} 
/dev/null dump.tmp (timeout = 300)
spawn [open ...]
./ld-new -z norelro  -L/home/dave/gnu/binutils/src/ld/testsuite/ld-gc 
--gc-sections -e main tmpdir/pr19161-1.o tmpdir/pr19161-2.o -o tmpdir/dump
tmpdir/dummy.o
Executing on host: sh -c {./ld-new -z norelro 
-L/home/dave/gnu/binutils/src/ld/testsuite/ld-gc  --gc-sections -e main
tmpdir/pr19161-1.o tmpdir/pr19161-2.o -o tmpdir/dump tmpdir/dummy.o  2>&1} 
/dev/null dump.tmp (timeout = 300)
spawn [open ...]
/home/dave/gnu/binutils/objdir/ld/.libs/lt-ld-new: tmpdir/pr19161-1.o: in
function `main':
/home/dave/gnu/binutils/src/ld/testsuite/ld-gc/pr19161-1.c:6: undefined
reference to `$$dyncall'
failed with: , no expected output
FAIL: --gc-sections with __start_SECTIONNAME

It would seem the linker is not linking against the library milli.a.

-- 
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/23837] Segmentation fault in resolve_symbol_value at symbols.c:1165

2018-10-28 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=23837

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from John David Anglin  ---
Fixed.

-- 
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/23837] Segmentation fault in resolve_symbol_value at symbols.c:1165

2018-10-27 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=23837

--- Comment #2 from John David Anglin  ---
Doh, I posted the corrected code in comment #1:

asm(".label hppa_save_regs");
asm(".proc");
asm(".callinfo");

The actual code in gbc.c is:
asm(".proc");
asm(".callinfo");
asm(".label hppa_save_regs");

-- 
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/23837] Segmentation fault in resolve_symbol_value at symbols.c:1165

2018-10-27 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=23837

--- Comment #1 from John David Anglin  ---
The problem occurs in getting the start callinfo symbol used for the
parisc unwind data.  The following hunk of code in gbc.c isn't quite
right:

#if defined(__hppa__) /* Courtesy of Lamont Jones */
/* the calling sequence */
struct regs {
void *callee_saves[16];
};
void hppa_save_regs(struct regs);

/* the code */

asm(".code");
asm(".export hppa_save_regs, entry");
asm(".label hppa_save_regs");
asm(".proc");
asm(".callinfo");
asm(".entry");

asm("stw%r3,0(%arg0)");
asm("stw%r4,4(%arg0)");
asm("stw%r5,8(%arg0)");
asm("stw%r6,12(%arg0)");
asm("stw%r7,16(%arg0)");
asm("stw%r8,20(%arg0)");
asm("stw%r9,24(%arg0)");
asm("stw%r10,28(%arg0)");
asm("stw%r11,32(%arg0)");
asm("stw%r12,36(%arg0)");
asm("stw%r13,40(%arg0)");
asm("stw%r14,44(%arg0)");
asm("stw%r15,48(%arg0)");
asm("stw%r16,52(%arg0)");
asm("stw%r17,56(%arg0)");
asm("bv 0(%rp)");
asm("stw%r18,60(%arg0)");

asm(".exit");
asm(".procend");
asm(".end");
#endif

The line "asm(".label hppa_save_regs");" should be before the .proc line.
As a result, gas finds the label marking the start of text in the object.  It
doesn't seem to have a valid frag.

I think the above code has been the same for many years.

-- 
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/23837] New: Segmentation fault in resolve_symbol_value at symbols.c:1165

2018-10-27 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=23837

Bug ID: 23837
   Summary: Segmentation fault in resolve_symbol_value at
symbols.c:1165
   Product: binutils
   Version: 2.31
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu

Created attachment 11370
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11370=edit
.s file

Assembly of gbc.c from gcl-2.6.12 fails with a segmentation fault.  Attached
assembly source.

The fault occurs here:
(gdb) r
Starting program: /home/dave/opt/gnu/bin/as -o gbc.o gbc.s

Program received signal SIGSEGV, Segmentation fault.
0x00034bac in resolve_symbol_value (symp=0x6f668)
at ../../src/gas/symbols.c:1165
1165  final_val += symp->sy_frag->fr_address / OCTETS_PER_BYTE;
(gdb) bt
#0  0x00034bac in resolve_symbol_value (symp=0x6f668)
at ../../src/gas/symbols.c:1165
#1  0x0003b710 in write_object_file () at ../../src/gas/write.c:2266
#2  0x00013104 in main (argc=, argv=)
at ../../src/gas/as.c:1385
(gdb) p *symp
$1 = {sy_flags = {sy_local_symbol = 0, sy_written = 0, sy_resolved = 0,
sy_resolving = 1, sy_used_in_reloc = 0, sy_used = 0, sy_volatile = 0,
sy_forward_ref = 0, sy_mri_common = 0, sy_weakrefr = 0, sy_weakrefd = 0},
  bsym = 0x8c8c8, sy_value = {X_add_symbol = 0x0, X_op_symbol = 0x0,
X_add_number = 0, X_op = O_constant, X_unsigned = 0, X_extrabit = 0,
X_md = 0}, sy_next = 0x6f760, sy_previous = 0x6f620, sy_frag = 0x655f7265,
  sy_obj = {local = 0, size = 0x0, versioned_name = 0x0}}

It appears the value at symp->sy_frag is set in brk:
(gdb) watch *0x6f688
Watchpoint 2: *0x6f688
(gdb) c
Continuing.

Watchpoint 2: *0x6f688

Old value = 
New value = 0
0xf80d7ad0 in brk () from /lib/hppa-linux-gnu/libc.so.6
(gdb) c
Continuing.

Watchpoint 2: *0x6f688

Old value = 0
New value = 1700754021
0xf80d7ad0 in brk () from /lib/hppa-linux-gnu/libc.so.6
(gdb) p/x *0x6f688
$6 = 0x655f7265
(gdb) bt
#0  0xf80d7ad0 in brk () from /lib/hppa-linux-gnu/libc.so.6
#1  0xf80d7c20 in sbrk () from /lib/hppa-linux-gnu/libc.so.6
#2  0xf80718c4 in __default_morecore () from /lib/hppa-linux-gnu/libc.so.6
#3  0xf806d0e0 in ?? () from /lib/hppa-linux-gnu/libc.so.6
#4  0xf806e210 in ?? () from /lib/hppa-linux-gnu/libc.so.6
#5  0xf806f7cc in malloc () from /lib/hppa-linux-gnu/libc.so.6
#6  0xf8594b3c in _objalloc_alloc (o=0x21000 ,
original_len=) at ../../src/libiberty/objalloc.c:159
#7  0xf8523bc0 in bfd_alloc (abfd=, size=)
at ../../src/bfd/opncls.c:950
#8  0xf85241e4 in bfd_zalloc (abfd=, size=716800)
at ../../src/bfd/opncls.c:998
#9  0xf854ab10 in _bfd_elf_make_empty_symbol (abfd=0xaf000)
at ../../src/bfd/elf.c:8691
#10 0x00034548 in symbol_create (name=, segment=0xae590,
valu=4162225112, frag=0x21000 )
at ../../src/gas/symbols.c:147
#11 0x0003463c in symbol_new (name=, segment=,
valu=, frag=) at ../../src/gas/symbols.c:89
#12 0x000360c4 in symbol_find_or_make (name=0xaf000 "")
at ../../src/gas/symbols.c:532
#13 0x0001f4ac in operand (expressionP=0xf8165c80, mode=(unknown: 4162225112))
at ../../src/gas/expr.c:1305
---Type  to continue, or q  to quit---
#14 0x0001f9a4 in expr (rankarg=, resultP=0x1008,
mode=(unknown: 135168)) at ../../src/gas/expr.c:1765
#15 0x00040cb8 in parse_cons_expression_hppa (exp=0xf8165c80)
at ../../src/gas/config/tc-hppa.c:2490
#16 0x0002d530 in cons_worker (nbytes=135168, rva=2672)
at ../../src/gas/read.c:4004
#17 0x0003e338 in pa_cons (nbytes=)
at ../../src/gas/config/tc-hppa.c:8160
#18 0x000303ac in read_a_source_file (name=)
at ../../src/gas/read.c:1148
#19 0x00012ec8 in perform_an_assembly_pass (argv=,
argc=-133469057) at ../../src/gas/as.c:1192
#20 main (argc=, argv=)
at ../../src/gas/as.c:1349
(gdb) disass $pc-32,$pc+32
Dump of assembler code from 0xf80d7ab0 to 0xf80d7af0:
   0xf80d7ab0 :   ldw,mb -80(sp),r7
   0xf80d7ab4 :  stw rp,-14(sp)
   0xf80d7ab8 :  stw,ma r4,40(sp)
   0xf80d7abc :  stw r3,-3c(sp)
   0xf80d7ac0 : stw r19,-20(sp)
   0xf80d7ac4 : copy r19,r4
   0xf80d7ac8 : be,l 100(sr2,r0),sr0,r31
   0xf80d7acc : ldi 2d,r20
=> 0xf80d7ad0 : copy r4,r19
   0xf80d7ad4 : ldi ffd,r20
   0xf80d7ad8 : ldo ffe(ret0),r21
   0xf80d7adc : cmpb,>>= r20,r21,0xf80d7b08 
   0xf80d7ae0 : addil L%1000,r19,r1
   0xf80d7ae4 : ldw 764(r1),r20
   0xf80d7ae8 : stw ret0,0(r20)
   0xf80d7aec : cmpb,<< ret0,r26,0xf80d7b48 
End of assembler dump.
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x00034bac in resolve_symbol_value (symp=0x6f668)
at ../../src/gas/symbols.c:1165
1165  final_val += symp->sy_frag->fr_address / OCTETS_PER_BYTE;

-

[Bug ld/23463] New: FAIL: PR ld/12982

2018-07-27 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=23463

Bug ID: 23463
   Summary: FAIL: PR ld/12982
   Product: binutils
   Version: 2.32 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu

gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/sr
c/ld/testsuite/ld-plugin -g -O2   -c -g -O2 -O2 -flto -c
/home/dave/gnu/binutils
/src/ld/testsuite/ld-plugin/pr12982.c -o tmpdir/pr12982.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I
/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin -g -O2   -c -g -O2 -O2 -flto
-c /home/dave/gnu/binutils/src/ld/testsuite/ld-plugin/pr12982.c -o
tmpdir/pr1298
2.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/  
-L=/home/dave/opt/gnu/hppa-
unknown-linux-gnu/lib -L=/home/dave/opt/gnu/lib -L=/usr/local/lib -L=/lib
-L=/us
r/lib  -o tmpdir/pr12982.exe 
-L/home/dave/gnu/binutils/src/ld/testsuite/ld-plug
in -O2 -flto -fuse-linker-plugin tmpdir/pr12982.o
Executing on host: sh -c {gcc -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/  
-
L=/home/dave/opt/gnu/hppa-unknown-linux-gnu/lib -L=/home/dave/opt/gnu/lib
-L=/us
r/local/lib -L=/lib -L=/usr/lib  -o tmpdir/pr12982.exe 
-L/home/dave/gnu/binutil
s/src/ld/testsuite/ld-plugin -O2 -flto -fuse-linker-plugin tmpdir/pr12982.o
2>&1
}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
/home/dave/gnu/binutils/objdir/ld/../binutils/readelf -l --wide
tmpdir/pr12982.e
xe > dump.out
fail if no difference
FAIL: PR ld/12982

dave@mx3210:~/gnu/binutils/objdir/ld/tmpdir$ readelf -l pr12982.exe

Elf file type is EXEC (Executable file)
Entry point 0x10338
There are 7 program headers, starting at offset 52

Program Headers:
  Type   Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR   0x34 0x00010034 0x00010034 0x000e0 0x000e0 R   0x4
  INTERP 0x000114 0x00010114 0x00010114 0xd 0xd R   0x1
  [Requesting program interpreter: /lib/ld.so.1]
  LOAD   0x00 0x0001 0x0001 0x00958 0x00958 R E 0x1000
  LOAD   0x001000 0x00011000 0x00011000 0x00168 0x00178 RWE 0x1000
  DYNAMIC0x001020 0x00011020 0x00011020 0x000c8 0x000c8 RW  0x4
  NOTE   0x000124 0x00010124 0x00010124 0x00044 0x00044 R   0x4
  GNU_STACK  0x00 0x 0x 0x0 0x0 RWE 0x10

The test should be xfailed on hppa as it still needs an executable stack
for syscall restarts and signal returns.

The test probably started to fail when I disabled generation of GNU stack
notes in gcc.  These notes caused problems with glibc (libc/23174).

MIPS probably has same problem.

-- 
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/22978] [2.30, 2.31 Regression] TLS local-dynamic incorrectly linked on hppa-linux

2018-03-18 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22978

John David Anglin  changed:

   What|Removed |Added

 Target||hppa-unknown-linux-gnu
   Host||hppa-unknown-linux-gnu
  Build||hppa-unknown-linux-gnu

-- 
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/22978] [2.30, 2.31 Regression] TLS local-dynamic incorrectly linked on hppa-linux

2018-03-18 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22978

John David Anglin  changed:

   What|Removed |Added

Summary|[2.30, 2.31 Regression] |[2.30, 2.31 Regression] TLS
   ||local-dynamic incorrectly
   ||linked on hppa-linux

-- 
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/22978] New: [2.30, 2.31 Regression]

2018-03-18 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22978

Bug ID: 22978
   Summary: [2.30, 2.31 Regression]
   Product: binutils
   Version: 2.31 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---

The run_ld.c test from gcc is incorrectly linked using binutils 2.30 and later
with -pie.

/* { dg-do run } */
/* { dg-require-effective-target tls_runtime } */
/* { dg-add-options tls } */

extern void abort (void);

__thread int tls_ld __attribute__((tls_model("local-dynamic"))) = 1;
__thread int tls_ld2 __attribute__((tls_model("local-dynamic"))) = 2;

int get_ld (void)
{
  return tls_ld + tls_ld2;
}

int *get_ldp (void)
{
  return _ld;
}

int main (void)
{
  int val;

  val = get_ld ();
  if (val != 1 + 2)
abort ();

  val = *get_ldp ();
  if (val != 1)
abort ();

  return 0;
}

Executing on host: /home/dave/gnu/gcc/objdir/gcc/xgcc
-B/home/dave/gnu/gcc/objdi
r/gcc/ /home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/tls/run-ld.c
-fno
-diagnostics-show-caret -fdiagnostics-color=never-O0  -pie -fPIE   -ansi
-pe
dantic-errors  -lm  -o ./run-ld.exe(timeout = 300)
spawn -ignore SIGHUP /home/dave/gnu/gcc/objdir/gcc/xgcc
-B/home/dave/gnu/gcc/obj
dir/gcc/ /home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/tls/run-ld.c
-fno-d
iagnostics-show-caret -fdiagnostics-color=never -O0 -pie -fPIE -ansi
-pedantic-e
rrors -lm -o ./run-ld.exe
PASS: gcc.dg/torture/tls/run-ld.c   -O0  -pie -fPIE  (test for excess errors)
Setting LD_LIBRARY_PATH to
:/home/dave/gnu/gcc/objdir/gcc:/home/dave/gnu/gcc/obj
dir/hppa-linux-gnu/./libatomic/.libs::/home/dave/gnu/gcc/objdir/gcc:/home/dave/g
nu/gcc/objdir/hppa-linux-gnu/./libatomic/.libs:/home/dave/gnu/gcc/objdir/hppa-li
nux-gnu/libstdc++-v3/src/.libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libssp/.
libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libgomp/.libs:/home/dave/gnu/gcc/o
bjdir/hppa-linux-gnu/libatomic/.libs:/home/dave/gnu/gcc/objdir/./gcc:/home/dave/
gnu/gcc/objdir/./prev-gcc:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libstdc++-v3/
src/.libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libssp/.libs:/home/dave/gnu/g
cc/objdir/hppa-linux-gnu/libgomp/.libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/
libatomic/.libs:/home/dave/gnu/gcc/objdir/./gcc:/home/dave/gnu/gcc/objdir/./prev
-gcc
Execution timeout is: 300
spawn [open ...]
FAIL: gcc.dg/torture/tls/run-ld.c   -O0  -pie -fPIE  execution test

Typical link command is:

/home/dave/gnu/binutils/objdir/ld/ld-new -plugin
/home/dave/gnu/gcc/objdir/gcc/liblto_plugin.so
-plugin-opt=/home/dave/gnu/gcc/objdir/gcc/lto-wrapper
-plugin-opt=-fresolution=run-ld.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id
--eh-frame-hdr -dynamic-linker /lib/ld.so.1  -o ./run-ld.exe
/usr/lib/hppa-linux-gnu/Scrt1.o /usr/lib/hppa-linux-gnu/crti.o
/home/dave/gnu/gcc/objdir/gcc/crtbeginS.o -L/home/dave/gnu/gcc/objdir/gcc
-L/lib/hppa-linux-gnu -L/usr/lib/hppa-linux-gnu run-ld.o -lm -v -lgcc
--as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed
/home/dave/gnu/gcc/objdir/gcc/crtendS.o /usr/lib/hppa-linux-gnu/crtn.o -pie

As far as I can tell, the tls_ld and tls_ld2 variables are not linked
correctly.
When it is linked correctly, I see the following:

Breakpoint 1, __GI___tls_get_addr (ti=0x41001214) at dl-tls.c:825
825 dl-tls.c: No such file or directory.
(gdb) x/2x $r26
0x41001214: 0x0001  0x
(gdb) c
Continuing.

Breakpoint 1, __GI___tls_get_addr (ti=0x41001200) at dl-tls.c:825
825 in dl-tls.c
(gdb) x/2x $r26
0x41001200: 0x0001  0x0004

With Debian 2.30, I see:

Starting program: /home/dave/gnu/gcc/objdir/gcc/testsuite/gcc/run-ld.exe

Breakpoint 1, __GI___tls_get_addr (ti=0x4100121c) at dl-tls.c:825
825 dl-tls.c: No such file or directory.
(gdb) x/2x $r26
0x4100121c: 0x0001  0x
(gdb) c
Continuing.

Breakpoint 1, __GI___tls_get_addr (ti=0x41001208) at dl-tls.c:825
825 in dl-tls.c
(gdb) x/2x $r26
0x41001208: 0x0001  0x

-- 
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/22758] New: FAIL: Run pr22393-2

2018-01-28 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22758

Bug ID: 22758
   Summary: FAIL: Run pr22393-2
   Product: binutils
   Version: 2.31 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---

gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-elf -g -O2   -c -g -O2 -fno-PIE
-c /home/dave/gnu/binutils/src/ld/testsuite/ld-elf/pr22393-2b.c -o
tmpdir/pr22393-2b.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-elf -g -O2   -c -g -O2 -fno-PIE
-c /home/dave/gnu/binutils/src/ld/testsuite/ld-elf/pr22393-2b.c -o
tmpdir/pr22393-2b.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/  
-L=/home/dave/opt/gnu/hppa-unknown-linux-gnu/lib -L=/home/dave/opt/gnu/lib
-L=/usr/local/lib -L=/lib -L=/usr/lib  -o tmpdir/pr22393-2 
-L/home/dave/gnu/binutils/src/ld/testsuite/ld-elf -no-pie
-Wl,-z,separate-code,--no-as-needed tmpdir/pr22393-2a.so tmpdir/pr22393-2b.o
Executing on host: sh -c {gcc -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/  
-L=/home/dave/opt/gnu/hppa-unknown-linux-gnu/lib -L=/home/dave/opt/gnu/lib
-L=/usr/local/lib -L=/lib -L=/usr/lib  -o tmpdir/pr22393-2 
-L/home/dave/gnu/binutils/src/ld/testsuite/ld-elf -no-pie
-Wl,-z,separate-code,--no-as-needed tmpdir/pr22393-2a.so tmpdir/pr22393-2b.o
2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
Running: tmpdir/pr22393-2 > tmpdir/pr22393-2.out
child killed: segmentation violation
FAIL: Run pr22393-2

Similar fail:
FAIL: Run pr22393-2 (PIE)

-- 
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/22533] New: ld: error while loading shared libraries: unexpected reloc type 0x12

2017-11-30 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22533

Bug ID: 22533
   Summary: ld: error while loading shared libraries: unexpected
reloc type 0x12
   Product: binutils
   Version: 2.30 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
CC: doko at debian dot org
  Target Milestone: ---
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu

The following ld tests recently started failing:

FAIL: bootstrap
FAIL: bootstrap with strip
UNTESTED: bootstrap with --static
FAIL: bootstrap with -Wl,--traditional-format
FAIL: bootstrap with -Wl,--no-keep-memory
FAIL: bootstrap with -Wl,--relax
FAIL: Run with libdata2.so
FAIL: Run with pr14323-1.c pr14323-2.so

>From ld.log:

Executing on host: sh -c {gcc
-B/home/dave/gnu/binutils/objdir/ld/tmpdir/gccld1/  
-L=/home/dave/opt/gnu/hppa-unknown-linux-gnu/lib -L=/home/dave/opt/gnu/lib
-L=/usr/local/lib -L=/lib -L=/usr/lib  -o tmpdir/ld2  ldgram.o ldlex-wrapper.o
lex
sup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o  ldemul.o
ldver.o ldmisc.o ldfile.o ldcref.o ehppalinux.o  ldbuildid.o
../bfd/.libs/libbfd.a ../libiberty/libiberty.a   -L../zlib -lz -ldl 2>&1} 
/dev/null ld.tmp (timeout = 300)
spawn [open ...]
/home/dave/gnu/binutils/objdir/ld/tmpdir/gccld1/collect-ld: error while loading
shared libraries: unexpected reloc type 0x12collect2: error: ld returned 127
exit status/home/dave/gnu/binutils/objdir/ld/tmpdir/gccld1/collect-ld: error
while loading 
shared libraries: unexpected reloc type 0x12collect2: error: ld returned 127
exit statusFAIL: bootstrap

-- 
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/22394] hppa-linux-ld fails to emit dynamic relocations on function pointer initialization

2017-11-04 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22394

--- Comment #3 from John David Anglin  ---
On HP-UX, the 64-bit HP linker treats the DIR64 and FPTR64 relocations the same
when "symbol" is a function pointer.  Both point to a function descriptor.

The ABI description is here:
https://uclibc.org/docs/psABI-parisc.pdf

If DIR32 and PLABEL32 were to behave similarly on 32-bit ELF, this would
break the current fast indirect call implementation.  We would have one
additional layer for fast indirect calls.  This is reasonably efficient
when generating PA 2.0 code because there is the bve instruction.  However,
things are not efficient when generating PA 1.X code.  So, fast indirect
calls would no longer be useful.

The original HP SOM linker required the P' selector for procedure labels
for functions in shared libraries.  So, it wasn't possible to do a fast
indirect call to a function in a shared library.  When the function isn't
in a shared library, the call is direct and no function descriptor is used.

Thus, I think it best that the DIR32 relocation provide the actual function
address and not point to a descriptor.  This will enable calls into shared
libraries to functions that don't need the PIC register.  Having the ability
to directly load the address of a function is probably useful for other things.

-- 
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/22394] hppa-linux-ld fails to emit dynamic relocations on function pointer initialization

2017-11-04 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22394

--- Comment #2 from John David Anglin  ---
The segmentation fault doesn't occur with trunk plus your proposed
elf32-hppa.c patch.

-- 
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/22394] hppa-linux-ld fails to emit dynamic relocations on function pointer initialization

2017-11-04 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22394

--- Comment #1 from John David Anglin  ---
Hi Alan,

Although your example is not technically supported, I think it should
work on linux because it doesn't use the PIC register and because of the
flat address space.

First, calls to functions in shared libraries are not supported using the
-mfast-indirect-calls gcc option:

  @item -mfast-indirect-calls
  @opindex mfast-indirect-calls
  Generate code that assumes calls never cross space boundaries.  This
  allows GCC to emit code that performs faster indirect calls.

  This option does not work in the presence of shared libraries or nested
  functions.

What works is:

$ gcc -o funcp funcp.c funcpdef.c -mfast-indirect-calls
$ ./funcp
$

Issues are the space register used for the call and the PIC register.

Looking at your example, it seems to me that R_PARISC_DIR32 relocations
are not handled correctly when they refer to a function.  This is the
assembly code:

.LEVEL 1.1
.globl fp
.section.data.rel,"aw",@progbits
.align 4
.type   fp, @object
.size   fp, 4
fp:
.word   foo

At runtime, fp is NULL causing the segmentation fault.  So, I agree
with your assessment.

-- 
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/22300] New: Abort in elf32_hppa_relocate_section at elf32-hppa.c:4055 building debian polyml

2017-10-15 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22300

Bug ID: 22300
   Summary: Abort in elf32_hppa_relocate_section at
elf32-hppa.c:4055 building debian polyml
   Product: binutils
   Version: 2.30 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
CC: deller at gmx dot de
  Target Milestone: ---
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu

(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/dave/gnu/binutils/objdir/ld/.libs/ld-new -plugin
/usr/lib/gcc/hppa-linux-gnu/7/liblto_plugin.so
-plugin-opt=/usr/lib/gcc/hppa-linux-gnu/7/lto-wrapper
-plugin-opt=-fresolution=-debug.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/
--build-id --eh-frame-hdr -dynamic-linker /lib/ld.so.1 -o .libs/poly
/usr/lib/gcc/hppa-linux-gnu/7/../../../hppa-linux-gnu/crt1.o
/usr/lib/gcc/hppa-linux-gnu/7/../../../hppa-linux-gnu/crti.o
/usr/lib/gcc/hppa-linux-gnu/7/crtbegin.o -L/usr/lib/gcc/hppa-linux-gnu/7
-L/usr/lib/gcc/hppa-linux-gnu/7/../../../hppa-linux-gnu
-L/usr/lib/gcc/hppa-linux-gnu/7/../../.. -L/lib/hppa-linux-gnu
-L/usr/lib/hppa-linux-gnu --as-needed polyexport.o
libpolymain/.libs/libpolymain.a libpolyml/.libs/libpolyml.so -lpthread -lffi
-lm -ldl -lstdc++ -lgcc_s -lgcc -v -lgcc --as-needed -lgcc_s --no-as-needed -lc
-lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/hppa-linux-gnu/7/crtend.o
/usr/lib/gcc/hppa-linux-gnu/7/../../../hppa-linux-gnu/crtn.o
GNU ld (GNU Binutils) 2.29.51.20170819

Breakpoint 2, elf32_hppa_relocate_section (output_bfd=0x0, info=0x71684
, 
input_bfd=0xf887405b <bfd_bwrite+84>, input_section=0xa5a18,
contents=, 
relocs=, local_syms=,
local_sections=)
at ../../src/bfd/elf32-hppa.c:4055
4055abort ();

(gdb) p *input_section
$2 = {name = 0xa438b ".data", id = 60, index = 4, next = 0xa5ad0, prev =
0xa5960, flags = 295, 
  user_set_vma = 1, linker_mark = 1, linker_has_input = 0, gc_mark = 0,
compress_status = 0, 
  segment_mark = 0, sec_info_type = 0, use_rela_p = 1, sec_flg0 = 0, sec_flg1 =
0, 
  sec_flg2 = 0, sec_flg3 = 0, sec_flg4 = 0, sec_flg5 = 0, vma = 0, lma = 0,
size = 4920, 
  rawsize = 0, compressed_size = 0, relax = 0x0, relax_count = 0, output_offset
= 24368, 
  output_section = 0x552958, alignment_power = 3, relocation = 0x0, orelocation
= 0x0, 
  reloc_count = 167, filepos = 7931160, rel_filepos = 4019104, line_filepos =
0, 
  userdata = 0x0, contents = 0x0, lineno = 0x0, lineno_count = 0, entsize = 0, 
  kept_section = 0x0, moving_line_filepos = 0, target_index = 0, used_by_bfd =
0xa78e0, 
  constructor_chain = 0x0, owner = 0xa46a8, symbol = 0xa7970, symbol_ptr_ptr =
0xa5ab0, 
  map_head = {link_order = 0xa5ad0, s = 0xa5ad0}, map_tail = {link_order =
0xa5960, 
s = 0xa5960}}

(gdb) p *((struct bfd_elf_section_data*)(input_section)->used_by_bfd)
$3 = {this_hdr = {sh_name = 19, sh_type = 1, sh_flags = 3, sh_addr = 0,
sh_offset = 7931160, 
sh_size = 4920, sh_link = 0, sh_info = 0, sh_addralign = 8, sh_entsize = 0, 
bfd_section = 0xa5a18, contents = 0x0}, section_flag_info = 0x0, rel = {hdr
= 0x0, 
count = 0, idx = 0, hashes = 0x0}, rela = {hdr = 0xa79a8, count = 0, idx =
0, 
hashes = 0x0}, this_idx = 11, dynindx = 0, linked_to = 0x0, relocs =
0xa7ec8, 
  local_dynrel = 0x0, sreloc = 0x0, group = {name = 0x0, id = 0x0}, sec_group =
0x0, 
  next_in_group = 0x0, fde_list = 0x0, eh_frame_entry = 0x0, sec_info = 0x0}

Full polyml build log is here:
https://buildd.debian.org/status/fetch.php?pkg=polyml=hppa=5.7-2=1507223380=0

-- 
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/21132] [hppa-linux] pie support doesn't work

2017-02-15 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21132

--- Comment #10 from John David Anglin  ---
The patch fixes the trivial test case.  We are down to the following ld
failures on trunk:

Running /home/dave/gnu/binutils/src/ld/testsuite/ld-elf/indirect.exp ...
FAIL: Run with libpr18720c.so 1
FAIL: Run with libpr18720c.so 2
FAIL: Run with libpr18720c.so 3
FAIL: Run with libpr18720c.so 4
FAIL: Run with libpr18720c.so 5

Running /home/dave/gnu/binutils/src/ld/testsuite/ld-elf/shared.exp ...
FAIL: Run pr18718
FAIL: Run pr18718 with PIE (1)
FAIL: Run pr18718 with PIE (2)
FAIL: Run pr18718 with PIC (1)
FAIL: Run pr18718 with PIC (2)

I'll take a look at these.

I'm somewhat surprised that this problem didn't affect shared libraries as the
fix seems to apply to them as well.

Still wondering why pie executables are being placed in second quadrant of VM.

-- 
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/21132] [hppa-linux] pie support doesn't work

2017-02-14 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21132

--- Comment #6 from John David Anglin  ---
Looking further, I have concluded $global$ and %r19 are set correctly. The
relocations for

.Lpmain:
.word P%main
.Lp__libc_start_main:
.word P%__libc_start_main
.Lp__libc_csu_fini:
.word P%__libc_csu_fini
.Lp__libc_csu_init:
.word P%__libc_csu_init

are not correct.  The relocation for

.Lp__global:
.word $global$

is okay.

(gdb) r
Starting program: /home/dave/ffmpeg/main 

Program received signal SIGSEGV, Segmentation fault.
0x41000548 in _start ()
(gdb) p/x $r19
$1 = 0x41001194
(gdb) x/16x 0x41001194
0x41001194: 0x1040  0x  0x  0x
0x410011a4: 0x  0x41001028  0x4100102c  0x4100100c
0x410011b4: 0x41001014  0x41001128  0x410011f4  0x410011f8
0x410011c4: 0x41001030  0x41001034  0x41001038  0x4100103c
(gdb) info address .Lpmain
Symbol ".Lpmain" is at 0x41001018 in a file compiled without debugging.
(gdb) x/x 0x41001028
0x41001028: 0x41001194
(gdb) info address $global$
Symbol "$global$" is at 0x41001194 in a file compiled without debugging.
(gdb) x/x 0x41001028
0x41001028: 0x41001194
(gdb) disass $pc-16,$pc+16
Dump of assembler code from 0x41000538 to 0x41000558:
   0x41000538 <_start+16>:  stw r19,-20(sp)
   0x4100053c <_start+20>:  stw r23,-38(sp)
   0x41000540 <_start+24>:  addil L%0,r19,r1
   0x41000544 <_start+28>:  ldw 8(r1),r26
=> 0x41000548 <_start+32>:  ldw 0(r26),r26
   0x4100054c <_start+36>:  addil L%0,r19,r1
   0x41000550 <_start+40>:  ldw c(r1),r23
   0x41000554 <_start+44>:  ldw 0(r23),r23

-- 
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/21131] *** Error in `/usr/bin/ld': corrupted double-linked list: 0x00239b48 ***

2017-02-14 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21131

--- Comment #5 from John David Anglin  ---
As the error is in the testsuite, this problem is going to be hard to
reproduce with a cross.  Need all the libs, etc.

Helge, would you please set up an account for Alan on phantom?

I see that the inequivalent alias problem is present in /usr/bin/ld,
so it's possible that pr21000 is the cause of this problem.

I'm going to rebuild Debian binutils with Alan's patch.  The LOAD headers
for ld-new look good.  We had following ld testsuite fails on trunk:

FAIL: PIE preinit array
FAIL: PIE init array
FAIL: PIE fini array
FAIL: PIE init array mixed
FAIL: PIE PR ld/14525
FAIL: Run with libpr18720c.so 1
FAIL: Run with libpr18720c.so 2
FAIL: Run with libpr18720c.so 3
FAIL: Run with libpr18720c.so 4
FAIL: Run with libpr18720c.so 5
FAIL: Run pr2404 with PIE
FAIL: Run pr18718
FAIL: Run pr18718 with PIE (1)
FAIL: Run pr18718 with PIE (2)
FAIL: Run pr18718 with PIC (1)
FAIL: Run pr18718 with PIC (2)
FAIL: Run pr19579
FAIL: Run pr19719pie fun defined
FAIL: Run pr19719pie fun undefined
FAIL: weak undefined
FAIL: weak undefined data

I think we should leave this bug until pr21132 is fixed.

-- 
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/21000] hppa-linux does not support -z relro

2017-02-14 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21000

--- Comment #19 from John David Anglin  ---
The LOAD headers for ld-new look good.  We had following ld testsuite fails on
trunk with patch:

FAIL: PIE preinit array
FAIL: PIE init array
FAIL: PIE fini array
FAIL: PIE init array mixed
FAIL: PIE PR ld/14525
FAIL: Run with libpr18720c.so 1
FAIL: Run with libpr18720c.so 2
FAIL: Run with libpr18720c.so 3
FAIL: Run with libpr18720c.so 4
FAIL: Run with libpr18720c.so 5
FAIL: Run pr2404 with PIE
FAIL: Run pr18718
FAIL: Run pr18718 with PIE (1)
FAIL: Run pr18718 with PIE (2)
FAIL: Run pr18718 with PIC (1)
FAIL: Run pr18718 with PIC (2)
FAIL: Run pr19579
FAIL: Run pr19719pie fun defined
FAIL: Run pr19719pie fun undefined
FAIL: weak undefined
FAIL: weak undefined data

=== ld Summary ===

# of expected passes1007
# of unexpected failures21
# of expected failures  41
# of untested testcases 1# of unsupported tests  8
/home/dave/gnu/binutils/objdir/ld/ld-new 2.28.51.20170214

There were no unexpected failures in binutils and gas suites.

-- 
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/21132] [hppa-linux] pie support doesn't work

2017-02-13 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21132

--- Comment #2 from John David Anglin  ---
Actually, it appears $global$ is incorrectly set in scripttempl/elf.sc.

-- 
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/21132] [hppa-linux] pie support doesn't work

2017-02-13 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21132

--- Comment #1 from John David Anglin  ---
It appears $global$ is set to the wrong value in elf32_hppa_set_gp()
for -pie.

-- 
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/21132] New: [hppa-linux] pie support doesn't work

2017-02-12 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21132

Bug ID: 21132
   Summary: [hppa-linux] pie support doesn't work
   Product: binutils
   Version: 2.27
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
CC: deller at gmx dot de
  Target Milestone: ---
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu

If one compiles "int main() { return 0; }" with "gcc -o main -pie main.c",
the program faults in _start:

dave@mx3210:~/ffmpeg$ gdb main
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "hppa-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from main...(no debugging symbols found)...done.
(gdb) r
Starting program: /home/dave/ffmpeg/main 

Program received signal SIGSEGV, Segmentation fault.
0x41000548 in _start ()
(gdb) disass
Dump of assembler code for function _start:
   0x41000528 <+0>: stw r0,-4(sp)
   0x4100052c <+4>: stw rp,-14(sp)
   0x41000530 <+8>: ldo 40(sp),sp
   0x41000534 <+12>:stw sp,-4(sp)
   0x41000538 <+16>:stw r19,-20(sp)
   0x4100053c <+20>:stw r23,-38(sp)
   0x41000540 <+24>:addil L%0,r19,r1
   0x41000544 <+28>:ldw 7c(r1),r26
=> 0x41000548 <+32>:ldw 0(r26),r26

The fault is in this hunk of code in glibc's start.S for hppa:

/* Have the linker create plabel words so we get PLABEL32
   relocs and not 21/14.  The use of 21/14 relocs is only
   supported in the latest dynamic linker.  */
#ifdef SHARED
.section.data.rel.ro,"aw",@progbits
#else
.section.rodata,"a",@progbits
#endif
.align 4
.Lpmain:
.word P%main
.Lp__libc_start_main:
.word P%__libc_start_main
.Lp__libc_csu_fini:
.word P%__libc_csu_fini
.Lp__libc_csu_init:
.word P%__libc_csu_init
#ifdef SHARED
.Lp__global:
.word $global$
#endif

.text
.align 4
.globl _start
.export _start, ENTRY
.type _start,@function
_start:
/* At entry to the function we have:

r26 - Unused
r25 - argc
r24 - argv
r23 - False _dl_fini plabel address

   This function is called from the lower half of RTLD_START.

   The call to __libc_start_main expects:

1. r26 - Application main
2. r25 - argc
3. r24 - argv
4. r23 - __libc_csu_init
5. sp-52 - __libc_csu_fini
6. sp-56 - rtld_fini
7. sp-60 - stackend  */

.proc
.callinfo
/* Clear previous-sp.  */
stw %r0, -4(%sp)
/* Setup the stack and frame.  */
stw %rp, -20(%sp)
ldo 64(%sp), %sp
stw %sp, -4(%sp)
stw %r19, -32(%sp)

/* argc and argv should be in 25 and 24 (2nd and 3rd argument) */
/* void (*rtld_fini) (void) (6th argument) */
stw %r23, -56(%sp)
/* Need to setup 1, 4, 5, and 7th arguments */

#ifdef SHARED
/* load main (1st argument) */
addil   LT'.Lpmain, %r19
ldw RT'.Lpmain(%r1), %r26
ldw 0(%r26),%r26

(gdb) p/x $r19
$1 = 0x41001120
(gdb) info address .Lpmain
Symbol ".Lpmain" is at 0x41001018 in a file compiled without debugging.
(gdb) x/x 0x41001018
0x41001018: 0x41001142
(gdb) x/2x 0x41001140
0x41001140: 0x410007f8  0x41001120
(gdb) info address main
Symbol "main" is at 0x410007f8 in a file compiled without debugging.
(gdb) p/x $r26
$2 = 0x0
(gdb) p/x $r1+0x7c
$3 = 0x4100119c
(gdb) p/x $r1
$4 = 0x41001120

So, there's an offset inconsistency of 0x7c.

-- 
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/21000] hppa-linux does not support -z relro

2017-02-12 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21000

John David Anglin  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 CC||deller at gmx dot de
 Resolution|FIXED   |---

--- Comment #13 from John David Anglin  ---
If I compile the trivial main program

int main() { return 0 }

with "gcc -o main -Wl,-z,relro main.c" and run main using gdb with
a break at _start

dave@mx3210:~/ffmpeg$ gdb main
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "hppa-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from main...(no debugging symbols found)...done.
(gdb) break _start
Breakpoint 1 at 0x10350
(gdb) r
Starting program: /home/dave/ffmpeg/main 

Breakpoint 1, 0x00010350 in _start ()

I get a bunch of inequivalent alias messages on the console:

mx3210 login: INEQUIVALENT ALIASES 0x1 and 0x11000 in file main
INEQUIVALENT ALIASES 0x1 and 0x11000 in file main
INEQUIVALENT ALIASES 0x1 and 0x11000 in file main
INEQUIVALENT ALIASES 0x1 and 0x11000 in file main
INEQUIVALENT ALIASES 0x1 and 0x11000 in file main
INEQUIVALENT ALIASES 0x1 and 0x11000 in file main
...

This doesn't happen without "-Wl,-z,relro".

-- 
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/21131] New: *** Error in `/usr/bin/ld': corrupted double-linked list: 0x00239b48 ***

2017-02-11 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21131

Bug ID: 21131
   Summary: *** Error in `/usr/bin/ld': corrupted double-linked
list: 0x00239b48 ***
   Product: binutils
   Version: 2.27
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
CC: deller at gmx dot de, doko at debian dot org
  Target Milestone: ---
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu

This is with "GNU ld (GNU Binutils for Debian) 2.27.90.20170205".  We have
seen several package builds fail with the following error:

gcc -pie -Wl,-O1 -nostdlib -nostartfiles -o
/home/dave/gnu/glibc/objdir/elf/vism
ain-Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both
/home/dave/gnu/glibc/
objdir/csu/Scrt1.o /home/dave/gnu/glibc/objdir/csu/crti.o `gcc 
--print-file-nam
e=crtbeginS.o` /home/dave/gnu/glibc/objdir/elf/vismain.o
/home/dave/gnu/glibc/ob
jdir/support/libsupport_nonshared.a /home/dave/gnu/glibc/objdir/elf/vismod1.so
/
home/dave/gnu/glibc/objdir/elf/vismod2.so  -Wl,-dynamic-linker=/lib/ld.so.1
-Wl,
-rpath-link=/home/dave/gnu/glibc/objdir:/home/dave/gnu/glibc/objdir/math:/home/d
ave/gnu/glibc/objdir/elf:/home/dave/gnu/glibc/objdir/dlfcn:/home/dave/gnu/glibc/
objdir/nss:/home/dave/gnu/glibc/objdir/nis:/home/dave/gnu/glibc/objdir/rt:/home/
dave/gnu/glibc/objdir/resolv:/home/dave/gnu/glibc/objdir/crypt:/home/dave/gnu/gl
ibc/objdir/mathvec:/home/dave/gnu/glibc/objdir/support:/home/dave/gnu/glibc/objd
ir/nptl /home/dave/gnu/glibc/objdir/libc.so.6
/home/dave/gnu/glibc/objdir/libc_n
onshared.a -Wl,--as-needed /home/dave/gnu/glibc/objdir/elf/ld.so
-Wl,--no-as-nee
ded -lgcc -Wl,--as-needed -lgcc_s  -Wl,--no-as-needed `gcc 
--print-file-name=cr
tendS.o` /home/dave/gnu/glibc/objdir/csu/crtn.o
collect2: fatal error: ld terminated with signal 6 [Aborted], core dumped
compilation terminated.
*** Error in `/usr/bin/ld': corrupted double-linked list: 0x00239b48 ***
../Rules:208: recipe for target '/home/dave/gnu/glibc/objdir/elf/vismain'
failed

The systemd and firefox-esr builds have failed with similar errors:
https://buildd.debian.org/status/fetch.php?pkg=systemd=hppa=232-17=1486777616=0
https://buildd.debian.org/status/fetch.php?pkg=firefox-esr=hppa=45.7.0esr-4=1486808503=0

If I was to guess, this probably has to do with new relro support.

-- 
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/20464] hppa-linux-gnu-ranlib: libcpp.a: File format not recognized

2016-08-13 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20464

--- Comment #1 from John David Anglin  ---
Also breaks binutils build:

/bin/bash ./libtool --tag=CC   --mode=link gcc -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror
-I../../src/bfd/../zlib -g -O2  -release `cat libtool-soversion` 
-static-libstdc++ -static-libgcc  -o libbfd.la -rpath /home/dave/opt/gnu/lib
archive.lo archures.lo bfd.lo bfdio.lo bfd
win.lo cache.lo coff-bfd.lo compress.lo corefile.lo format.lo hash.lo init.lo
libbfd.lo linker.lo merge.lo opncls.lo reloc.lo section.lo simple.lo
stab-syms.lo 
stabs.lo syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo verilog.lo `cat 
ofiles` -L/home/dave/gnu/binutils/objdir/bfd/../libiberty/pic -liberty
-Wl,-lc,-
-as-needed,-lm,--no-as-needed -ldl -L./../zlib -lz -ldl 
libtool: link: gcc -shared  -fPIC -DPIC  .libs/archive.o .libs/archures.o
.libs/
bfd.o .libs/bfdio.o .libs/bfdwin.o .libs/cache.o .libs/coff-bfd.o
.libs/compress
.o .libs/corefile.o .libs/format.o .libs/hash.o .libs/init.o .libs/libbfd.o
.lib
s/linker.o .libs/merge.o .libs/opncls.o .libs/reloc.o .libs/section.o
.libs/simp
le.o .libs/stab-syms.o .libs/stabs.o .libs/syms.o .libs/targets.o
.libs/binary.o
 .libs/ihex.o .libs/srec.o .libs/tekhex.o .libs/verilog.o .libs/elf32-hppa.o
.li
bs/elf32.o .libs/elf.o .libs/elflink.o .libs/elf-attrs.o .libs/elf-strtab.o
.lib
s/elf-eh-frame.o .libs/dwarf1.o .libs/dwarf2.o .libs/elf32-gen.o .libs/plugin.o 
.libs/cpu-hppa.o .libs/cpu-plugin.o  
-L/home/dave/gnu/binutils/objdir/bfd/../li
biberty/pic -liberty -L/home/dave/gnu/binutils/objdir/zlib -lz -ldl  -Wl,-lc
-Wl
,--as-needed -Wl,-lm -Wl,--no-as-needed   -Wl,-soname
-Wl,libbfd-2.27.51.2016081
3.so -o .libs/libbfd-2.27.51.20160813.so
/home/dave/gnu/binutils/objdir/bfd/../libiberty/pic/libiberty.a: file not
recognized: File format not recognized

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


  1   2   >