Line 1... |
Line 1... |
/* Support for HPPA 64-bit ELF
|
/* Support for HPPA 64-bit ELF
|
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
2010 Free Software Foundation, Inc.
|
2010, 2011 Free Software Foundation, Inc.
|
|
|
This file is part of BFD, the Binary File Descriptor library.
|
This file is part of BFD, the Binary File Descriptor library.
|
|
|
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
Line 935... |
Line 935... |
|
|
hppa_info = hppa_link_hash_table (info);
|
hppa_info = hppa_link_hash_table (info);
|
if (hppa_info == NULL)
|
if (hppa_info == NULL)
|
return FALSE;
|
return FALSE;
|
|
|
if (eh->root.type == bfd_link_hash_warning)
|
|
eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
|
|
|
|
if (eh
|
if (eh
|
&& (eh->root.type == bfd_link_hash_defined
|
&& (eh->root.type == bfd_link_hash_defined
|
|| eh->root.type == bfd_link_hash_defweak)
|
|| eh->root.type == bfd_link_hash_defweak)
|
&& eh->root.u.def.section->output_section != NULL
|
&& eh->root.u.def.section->output_section != NULL
|
&& eh->type == STT_FUNC)
|
&& eh->type == STT_FUNC)
|
Line 1054... |
Line 1051... |
struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh);
|
struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh);
|
struct elf64_hppa_allocate_data *x = (struct elf64_hppa_allocate_data *)data;
|
struct elf64_hppa_allocate_data *x = (struct elf64_hppa_allocate_data *)data;
|
|
|
if (hh && hh->want_opd)
|
if (hh && hh->want_opd)
|
{
|
{
|
while (hh->eh.root.type == bfd_link_hash_indirect
|
|
|| hh->eh.root.type == bfd_link_hash_warning)
|
|
hh = hppa_elf_hash_entry (hh->eh.root.u.i.link);
|
|
|
|
/* We never need an opd entry for a symbol which is not
|
/* We never need an opd entry for a symbol which is not
|
defined by this output file. */
|
defined by this output file. */
|
if (hh && (hh->eh.root.type == bfd_link_hash_undefined
|
if (hh && (hh->eh.root.type == bfd_link_hash_undefined
|
|| hh->eh.root.type == bfd_link_hash_undefweak
|
|| hh->eh.root.type == bfd_link_hash_undefweak
|
|| hh->eh.root.u.def.section->output_section == NULL))
|
|| hh->eh.root.u.def.section->output_section == NULL))
|
Line 1510... |
Line 1503... |
|
|
static bfd_boolean
|
static bfd_boolean
|
elf64_hppa_mark_milli_and_exported_functions (struct elf_link_hash_entry *eh,
|
elf64_hppa_mark_milli_and_exported_functions (struct elf_link_hash_entry *eh,
|
void *data)
|
void *data)
|
{
|
{
|
struct elf_link_hash_entry *elf = eh;
|
|
struct bfd_link_info *info = (struct bfd_link_info *)data;
|
struct bfd_link_info *info = (struct bfd_link_info *)data;
|
|
|
if (elf->root.type == bfd_link_hash_warning)
|
if (eh->type == STT_PARISC_MILLI)
|
elf = (struct elf_link_hash_entry *) elf->root.u.i.link;
|
|
|
|
if (elf->type == STT_PARISC_MILLI)
|
|
{
|
{
|
if (elf->dynindx != -1)
|
if (eh->dynindx != -1)
|
{
|
{
|
elf->dynindx = -1;
|
eh->dynindx = -1;
|
_bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
|
_bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
|
elf->dynstr_index);
|
eh->dynstr_index);
|
}
|
}
|
return TRUE;
|
return TRUE;
|
}
|
}
|
|
|
return elf64_hppa_mark_exported_functions (eh, data);
|
return elf64_hppa_mark_exported_functions (eh, data);
|
Line 2837... |
Line 2826... |
elf_hppa_unmark_useless_dynamic_symbols (struct elf_link_hash_entry *h,
|
elf_hppa_unmark_useless_dynamic_symbols (struct elf_link_hash_entry *h,
|
void *data)
|
void *data)
|
{
|
{
|
struct bfd_link_info *info = data;
|
struct bfd_link_info *info = data;
|
|
|
if (h->root.type == bfd_link_hash_warning)
|
|
h = (struct elf_link_hash_entry *) h->root.u.i.link;
|
|
|
|
/* If we are not creating a shared library, and this symbol is
|
/* If we are not creating a shared library, and this symbol is
|
referenced by a shared library but is not defined anywhere, then
|
referenced by a shared library but is not defined anywhere, then
|
the generic code will warn that it is undefined.
|
the generic code will warn that it is undefined.
|
|
|
This behavior is undesirable on HPs since the standard shared
|
This behavior is undesirable on HPs since the standard shared
|
Line 2871... |
Line 2857... |
elf_hppa_remark_useless_dynamic_symbols (struct elf_link_hash_entry *h,
|
elf_hppa_remark_useless_dynamic_symbols (struct elf_link_hash_entry *h,
|
void *data)
|
void *data)
|
{
|
{
|
struct bfd_link_info *info = data;
|
struct bfd_link_info *info = data;
|
|
|
if (h->root.type == bfd_link_hash_warning)
|
|
h = (struct elf_link_hash_entry *) h->root.u.i.link;
|
|
|
|
/* If we are not creating a shared library, and this symbol is
|
/* If we are not creating a shared library, and this symbol is
|
referenced by a shared library but is not defined anywhere, then
|
referenced by a shared library but is not defined anywhere, then
|
the generic code will warn that it is undefined.
|
the generic code will warn that it is undefined.
|
|
|
This behavior is undesirable on HPs since the standard shared
|
This behavior is undesirable on HPs since the standard shared
|