diff options
author | dim <dim@FreeBSD.org> | 2010-11-01 19:35:33 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2010-11-01 19:35:33 +0000 |
commit | 3f5c947f4453c6016a2a6a9636367ee3f48fc6fc (patch) | |
tree | 461aafc934d462eb9b9221308f8e25238c0ada62 /contrib/binutils/bfd/sunos.c | |
parent | e6be3e7867eb43d220575baee2ce5662fb03e46c (diff) | |
parent | d0f678fa0ff3f08a4eca29daf4d1ac39797b6326 (diff) | |
download | FreeBSD-src-3f5c947f4453c6016a2a6a9636367ee3f48fc6fc.zip FreeBSD-src-3f5c947f4453c6016a2a6a9636367ee3f48fc6fc.tar.gz |
Merge ^/vendor/binutils/dist@214571 into contrib/binutils, which brings
us up to version 2.17.50.20070703, at the last GPLv2 commit.
Amongst others, this added upstream support for some FreeBSD-specific
things that we previously had to manually hack in, such as the OSABI
label support, and so on.
There are also quite a number of new files, some for cpu's (e.g. SPU)
that we may or may not be interested in, but those can be cleaned up
later on, if needed.
Diffstat (limited to 'contrib/binutils/bfd/sunos.c')
-rw-r--r-- | contrib/binutils/bfd/sunos.c | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/contrib/binutils/bfd/sunos.c b/contrib/binutils/bfd/sunos.c index 024320f..a9117f4 100644 --- a/contrib/binutils/bfd/sunos.c +++ b/contrib/binutils/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; } |