Created attachment 7836 [details] test case $ gcc -c 173930.c as: BFD (GNU Binutils for Ubuntu) 2.24.90.20141014 assertion fail ../../bfd/elf.c:6879 as: BFD (GNU Binutils for Ubuntu) 2.24.90.20141014 internal error, aborting at ../../bfd/elfcode.h line 224 in bfd_elf64_swap_symbol_out as: Please report this bug.
Reduced testcase movl $(%ebx+4), %eax
Created attachment 7837 [details] fix I think this tc-i386.c is the right fix for this bug, but I'll leave that up to HJ to judge. I intend to make the write.c change as well, to stop any register symbols being reduced to the register section symbol, but it seems this requires testsuite tweaking.
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, master has been updated via a841bdf5d3bfb9c687f938be7388597db2e461de (commit) from 998a69f46a3770d0f26aec080fcac4865c689739 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a841bdf5d3bfb9c687f938be7388597db2e461de commit a841bdf5d3bfb9c687f938be7388597db2e461de Author: Alan Modra <amodra@gmail.com> Date: Sat Oct 18 11:10:53 2014 +1030 Fix PR17493, attempted output of *GAS `reg' section* symbol The write.c change is to make gas report an error if reg_section symbols should leak in future. The tc-i386.c change is the real fix. Note that the error isn't the most helpful, "redefined symbol cannot be used on reloc", but I'm not inclined to improve what is really an internal gas error. reg_section symbols shouldn't leak.. gas/ PR 17493 * write.c (adjust_reloc_syms): Don't allow symbols in reg_section to be reduced to reg_section section symbol. * gas/config/tc-i386.c (i386_finalize_immediate): Reject all reg_section immediates. gas/testsuite/ * gas/i386/inval-equ-2.l: Adjust. ----------------------------------------------------------------------- Summary of changes: gas/ChangeLog | 8 ++++++++ gas/config/tc-i386.c | 2 +- gas/testsuite/ChangeLog | 4 ++++ gas/testsuite/gas/i386/inval-equ-2.l | 12 ++++++------ gas/write.c | 3 ++- 5 files changed, 21 insertions(+), 8 deletions(-)
Fixed
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, binutils-2_25-branch has been updated via 7cc2a6b6a4c63cba363836475052a71e0387e621 (commit) from 04253f276b48227728cac3e4c6df614e161f1e9c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7cc2a6b6a4c63cba363836475052a71e0387e621 commit 7cc2a6b6a4c63cba363836475052a71e0387e621 Author: Alan Modra <amodra@gmail.com> Date: Sat Oct 18 11:10:53 2014 +1030 Fix PR17493, attempted output of *GAS `reg' section* symbol The write.c change is to make gas report an error if reg_section symbols should leak in future. The tc-i386.c change is the real fix. Note that the error isn't the most helpful, "redefined symbol cannot be used on reloc", but I'm not inclined to improve what is really an internal gas error. reg_section symbols shouldn't leak.. gas/ PR 17493 * write.c (adjust_reloc_syms): Don't allow symbols in reg_section to be reduced to reg_section section symbol. * gas/config/tc-i386.c (i386_finalize_immediate): Reject all reg_section immediates. gas/testsuite/ * gas/i386/inval-equ-2.l: Adjust. ----------------------------------------------------------------------- Summary of changes: gas/ChangeLog | 7 +++++++ gas/config/tc-i386.c | 2 +- gas/testsuite/ChangeLog | 6 ++++++ gas/testsuite/gas/i386/inval-equ-2.l | 12 ++++++------ gas/write.c | 3 ++- 5 files changed, 22 insertions(+), 8 deletions(-)