[Bug binutils/17840] New: [2.25 Regression] ar creates archives with incorrect LST system_id and magic

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

Bug ID: 17840
   Summary: [2.25 Regression] ar creates archives with incorrect
LST system_id and magic
   Product: binutils
   Version: 2.25
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org

With 2.25, ar creates archive files with am incorrect LST header on
hppa2.0w-hp-hpux11.11.  This causes problems with HP ld and earlier
versions of ar (e.g., 2.23.2).

First, the file command doesn't show the type of archive:

-bash-4.3$ file libgnu.a
libgnu.a:   archive file
-bash-4.3$ file libc.a
libc.a: archive file -PA-RISC1.1 relocatable library

-bash-4.3$ /opt/gnu/bin/ar tv libgnu.a
/opt/gnu/bin/ar: libgnu.a: File format not recognized
-bash-4.3$ /opt/gnu/bin/ar --version
GNU ar (GNU Binutils) 2.23.2
Copyright 2012 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

Strangely, the above works with 2.25:

-bash-4.3$ /xxx/gnu/binutils-2.25/objdir/binutils/ar tv libgnu.a
rw-r--r-- 2/2  12455 Jan 12 20:43 2015 base32.o
rw-r--r-- 2/2   4920 Jan 12 20:43 2015 binary-io.o
rw-r--r-- 2/2   4320 Jan 12 20:43 2015 c-ctype.o
rw-r--r-- 2/2902 Jan 12 20:43 2015 c-strcasecmp.o
rw-r--r-- 2/2966 Jan 12 20:43 2015 c-strncasecmp.o
rw-r--r-- 2/2   5317 Jan 12 20:43 2015 cloexec.o
rw-r--r-- 2/2  21687 Jan 12 20:43 2015 md5.o
rw-r--r-- 2/2  29655 Jan 12 20:43 2015 sha1.o
rw-r--r-- 2/2   4752 Jan 12 20:44 2015 dirname-lgpl.o
rw-r--r-- 2/2   1156 Jan 12 20:44 2015 basename-lgpl.o
rw-r--r-- 2/2885 Jan 12 20:44 2015 stripslash.o
rw-r--r-- 2/2   3895 Jan 12 20:44 2015 exitfail.o
rw-r--r-- 2/2   8146 Jan 12 20:44 2015 fatal-signal.o
rw-r--r-- 2/2   3846 Jan 12 20:44 2015 fd-hook.o
rw-r--r-- 2/2   4353 Jan 12 20:44 2015 fd-safer-flag.o
rw-r--r-- 2/2   4991 Jan 12 20:44 2015 dup-safer-flag.o
rw-r--r-- 2/2766 Jan 12 20:44 2015 gettime.o
rw-r--r-- 2/2   8288 Jan 12 20:44 2015 localcharset.o
rw-r--r-- 2/2   6749 Jan 12 20:44 2015 lock.o
rw-r--r-- 2/2   4980 Jan 12 20:44 2015 mbchar.o
rw-r--r-- 2/2   5744 Jan 12 20:44 2015 mbiter.o
rw-r--r-- 2/2   5679 Jan 12 20:44 2015 pipe2.o
rw-r--r-- 2/2   4519 Jan 12 20:44 2015 pipe2-safer.o
rw-r--r-- 2/2  22649 Jan 12 20:44 2015 quotearg.o
rw-r--r-- 2/2736 Jan 12 20:44 2015 sig-handler.o
rw-r--r-- 2/2787 Jan 12 20:44 2015 sockets.o
rw-r--r-- 2/2   9634 Jan 12 20:44 2015 spawn-pipe.o
rw-r--r-- 2/2   2799 Jan 12 20:44 2015 stat-time.o
rw-r--r-- 2/2811 Jan 12 20:44 2015 strnlen1.o
rw-r--r-- 2/2   4761 Jan 12 20:44 2015 sys_socket.o
rw-r--r-- 2/2   7587 Jan 12 20:44 2015 tempname.o
rw-r--r-- 2/2   5153 Jan 12 20:44 2015 threadlib.o
rw-r--r-- 2/2   1558 Jan 12 20:44 2015 timespec.o
rw-r--r-- 2/2   6257 Jan 12 20:44 2015 tmpdir.o
rw-r--r-- 2/2   3846 Jan 12 20:44 2015 unistd.o
rw-r--r-- 2/2   4980 Jan 12 20:44 2015 dup-safer.o
rw-r--r-- 2/2   4320 Jan 12 20:44 2015 fd-safer.o
rw-r--r-- 2/2   4484 Jan 12 20:44 2015 pipe-safer.o
rw-r--r-- 2/2   4686 Jan 12 20:44 2015 width.o
rw-r--r-- 2/2   7806 Jan 12 20:44 2015 utimens.o
rw-r--r-- 2/2   7431 Jan 12 20:44 2015 wait-process.o
rw-r--r-- 2/2   3846 Jan 12 20:44 2015 wctype-h.o
rw-r--r-- 2/2   7161 Jan 12 20:44 2015 xmalloc.o
rw-r--r-- 2/2   4329 Jan 12 20:44 2015 xalloc-die.o
rw-r--r-- 2/2   1424 Jan 12 20:44 2015 xsize.o
rw-r--r-- 2/2818 Jan 12 20:44 2015 xstrndup.o
rw-r--r-- 2/2824 Jan 12 20:44 2015 asnprintf.o
rw-r--r-- 2/2   2403 Jan 12 20:44 2015 asprintf.o
rw-r--r-- 2/2   8393 Jan 12 20:44 2015 error.o
rw-r--r-- 2/2   5874 Jan 12 20:44 2015 fcntl.o
rw-r--r-- 2/2   1419 Jan 12 20:44 2015 futimens.o
rw-r--r-- 2/2   4984 Jan 12 20:44 2015 gai_strerror.o
rw-r--r-- 2/2   5119 Jan 12 20:44 2015 getdelim.o
rw-r--r-- 2/2   2353 Jan 12 20:44 2015 getline.o
rw-r--r-- 2/2  17234 Jan 12 20:44 2015 getopt.o
rw-r--r-- 2/2   5192 Jan 12 20:44 2015 getopt1.o
rw-r--r-- 2/2   5606 Jan 12 20:44 2015 getpass.o
rw-r--r-- 2/2   3203 Jan 12 20:44 2015 localeconv.o
rw-r--r-- 2/2   1995 Jan 12 20:44 2015 lstat.o
rw-r--r-- 2/2   4732 Jan 12 20:44 2015 mbrtowc.o
rw-r--r-- 2/2   5230 Jan 12 20:44 2015 mbsrtowcs.o
rw-r--r-- 2/2   3890 Jan 12 20:44 2015 mbsrtowcs-state.o
rw-r--r-- 2/2   1237 Jan 12 20:44 2015 memrchr.o
rw-r--r-- 2/2   4093 Jan 12 20:44 2015 mkostemp.o
rw-r--r-- 2/2   4068 Jan 12 20:44 2015 mkstemp.o
rw-r--r-- 2/2   9627 Jan 12 20:44 2015 mktime.o
rw-r--r-- 2/2   5914 Jan 12 20:44 2015 open.o
rw-r--r-- 2/2   5963 Jan 12 20:44 2015 printf-args.o
rw-r--r-- 2/2  13382 Jan 12 20:44 2015 printf-parse.o
rw-r--r-- 2/2   1072 Jan 12 20:44 2015 rawmemchr.o
rw-r--r-- 2/2 187460 Jan 12 20:44 2015 regex.o
rw-r--r-- 2/2   3998 Jan 12 20:44 2015 secure_getenv.o
rw-r--r-- 2/2   4638 Jan 12 20:44

