aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-12-06 15:08:31 +1030
committerAlan Modra <amodra@gmail.com>2022-12-06 15:08:31 +1030
commitda16cc96f3f29e8e3eacf25c5ad56ff15974c8dc (patch)
tree1ff29d71b8356a269f9f5aee69149fdeba3ce515 /bfd/elflink.c
parent7b5f66a118a6e252a56c472c082a29d39ede68c6 (diff)
downloadfsf-binutils-gdb-da16cc96f3f29e8e3eacf25c5ad56ff15974c8dc.zip
fsf-binutils-gdb-da16cc96f3f29e8e3eacf25c5ad56ff15974c8dc.tar.gz
fsf-binutils-gdb-da16cc96f3f29e8e3eacf25c5ad56ff15974c8dc.tar.bz2
Get rid of SEC_ELF_COMPRESS
This flag also isn't needed, except for some sanity checks which we can omit. * elf.c (elf_fake_sections): Don't set SEC_ELF_COMPRESS for compressed debug sections, just leave sh_name as -1. (assign_file_positions_for_non_load_sections), (assign_file_positions_except_relocs): Decide whether a section needs compressing and thus should not have its file offset set by looking at sh_name. (_bfd_elf_assign_file_positions_for_non_load): Similarly decide which sections need compressing. * elflink.c (bfd_elf_final_link): Don't test SEC_ELF_COMPRESS. * merge.c (_bfd_write_merged_section): Likewise. * section.c (SEC_ELF_COMPRESS): Don't define. (SEC_ELF_PURECODE): Renumber. * bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index a141c9e..fc3edef 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -12559,7 +12559,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
later. Use bfd_malloc since it will be freed by
bfd_compress_section_contents. */
unsigned char *contents = esdo->this_hdr.contents;
- if ((o->flags & SEC_ELF_COMPRESS) == 0 || contents != NULL)
+ if (contents != NULL)
abort ();
contents
= (unsigned char *) bfd_malloc (esdo->this_hdr.sh_size);