[Bug ld/17288] New: sh64 incremental link does not set flags in ELF header

2014-08-18 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17288

Bug ID: 17288
   Summary: sh64 incremental link does not set flags in ELF header
   Product: binutils
   Version: 2.24
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: dhowells at redhat dot com

Doing an incremental link with an sh64 binutils does not set the flags field in
the ELF header.  Using this script:

#!/bin/sh -x
CROSS=sh64-linux-gnu-
LDFLAGS="-EL -mshlelf64"
CFLAGS=-m5-64media-nofpu
rm -f hello.o wibble.o foo.o bar.o
echo 'int hello(int i) {return i + 42;}' |
${CROSS}gcc $CFLAGS -x c -c - -o hello.o || exit $?
${CROSS}readelf -h hello.o | grep Flags
${CROSS}ar rcsD wibble.o hello.o || exit $?
${CROSS}ld $LDFLAGS -r -o foo.o wibble.o || exit $?
${CROSS}readelf -h foo.o | grep Flags
${CROSS}ld $LDFLAGS -r -o bar.o foo.o || exit $?
${CROSS}readelf -h bar.o | grep Flags

The following is seen:

+ CROSS=sh64-linux-gnu-
+ LDFLAGS='-EL -mshlelf64'
+ CFLAGS=-m5-64media-nofpu
+ rm -f hello.o wibble.o foo.o bar.o
+ echo 'int hello(int i) {return i + 42;}'
+ sh64-linux-gnu-gcc -m5-64media-nofpu -x c -c - -o hello.o
+ sh64-linux-gnu-readelf -h hello.o
+ grep Flags
  Flags: 0xa, sh5
+ sh64-linux-gnu-ar rcsD wibble.o hello.o
+ sh64-linux-gnu-ld -EL -mshlelf64 -r -o foo.o wibble.o
+ sh64-linux-gnu-readelf -h foo.o
+ grep Flags
  Flags: 0x0
