summaryrefslogtreecommitdiff
path: root/bfd/sunos.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2006-06-01 03:45:58 +0000
committerAlan Modra <amodra@bigpond.net.au>2006-06-01 03:45:58 +0000
commit454a1d45bf48e21c7b0d3895bd67bd416c9f08db (patch)
treea4e0128ccca5085bc3f27e471ce5d574634a6b15 /bfd/sunos.c
parent2c8c74e00b6f4014ad85fe77940471169a82c84d (diff)
downloadbinutils-redhat-454a1d45bf48e21c7b0d3895bd67bd416c9f08db.tar.gz
* 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/sunos.c')
-rw-r--r--bfd/sunos.c41
1 files changed, 13 insertions, 28 deletions
diff --git a/bfd/sunos.c b/bfd/sunos.c
index 024320fbfa..a9117f4771 100644
--- a/bfd/sunos.c
+++ b/bfd/sunos.c
@@ -745,57 +745,50 @@ sunos_create_dynamic_sections (bfd *abfd,
/* The .dynamic section holds the basic dynamic information: the
sun4_dynamic structure, the dynamic debugger information, and
the sun4_dynamic_link structure. */
- s = bfd_make_section (abfd, ".dynamic");
+ s = bfd_make_section_with_flags (abfd, ".dynamic", flags);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
/* The .got section holds the global offset table. The address
is put in the ld_got field. */
- s = bfd_make_section (abfd, ".got");
+ s = bfd_make_section_with_flags (abfd, ".got", flags);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
/* The .plt section holds the procedure linkage table. The
address is put in the ld_plt field. */
- s = bfd_make_section (abfd, ".plt");
+ s = bfd_make_section_with_flags (abfd, ".plt", flags | SEC_CODE);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_CODE)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
/* The .dynrel section holds the dynamic relocs. The address is
put in the ld_rel field. */
- s = bfd_make_section (abfd, ".dynrel");
+ s = bfd_make_section_with_flags (abfd, ".dynrel", flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
/* The .hash section holds the dynamic hash table. The address
is put in the ld_hash field. */
- s = bfd_make_section (abfd, ".hash");
+ s = bfd_make_section_with_flags (abfd, ".hash", flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
/* The .dynsym section holds the dynamic symbols. The address
is put in the ld_stab field. */
- s = bfd_make_section (abfd, ".dynsym");
+ s = bfd_make_section_with_flags (abfd, ".dynsym", flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
/* The .dynstr section holds the dynamic symbol string table.
The address is put in the ld_symbols field. */
- s = bfd_make_section (abfd, ".dynstr");
+ s = bfd_make_section_with_flags (abfd, ".dynstr", flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
@@ -890,14 +883,10 @@ sunos_add_dynamic_symbols (bfd *abfd,
/* The .need section holds the list of names of shared objets
which must be included at runtime. The address of this
section is put in the ld_need field. */
- asection *s = bfd_make_section (dynobj, ".need");
+ flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY | SEC_READONLY);
+ asection *s = bfd_make_section_with_flags (dynobj, ".need", flags);
if (s == NULL
- || ! bfd_set_section_flags (dynobj, s,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, s, 2))
return FALSE;
}
@@ -907,14 +896,10 @@ sunos_add_dynamic_symbols (bfd *abfd,
/* The .rules section holds the path to search for shared
objects. The address of this section is put in the ld_rules
field. */
- asection *s = bfd_make_section (dynobj, ".rules");
+ flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY | SEC_READONLY);
+ asection *s = bfd_make_section_with_flags (dynobj, ".rules", flags);
if (s == NULL
- || ! bfd_set_section_flags (dynobj, s,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, s, 2))
return FALSE;
}