diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2014-08-27 07:59:48 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2014-08-27 07:59:48 -0700 |
commit | c8831961f9fecf81e90fe7c8c94b47e01ee64662 (patch) | |
tree | 22fb029acee0d6388275d2628613dd74bfaa2063 /bfd/elf32-i386.c | |
parent | 29a9f53e857c5d55df852d0a5d5c41a9247c16a2 (diff) | |
download | gdb-c8831961f9fecf81e90fe7c8c94b47e01ee64662.zip gdb-c8831961f9fecf81e90fe7c8c94b47e01ee64662.tar.gz gdb-c8831961f9fecf81e90fe7c8c94b47e01ee64662.tar.bz2 |
Use bfd_is_abs_section to check discarded input section
bfd/
PR ld/17306
* elf32-i386.c (elf_i386_convert_mov_to_lea): Use bfd_is_abs_section
to check discarded input section.
* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
ld/testsuite/
PR ld/17306
* ld-i386/i386.exp (i386tests): Add tests for PR ld/17306.
* ld-x86-64/x86-64.exp (x86_64tests): Likewise.
* ld-i386/pr17306a.s: New file.
* ld-i386/pr17306b.s: Likewise.
* ld-x86-64/pr17306a.s: Likewise.
* ld-x86-64/pr17306b.s: Likewise.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r-- | bfd/elf32-i386.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 7c4b4bb..a00d47c 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -2533,7 +2533,7 @@ elf_i386_convert_mov_to_lea (bfd *abfd, asection *sec, /* Nothing to do if there are no codes, no relocations or no output. */ if ((sec->flags & (SEC_CODE | SEC_RELOC)) != (SEC_CODE | SEC_RELOC) || sec->reloc_count == 0 - || discarded_section (sec)) + || bfd_is_abs_section (sec->output_section)) return TRUE; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; |