diff options
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/obj-elf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index a8ba588..8687965 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -683,8 +683,10 @@ obj_elf_change_section (name, type, attr, entsize, group_name, linkonce, push) attr |= def_attr; } - elf_section_type (sec) = type; - elf_section_flags (sec) = attr; + if (type != SHT_NULL) + elf_section_type (sec) = type; + if (attr != 0) + elf_section_flags (sec) = attr; /* Convert ELF type and flags to BFD flags. */ flags = (SEC_RELOC |