[Bug gas/18427] GNU as slow on hppa architecture

2015-06-11 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=18427

John David Anglin  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||danglin at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #10 from John David Anglin  ---
Should be fixed on master:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=18c208b2292f3c61097dee99053ecab78b393e46

-- 
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/18514] elfutils reports '.plt' size not multiple of entry size

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

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||danglin at gcc dot gnu.org
 Resolution|--- |FIXED

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

-- 
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/19526] Using "gcc -o /dev/null" gives "ld: final link failed: File truncated" error

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

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||danglin at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #12 from John David Anglin  ---
Fixed on trunk by commit 6d4b286.

-- 
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] New: 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

Bug ID: 20464
   Summary: hppa-linux-gnu-ranlib: libcpp.a: File format not
recognized
   Product: binutils
   Version: 2.27
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  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

In gcc trunk build, the following error occurs:

ar cru libcpp.a charset.o directives.o directives-only.o errors.o expr.o
files.o
 identifiers.o init.o lex.o line-map.o macro.o mkdeps.o pch.o symtab.o
tradition
al.o
ar: `u' modifier ignored since `D' is the default (see `U')
hppa-linux-gnu-ranlib libcpp.a
hppa-linux-gnu-ranlib: libcpp.a: File format not recognized
Makefile:100: recipe for target 'libcpp.a' failed
make[3]: *** [libcpp.a] Error 1
make[3]: Leaving directory
'/home/dave/gnu/gcc/objdir/build-hppa-linux-gnu/libcp
p'
Makefile:2834: recipe for target 'all-build-libcpp' failed

A similar error occurs in glibc build.

The file format of archive libraries is not recognized.

mx3210:/home/dave# hppa-linux-gnu-ranlib --version
GNU ranlib (GNU Binutils for Debian) 2.27
Copyright (C) 2016 Free Software Foundation, Inc.

The bug is not present in 2.26.1.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/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


[Bug binutils/20464] hppa-linux-gnu-ranlib: libcpp.a: File format not recognized

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

--- Comment #2 from John David Anglin  ---
With ranlib, only hppa-linux-gnu-ranlib fails with "File format not
recognized".  The ranlib command works.

dave@mx3210:~/gnu/gcc/objdir/build-hppa-linux-gnu/libcpp$ cmp libcpp.a.save
libcpp.a
dave@mx3210:~/gnu/gcc/objdir/build-hppa-linux-gnu/libcpp$ hppa-linux-gnu-ranlib
libcpp.a
hppa-linux-gnu-ranlib: libcpp.a: File format not recognized
dave@mx3210:~/gnu/gcc/objdir/build-hppa-linux-gnu/libcpp$ ranlib libcpp.a
dave@mx3210:~/gnu/gcc/objdir/build-hppa-linux-gnu/libcpp$ 

The difference seems to be hppa-linux-gnu-ranlib is linked against
libbfd-2.27-system.so and ranlib is linked against libbfd-2.27-multiarch.so:

dave@mx3210:/usr/bin$ ldd hppa-linux-gnu-ranlib
libbfd-2.27-system.so => /usr/lib/hppa-linux-gnu/libbfd-2.27-system.so
(0xfd20c000)
libz.so.1 => /lib/hppa-linux-gnu/libz.so.1 (0xfcfb8000)
libdl.so.2 => /lib/hppa-linux-gnu/libdl.so.2 (0xfcbf8000)
libc.so.6 => /lib/hppa-linux-gnu/libc.so.6 (0xfc7f8000)
/lib/ld.so.1 (0x4100)
dave@mx3210:/usr/bin$ ldd ranlib
libbfd-2.27-multiarch.so =>
/usr/lib/hppa-linux-gnu/libbfd-2.27-multiarch.so (0xfcffb000)
libz.so.1 => /lib/hppa-linux-gnu/libz.so.1 (0xfcfb8000)
libdl.so.2 => /lib/hppa-linux-gnu/libdl.so.2 (0xfcbf8000)
libc.so.6 => /lib/hppa-linux-gnu/libc.so.6 (0xfc7f8000)
/lib/ld.so.1 (0x4100)

Somehow, I think 32 and 64-bit targets are getting mixed up.

-- 
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&arch=hppa&ver=232-17&stamp=1486777616&raw=0
https://buildd.debian.org/status/fetch.php?pkg=firefox-esr&arch=hppa&ver=45.7.0esr-4&stamp=1486808503&raw=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 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/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/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] [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/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/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/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/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 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 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/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/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 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/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&action=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 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&action=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-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/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/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/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 #3 from John David Anglin  ---
Created attachment 12778
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12778&action=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/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&action=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/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-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 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 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] 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] 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 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/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 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/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/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/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&action=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] 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-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 #7 from John David Anglin  ---
Created attachment 14469
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14469&action=edit
sincos_table.s

-- 
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 (&rfds);
  tv.tv_sec = 0;
  tv.tv_usec = 1;

  select (0, &rfds, NULL, NULL, &tv);
#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/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 gas/11395] gas creates 64bit add-instruction in 32bit mode for hppa2.0

2010-12-26 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=11395

John David Anglin  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 CC||danglin at gcc dot gnu.org
 Resolution|FIXED   |

--- Comment #3 from John David Anglin  2010-12-26 
19:45:18 UTC ---
Change breaks 64-bit linux build:

{standard input}: Assembler messages:
{standard input}:4508: Error: Invalid Add Condition: dc
{standard input}:4509: Error: Invalid Add Condition: dc
{standard input}:4510: Error: Invalid Add Condition: dc
{standard input}:4511: Error: Invalid Add Condition: dc
make[3]: *** [drivers/net/e1000/e1000_main.o] Error 1

The failing instructions are:
.LEVEL 2.0w