+ sh64-linux-gnu-ld -EL -mshlelf64 -r -o bar.o foo.o
sh64-linux-gnu-ld: unknown architecture of input file `foo.o' is incompatible
with sh5 output
+ exit 1

As can be seen, the assembler's output is flagged 0xa (sh5), but the linker's
output is flagged 0x0.  Note that adding -belf64-sh64l to the ld command line
doesn't help.

-- 
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/17288] sh64 incremental link does not set flags in ELF header

2014-08-18 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17288

--- Comment #1 from David Howells  ---
The binutils was built from the 2.24 tarball plus a patch bringing it up to git
release cab6c3ee9785f072a373afe31253df0451db93cf.

Build configuration:

+ LDFLAGS='-Wl,-z,relro '
+ ../binutils-2.24/configure \
--disable-dependency-tracking \
--disable-silent-rules \
--enable-checking \
--build=x86_64-redhat-linux-gnu \
--host=x86_64-redhat-linux-gnu \
--target=sh64-linux-elf \
--program-prefix=sh64-linux-gnu- \
--disable-shared \
--disable-install_libbfd \
--with-sysroot=/usr/sh64-linux-gnu/sys-root \
--enable-64-bit-bfd

(I've removed the flags that set the various installation paths and the bug
url)

-- 
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/17288] sh64 incremental link does not set flags in ELF header

2014-08-19 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17288

--- Comment #3 from David Howells  ---
Using --whole-archive seems to work.

+ sh64-linux-gnu-ar rcsD wibble.o hello.o
+ sh64-linux-gnu-ld -EL -mshlelf64 --whole-archive -r -o foo.o wibble.o
+ sh64-linux-gnu-readelf -h foo.o
+ grep Flags
  Flags: 0xa, sh5
+ sh64-linux-gnu-ld -EL -mshlelf64 -r -o bar.o foo.o
+ sh64-linux-gnu-readelf -h bar.o
+ grep Flags
  Flags: 0xa, sh5

-- 
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/17288] sh64 incremental link does not set flags in ELF header

2014-08-21 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17288

--- Comment #6 from David Howells  ---
Should the linker invent a new e_flags based on the -b and -m flags it has been
given and reject any contributory object file that has different flags?

-- 
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/17288] sh64 incremental link does not set flags in ELF header

2015-01-07 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17288

--- Comment #7 from David Howells  ---
Any further thoughts on this?

-- 
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/18189] New: Extra-large constant handling failure in microblaze

2015-04-01 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18189

Bug ID: 18189
   Summary: Extra-large constant handling failure in microblaze
   Product: binutils
   Version: 2.25
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: dhowells at redhat dot com

Created attachment 8220
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8220&action=edit
libgcc derived assembly file that shows the problem.

Attempting to assemble this line with a microblaze-linux-gnu target assembler:

addikr23,r0,0xb746a0003f80

works when the compiler is x86_64 hosted but fails when i386 hosted with the
following error:

_powisf2.s: Assembler messages:
_powisf2.s:71: Fatal error: operand must be a constant or a label

Given that microblaze is 32-bit only, I would guess that the error should
appear on x86_64 as well as on i386 - and that this is actually a symptom of a
gcc bug.

The error can be obtained by running the attached assembly file through the
assembler thusly:

microblaze-linux-gnu-as _powisf2.s

-- 
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/18189] Extra-large constant handling failure in microblaze

2015-04-01 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18189

--- Comment #1 from David Howells  ---
Created attachment 8221
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8221&action=edit
Preprocessed libgcc C file

For reference, here's the preprocessed libgcc file that compiles to the
previously attached assembly.  The compiler command line was:

/root/cross-gcc/gcc-5.0.0-20150319/microblaze-linux-gnu/gcc/xgcc
-B/root/cross-gcc/gcc-5.0.0-20150319/microblaze-linux-gnu/gcc/
-B/usr/microblaze-linux-gnu/bin/ -B/usr/microblaze-linux-gnu/lib/ -O2 -fPIC
-fbuilding-libgcc -fno-exceptions -fno-stack-protector -fvisibility=hidden -g
-o _powisf2.o -c _powisf2.i

-- 
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/18189] Extra-large constant handling failure in microblaze

2015-04-01 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18189

--- Comment #2 from David Howells  ---
binutils-2.25 was the base, plus patches as for the Fedora 21 binutils rpm.

The configuration for the x86_64 binutils was:

LDFLAGS='-Wl,-z,relro ' \
../binutils-2.25/configure --disable-dependency-tracking --disable-silent-rules
--enable-checking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
--sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec
--localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --target=microblaze-linux-gnu
--program-prefix=microblaze-linux-gnu- --disable-shared
--disable-install_libbfd --with-sysroot=/usr/microblaze-linux-gnu/sys-root
--with-bugurl=http://bugzilla.redhat.com/bugzilla/

The i386 variant would be similar, changing x86_64 to i386.

and the build line:

make -C microblaze -j5 tooldir=/usr all

-- 
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/18189] Extra-large constant handling failure in microblaze

2015-04-07 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18189

--- Comment #6 from David Howells  ---
Works for me, thanks!

-- 
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/19587] New: Some of the less-well used targets won't compile with gcc-6 due to static vars in opcode headers

2016-02-09 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19587

Bug ID: 19587
   Summary: Some of the less-well used targets won't compile with
gcc-6 due to static vars in opcode headers
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: dhowells at redhat dot com
  Target Milestone: ---

gcc-6 added a new warning -Wunused-const-variable that causes unused constant
variables to generate a warning.  Binutils adds -Werror to the build which
turns this into an error.

The opcode header files define a bunch of static constant variables, mostly
arrays, that now fall foul of this.  Errors like the following are generated:

 ../../binutils-2.26/opcodes/../include/opcode/metag.h:686:30: error:
'metag_scondtab' defined but not used [-Werror=unused-const-variable]

This error can be suppressed by adding -Wno-unused-const-variable to the build.
Note that whilst -Wno-error=unused-const-variable could be used with gcc-6, it
cannot be used with anything older.


The following are all potential problems:

warthog>git grep "static const.*=" master -- include/opcode/*.h | sed
s/master://
include/opcode/dlx.h:static const struct dlx_opcode dlx_opcodes[] =
include/opcode/hppa.h:static const char *const completer_chars =
",CcY<>?!@+&U~FfGHINnOoZMadu|/=0123%e$m}";
include/opcode/hppa.h:static const struct pa_opcode pa_opcodes[] =
include/opcode/i860.h:static const struct i860_opcode i860_opcodes[] =
include/opcode/metag.h:static const metag_reg metag_regtab[] =
include/opcode/metag.h:static const metag_reg metag_dsp_regtab[] =
include/opcode/metag.h:static const metag_reg metag_dsp_tmpl_regtab[2][56] =
include/opcode/metag.h:static const metag_acf metag_acftab[] =
include/opcode/metag.h:static const split_condition metag_scondtab[] =
include/opcode/metag.h:static const split_condition metag_dsp_scondtab[] =
include/opcode/metag.h:static const split_condition metag_fpu_scondtab[] =
include/opcode/metag.h:static const insn_template metag_optab[] =
include/opcode/mips.h:static const unsigned int mips_isa_table[] = {
include/opcode/nds32.h:static const int nds32_r45map[] =
include/opcode/nds32.h:static const int nds32_r54map[] =
include/opcode/ns32k.h:static const struct ns32k_opcode ns32k_opcodes[]=
include/opcode/score-datadep.h:static const struct insn_to_dependency
insn_to_dependency_table[] =
include/opcode/score-datadep.h:static const struct data_dependency
data_dependency_table[] =
include/opcode/tic30.h:static const reg tic30_regtab[] = {
include/opcode/tic30.h:static const ind_addr_type tic30_indaddr_tab[] = {
include/opcode/tic30.h:static const insn_template tic30_optab[] = {
include/opcode/tic30.h:static const insn_template *const tic30_optab_end =
include/opcode/tic30.h:static const partemplate tic30_paroptab[] = {
include/opcode/tic30.h:static const partemplate *const tic30_paroptab_end =
include/opcode/tic4x.h:static const tic4x_register_t tic3x_registers[] =
include/opcode/tic4x.h:static const tic4x_register_t tic4x_registers[] =
include/opcode/tic4x.h:static const tic4x_cond_t tic4x_conds[] =
include/opcode/tic4x.h:static const tic4x_indirect_t tic4x_indirects[] =
include/opcode/tic4x.h:static const tic4x_inst_t tic4x_insts[] =
include/opcode/visium.h:static const struct reg_entry gen_reg_table[] =
include/opcode/visium.h:static const struct reg_entry fp_reg_table[] =

-- 
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/19614] New: gas for c6x prints "Error: inconsistent uses of .cfi_sections" when gcc compiles things with it

2016-02-11 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19614

Bug ID: 19614
   Summary: gas for c6x prints "Error: inconsistent uses of
.cfi_sections" when gcc compiles things with it
   Product: binutils
   Version: 2.26
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: dhowells at redhat dot com
  Target Milestone: ---

When gcc is building for c6x with a command like the following:

   echo 'int main() { return 0; }' | ./gcc/xgcc -x c -c -g - -B ./gcc
-fexceptions

the following occurs with the 2.26 gas:

   /tmp/cc6wIVaX.s: Assembler messages:
   /tmp/cc6wIVaX.s:12: Error: inconsistent uses of .cfi_sections

The problem is the following in the assembly source output by gcc:

...
.cfi_sections   .debug_frame
...
.cfi_sections .debug_frame, .c6xabi.exidx
...

If the first directive is modified to have the same parameter as the second
then the error goes away.

This isn't a problem in 2.25 and is due to the following commit:

commit 2f0c68f23bb3132cd5ac466ca8775c0d9e4960cd
Author: Catherine Moore 
Date:   Thu May 28 14:50:36 2015 -0700
Compact EH Support

adding a check:

  if (cfi_sections_set && cfi_sections != sections)
as_bad (_("inconsistent uses of .cfi_sections"));

Can the check be relaxed so that if the parameter hasn't been specified yet,
it's made retroactive, but only incurs an error if changed once specified?

gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69747

-- 
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/20047] New: The arc assembler outputs an "unrecognized option" error with a weird character in it

2016-05-05 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20047

Bug ID: 20047
   Summary: The arc assembler outputs an "unrecognized option"
error with a weird character in it
   Product: binutils
   Version: 2.26
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: dhowells at redhat dot com
  Target Milestone: ---

Running the arc assembler produces an error with a weird character in it:

echo | /data/fedora/cross-gcc/gcc-6.1.1-20160427/arc-linux-gnu/./gcc/as -v
-mARC700 -mEA -o conftest.o 
GNU assembler version 2.26 (arc-linux-uclibc) using BFD version version
2.26.20160125
Assembler messages:
Error: unrecognized option -Î

It appears that it doesn't like the -mEA argument supplied by gcc, but gets the
error message wrong.

The version was binutils-2.26. The configuration was:

LDFLAGS='-Wl,-z,relro ' \
../binutils-2.26/configure --disable-dependency-tracking --disable-silent-rules
--enable-checking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
--sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec
--localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --target=arc-linux-uclibc
--program-prefix=arc-linux-gnu- --disable-shared --disable-install_libbfd
--with-sysroot=/usr/arc-linux-gnu/sys-root --enable-deterministic-archives=no
--with-bugurl=http://bugzilla.redhat.com/bugzilla/

-- 
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/21021] New: Assertion failure in ignore_rest_of_line at gas/read.c:3758

2017-01-03 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21021

Bug ID: 21021
   Summary: Assertion failure in ignore_rest_of_line at
gas/read.c:3758
   Product: binutils
   Version: 2.27
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: dhowells at redhat dot com
  Target Milestone: ---

Created attachment 9736
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9736&action=edit
Test code

Compiling the attached test case with:

xtensa-linux-gnu-as /tmp/xtensa.s

results in the following:

/tmp/xtensa.s: Assembler messages:
/tmp/xtensa.s:39: Error: bad expression
/tmp/xtensa.s:39: Error: found '�', expected: ')'
/tmp/xtensa.s:39: Error: junk at end of line, first unrecognized character
valued 0xfff9
/tmp/xtensa.s:39: Internal error!
Assertion failure in ignore_rest_of_line at
../../binutils-2.27/gas/read.c:3758.
Please report this bug.

Line 39 is:

bbci.l a10, 0, 1f

but attempting to remove any of the other lines affects the error produced. 
The unexpected character changes, depending on the run.  Valgrind doesn't find
anything.

The binutils-2.27 package was built on x86_64 using:

LDFLAGS='-Wl,-z,relro '
./configure --disable-dependency-tracking --disable-silent-rules
--enable-checking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
--sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec
--localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --target=xtensa-linux-gnu
--program-prefix=xtensa-linux-gnu- --disable-shared --disable-install_libbfd
--with-sysroot=/usr/xtensa-linux-gnu/sys-root
--enable-deterministic-archives=no --enable-compressed-debug-sections=none
--enable-lto --with-bugurl=http://bugzilla.redhat.com/bugzilla/

-- 
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/21914] [x86_64] SEGV during link

2017-08-07 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21914

--- Comment #1 from David Howells  ---
binutils was configured thusly:

+ LDFLAGS='-Wl,-z,relro '
+ ../binutils-2.29/configure --disable-dependency-tracking
--disable-silent-rules --enable-checking --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec
--localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --target=x86_64-linux-gnu
--program-prefix=x86_64-linux-gnu- --disable-shared --disable-install_libbfd
--with-sysroot=/usr/x86_64-linux-gnu/sys-root
--enable-deterministic-archives=no --enable-compressed-debug-sections=none
--enable-lto --with-bugurl=http://bugzilla.redhat.com/bugzilla/

-- 
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/21914] New: [x86_64] SEGV during link

2017-08-07 Thread dhowells at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21914

Bug ID: 21914
   Summary: [x86_64] SEGV during link
   Product: binutils
   Version: 2.29
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: dhowells at redhat dot com
  Target Milestone: ---

Created attachment 10322
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10322&action=edit
Test data

ld from binutils-2.29 can be made to crash when attempting to link the attached
test data.  The test data needs to be decompressed and then ld commanded as
follows:

x86_64-linux-gnu-ld  -m elf_i386 -N --no-check-sections
--section-start=.prefix=0 --gc-sections -static -o usbdisk.bin --oformat binary
-e 0 usbdisk.o

Note that the ld being used here is an x86_64-on-x86_64 cross.

Poking around in the crashed ld process with gdb shows:

Program received signal SIGSEGV, Segmentation fault.
0x0042e3a4 in gldelf_i386_place_orphan (s=0x82cea0, 
secname=0x82c692 ".prefix", constraint=382) at eelf_i386.c:1978
1978&& (elf_section_data (os->bfd_section)->this_hdr.sh_info
(gdb) bt
#0  0x0042e3a4 in gldelf_i386_place_orphan (s=0x82cea0, 
secname=0x82c692 ".prefix", constraint=382) at eelf_i386.c:1978
#1  0x00412bfa in lang_place_orphans ()
at ../../binutils-2.29/ld/ldlang.c:6396
#2  0x00416f21 in lang_process ()
at ../../binutils-2.29/ld/ldlang.c:7198
#3  0x00403ee0 in main (argc=, argv=)
at ../../binutils-2.29/ld/ldmain.c:413

The fault apparently occurs on line 1978 in the following:

1977if (os->bfd_section != NULL
1978&& (elf_section_data (os->bfd_section)->this_hdr.sh_info
1979== elf_section_data (s)->this_hdr.sh_info)
1980&& (os->bfd_section->flags == 0
1981|| ((!bfd_link_relocatable (&link_info)
1982 || (iself && (((elf_section_flags (s)
1983 ^ elf_section_flags
(os->bfd_section))
1984& SHF_EXCLUDE) == 0)))

(gdb) p os
$1 = (lang_output_section_statement_type *) 0x81e168
(gdb) p os->bfd_section
$2 = (asection *) 0x820720
(gdb) p s
$3 = (asection *) 0x82cea0

Looking at the disassembly, line 1977 starts here:

   0x0042e386 <+822>:   mov0x38(%rbx),%rsi
   0x0042e38a <+826>:   test   %rsi,%rsi
   0x0042e38d <+829>:   je 0x42e448 
   0x0042e393 <+835>:   mov0xe0(%rsi),%rax
   0x0042e39a <+842>:   mov0xe0(%rbp),%rdx
   0x0042e3a1 <+849>:   mov0x2c(%rdx),%ecx
=> 0x0042e3a4 <+852>:   cmp%ecx,0x2c(%rax)

So %rbx holds 'os', %rsi holds 'os->bfd_section' and %rbp holds 's'.

(gdb) p/x *(long*)($rsi+0xe0)
$13 = 0x0
(gdb) p/x *(long*)($rbp+0xe0)
$14 = 0x82f170

So elf_section_data (os->bfd_section) returns NULL and a SEGV occurs when we
try and dereference it.

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