aboutsummaryrefslogtreecommitdiff
path: root/bfd/sunos.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-01-20 16:57:34 +0000
committerIan Lance Taylor <ian@airs.com>1995-01-20 16:57:34 +0000
commit04dc16b76b5164ce00213f0822234676d365eb5d (patch)
tree9194f8e6fddabc5b8499cc0c1543e49055001853 /bfd/sunos.c
parent11618ce8f284e45b1eea6a60e4f1a662d971c5f6 (diff)
downloadgdb-04dc16b76b5164ce00213f0822234676d365eb5d.zip
gdb-04dc16b76b5164ce00213f0822234676d365eb5d.tar.gz
gdb-04dc16b76b5164ce00213f0822234676d365eb5d.tar.bz2
* sunos.c (sunos_add_one_symbol): Only set the sunos specific
fields if we are doing a sunos link.
Diffstat (limited to 'bfd/sunos.c')
-rw-r--r--bfd/sunos.c53
1 files changed, 28 insertions, 25 deletions
diff --git a/bfd/sunos.c b/bfd/sunos.c
index 71ad457..157eba9 100644
--- a/bfd/sunos.c
+++ b/bfd/sunos.c
@@ -518,7 +518,7 @@ sunos_canonicalize_dynamic_reloc (abfd, storage, syms)
#define SPARC_PLT_ENTRY_SIZE (12)
-static bfd_byte sparc_plt_first_entry[SPARC_PLT_ENTRY_SIZE] =
+static const bfd_byte sparc_plt_first_entry[SPARC_PLT_ENTRY_SIZE] =
{
/* sethi %hi(0),%g1; address filled in by runtime linker. */
0x3, 0, 0, 0,
@@ -542,7 +542,7 @@ static bfd_byte sparc_plt_first_entry[SPARC_PLT_ENTRY_SIZE] =
#define M68K_PLT_ENTRY_SIZE (8)
-static bfd_byte m68k_plt_first_entry[M68K_PLT_ENTRY_SIZE] =
+static const bfd_byte m68k_plt_first_entry[M68K_PLT_ENTRY_SIZE] =
{
/* jmps @# */
0x4e, 0xf9,
@@ -891,32 +891,35 @@ sunos_add_one_symbol (info, abfd, name, flags, section, value, string,
hashp))
return false;
- /* Set a flag in the hash table entry indicating the type of
- reference or definition we just found. Keep a count of the
- number of dynamic symbols we find. A dynamic symbol is one which
- is referenced or defined by both a regular object and a shared
- object. */
- if ((abfd->flags & DYNAMIC) == 0)
- {
- if (bfd_is_und_section (section))
- new_flag = SUNOS_REF_REGULAR;
- else
- new_flag = SUNOS_DEF_REGULAR;
- }
- else
+ if (abfd->xvec == info->hash->creator)
{
- if (bfd_is_und_section (section))
- new_flag = SUNOS_REF_DYNAMIC;
+ /* Set a flag in the hash table entry indicating the type of
+ reference or definition we just found. Keep a count of the
+ number of dynamic symbols we find. A dynamic symbol is one
+ which is referenced or defined by both a regular object and a
+ shared object. */
+ if ((abfd->flags & DYNAMIC) == 0)
+ {
+ if (bfd_is_und_section (section))
+ new_flag = SUNOS_REF_REGULAR;
+ else
+ new_flag = SUNOS_DEF_REGULAR;
+ }
else
- new_flag = SUNOS_DEF_DYNAMIC;
- }
- h->flags |= new_flag;
+ {
+ if (bfd_is_und_section (section))
+ new_flag = SUNOS_REF_DYNAMIC;
+ else
+ new_flag = SUNOS_DEF_DYNAMIC;
+ }
+ h->flags |= new_flag;
- if (h->dynindx == -1
- && (h->flags & (SUNOS_DEF_REGULAR | SUNOS_REF_REGULAR)) != 0)
- {
- ++sunos_hash_table (info)->dynsymcount;
- h->dynindx = -2;
+ if (h->dynindx == -1
+ && (h->flags & (SUNOS_DEF_REGULAR | SUNOS_REF_REGULAR)) != 0)
+ {
+ ++sunos_hash_table (info)->dynsymcount;
+ h->dynindx = -2;
+ }
}
return true;