add,dc  %r20, %r28, %r28
add,dc  %r21, %r28, %r28
add,dc  %r22, %r28, %r28
add,dc  %r1, %r28, %r28

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug gas/11395] gas creates 64bit add-instruction in 32bit mode for hppa2.0

2010-12-26 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=11395

--- Comment #4 from John David Anglin  2010-12-26 
20:49:28 UTC ---
The PA 2.0 architecture says "When a condition completer is not
specified, the "never" condition is used."

Adding ",dc" to the testcase case results in the following assembler
code with HP assembler:

   4:   08 21 07 21 add,dc r1,r1,r1

The "overflow" bit (d) is set.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug gas/11395] gas creates 64bit add-instruction in 32bit mode for hppa2.0

2010-12-26 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=11395

John David Anglin  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #6 from John David Anglin  2010-12-27 
02:07:36 UTC ---
The initial fix broke the handling of "add,dc".  The same bug was
also present for "sub".  Fixed by patch.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12357] New: ERROR: tcl error sourcing /home2/dave/binutils/src/ld/testsuite/ld-plugin/plugin.exp

2010-12-31 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=12357

   Summary: ERROR: tcl error sourcing
/home2/dave/binutils/src/ld/testsuite/ld-plugin/plugin
.exp
   Product: binutils
   Version: 2.22 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sources.redhat.com
ReportedBy: dang...@gcc.gnu.org


Running /home2/dave/binutils/src/ld/testsuite/ld-plugin/plugin.exp ...
ERROR: tcl error sourcing
/home2/dave/binutils/src/ld/testsuite/ld-plugin/plugin
.exp.
ERROR: wrong # args: should be "regsub ?switches? exp string subSpec varName"
while executing
"regsub ".*dlname='" "$plugin_name" """
invoked from within
"regsub "'.*" [regsub ".*dlname='" "$plugin_name" ""] """
invoked from within
"set plugin_name [regsub "'.*" [regsub ".*dlname='" "$plugin_name" ""] ""]"
(file "/home2/dave/binutils/src/ld/testsuite/ld-plugin/plugin.exp" line 42)
invoked from within
"source /home2/dave/binutils/src/ld/testsuite/ld-plugin/plugin.exp"
("uplevel" body line 1)
invoked from within
"uplevel #0 source /home2/dave/binutils/src/ld/testsuite/ld-plugin/plugin.exp"
invoked from within
"catch "uplevel #0 source $test_file_name""

# Look for the name we can dlopen in the test plugin's libtool control script.
set plugin_name [file_contents "$base_dir/libldtestplug.la"]
set plugin_name [regsub "'.*" [regsub ".*dlname='" "$plugin_name" ""] ""]

Probably, issue is '.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12358] New: FAIL: ld-elf/textaddr2

2010-12-31 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=12358

   Summary: FAIL: ld-elf/textaddr2
   Product: binutils
   Version: 2.22 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sources.redhat.com
ReportedBy: dang...@gcc.gnu.org


The target is hppa64-unknown-linux-gnu.

Executing on host: sh -c {/home2/dave/binutils/objdir/ld/../gas/as-new-o
tmp
dir/dump0.o /home2/dave/binutils/src/ld/testsuite/ld-elf/maxpage1.s 2>&1} 
/dev/
null ld.tmp (timeout = 300)
./ld-new  -L/home2/dave/binutils/src/ld/testsuite/ld-elf  -shared
-Ttext-segment
 0x700 -z max-page-size=0x20 -o tmpdir/dump tmpdir/dump0.o 
Executing on host: sh -c {./ld-new 
-L/home2/dave/binutils/src/ld/testsuite/ld-e
lf  -shared -Ttext-segment 0x700 -z max-page-size=0x20 -o tmpdir/dump
tm
pdir/dump0.o  2>&1}  /dev/null ld.tmp (timeout = 300)
/home2/dave/binutils/objdir/ld/../binutils/readelf  -l --wide tmpdir/dump >
tmpd
ir/dump.out
Executing on host: sh -c {/home2/dave/binutils/objdir/ld/../binutils/readelf 
-l
 --wide tmpdir/dump > tmpdir/dump.out 2>ld.tmp}  /dev/null  (timeout = 300)
extra regexps in /home2/dave/binutils/src/ld/testsuite/ld-elf/textaddr2.d
starti
ng with "^  LOAD +0x0+ 0x0*700 0x0*700 0x0*[0-9a-f][0-9a-f][0-9a-f]
0x0*
[0-9a-f][0-9a-f][0-9a-f] R[ W]E 0x20$"
EOF from tmpdir/dump.out
FAIL: ld-elf/textaddr2

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12359] New: FAIL: ld-elf/textaddr6

2010-12-31 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=12359

   Summary: FAIL: ld-elf/textaddr6
   Product: binutils
   Version: 2.22 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sources.redhat.com
ReportedBy: dang...@gcc.gnu.org


This PR is similar to ld/12358 and might be a dup.

Target is hppa64-unknown-linux-gnu.

/home2/dave/binutils/objdir/ld/../gas/as-new-o tmpdir/dump0.o
/home2/dave/bi
nutils/src/ld/testsuite/ld-elf/maxpage1.s
Executing on host: sh -c {/home2/dave/binutils/objdir/ld/../gas/as-new-o
tmp
dir/dump0.o /home2/dave/binutils/src/ld/testsuite/ld-elf/maxpage1.s 2>&1} 
/dev/
null ld.tmp (timeout = 300)
./ld-new  -L/home2/dave/binutils/src/ld/testsuite/ld-elf  -shared -z
max-page-si
ze=0x1 -Ttext-segment 0x1 -o tmpdir/dump tmpdir/dump0.o 
Executing on host: sh -c {./ld-new 
-L/home2/dave/binutils/src/ld/testsuite/ld-e
lf  -shared -z max-page-size=0x1 -Ttext-segment 0x1 -o tmpdir/dump
tmpdi
r/dump0.o  2>&1}  /dev/null ld.tmp (timeout = 300)
/home2/dave/binutils/objdir/ld/../binutils/readelf  -l --wide tmpdir/dump >
tmpd
ir/dump.out
Executing on host: sh -c {/home2/dave/binutils/objdir/ld/../binutils/readelf 
-l
 --wide tmpdir/dump > tmpdir/dump.out 2>ld.tmp}  /dev/null  (timeout = 300)
extra regexps in /home2/dave/binutils/src/ld/testsuite/ld-elf/textaddr6.d
starti
ng with "^  LOAD +0x0+ 0x0*1 0x0*1 0x0*[0-9a-f][0-9a-f][0-9a-f]
0x0*[0-9
a-f][0-9a-f][0-9a-f] R E 0x1$"
EOF from tmpdir/dump.out
FAIL: ld-elf/textaddr6

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12360] New: FAIL: size/aligment change of common symbols (warning 1)

