Get rid of SEC_ELF_RENAME
authorAlan Modra <amodra@gmail.com>
Tue, 6 Dec 2022 04:10:10 +0000 (14:40 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 6 Dec 2022 04:10:10 +0000 (14:40 +1030)
commit7b5f66a118a6e252a56c472c082a29d39ede68c6
treeae6097315f0fbd29f6a2783856afddd8c715b532
parent89dbeac7460eaa2c6b0149b8abfac880ecefbfe3
Get rid of SEC_ELF_RENAME

SEC_ELF_RENAME is a flag used to effect section name changes when
compressing/decompressing zlib-gnu debug sections.  This can be
accomplished more directly in one of the objcopy specific bfd
functions.  Renaming for ld input is simplified too.  Ld input object
files always have BFD_DECOMPRESS set.

bfd/
* compress.c (bfd_convert_section_size): Rename to..
(bfd_convert_section_setup): ..this.  Handle objcopy renaming
of compressed/decompressed debug sections.
* elf.c (_bfd_elf_make_section_from_shdr): Only rename zdebug
input for linker.
(elf_fake_sections): Don't handle renaming of debug sections for
objcopy here.
* section.c (SEC_ELF_RENAME): Delete.
* bfd-in2.h: Regenerate.
binutils/
* objcopy.c (setup_section): Call bfd_convert_section_setup.
Don't call bfd_convert_section_size.
bfd/bfd-in2.h
bfd/compress.c
bfd/elf.c
bfd/section.c
binutils/objcopy.c