diff options
author | Alan Modra <amodra@gmail.com> | 2006-06-01 03:45:58 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2006-06-01 03:45:58 +0000 |
commit | 117ed4f8d5a9691c0bc1200d5d797e5211688c84 (patch) | |
tree | 4f57e1654f1a735dd6358ae27f0f705cbd49788e /bfd/xcofflink.c | |
parent | 13d6194fb981e198cdf887374d8ed3a1737cca0e (diff) | |
download | gdb-117ed4f8d5a9691c0bc1200d5d797e5211688c84.zip gdb-117ed4f8d5a9691c0bc1200d5d797e5211688c84.tar.gz gdb-117ed4f8d5a9691c0bc1200d5d797e5211688c84.tar.bz2 |
* stabs.c (_bfd_link_section_stabs): Use bfd_make_section*_with_flags
instead of bfd_make_section*.
* aix386-core.c: Likewise.
* aix5ppc-core.c: Likewise.
* aout-adobe.c: Likewise.
* aoutf1.h: Likewise.
* binary.c: Likewise.
* cisco-core.c: Likewise.
* coff-arm.c: Likewise.
* coff-h8300.c: Likewise.
* elf.c: Likewise.
* elf32-bfin.c: Likewise.
* elf32-m32c.c: Likewise.
* hppabsd-core.c: Likewise.
* hpux-core.c: Likewise.
* i386linux.c: Likewise.
* ieee.c: Likewise.
* ihex.c: Likewise.
* irix-core.c: Likewise.
* lynx-core.c: Likewise.
* m68klinux.c: Likewise.
* mach-o.c: Likewise.
* netbsd-core.c: Likewise.
* nlmcode.h: Likewise.
* opncls.c: Likewise.
* osf-core.c: Likewise.
* peXXigen.c: Likewise.
* ppcboot.c: Likewise.
* ptrace-core.c: Likewise.
* rs6000-core.c: Likewise.
* sco5-core.c: Likewise.
* sparclinux.c: Likewise.
* srec.c: Likewise.
* sunos.c: Likewise.
* trad-core.c: Likewise.
* xcofflink.c: Likewise.
* xsym.c: Likewise.
Diffstat (limited to 'bfd/xcofflink.c')
-rw-r--r-- | bfd/xcofflink.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index 47c330b..e76b95c 100644 --- a/bfd/xcofflink.c +++ b/bfd/xcofflink.c @@ -794,27 +794,27 @@ xcoff_link_create_extra_sections (bfd * abfd, struct bfd_link_info *info) if (xcoff_hash_table (info)->loader_section == NULL) { asection *lsec; + flagword flags = SEC_HAS_CONTENTS | SEC_IN_MEMORY; - lsec = bfd_make_section_anyway (abfd, ".loader"); + lsec = bfd_make_section_anyway_with_flags (abfd, ".loader", flags); if (lsec == NULL) goto end_return; xcoff_hash_table (info)->loader_section = lsec; - lsec->flags |= SEC_HAS_CONTENTS | SEC_IN_MEMORY; } /* Likewise for the linkage section. */ if (xcoff_hash_table (info)->linkage_section == NULL) { asection *lsec; + flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS + | SEC_IN_MEMORY); - lsec = bfd_make_section_anyway (abfd, ".gl"); + lsec = bfd_make_section_anyway_with_flags (abfd, ".gl", flags); if (lsec == NULL) goto end_return; xcoff_hash_table (info)->linkage_section = lsec; - lsec->flags |= (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS - | SEC_IN_MEMORY); lsec->alignment_power = 2; } @@ -822,14 +822,14 @@ xcoff_link_create_extra_sections (bfd * abfd, struct bfd_link_info *info) if (xcoff_hash_table (info)->toc_section == NULL) { asection *tsec; + flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS + | SEC_IN_MEMORY); - tsec = bfd_make_section_anyway (abfd, ".tc"); + tsec = bfd_make_section_anyway_with_flags (abfd, ".tc", flags); if (tsec == NULL) goto end_return; xcoff_hash_table (info)->toc_section = tsec; - tsec->flags |= (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS - | SEC_IN_MEMORY); tsec->alignment_power = 2; } @@ -837,14 +837,14 @@ xcoff_link_create_extra_sections (bfd * abfd, struct bfd_link_info *info) if (xcoff_hash_table (info)->descriptor_section == NULL) { asection *dsec; + flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS + | SEC_IN_MEMORY); - dsec = bfd_make_section_anyway (abfd, ".ds"); + dsec = bfd_make_section_anyway_with_flags (abfd, ".ds", flags); if (dsec == NULL) goto end_return; xcoff_hash_table (info)->descriptor_section = dsec; - dsec->flags |= (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS - | SEC_IN_MEMORY); dsec->alignment_power = 2; } @@ -853,13 +853,13 @@ xcoff_link_create_extra_sections (bfd * abfd, struct bfd_link_info *info) && info->strip != strip_all) { asection *dsec; + flagword flags = SEC_HAS_CONTENTS | SEC_IN_MEMORY; - dsec = bfd_make_section_anyway (abfd, ".debug"); + dsec = bfd_make_section_anyway_with_flags (abfd, ".debug", flags); if (dsec == NULL) goto end_return; xcoff_hash_table (info)->debug_section = dsec; - dsec->flags |= SEC_HAS_CONTENTS | SEC_IN_MEMORY; } } @@ -1552,16 +1552,17 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { /* The linker script puts the .td section in the data section after the .tc section. */ - csect = bfd_make_section_anyway (abfd, ".td"); + csect = bfd_make_section_anyway_with_flags (abfd, ".td", + SEC_ALLOC); } else - csect = bfd_make_section_anyway (abfd, ".bss"); + csect = bfd_make_section_anyway_with_flags (abfd, ".bss", + SEC_ALLOC); if (csect == NULL) goto error_return; csect->vma = sym.n_value; csect->size = aux.x_csect.x_scnlen.l; - csect->flags |= SEC_ALLOC; csect->alignment_power = SMTYP_ALIGN (aux.x_csect.x_smtyp); /* There are a number of other fields and section flags which we do not bother to set. */ @@ -5460,8 +5461,8 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) that needs padding. This requires unlinking and relinking the bfd's section list. */ - n = bfd_make_section_anyway (abfd, ".pad"); - n->flags = SEC_HAS_CONTENTS; + n = bfd_make_section_anyway_with_flags (abfd, ".pad", + SEC_HAS_CONTENTS); n->alignment_power = 0; bfd_section_list_remove (abfd, n); |