2010-12-31 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=12360

   Summary: FAIL: size/aligment change of common symbols (warning
1)
   Product: binutils
   Version: 2.22 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sources.redhat.com
ReportedBy: dang...@gcc.gnu.org


hppa64-linux-gnu-gcc  -B/home2/dave/binutils/objdir/ld/tmpdir/gas/
-I/home2/dave
/binutils/src/ld/testsuite/ld-elfcomm -g -O2   -g -O2 -fcommon -c
/home2/dave/bi
nutils/src/ld/testsuite/ld-elfcomm/common1a.c -o tmpdir/common1a.o
Executing on host: sh -c {hppa64-linux-gnu-gcc 
-B/home2/dave/binutils/objdir/ld
/tmpdir/gas/ -I/home2/dave/binutils/src/ld/testsuite/ld-elfcomm -g -O2   -g -O2 
-fcommon -c /home2/dave/binutils/src/ld/testsuite/ld-elfcomm/common1a.c -o
tmpdi
r/common1a.o 2>&1}  /dev/null ld.tmp (timeout = 300)
hppa64-linux-gnu-gcc  -B/home2/dave/binutils/objdir/ld/tmpdir/gas/
-I/home2/dave
/binutils/src/ld/testsuite/ld-elfcomm -g -O2   -g -O2 -fcommon -c
/home2/dave/bi
nutils/src/ld/testsuite/ld-elfcomm/common1b.c -o tmpdir/common1b.o
Executing on host: sh -c {hppa64-linux-gnu-gcc 
-B/home2/dave/binutils/objdir/ld
/tmpdir/gas/ -I/home2/dave/binutils/src/ld/testsuite/ld-elfcomm -g -O2   -g -O2 
-fcommon -c /home2/dave/binutils/src/ld/testsuite/ld-elfcomm/common1b.c -o
tmpdi
r/common1b.o 2>&1}  /dev/null ld.tmp (timeout = 300)
/home2/dave/binutils/objdir/ld/ld-new   -o tmpdir/common1.o -r
tmpdir/common1a.o
 tmpdir/common1b.o
Executing on host: sh -c {/home2/dave/binutils/objdir/ld/ld-new   -o
tmpdir/comm
on1.o -r tmpdir/common1a.o tmpdir/common1b.o 2>&1}  /dev/null ld.tmp (timeout = 
300)
/home2/dave/binutils/objdir/ld/ld-new: Warning: alignment 8 of symbol `foo1' in 
tmpdir/common1b.o is smaller than 64 in tmpdir/common1a.o
/home2/dave/binutils/objdir/ld/ld-new: Warning: alignment 8 of symbol `foo1' in 
tmpdir/common1b.o is smaller than 64 in tmpdir/common1a.o
FAIL: size/aligment change of common symbols (warning 1)

