1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
2003-10-21 H.J. Lu <hongjiu.lu@intel.com>
* config/obj-elf.c (obj_elf_change_section): Allow SHF_ALLOC
for .interp, .strtab and .symtab. Use specified section
attributes.
--- gas/config/obj-elf.c.attr 2003-09-23 08:16:44.000000000 -0700
+++ gas/config/obj-elf.c 2003-10-21 23:26:06.000000000 -0700
@@ -615,6 +615,7 @@ obj_elf_change_section (name, type, attr
segT sec;
flagword flags;
const struct bfd_elf_special_section *ssect;
+ bfd_boolean override = FALSE;
#ifdef md_flush_pending_output
md_flush_pending_output ();
@@ -684,11 +685,20 @@ obj_elf_change_section (name, type, attr
&& name[ssect->prefix_length] == '.'
&& (attr &~ ssect->attr &~ SHF_MERGE &~ SHF_STRINGS) == 0)
;
+ /* .interp, .strtab and .symtab can have SHF_ALLOC. */
+ else if (attr == SHF_ALLOC
+ && (strcmp (name, ".interp") == 0
+ || strcmp (name, ".strtab") == 0
+ || strcmp (name, ".symtab") == 0))
+ override = TRUE;
else
- as_warn (_("setting incorrect section attributes for %s"),
- name);
+ {
+ as_warn (_("setting incorrect section attributes for %s"),
+ name);
+ override = TRUE;
+ }
}
- if (old_sec == NULL)
+ if (!override && old_sec == NULL)
attr |= ssect->attr;
}
|