diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-04-23 07:58:05 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-04-23 07:59:59 -0700 |
commit | f6fe1ccd62e4492aabda6a9a9d12da438d0ebf2b (patch) | |
tree | a41818b68d4e2ece962519ffc0d61c5b2bc1fb8a /bfd/bfd-in2.h | |
parent | 4ef9fb2f075daec3885c63aa2056075bdd94384b (diff) | |
download | gdb-f6fe1ccd62e4492aabda6a9a9d12da438d0ebf2b.zip gdb-f6fe1ccd62e4492aabda6a9a9d12da438d0ebf2b.tar.gz gdb-f6fe1ccd62e4492aabda6a9a9d12da438d0ebf2b.tar.bz2 |
Don't change compressed input debug section names
Change compressed input debug section name for objdump is very confusing.
But we need to change it for linker so that linker will consider the
input section as a debug section. This patch delays section rename to
elf_fake_sections for objcopy and avoids it for objdump.
bfd/
PR binutils/18209
* bfd.c (bfd): Add is_linker_input.
* elf.c (convert_debug_to_zdebug): New.
(convert_zdebug_to_debug): Likewise.
(_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
.zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
(_bfd_elf_init_reloc_shdr): Pass a pointer to section name
instead of a pointer to section.
(elf_fake_sections): Rename the section name if SEC_ELF_RENAME
is set.
* section.c (SEC_ELF_RENAME): New.
* bfd-in2.h: Regenerated.
binutils/
PR binutils/18209
* objcopy.c (setup_section): Copy compress status.
binutils/testsuite/
PR binutils/18209
* binutils-all/compress.exp: Replace dw2-3.W with dw2-3gabi.W
on zlib-gabi output.
* binutils-all/dw2-1.W: Convert section names to .zdebug_*.
* binutils-all/dw2-3.W: Likewise.
* binutils-all/objdump.W: Likewise.
* binutils-all/dw2-3gabi.W: New file.
ld/
PR binutils/18209
* ldfile.c (ldfile_try_open_bfd): Set is_linker_input to 1.
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r-- | bfd/bfd-in2.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 122caa0..d4e2b9a 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1400,6 +1400,10 @@ typedef struct bfd_section TMS320C54X only. */ #define SEC_TIC54X_BLOCK 0x10000000 + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 0x10000000 + /* Conditionally link this section; do not link if there are no references found to any symbol in the section. This is for TI TMS320C54X only. */ @@ -6465,6 +6469,9 @@ struct bfd /* Set if this is the linker output BFD. */ unsigned int is_linker_output : 1; + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + /* If this is an input for a compiler plug-in library. */ ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; |