"aligment" is misspelled in fail.  It looks like the regexp expects `(8)'.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12360] FAIL: size/aligment change of common symbols (warning 1)

2010-12-31 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=12360

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from John David Anglin  2010-12-31 
22:32:17 UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12376] New: File offsets for PT_LOAD segments and resulting inequivalent memory aliases

2011-01-08 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=12376

   Summary: File offsets for PT_LOAD segments and resulting
inequivalent memory aliases
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sources.redhat.com
ReportedBy: dang...@gcc.gnu.org


By default, the linker places sections in sequential order in executable
files for ELF targets like hppa-unknown-linux-gnu.  The glibc dynamic
linker uses mmap with MAP_FIXED to map PT_LOAD segments in the executable
file to the virtual address ranges specified in the program headers.
At the boundary between segments, we may have two different virtual
address pages with different protections mapping to the same physical
address page.

This results in two inequivalent aliases to the same physical page.  This
is inefficient, and certain hardware can lead to cache corruption and
segmentation faults.  For example, the HP PA8800 and PA8900 processors
do not support inequivalent aliases.

The issue can be seen with the following simple program:

int main () { return 0; }

Compiling with gcc -o xxx3 xxx3.c, I see with readelf:

ELF Header:
  Magic:   7f 45 4c 46 01 02 01 03 00 00 00 00 00 00 00 00 
  Class: ELF32
  Data:  2's complement, big endian
  Version:   1 (current)
  OS/ABI:UNIX - Linux
  ABI Version:   0
  Type:  EXEC (Executable file)
  Machine:   HPPA
  Version:   0x1
  Entry point address:   0x10354
  Start of program headers:  52 (bytes into file)
  Start of section headers:  2880 (bytes into file)
  Flags: 0x210, PA-RISC 1.1
  Size of this header:   52 (bytes)
  Size of program headers:   32 (bytes)
  Number of program headers: 7
  Size of section headers:   40 (bytes)
  Number of section headers: 31
  Section header string table index: 28

Section Headers:
  [Nr] Name  TypeAddr OffSize   ES Flg Lk Inf
Al
  [ 0]   NULL 00 00 00  0   0 
0
  [ 1] .interp   PROGBITS00010114 000114 0d 00   A  0   0 
1
  [ 2] .note.ABI-tag NOTE00010124 000124 20 00   A  0   0 
4
  [ 3] .note.gnu.build-i NOTE00010144 000144 00 00   A  0   0 
4
  [ 4] .hash HASH00010144 000144 34 04   A  5   0 
4
  [ 5] .dynsym   DYNSYM  00010178 000178 80 10   A  6   1 
4
  [ 6] .dynstr   STRTAB  000101f8 0001f8 80 00   A  0   0 
1
  [ 7] .gnu.version  VERSYM  00010278 000278 10 02   A  5   0 
2
  [ 8] .gnu.version_rVERNEED 00010288 000288 20 00   A  6   1 
4
  [ 9] .rela.dyn RELA000102a8 0002a8 0c 0c   A  5   0 
4
  [10] .rela.plt RELA000102b4 0002b4 48 0c   A  5  23 
4
  [11] .init PROGBITS000102fc 0002fc 48 00  AX  0   0 
4
  [12] .text PROGBITS00010344 000344 0003e0 00  AX  0   0 
4
  [13] .fini PROGBITS00010724 000724 28 00  AX  0   0 
4
  [14] .rodata   PROGBITS0001074c 00074c 18 00   A  0   0 
4
  [15] .PARISC.unwindPROGBITS00010764 000764 e0 04   A  0  12 
4
  [16] .eh_frame_hdr PROGBITS00010844 000844 14 00   A  0   0 
4
  [17] .eh_frame PROGBITS00010858 000858 34 00   A  0   0 
4
  [18] .ctorsPROGBITS0001188c 00088c 08 00  WA  0   0 
4
  [19] .dtorsPROGBITS00011894 000894 08 00  WA  0   0 
4
  [20] .jcr  PROGBITS0001189c 00089c 04 00  WA  0   0 
4
  [21] .dynamic  DYNAMIC 000118a0 0008a0 c8 08  WA  6   0 
4
  [22] .data PROGBITS00011968 000968 08 00  WA  0   0 
4
  [23] .plt  PROGBITS00011970 000970 4c 08 WAX  0   0 
4
  [24] .got  PROGBITS000119bc 0009bc 1c 04  WA  0   0 
4
  [25] .bss  NOBITS  000119d8 0009d8 14 00  WA  0   0 
4
  [26] .note NOTE 0009d8 28 00  0   0 
1
  [27] .comment  PROGBITS 000a00 38 01  MS  0   0 
1
  [28] .shstrtab STRTAB   000a38 000106 00  0   0 
1
  [29] .symtab   SYMTAB   001018 0004c0 10 30  56 
4
  [30] .strtab   STRTAB   0014d8 0002b1 00  0   0 
1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor spec

[Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases

2011-01-09 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=12376

--- Comment #1 from John David Anglin  2011-01-09 
17:05:02 UTC ---
This might also be a glibc bug:

$ strace /lib/ld-2.11.2.so ./xxx3execve("/lib/ld-2.11.2.so",
["/lib/ld-2.11.2.so", "./xxx3"], [/* 17 vars */]) = 0
brk(0)  = 0x4119a000
open("./xxx3", O_RDONLY)= 3
read(3, "\177ELF\1\2\1\3\0\0\0\0\0\0\0\0\0\2\0\17\0\0\0\1\0\1\3T\0\0\0004"...,
512) = 512
fstat64(3, {st_mode=0, st_size=4380866642020, ...}) = 0
getcwd("/home2/dave/inequiv", 128)  = 20
mmap(0x1, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE,
3, 0) = 0x1
mmap(0x11000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x11000
close(3)= 0
newuname({sys="Linux", node="gsyprf11", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK)  = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)  = 3
fstat64(3, {st_mode=0, st_size=0, ...}) = 0
mmap(NULL, 62087, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40192000
close(3)= 0
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)= 3
read(3,
"\177ELF\1\2\1\3\0\0\0\0\0\0\0\0\0\3\0\17\0\0\0\1\0\2\0\350\0\0\0004"..., 512)
= 512
fstat64(3, {st_mode=0, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4000
mmap(NULL, 1449240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x403ee000
mmap(0x40547000, 28672, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x158000) = 0x40547000
mmap(0x4054e000, 7448, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4054e000
close(3)= 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40001000
mprotect(0x403ee000, 1413120, PROT_READ|PROT_WRITE) = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40002000
mprotect(0x403ee000, 1413120, PROT_READ|PROT_EXEC) = 0
munmap(0x40192000, 62087)   = 0
exit_group(0)   = ?

The same fd (3) is used for all mmap calls.  Possibly, different physical
memory pages would be allocated if different file descriptors were used.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases

2011-01-09 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=12376

--- Comment #3 from John David Anglin  2011-01-09 
20:56:17 UTC ---
1) Adjust hppalinux.sh to modify TEXT_ADDR and SHLIB_TEXT_ADDR.  I need to
   add 0x40 (4 MB) to make the addresses equivalent.  This rather chews
   up the virtual address space for shared libraries.

The breaks glibc build.  My sense is there is no reasonable binutils fix
but I'm not sure.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12402] New: ld --disable-plugins configure options doesn't work

2011-01-15 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=12402

   Summary: ld --disable-plugins configure options doesn't work
   Product: binutils
   Version: 2.22 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sources.redhat.com
ReportedBy: dang...@gcc.gnu.org


I was unable to disable ld plugin support on hppa-unknown-linux-gnu.
GCC lto/plugin support is currently broken on this target.

It seems the stuff in config/plugins.m4 is overridden by the dlopen
stuff in configure.in:

# Check for dlopen support and enable plugins if possible.
enable_plugins=yes
AC_CHECK_HEADER([dlfcn.h],[],[enable_plugins=no],[AC_INCLUDES_DEFAULT])
AC_SEARCH_LIBS([dlopen],[dl],[],[enable_plugins=no],[])
AC_CHECK_FUNCS([dlopen dlsym dlclose],[],[enable_plugins=no])
# We also support plugins on Windows (MinGW).
if test x$enable_plugins = xno ; then
  AC_CHECK_HEADERS([Windows.h],[enable_plugins=yes],[],[AC_INCLUDES_DEFAULT])
fi
AM_CONDITIONAL([ENABLE_PLUGINS], [test x$enable_plugins = xyes])

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12499] New: Changes to .init_array support breaks eglibc-2.11.2 on hppa-linux

2011-02-17 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=12499

   Summary: Changes to .init_array support breaks eglibc-2.11.2 on
hppa-linux
   Product: binutils
   Version: 2.22 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sources.redhat.com
ReportedBy: dang...@gcc.gnu.org


...
CPP='gcc-4.4 -E -x c-header'   
/home2/dave/debian/glibc/eglibc-2.11.2/build-tre
e/hppa-libc/elf/ld.so.1 --library-path
/home2/dave/debian/glibc/eglibc-2.11.2/bu
ild-tree/hppa-libc:/home2/dave/debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/m
ath:/home2/dave/debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/elf:/home2/dave/
debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/dlfcn:/home2/dave/debian/glibc/e
glibc-2.11.2/build-tree/hppa-libc/nss:/home2/dave/debian/glibc/eglibc-2.11.2/bui
ld-tree/hppa-libc/nis:/home2/dave/debian/glibc/eglibc-2.11.2/build-tree/hppa-lib
c/rt:/home2/dave/debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/resolv:/home2/d
ave/debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/crypt:/home2/dave/debian/gli
bc/eglibc-2.11.2/build-tree/hppa-libc/nptl
/home2/dave/debian/glibc/eglibc-2.11.
2/build-tree/hppa-libc/sunrpc/rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x
-o

/home2/dave/debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/sunrpc/xbootparam_p
rot.T
make[3]: ***
[/home2/dave/debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/sunrpc
/xbootparam_prot.stmp] Segmentation fault (core dumped)

Problem occurs in call_init trying to run constructors for newly built
libc.so.6.

/home2/dave/debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/libc.so.6:
+file 
format elf32-hppa-linux

Contents of section .init_array:
159008  0015bee2    

The  and  appear to come from merging .ctors into .init_array.
Calling 0x causes the segv.   and  mark the limits
of .ctors as generated by crtstuff.c.

Building binutils with --disable-initfini-array avoids the error.

Not much documentation on this...

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12376] File offsets for PT_LOAD segments and resulting inequivalent memory aliases

2011-02-18 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=12376

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #13 from John David Anglin  2011-02-18 
18:30:42 UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12499] Changes to .init_array support breaks eglibc-2.11.2 on hppa-linux

2011-03-10 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=12499

John David Anglin  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|DUPLICATE   |

--- Comment #2 from John David Anglin  2011-03-11 
02:09:24 UTC ---
Irrespective of the closing of bug 12343, I still believe this is a binutils
bug.  .ctors is incorrectly merged.  binutils should understand the markers
that GCC has used for years.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/13168] New: Comdat group breaks hppa stub placement on hppa-unknown-linux-gnu

2011-09-07 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=13168

 Bug #: 13168
   Summary: Comdat group breaks hppa stub placement on
hppa-unknown-linux-gnu
   Product: binutils
   Version: 2.22 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sources.redhat.com
ReportedBy: dang...@gcc.gnu.org
Classification: Unclassified


The cmake-next package build fails with the following error:

Linking CXX executable ../bin/ccmake
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld:
libCMakeLib.a(cmGlobalGenerator.cxx.o)(.text._ZNSt8_Rb_treeIN5cmsys6StringESt4pairIKS1_iESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE16_M_insert_uniqueERKS4_[std::_Rb_tree,
std::_Select1st >,
std::less, std::allocator > >::_M_insert_unique(std::pair
const&)]+0xbc): cannot reach
4abb__ZNSt8_Rb_treeIN5cmsys6StringESt4pairIKS1_iESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE8_S_rightEPSt18_Rb_tree_node_base+0,
recompile with -ffunction-sections
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld:
libCMakeLib.a(cmGlobalGenerator.cxx.o)(.text._ZNSt8_Rb_treeIN5cmsys6StringESt4pairIKS1_iESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE16_M_insert_uniqueERKS4_[std::_Rb_tree,
std::_Select1st >,
std::less, std::allocator > >::_M_insert_unique(std::pair
const&)]+0xbc): cannot handle R_PARISC_PCREL17F for
std::_Rb_tree,
std::_Select1st >,
std::less, std::allocator > >::_S_right(std::_Rb_tree_node_base*)
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status

The R_PARISC_PCREL17F is close to the start of the cmGlobalGenerator.cxx.o
object.

I see that all the .text.* sections in the various cmake objects are
contained in comdat groups.

Linking with --unique='.text.*' results in a successful link, but I think
this hack probably breaks comdat group and discard support.

I'm not sure how to interpret the linker script when comdat groups are used:
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})

Also, shouldn't .stub be *.stub?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/13387] New: Abort at elf32-hppa.c:3921 in elf32_hppa_relocate_section

2011-11-05 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=13387

 Bug #: 13387
   Summary: Abort at elf32-hppa.c:3921 in
elf32_hppa_relocate_section
   Product: binutils
   Version: 2.23 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sourceware.org
ReportedBy: dang...@gcc.gnu.org
Classification: Unclassified


Breakpoint 1, elf32_hppa_relocate_section (output_bfd=0xa21f0, info=0x8078c, 
input_bfd=0x8a03430, input_section=0x8acac68, contents=0x4052c008 "", 
relocs=0x8abe9d8, local_syms=0xced4478, local_sections=0xd9515c8)
at ../../src/bfd/elf32-hppa.c:3921
3921abort ();
(gdb) p *hh
$22 = {eh = {root = {root = {next = 0x0, 
string = 0x8aa0679
"_ZN7WebCore35XMLHttpRequestProgressEventThrottleD1Ev", hash = 475821030}, type
= bfd_link_hash_defined, non_ir_ref = 0, u = {
undef = {next = 0x8a87a98, abfd = 0x8ac8568}, def = {next = 0x8a87a98, 
  section = 0x8ac8568, value = 0}, i = {next = 0x8a87a98, 
  link = 0x8ac8568, warning = 0x0}, c = {next = 0x8a87a98, 
  p = 0x8ac8568, size = 0}}}, indx = -1, dynindx = -1, got = {
  refcount = -1, offset = 4294967295, glist = 0x, 
  plist = 0x}, plt = {refcount = -1, offset = 4294967295, 
  glist = 0x, plist = 0x}, size = 160, type = 2, 
other = 2, target_internal = 0, ref_regular = 1, def_regular = 1, 
ref_dynamic = 0, def_dynamic = 0, ref_regular_nonweak = 1, 
dynamic_adjusted = 1, needs_copy = 0, needs_plt = 0, non_elf = 0, 
hidden = 0, forced_local = 1, dynamic = 0, mark = 1, non_got_ref = 0, 
dynamic_def = 0, dynamic_weak = 0, pointer_equality_needed = 0, 
unique_global = 0, dynstr_index = 7049, u = {weakdef = 0x0, 
  elf_hash_value = 0}, verinfo = {verdef = 0x0, vertree = 0x0}, 
vtable = 0x0}, hsh_cache = 0x0, dyn_relocs = 0x8abc4d8, 
  tls_type = GOT_UNKNOWN, plabel = 1}

Relocation is R_PARISC_PLABEL32.  Symbol visibility is STV_HIDDEN and
it has been forced local.  No space has been allocated in plt because
the plt refcount is -1.

Function is defined in .s:

.section   
.text._ZN7WebCore35XMLHttpRequestProgressEventThrottleD1
Ev,"ax",@progbits
.align 4
.globl _ZN7WebCore35XMLHttpRequestProgressEventThrottleD1Ev
.hidden _ZN7WebCore35XMLHttpRequestProgressEventThrottleD1Ev
.type   _ZN7WebCore35XMLHttpRequestProgressEventThrottleD1Ev, @function
.LFB3486:
.cfi_startproc
.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
.cfi_lsda 0x1b,.LLSDA3486
_ZN7WebCore35XMLHttpRequestProgressEventThrottleD1Ev:
.PROC
.CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=5
.ENTRY
stw %r2,-20(%r30)
addil LT'_ZTVN7WebCore35XMLHttpRequestProgressEventThrottleE,%r19
ldw RT'_ZTVN7WebCore35XMLHttpRequestProgressEventThrottleE(%r1),%r20
ldo 8(%r20),%r20
stwm %r5,128(%r30)

This is reference:

.section   
.data.rel.ro._ZTVN7WebCore35XMLHttpRequestProgressEventT
hrottleE,"awG",@progbits,_ZTVN7WebCore35XMLHttpRequestProgressEventThrottleE,comdat
.align 8
.type   _ZTVN7WebCore35XMLHttpRequestProgressEventThrottleE, @object
.size   _ZTVN7WebCore35XMLHttpRequestProgressEventThrottleE, 20
_ZTVN7WebCore35XMLHttpRequestProgressEventThrottleE:
.word   0
.word   _ZTIN7WebCore35XMLHttpRequestProgressEventThrottleE
.word   P%_ZN7WebCore35XMLHttpRequestProgressEventThrottleD1Ev

Maybe this is a comdat issue.

The problem is present in earlier versions.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/13387] Abort at elf32-hppa.c:3921 in elf32_hppa_relocate_section

2011-11-05 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=13387

--- Comment #1 from John David Anglin  2011-11-05 
23:06:27 UTC ---
elf32_hppa_hide_symbol appears to be broken as it can be called
before are all relocs are processed by elf32_hppa_check_relocs.
As a result, the plabel flag may not be set when it is called,
and as a result the plt.refcounts are reset.  This messes up
the refcounts for the symbol causing the abort.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/13387] Abort at elf32-hppa.c:3921 in elf32_hppa_relocate_section

2011-11-06 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=13387

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #3 from John David Anglin  2011-11-06 
20:47:55 UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug binutils/13476] Incorrect TLS relocations created in DSOs on hppa

2011-12-07 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=13476

John David Anglin  changed:

   What|Removed |Added

 CC||danglin at gcc dot gnu.org

--- Comment #1 from John David Anglin  2011-12-08 
01:43:58 UTC ---
1) The testcase doesn't show the bug.

2) The register is still r19 (PIC register).  The addil hasn't been changed
   to dp or r0, so the I fail to see how the commit referenced changed
   the situation.

The first hunk doesn't apply because this is a shared link.  The second
hunk doesn't apply because the register isn't dp.  So, we should fallthru
to the original code.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug binutils/13476] Incorrect TLS relocations created in DSOs on hppa

2011-12-07 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=13476

--- Comment #2 from John David Anglin  2011-12-08 
02:08:56 UTC ---
Looking a bit more, I think this break is questionable:

  /* Now try to make things easy for the dynamic linker.  */

  break;

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug binutils/13476] Incorrect TLS relocations created in DSOs on hppa

2011-12-11 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=13476

--- Comment #7 from John David Anglin  2011-12-11 
15:54:11 UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug binutils/13476] Incorrect TLS relocations created in DSOs on hppa

2011-12-11 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=13476

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #8 from John David Anglin  2011-12-11 
15:54:35 UTC ---
...

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug binutils/14720] New: FAIL: ar long file names (bfdtest1)

2012-10-14 Thread danglin at gcc dot gnu.org


http://sourceware.org/bugzilla/show_bug.cgi?id=14720



 Bug #: 14720

   Summary: FAIL: ar long file names (bfdtest1)

   Product: binutils

   Version: 2.24 (HEAD)

Status: NEW

  Severity: normal

  Priority: P2

 Component: binutils

AssignedTo: unassig...@sourceware.org

ReportedBy: dang...@gcc.gnu.org

Classification: Unclassified

  Host: hppa2.0w-hp-hpux11.11

Target: hppa2.0w-hp-hpux11.11

 Build: hppa2.0w-hp-hpux11.11





Running target unixUsing /opt/gnu/share/dejagnu/baseboards/unix.exp as board

description file for t

arget.

Using /opt/gnu/share/dejagnu/config/unix.exp as generic interface file for

targe

t.Using /xxx/gnu/binutils/src/binutils/testsuite/config/default.exp as

tool-and-ta

rget-specific interface file.

Running /xxx/gnu/binutils/src/binutils/testsuite/binutils-all/ar.exp ...

/xxx/gnu/binutils/objdir/binutils/ar rc tmpdir/artest.a

tmpdir/abcdefghijklmnopqrstuvwxyz1 tmpdir/abcdefghijklmnopqrstuvwxyz2

Executing on host: /xxx/gnu/binutils/objdir/binutils/ar rc tmpdir/artest.a

tmpdi

r/abcdefghijklmnopqrstuvwxyz1 tmpdir/abcdefghijklmnopqrstuvwxyz2   (timeout =

30

0)

spawn /xxx/gnu/binutils/objdir/binutils/ar rc tmpdir/artest.a

tmpdir/abcdefghijk

lmnopqrstuvwxyz1 tmpdir/abcdefghijklmnopqrstuvwxyz2

/xxx/gnu/binutils/objdir/binutils/ar rc tmpdir/artest.a

tmpdir/abcdefghijklmnopq

rstuvwxyz1 tmpdir/abcdefghijklmnopqrstuvwxyz2

Executing on host: /xxx/gnu/binutils/objdir/binutils/ar rc tmpdir/artest.a

tmpdi

r/abcdefghijklmnopqrstuvwxyz1 tmpdir/abcdefghijklmnopqrstuvwxyz2   (timeout =

30

0)

spawn /xxx/gnu/binutils/objdir/binutils/ar rc tmpdir/artest.a

tmpdir/abcdefghijklmnopqrstuvwxyz1 tmpdir/abcdefghijklmnopqrstuvwxyz2

/xxx/gnu/binutils/objdir/binutils/ar t tmpdir/artest.a

Executing on host: /xxx/gnu/binutils/objdir/binutils/ar t tmpdir/artest.a  

(timeout = 300)

spawn /xxx/gnu/binutils/objdir/binutils/ar t tmpdir/artest.a

abcdefghijklmnopqrstuvwxyz1

abcdefghijklmnopqrstuvwxyz2

abcdefghijklmnopqrstuvwxyz1

abcdefghijklmnopqrstuvwxyz2



/xxx/gnu/binutils/objdir/binutils/ar x tmpdir/artest.a

Executing on host: /xxx/gnu/binutils/objdir/binutils/ar x tmpdir/artest.a  

(timeout = 300)

spawn /xxx/gnu/binutils/objdir/binutils/ar x tmpdir/artest.a

/xxx/gnu/binutils/objdir/binutils/bfdtest1 tmpdir/artest.a

Executing on host: /xxx/gnu/binutils/objdir/binutils/bfdtest1 tmpdir/artest.a  

(timeout = 300)

spawn /xxx/gnu/binutils/objdir/binutils/bfdtest1 tmpdir/artest.a

/xxx/gnu/binutils/objdir/binutils/bfdtest1 exited with status 1

/xxx/gnu/binutils/objdir/binutils/bfdtest1 exited with status 1

FAIL: ar long file names (bfdtest1)



Similar fails:

FAIL: ar thin archive (bfdtest1)

FAIL: ar thin archive with nested archive (bfdtest1)



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

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


[Bug gas/14721] New: FAIL: Multibyte symbol names

2012-10-14 Thread danglin at gcc dot gnu.org


http://sourceware.org/bugzilla/show_bug.cgi?id=14721



 Bug #: 14721

   Summary: FAIL: Multibyte symbol names

   Product: binutils

   Version: 2.24 (HEAD)

Status: NEW

  Severity: normal

  Priority: P2

 Component: gas

AssignedTo: unassig...@sourceware.org

ReportedBy: dang...@gcc.gnu.org

Classification: Unclassified

  Host: hppa64-hp-hpux11.11

Target: hppa64-hp-hpux11.11

 Build: hppa64-hp-hpux11.11





../as-new   -o dump.o

/xxx/gnu/binutils/src/gas/testsuite/gas/elf/syms.sExecuting on host: sh -c

{../as-new   -o dump.o /xxx/gnu/binutils/src/gas/testsu

ite/gas/elf/syms.s 2>&1}  /dev/null gas.out (timeout = 300)spawn [open ...]

/xxx/gnu/binutils/objdir/gas/testsuite/../../binutils/readelf  -S -s -p .strtab 

dump.oExecuting on host: sh -c

{/xxx/gnu/binutils/objdir/gas/testsuite/../../binutils/

readelf  -S -s -p .strtab dump.o >dump.out 2>gas.stderr}  /dev/null  (timeout =

300)

spawn [open ...]

extra regexps in /xxx/gnu/binutils/src/gas/testsuite/gas/elf/syms.d starting

wit

h "^  \[..\]  sy.*mbol$"EOF from dump.out

FAIL: Multibyte symbol names



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

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


[Bug gas/14722] New: FAIL: weak and common directives

2012-10-14 Thread danglin at gcc dot gnu.org


http://sourceware.org/bugzilla/show_bug.cgi?id=14722



 Bug #: 14722

   Summary: FAIL: weak and common directives

   Product: binutils

   Version: 2.24 (HEAD)

Status: NEW

  Severity: normal

  Priority: P2

 Component: gas

AssignedTo: unassig...@sourceware.org

ReportedBy: dang...@gcc.gnu.org

Classification: Unclassified

  Host: hppa64-hp-hpux11.11

Target: hppa64-hp-hpux11.11

 Build: hppa64-hp-hpux11.11





../as-new   -o dump.o

/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common1.sExecuting on host: sh -c

{../as-new   -o dump.o /xxx/gnu/binutils/src/gas/testsu

ite/gas/elf/common1.s 2>&1}  /dev/null gas.out (timeout = 300)

spawn [open ...]

/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common1.s: Assembler

messages:/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common1.s:2: Error: bad or

irreducib

le absolute expression/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common1.s:2:

Error: junk at end of l

ine, first unrecognized character is `,'

