From da16cc96f3f29e8e3eacf25c5ad56ff15974c8dc Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 6 Dec 2022 15:08:31 +1030 Subject: 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. --- bfd/merge.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bfd/merge.c') diff --git a/bfd/merge.c b/bfd/merge.c index 5e021b7..79d80e7 100644 --- a/bfd/merge.c +++ b/bfd/merge.c @@ -850,8 +850,7 @@ _bfd_write_merged_section (bfd *output_bfd, asection *sec, void *psecinfo) /* We must compress this section. Write output to the buffer. */ contents = hdr->contents; - if ((sec->output_section->flags & SEC_ELF_COMPRESS) == 0 - || contents == NULL) + if (contents == NULL) abort (); } else -- cgit v1.1