aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-elf.c
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1996-02-29 19:04:49 +0000
committerMichael Meissner <gnu@the-meissners.org>1996-02-29 19:04:49 +0000
commit30510276e63c0495d306d826243feab9ee71f8ee (patch)
tree623502bf0e92d06ecff2126b333d3c7bf6aa8d23 /gas/config/obj-elf.c
parentcf3c0938711c74594e529f4c1d659f0482fc1587 (diff)
downloadgdb-30510276e63c0495d306d826243feab9ee71f8ee.zip
gdb-30510276e63c0495d306d826243feab9ee71f8ee.tar.gz
gdb-30510276e63c0495d306d826243feab9ee71f8ee.tar.bz2
All predefined sections to be of NOBITS type
Diffstat (limited to 'gas/config/obj-elf.c')
-rw-r--r--gas/config/obj-elf.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index f4f523b..8797672 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -506,12 +506,12 @@ obj_elf_section (xxx)
if (flag_mri)
{
- char type;
+ char mri_type;
previous_section = now_seg;
previous_subsection = now_subseg;
- s_mri_sect (&type);
+ s_mri_sect (&mri_type);
#ifdef md_elf_section_change_hook
md_elf_section_change_hook ();
@@ -733,20 +733,19 @@ obj_elf_section (xxx)
| ((attr & SHF_WRITE) ? 0 : SEC_READONLY)
| ((attr & SHF_ALLOC) ? SEC_ALLOC | SEC_LOAD : 0)
| ((attr & SHF_EXECINSTR) ? SEC_CODE : 0));
- if (special_sections[i].name == NULL)
+
+ if (type == SHT_PROGBITS)
+ flags |= SEC_ALLOC | SEC_LOAD;
+ else if (type == SHT_NOBITS)
{
- if (type == SHT_PROGBITS)
- flags |= SEC_ALLOC | SEC_LOAD;
- else if (type == SHT_NOBITS)
- {
- flags |= SEC_ALLOC;
- flags &=~ SEC_LOAD;
- }
+ flags |= SEC_ALLOC;
+ flags &=~ SEC_LOAD;
+ }
#ifdef md_elf_section_flags
- flags = md_elf_section_flags (flags, attr, type);
+ if (special_sections[i].name == NULL)
+ flags = md_elf_section_flags (flags, attr, type);
#endif
- }
bfd_set_section_flags (stdoutput, sec, flags);