/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common1.s: Assembler

messages:/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common1.s:2: Error: bad or

irreducib

le absolute expression/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common1.s:2:

Error: junk at end of l

ine, first unrecognized character is `,'

regexp_diff match failure

regexp "^[^:]*: Error: symbol `foobar' can not be both weak and common$"line  

"/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common1.s:2: Error: bad or i

rreducible absolute expression"extra lines in dump.stderr starting with

"^/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common1.s:2: Error: junk at end

of line, first unrecognized character is 

`,'$"

EOF from /xxx/gnu/binutils/src/gas/testsuite/gas/elf/common1.l

FAIL: weak and common directives



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

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


[Bug gas/14722] FAIL: weak and common directives

2012-10-14 Thread danglin at gcc dot gnu.org


http://sourceware.org/bugzilla/show_bug.cgi?id=14722



--- Comment #1 from John David Anglin  2012-10-15 
01:27:41 UTC ---

Also:



../as-new   -o dump.o /xxx/gnu/binutils/src/gas/testsuite/gas/elf/common2.s

Executing on host: sh -c {../as-new   -o dump.o

/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common2.s 2>&1}  /dev/null gas.out

(timeout = 300)

spawn [open ...]

/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common2.s: Assembler

messages:/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common2.s:1: Error: bad or

irreducib

le absolute expression/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common2.s:1:

Error: junk at end of l

ine, first unrecognized character is

`,'/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common2.s: Assembler messages:

