aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-02-24 04:50:04 +0000
committerAlan Modra <amodra@gmail.com>2003-02-24 04:50:04 +0000
commitaad5d35016941df317c66b333216c970e0a08b72 (patch)
tree730bd47e0bf7cfb4c6fe01da6b299b065aa0b9f6
parent11203c8bc5ecaee05021a24e2a11c0c2c36fda40 (diff)
downloadgdb-aad5d35016941df317c66b333216c970e0a08b72.zip
gdb-aad5d35016941df317c66b333216c970e0a08b72.tar.gz
gdb-aad5d35016941df317c66b333216c970e0a08b72.tar.bz2
* elflink.c (_bfd_elf_create_got_section): Check existing .got
section flags before concluding that we've already been called. Don't use register keyword. (_bfd_elf_create_dynamic_sections): Don't use register keyword. (_bfd_elf_create_linker_section): Formatting.
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/elflink.c24
2 files changed, 21 insertions, 11 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5d697ef..d82580d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2003-02-24 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (_bfd_elf_create_got_section): Check existing .got
+ section flags before concluding that we've already been called.
+ Don't use register keyword.
+ (_bfd_elf_create_dynamic_sections): Don't use register keyword.
+ (_bfd_elf_create_linker_section): Formatting.
+
2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
* coff-h8300.c: Fix typo: intial -> initial.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 3170035..962c104 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -1,5 +1,5 @@
/* ELF linking support for BFD.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -31,14 +31,15 @@ _bfd_elf_create_got_section (abfd, info)
struct bfd_link_info *info;
{
flagword flags;
- register asection *s;
+ asection *s;
struct elf_link_hash_entry *h;
struct bfd_link_hash_entry *bh;
struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign;
/* This function may be called more than once. */
- if (bfd_get_section_by_name (abfd, ".got") != NULL)
+ s = bfd_get_section_by_name (abfd, ".got");
+ if (s != NULL && (s->flags & SEC_LINKER_CREATED) != 0)
return TRUE;
switch (bed->s->arch_size)
@@ -111,7 +112,7 @@ _bfd_elf_create_dynamic_sections (abfd, info)
struct bfd_link_info *info;
{
flagword flags, pltflags;
- register asection *s;
+ asection *s;
struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign;
@@ -272,7 +273,7 @@ _bfd_elf_link_record_dynamic_symbol (info, h)
}
/* We don't put any version information in the dynamic string
- table. */
+ table. */
name = h->root.root.string;
p = strchr (name, ELF_VER_CHR);
if (p == NULL)
@@ -525,18 +526,19 @@ _bfd_elf_create_linker_section (abfd, info, which, defaults)
s->_raw_size = align_power (s->_raw_size, lsect->alignment);
- /* Is there a hole we have to provide? If so check whether the segment is
- too big already */
+ /* Is there a hole we have to provide? If so check whether the
+ segment is too big already */
if (lsect->hole_size)
{
lsect->hole_offset = s->_raw_size;
s->_raw_size += lsect->hole_size;
if (lsect->hole_offset > lsect->max_hole_offset)
{
- (*_bfd_error_handler) (_("%s: Section %s is too large to add hole of %ld bytes"),
- bfd_get_filename (abfd),
- lsect->name,
- (long) lsect->hole_size);
+ (*_bfd_error_handler)
+ (_("%s: Section %s is too large to add hole of %ld bytes"),
+ bfd_get_filename (abfd),
+ lsect->name,
+ (long) lsect->hole_size);
bfd_set_error (bfd_error_bad_value);
return (elf_linker_section_t *)0;