/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common2.s:1: Error: bad or

irreducib

le absolute expression

/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common2.s:1: Error: junk at end of

line, first unrecognized character is `,'

regexp_diff match failureregexp "^[^:]*: Error: symbol `foobar' can not be both

weak and common$"line  

"/xxx/gnu/binutils/src/gas/testsuite/gas/elf/common2.s:1: Error: bad or i

rreducible absolute expression"

extra lines in dump.stderr starting with

"^/xxx/gnu/binutils/src/gas/testsuite/g

as/elf/common2.s:1: Error: junk at end of line, first unrecognized character is

`,'$"EOF from /xxx/gnu/binutils/src/gas/testsuite/gas/elf/common2.l

FAIL: common and weak directives



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

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


[Bug binutils/14779] New: readelf.c:403:3: error: unknown type name 'mbstate_t'

2012-10-27 Thread danglin at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=14779

 Bug #: 14779
   Summary: readelf.c:403:3: error: unknown type name 'mbstate_t'
   Product: binutils
   Version: 2.24 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassig...@sourceware.org
ReportedBy: dang...@gcc.gnu.org
CC: ni...@redhat.com
Classification: Unclassified
  Host: hppa1.1-hp-hp10.20
Target: hppa1.1-hp-hp10.20
 Build: hppa1.1-hp-hp10.20


gcc -DHAVE_CONFIG_H -I. -I../../src/binutils  -I. -I../../src/binutils -I../bfd
-I../../src/binutils/../bfd -I../../src/binutils/../include -DHOST_HPPAHPUX
-D_LARGEFILE64_SOURCE -DLOCALEDIR="\"/usr/local/share/locale\""
-Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -I/usr/local/include -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -g -O2 -MT readelf.o -MD -MP -MF
.deps/readelf.Tpo -c -o readelf.o ../../src/binutils/readelf.c
../../src/binutils/readelf.c: In function 'print_symbol':
../../src/binutils/readelf.c:403:3: error: unknown type name 'mbstate_t'
../../src/binutils/readelf.c:460:4: warning: implicit declaration of function
'mbrtowc' [-Wimplicit-function-declaration]
make[4]: *** [readelf.o] Error 1

'mbstate_t' and 'mbrtowc' are not supported.

Have:
 extern int mblen(const char *, size_t);
 extern int mbtowc(wchar_t *, const char *, size_t);
 extern int wctomb(char *, wchar_t);
 extern size_t mbstowcs(wchar_t *, const char *, size_t);
 extern size_t wcstombs(char *, const wchar_t *, size_t);

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
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 , 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&arch=hppa&ver=5.7-2&stamp=1507223380&raw=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/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/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 #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/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/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/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 &tls_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/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] [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/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 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&action=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

[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] 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-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 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 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&action=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] 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-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 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 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&action=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] 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 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&arch=hppa&ver=1.20.2710-1&stamp=1577116832&raw=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 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] `__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 #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-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.


  1   2   >