projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Automatic date update in version.in
[deliverable/binutils-gdb.git]
/
bfd
/
elf64-hppa.c
diff --git
a/bfd/elf64-hppa.c
b/bfd/elf64-hppa.c
index 6087fe55c1864476fd95e83c649d06fdfc4c99e1..fca40e185177a030be2ca913b5d9919295939f0c 100644
(file)
--- a/
bfd/elf64-hppa.c
+++ b/
bfd/elf64-hppa.c
@@
-1,7
+1,5
@@
/* Support for HPPA 64-bit ELF
/* Support for HPPA 64-bit ELF
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2010, 2011, 2012
- Free Software Foundation, Inc.
+ Copyright (C) 1999-2016 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.
@@
-28,7
+26,7
@@
#include "elf/hppa.h"
#include "libhppa.h"
#include "elf64-hppa.h"
#include "elf/hppa.h"
#include "libhppa.h"
#include "elf64-hppa.h"
-
+#include "libiberty.h"
#define ARCH_SIZE 64
#define ARCH_SIZE 64
@@
-194,9
+192,6
@@
static bfd_boolean elf64_hppa_finish_dynamic_symbol
(bfd *, struct bfd_link_info *,
struct elf_link_hash_entry *, Elf_Internal_Sym *);
(bfd *, struct bfd_link_info *,
struct elf_link_hash_entry *, Elf_Internal_Sym *);
-static enum elf_reloc_type_class elf64_hppa_reloc_type_class
- (const Elf_Internal_Rela *);
-
static bfd_boolean elf64_hppa_finish_dynamic_sections
(bfd *, struct bfd_link_info *);
static bfd_boolean elf64_hppa_finish_dynamic_sections
(bfd *, struct bfd_link_info *);
@@
-299,7
+294,7
@@
elf64_hppa_hash_table_create (bfd *abfd)
struct elf64_hppa_link_hash_table *htab;
bfd_size_type amt = sizeof (*htab);
struct elf64_hppa_link_hash_table *htab;
bfd_size_type amt = sizeof (*htab);
- htab = bfd_z
alloc (abfd,
amt);
+ htab = bfd_z
malloc (
amt);
if (htab == NULL)
return NULL;
if (htab == NULL)
return NULL;
@@
-308,7
+303,7
@@
elf64_hppa_hash_table_create (bfd *abfd)
sizeof (struct elf64_hppa_link_hash_entry),
HPPA64_ELF_DATA))
{
sizeof (struct elf64_hppa_link_hash_entry),
HPPA64_ELF_DATA))
{
-
bfd_release (abfd,
htab);
+
free (
htab);
return NULL;
}
return NULL;
}
@@
-416,16
+411,16
@@
get_reloc_section (bfd *abfd,
if (!dynobj)
hppa_info->root.dynobj = dynobj = abfd;
if (!dynobj)
hppa_info->root.dynobj = dynobj = abfd;
- srel = bfd_get_
section_by_name
(dynobj, srel_name);
+ srel = bfd_get_
linker_section
(dynobj, srel_name);
if (srel == NULL)
{
if (srel == NULL)
{
- srel = bfd_make_section_with_flags (dynobj, srel_name,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY));
+ srel = bfd_make_section_
anyway_
with_flags (dynobj, srel_name,
+
(SEC_ALLOC
+
| SEC_LOAD
+
| SEC_HAS_CONTENTS
+
| SEC_IN_MEMORY
+
| SEC_LINKER_CREATED
+
| SEC_READONLY));
if (srel == NULL
|| !bfd_set_section_alignment (dynobj, srel, 3))
return FALSE;
if (srel == NULL
|| !bfd_set_section_alignment (dynobj, srel, 3))
return FALSE;
@@
-476,7
+471,7
@@
hppa64_elf_local_refcounts (bfd *abfd)
{
Elf_Internal_Shdr *symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
bfd_signed_vma *local_refcounts;
{
Elf_Internal_Shdr *symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
bfd_signed_vma *local_refcounts;
-
+
local_refcounts = elf_local_got_refcounts (abfd);
if (local_refcounts == NULL)
{
local_refcounts = elf_local_got_refcounts (abfd);
if (local_refcounts == NULL)
{
@@
-508,7
+503,7
@@
elf64_hppa_check_relocs (bfd *abfd,
const Elf_Internal_Rela *rel;
unsigned int sec_symndx;
const Elf_Internal_Rela *rel;
unsigned int sec_symndx;
- if (
info->relocatable
)
+ if (
bfd_link_relocatable (info)
)
return TRUE;
/* If this is the first dynamic object found in the link, create
return TRUE;
/* If this is the first dynamic object found in the link, create
@@
-527,7
+522,7
@@
elf64_hppa_check_relocs (bfd *abfd,
/* If necessary, build a new table holding section symbols indices
for this BFD. */
/* If necessary, build a new table holding section symbols indices
for this BFD. */
- if (
info->shared
&& hppa_info->section_syms_bfd != abfd)
+ if (
bfd_link_pic (info)
&& hppa_info->section_syms_bfd != abfd)
{
unsigned long i;
unsigned int highest_shndx;
{
unsigned long i;
unsigned int highest_shndx;
@@
-601,7
+596,7
@@
elf64_hppa_check_relocs (bfd *abfd,
relocations when building shared libraries. When not building shared
libraries this value is never really used, but assign it to zero to
prevent out of bounds memory accesses in other routines. */
relocations when building shared libraries. When not building shared
libraries this value is never really used, but assign it to zero to
prevent out of bounds memory accesses in other routines. */
- if (
info->shared
)
+ if (
bfd_link_pic (info)
)
{
sec_symndx = _bfd_elf_section_from_bfd_section (abfd, sec);
{
sec_symndx = _bfd_elf_section_from_bfd_section (abfd, sec);
@@
-647,6
+642,9
@@
elf64_hppa_check_relocs (bfd *abfd,
|| hh->eh.root.type == bfd_link_hash_warning)
hh = hppa_elf_hash_entry (hh->eh.root.u.i.link);
|| hh->eh.root.type == bfd_link_hash_warning)
hh = hppa_elf_hash_entry (hh->eh.root.u.i.link);
+ /* PR15323, ref flags aren't set for references in the same
+ object. */
+ hh->eh.root.non_ir_ref = 1;
hh->eh.ref_regular = 1;
}
else
hh->eh.ref_regular = 1;
}
else
@@
-657,7
+655,7
@@
elf64_hppa_check_relocs (bfd *abfd,
have yet been processed. Do something with what we know, as
this may help reduce memory usage and processing time later. */
maybe_dynamic = FALSE;
have yet been processed. Do something with what we know, as
this may help reduce memory usage and processing time later. */
maybe_dynamic = FALSE;
- if (hh && ((
info->shared
+ if (hh && ((
bfd_link_pic (info)
&& (!info->symbolic
|| info->unresolved_syms_in_shared_libs == RM_IGNORE))
|| !hh->eh.def_regular
&& (!info->symbolic
|| info->unresolved_syms_in_shared_libs == RM_IGNORE))
|| !hh->eh.def_regular
@@
-732,7
+730,7
@@
elf64_hppa_check_relocs (bfd *abfd,
break;
case R_PARISC_DIR64:
break;
case R_PARISC_DIR64:
- if (
info->shared
|| maybe_dynamic)
+ if (
bfd_link_pic (info)
|| maybe_dynamic)
need_entry = (NEED_DYNREL);
dynrel_type = R_PARISC_DIR64;
break;
need_entry = (NEED_DYNREL);
dynrel_type = R_PARISC_DIR64;
break;
@@
-749,7
+747,7
@@
elf64_hppa_check_relocs (bfd *abfd,
case R_PARISC_LTOFF_FPTR16F:
case R_PARISC_LTOFF_FPTR16WF:
case R_PARISC_LTOFF_FPTR16DF:
case R_PARISC_LTOFF_FPTR16F:
case R_PARISC_LTOFF_FPTR16WF:
case R_PARISC_LTOFF_FPTR16DF:
- if (
info->shared
|| maybe_dynamic)
+ if (
bfd_link_pic (info)
|| maybe_dynamic)
need_entry = (NEED_DLT | NEED_OPD | NEED_PLT);
else
need_entry = (NEED_DLT | NEED_OPD | NEED_PLT);
need_entry = (NEED_DLT | NEED_OPD | NEED_PLT);
else
need_entry = (NEED_DLT | NEED_OPD | NEED_PLT);
@@
-758,7
+756,7
@@
elf64_hppa_check_relocs (bfd *abfd,
/* This is a simple OPD entry. */
case R_PARISC_FPTR64:
/* This is a simple OPD entry. */
case R_PARISC_FPTR64:
- if (
info->shared
|| maybe_dynamic)
+ if (
bfd_link_pic (info)
|| maybe_dynamic)
need_entry = (NEED_OPD | NEED_PLT | NEED_DYNREL);
else
need_entry = (NEED_OPD | NEED_PLT);
need_entry = (NEED_OPD | NEED_PLT | NEED_DYNREL);
else
need_entry = (NEED_OPD | NEED_PLT);
@@
-796,7
+794,7
@@
elf64_hppa_check_relocs (bfd *abfd,
else
{
bfd_signed_vma *local_dlt_refcounts;
else
{
bfd_signed_vma *local_dlt_refcounts;
-
+
/* This is a DLT entry for a local symbol. */
local_dlt_refcounts = hppa64_elf_local_refcounts (abfd);
if (local_dlt_refcounts == NULL)
/* This is a DLT entry for a local symbol. */
local_dlt_refcounts = hppa64_elf_local_refcounts (abfd);
if (local_dlt_refcounts == NULL)
@@
-821,7
+819,7
@@
elf64_hppa_check_relocs (bfd *abfd,
{
bfd_signed_vma *local_dlt_refcounts;
bfd_signed_vma *local_plt_refcounts;
{
bfd_signed_vma *local_dlt_refcounts;
bfd_signed_vma *local_plt_refcounts;
-
+
/* This is a PLT entry for a local symbol. */
local_dlt_refcounts = hppa64_elf_local_refcounts (abfd);
if (local_dlt_refcounts == NULL)
/* This is a PLT entry for a local symbol. */
local_dlt_refcounts = hppa64_elf_local_refcounts (abfd);
if (local_dlt_refcounts == NULL)
@@
-855,7
+853,7
@@
elf64_hppa_check_relocs (bfd *abfd,
{
bfd_signed_vma *local_dlt_refcounts;
bfd_signed_vma *local_opd_refcounts;
{
bfd_signed_vma *local_dlt_refcounts;
bfd_signed_vma *local_opd_refcounts;
-
+
/* This is a OPD for a local symbol. */
local_dlt_refcounts = hppa64_elf_local_refcounts (abfd);
if (local_dlt_refcounts == NULL)
/* This is a OPD for a local symbol. */
local_dlt_refcounts = hppa64_elf_local_refcounts (abfd);
if (local_dlt_refcounts == NULL)
@@
-884,7
+882,7
@@
elf64_hppa_check_relocs (bfd *abfd,
a dynamic R_PARISC_FPTR64 relocation, then make sure the
section symbol for this section ends up in the dynamic
symbol table. */
a dynamic R_PARISC_FPTR64 relocation, then make sure the
section symbol for this section ends up in the dynamic
symbol table. */
- if (
info->shared
&& dynrel_type == R_PARISC_FPTR64
+ if (
bfd_link_pic (info)
&& dynrel_type == R_PARISC_FPTR64
&& ! (bfd_elf_link_record_local_dynamic_symbol
(info, abfd, sec_symndx)))
return FALSE;
&& ! (bfd_elf_link_record_local_dynamic_symbol
(info, abfd, sec_symndx)))
return FALSE;
@@
-968,7
+966,7
@@
allocate_global_data_dlt (struct elf_link_hash_entry *eh, void *data)
if (hh->want_dlt)
{
if (hh->want_dlt)
{
- if (
x->info->shared
)
+ if (
bfd_link_pic (x->info)
)
{
/* Possibly add the symbol to the local dynamic symbol
table since we might need to create a dynamic relocation
{
/* Possibly add the symbol to the local dynamic symbol
table since we might need to create a dynamic relocation
@@
-1064,7
+1062,7
@@
allocate_global_data_opd (struct elf_link_hash_entry *eh, void *data)
/* If we are creating a shared library, took the address of a local
function or might export this function from this object file, then
we have to create an opd descriptor. */
/* If we are creating a shared library, took the address of a local
function or might export this function from this object file, then
we have to create an opd descriptor. */
- else if (
x->info->shared
+ else if (
bfd_link_pic (x->info)
|| hh == NULL
|| (hh->eh.dynindx == -1 && hh->eh.type != STT_PARISC_MILLI)
|| (hh->eh.root.type == bfd_link_hash_defined
|| hh == NULL
|| (hh->eh.dynindx == -1 && hh->eh.type != STT_PARISC_MILLI)
|| (hh->eh.root.type == bfd_link_hash_defined
@@
-1074,7
+1072,7
@@
allocate_global_data_opd (struct elf_link_hash_entry *eh, void *data)
create a runtime relocation for the symbol to properly
initialize the .opd entry. Make sure the symbol gets
added to the dynamic symbol table. */
create a runtime relocation for the symbol to properly
initialize the .opd entry. Make sure the symbol gets
added to the dynamic symbol table. */
- if (
x->info->shared
+ if (
bfd_link_pic (x->info)
&& (hh == NULL || (hh->eh.dynindx == -1)))
{
bfd *owner;
&& (hh == NULL || (hh->eh.dynindx == -1)))
{
bfd *owner;
@@
-1091,25
+1089,23
@@
allocate_global_data_opd (struct elf_link_hash_entry *eh, void *data)
in dynamic relocs. But name munging does make the result
much easier to debug. ie, the EPLT reloc will reference
a symbol like .foobar, instead of .text + offset. */
in dynamic relocs. But name munging does make the result
much easier to debug. ie, the EPLT reloc will reference
a symbol like .foobar, instead of .text + offset. */
- if (
x->info->shared
&& eh)
+ if (
bfd_link_pic (x->info)
&& eh)
{
char *new_name;
struct elf_link_hash_entry *nh;
{
char *new_name;
struct elf_link_hash_entry *nh;
- new_name = alloca (strlen (eh->root.root.string) + 2);
- new_name[0] = '.';
- strcpy (new_name + 1, eh->root.root.string);
+ new_name = concat (".", eh->root.root.string, NULL);
nh = elf_link_hash_lookup (elf_hash_table (x->info),
new_name, TRUE, TRUE, TRUE);
nh = elf_link_hash_lookup (elf_hash_table (x->info),
new_name, TRUE, TRUE, TRUE);
+ free (new_name);
nh->root.type = eh->root.type;
nh->root.u.def.value = eh->root.u.def.value;
nh->root.u.def.section = eh->root.u.def.section;
if (! bfd_elf_link_record_dynamic_symbol (x->info, nh))
return FALSE;
nh->root.type = eh->root.type;
nh->root.u.def.value = eh->root.u.def.value;
nh->root.u.def.section = eh->root.u.def.section;
if (! bfd_elf_link_record_dynamic_symbol (x->info, nh))
return FALSE;
-
}
hh->opd_offset = x->ofs;
x->ofs += OPD_ENTRY_SIZE;
}
hh->opd_offset = x->ofs;
x->ofs += OPD_ENTRY_SIZE;
@@
-1132,7
+1128,7
@@
elf64_hppa_post_process_headers (bfd *abfd,
Elf_Internal_Ehdr * i_ehdrp;
i_ehdrp = elf_elfheader (abfd);
Elf_Internal_Ehdr * i_ehdrp;
i_ehdrp = elf_elfheader (abfd);
-
+
i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi;
i_ehdrp->e_ident[EI_ABIVERSION] = 1;
}
i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi;
i_ehdrp->e_ident[EI_ABIVERSION] = 1;
}
@@
-1157,12
+1153,12
@@
get_opd (bfd *abfd,
if (!dynobj)
hppa_info->root.dynobj = dynobj = abfd;
if (!dynobj)
hppa_info->root.dynobj = dynobj = abfd;
- opd = bfd_make_section_with_flags (dynobj, ".opd",
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED));
+ opd = bfd_make_section_
anyway_
with_flags (dynobj, ".opd",
+
(SEC_ALLOC
+
| SEC_LOAD
+
| SEC_HAS_CONTENTS
+
| SEC_IN_MEMORY
+
| SEC_LINKER_CREATED));
if (!opd
|| !bfd_set_section_alignment (abfd, opd, 3))
{
if (!opd
|| !bfd_set_section_alignment (abfd, opd, 3))
{
@@
-1193,12
+1189,12
@@
get_plt (bfd *abfd,
if (!dynobj)
hppa_info->root.dynobj = dynobj = abfd;
if (!dynobj)
hppa_info->root.dynobj = dynobj = abfd;
- plt = bfd_make_section_with_flags (dynobj, ".plt",
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED));
+ plt = bfd_make_section_
anyway_
with_flags (dynobj, ".plt",
+
(SEC_ALLOC
+
| SEC_LOAD
+
| SEC_HAS_CONTENTS
+
| SEC_IN_MEMORY
+
| SEC_LINKER_CREATED));
if (!plt
|| !bfd_set_section_alignment (abfd, plt, 3))
{
if (!plt
|| !bfd_set_section_alignment (abfd, plt, 3))
{
@@
-1229,12
+1225,12
@@
get_dlt (bfd *abfd,
if (!dynobj)
hppa_info->root.dynobj = dynobj = abfd;
if (!dynobj)
hppa_info->root.dynobj = dynobj = abfd;
- dlt = bfd_make_section_with_flags (dynobj, ".dlt",
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED));
+ dlt = bfd_make_section_
anyway_
with_flags (dynobj, ".dlt",
+
(SEC_ALLOC
+
| SEC_LOAD
+
| SEC_HAS_CONTENTS
+
| SEC_IN_MEMORY
+
| SEC_LINKER_CREATED));
if (!dlt
|| !bfd_set_section_alignment (abfd, dlt, 3))
{
if (!dlt
|| !bfd_set_section_alignment (abfd, dlt, 3))
{
@@
-1265,12
+1261,12
@@
get_stub (bfd *abfd,
if (!dynobj)
hppa_info->root.dynobj = dynobj = abfd;
if (!dynobj)
hppa_info->root.dynobj = dynobj = abfd;
- stub = bfd_make_section_with_flags (dynobj, ".stub",
- (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_READONLY
- | SEC_LINKER_CREATED));
+ stub = bfd_make_section_
anyway_
with_flags (dynobj, ".stub",
+
(SEC_ALLOC | SEC_LOAD
+
| SEC_HAS_CONTENTS
+
| SEC_IN_MEMORY
+
| SEC_READONLY
+
| SEC_LINKER_CREATED));
if (!stub
|| !bfd_set_section_alignment (abfd, stub, 3))
{
if (!stub
|| !bfd_set_section_alignment (abfd, stub, 3))
{
@@
-1345,45
+1341,45
@@
elf64_hppa_create_dynamic_sections (bfd *abfd,
if (! get_opd (abfd, info, hppa_info))
return FALSE;
if (! get_opd (abfd, info, hppa_info))
return FALSE;
- s = bfd_make_section_with_flags (abfd, ".rela.dlt",
- (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_READONLY
- | SEC_LINKER_CREATED));
+ s = bfd_make_section_
anyway_
with_flags (abfd, ".rela.dlt",
+
(SEC_ALLOC | SEC_LOAD
+
| SEC_HAS_CONTENTS
+
| SEC_IN_MEMORY
+
| SEC_READONLY
+
| SEC_LINKER_CREATED));
if (s == NULL
|| !bfd_set_section_alignment (abfd, s, 3))
return FALSE;
hppa_info->dlt_rel_sec = s;
if (s == NULL
|| !bfd_set_section_alignment (abfd, s, 3))
return FALSE;
hppa_info->dlt_rel_sec = s;
- s = bfd_make_section_with_flags (abfd, ".rela.plt",
- (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_READONLY
- | SEC_LINKER_CREATED));
+ s = bfd_make_section_
anyway_
with_flags (abfd, ".rela.plt",
+
(SEC_ALLOC | SEC_LOAD
+
| SEC_HAS_CONTENTS
+
| SEC_IN_MEMORY
+
| SEC_READONLY
+
| SEC_LINKER_CREATED));
if (s == NULL
|| !bfd_set_section_alignment (abfd, s, 3))
return FALSE;
hppa_info->plt_rel_sec = s;
if (s == NULL
|| !bfd_set_section_alignment (abfd, s, 3))
return FALSE;
hppa_info->plt_rel_sec = s;
- s = bfd_make_section_with_flags (abfd, ".rela.data",
- (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_READONLY
- | SEC_LINKER_CREATED));
+ s = bfd_make_section_
anyway_
with_flags (abfd, ".rela.data",
+
(SEC_ALLOC | SEC_LOAD
+
| SEC_HAS_CONTENTS
+
| SEC_IN_MEMORY
+
| SEC_READONLY
+
| SEC_LINKER_CREATED));
if (s == NULL
|| !bfd_set_section_alignment (abfd, s, 3))
return FALSE;
hppa_info->other_rel_sec = s;
if (s == NULL
|| !bfd_set_section_alignment (abfd, s, 3))
return FALSE;
hppa_info->other_rel_sec = s;
- s = bfd_make_section_with_flags (abfd, ".rela.opd",
- (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_READONLY
- | SEC_LINKER_CREATED));
+ s = bfd_make_section_
anyway_
with_flags (abfd, ".rela.opd",
+
(SEC_ALLOC | SEC_LOAD
+
| SEC_HAS_CONTENTS
+
| SEC_IN_MEMORY
+
| SEC_READONLY
+
| SEC_LINKER_CREATED));
if (s == NULL
|| !bfd_set_section_alignment (abfd, s, 3))
return FALSE;
if (s == NULL
|| !bfd_set_section_alignment (abfd, s, 3))
return FALSE;
@@
-1409,7
+1405,7
@@
allocate_dynrel_entries (struct elf_link_hash_entry *eh, void *data)
return FALSE;
dynamic_symbol = elf64_hppa_dynamic_symbol_p (eh, x->info);
return FALSE;
dynamic_symbol = elf64_hppa_dynamic_symbol_p (eh, x->info);
- shared =
x->info->shared
;
+ shared =
bfd_link_pic (x->info)
;
/* We may need to allocate relocations for a non-dynamic symbol
when creating a shared library. */
/* We may need to allocate relocations for a non-dynamic symbol
when creating a shared library. */
@@
-1560,9
+1556,9
@@
elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (
info->executable
)
+ if (
bfd_link_executable (info) && !info->nointerp
)
{
{
- sec = bfd_get_
section_by_name
(dynobj, ".interp");
+ sec = bfd_get_
linker_section
(dynobj, ".interp");
BFD_ASSERT (sec != NULL);
sec->size = sizeof ELF_DYNAMIC_INTERPRETER;
sec->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
BFD_ASSERT (sec != NULL);
sec->size = sizeof ELF_DYNAMIC_INTERPRETER;
sec->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
@@
-1575,14
+1571,14
@@
elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
not actually use these entries. Reset the size of .rela.dlt,
which will cause it to get stripped from the output file
below. */
not actually use these entries. Reset the size of .rela.dlt,
which will cause it to get stripped from the output file
below. */
- sec = bfd_get_
section_by_name
(dynobj, ".rela.dlt");
+ sec = bfd_get_
linker_section
(dynobj, ".rela.dlt");
if (sec != NULL)
sec->size = 0;
}
/* Set up DLT, PLT and OPD offsets for local syms, and space for local
dynamic relocs. */
if (sec != NULL)
sec->size = 0;
}
/* Set up DLT, PLT and OPD offsets for local syms, and space for local
dynamic relocs. */
- for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link
_
next)
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link
.
next)
{
bfd_signed_vma *local_dlt;
bfd_signed_vma *end_local_dlt;
{
bfd_signed_vma *local_dlt;
bfd_signed_vma *end_local_dlt;
@@
-1639,7
+1635,7
@@
elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
{
*local_dlt = sec->size;
sec->size += DLT_ENTRY_SIZE;
{
*local_dlt = sec->size;
sec->size += DLT_ENTRY_SIZE;
- if (
info->shared)
+ if (
bfd_link_pic (info))
{
srel->size += sizeof (Elf64_External_Rela);
}
{
srel->size += sizeof (Elf64_External_Rela);
}
@@
-1666,7
+1662,7
@@
elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
{
*local_plt = sec->size;
sec->size += PLT_ENTRY_SIZE;
{
*local_plt = sec->size;
sec->size += PLT_ENTRY_SIZE;
- if (
info->shared
)
+ if (
bfd_link_pic (info)
)
srel->size += sizeof (Elf64_External_Rela);
}
else
srel->size += sizeof (Elf64_External_Rela);
}
else
@@
-1692,7
+1688,7
@@
elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
{
*local_opd = sec->size;
sec->size += OPD_ENTRY_SIZE;
{
*local_opd = sec->size;
sec->size += OPD_ENTRY_SIZE;
- if (
info->shared
)
+ if (
bfd_link_pic (info)
)
srel->size += sizeof (Elf64_External_Rela);
}
else
srel->size += sizeof (Elf64_External_Rela);
}
else
@@
-1857,7
+1853,7
@@
elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
must add the entries now so that we get the correct size for
the .dynamic section. The DT_DEBUG entry is filled in by the
dynamic linker and used by the debugger. */
must add the entries now so that we get the correct size for
the .dynamic section. The DT_DEBUG entry is filled in by the
dynamic linker and used by the debugger. */
- if (!
info->shared
)
+ if (!
bfd_link_pic (info)
)
{
if (!add_dynamic_entry (DT_DEBUG, 0)
|| !add_dynamic_entry (DT_HP_DLD_HOOK, 0)
{
if (!add_dynamic_entry (DT_DEBUG, 0)
|| !add_dynamic_entry (DT_HP_DLD_HOOK, 0)
@@
-1999,7
+1995,7
@@
elf64_hppa_finish_dynamic_symbol (bfd *output_bfd,
if we are creating a shared library and the symbol is
still undefined, we create a dynamic relocation to fill
in the correct value. */
if we are creating a shared library and the symbol is
still undefined, we create a dynamic relocation to fill
in the correct value. */
- if (
info->shared
&& eh->root.type == bfd_link_hash_undefined)
+ if (
bfd_link_pic (info)
&& eh->root.type == bfd_link_hash_undefined)
value = 0;
else
value = (eh->root.u.def.value + eh->root.u.def.section->vma);
value = 0;
else
value = (eh->root.u.def.value + eh->root.u.def.section->vma);
@@
-2154,7
+2150,7
@@
elf64_hppa_finalize_opd (struct elf_link_hash_entry *eh, void *data)
/* If we are generating a shared library, we must generate EPLT relocations
for each entry in the .opd, even for static functions (they may have
had their address taken). */
/* If we are generating a shared library, we must generate EPLT relocations
for each entry in the .opd, even for static functions (they may have
had their address taken). */
- if (
info->shared
&& hh->want_opd)
+ if (
bfd_link_pic (info)
&& hh->want_opd)
{
Elf_Internal_Rela rel;
bfd_byte *loc;
{
Elf_Internal_Rela rel;
bfd_byte *loc;
@@
-2207,17
+2203,16
@@
elf64_hppa_finalize_opd (struct elf_link_hash_entry *eh, void *data)
char *new_name;
struct elf_link_hash_entry *nh;
char *new_name;
struct elf_link_hash_entry *nh;
- new_name = alloca (strlen (eh->root.root.string) + 2);
- new_name[0] = '.';
- strcpy (new_name + 1, eh->root.root.string);
+ new_name = concat (".", eh->root.root.string, NULL);
nh = elf_link_hash_lookup (elf_hash_table (info),
new_name, TRUE, TRUE, FALSE);
nh = elf_link_hash_lookup (elf_hash_table (info),
new_name, TRUE, TRUE, FALSE);
-
+
/* All we really want from the new symbol is its dynamic
symbol index. */
if (nh)
dynindx = nh->dynindx;
/* All we really want from the new symbol is its dynamic
symbol index. */
if (nh)
dynindx = nh->dynindx;
+ free (new_name);
}
rel.r_addend = 0;
}
rel.r_addend = 0;
@@
-2253,7
+2248,7
@@
elf64_hppa_finalize_dlt (struct elf_link_hash_entry *eh, void *data)
address, so there is no need to create a relocation. Just install
the proper value into the DLT, note this shortcut can not be
skipped when building a shared library. */
address, so there is no need to create a relocation. Just install
the proper value into the DLT, note this shortcut can not be
skipped when building a shared library. */
- if (!
info->shared
&& hh && hh->want_dlt)
+ if (!
bfd_link_pic (info)
&& hh && hh->want_dlt)
{
bfd_vma value;
{
bfd_vma value;
@@
-2291,7
+2286,7
@@
elf64_hppa_finalize_dlt (struct elf_link_hash_entry *eh, void *data)
/* Create a relocation for the DLT entry associated with this symbol.
When building a shared library the symbol does not have to be dynamic. */
if (hh->want_dlt
/* Create a relocation for the DLT entry associated with this symbol.
When building a shared library the symbol does not have to be dynamic. */
if (hh->want_dlt
- && (elf64_hppa_dynamic_symbol_p (eh, info) ||
info->shared
))
+ && (elf64_hppa_dynamic_symbol_p (eh, info) ||
bfd_link_pic (info)
))
{
Elf_Internal_Rela rel;
bfd_byte *loc;
{
Elf_Internal_Rela rel;
bfd_byte *loc;
@@
-2339,7
+2334,7
@@
elf64_hppa_finalize_dynreloc (struct elf_link_hash_entry *eh,
dynamic_symbol = elf64_hppa_dynamic_symbol_p (eh, info);
dynamic_symbol = elf64_hppa_dynamic_symbol_p (eh, info);
- if (!dynamic_symbol && !
info->shared
)
+ if (!dynamic_symbol && !
bfd_link_pic (info)
)
return TRUE;
if (hh->reloc_entries)
return TRUE;
if (hh->reloc_entries)
@@
-2368,7
+2363,8
@@
elf64_hppa_finalize_dynreloc (struct elf_link_hash_entry *eh,
/* Allocate one iff we are building a shared library, the relocation
isn't a R_PARISC_FPTR64, or we don't want an opd entry. */
/* Allocate one iff we are building a shared library, the relocation
isn't a R_PARISC_FPTR64, or we don't want an opd entry. */
- if (!info->shared && rent->type == R_PARISC_FPTR64 && hh->want_opd)
+ if (!bfd_link_pic (info)
+ && rent->type == R_PARISC_FPTR64 && hh->want_opd)
continue;
/* Create a dynamic relocation for this entry.
continue;
/* Create a dynamic relocation for this entry.
@@
-2398,7
+2394,8
@@
elf64_hppa_finalize_dynreloc (struct elf_link_hash_entry *eh,
We use a section symbol recorded by check_relocs as the
base symbol for the relocation. The addend is the difference
between the section symbol and the address of the .opd entry. */
We use a section symbol recorded by check_relocs as the
base symbol for the relocation. The addend is the difference
between the section symbol and the address of the .opd entry. */
- if (info->shared && rent->type == R_PARISC_FPTR64 && hh->want_opd)
+ if (bfd_link_pic (info)
+ && rent->type == R_PARISC_FPTR64 && hh->want_opd)
{
bfd_vma value, value2;
{
bfd_vma value, value2;
@@
-2446,7
+2443,9
@@
elf64_hppa_finalize_dynreloc (struct elf_link_hash_entry *eh,
dynamic linker, before writing them out. */
static enum elf_reloc_type_class
dynamic linker, before writing them out. */
static enum elf_reloc_type_class
-elf64_hppa_reloc_type_class (const Elf_Internal_Rela *rela)
+elf64_hppa_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ const asection *rel_sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *rela)
{
if (ELF64_R_SYM (rela->r_info) == STN_UNDEF)
return reloc_class_relative;
{
if (ELF64_R_SYM (rela->r_info) == STN_UNDEF)
return reloc_class_relative;
@@
-2492,7
+2491,7
@@
elf64_hppa_finish_dynamic_sections (bfd *output_bfd,
elf64_hppa_finalize_dlt,
info);
elf64_hppa_finalize_dlt,
info);
- sdyn = bfd_get_
section_by_name
(dynobj, ".dynamic");
+ sdyn = bfd_get_
linker_section
(dynobj, ".dynamic");
if (elf_hash_table (info)->dynamic_sections_created)
{
if (elf_hash_table (info)->dynamic_sections_created)
{
@@
-2522,6
+2521,8
@@
elf64_hppa_finish_dynamic_sections (bfd *output_bfd,
area at the start of the .data section. So all we have to
to is find the start of the .data section. */
s = bfd_get_section_by_name (output_bfd, ".data");
area at the start of the .data section. So all we have to
to is find the start of the .data section. */
s = bfd_get_section_by_name (output_bfd, ".data");
+ if (!s)
+ return FALSE;
dyn.d_un.d_ptr = s->vma;
bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
dyn.d_un.d_ptr = s->vma;
bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
@@
-2591,10
+2592,10
@@
elf64_hppa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 760: /* Linux/hppa */
/* pr_cursig */
case 760: /* Linux/hppa */
/* pr_cursig */
- elf_tdata (abfd)->core
_
signal = bfd_get_16 (abfd, note->descdata + 12);
+ elf_tdata (abfd)->core
->
signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
/* pr_pid */
- elf_tdata (abfd)->core
_
lwpid = bfd_get_32 (abfd, note->descdata + 32);
+ elf_tdata (abfd)->core
->
lwpid = bfd_get_32 (abfd, note->descdata + 32);
/* pr_reg */
offset = 112;
/* pr_reg */
offset = 112;
@@
-2620,16
+2621,16
@@
elf64_hppa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 136: /* Linux/hppa elf_prpsinfo. */
return FALSE;
case 136: /* Linux/hppa elf_prpsinfo. */
- elf_tdata (abfd)->core
_
program
+ elf_tdata (abfd)->core
->
program
= _bfd_elfcore_strndup (abfd, note->descdata + 40, 16);
= _bfd_elfcore_strndup (abfd, note->descdata + 40, 16);
- elf_tdata (abfd)->core
_
command
+ elf_tdata (abfd)->core
->
command
= _bfd_elfcore_strndup (abfd, note->descdata + 56, 80);
}
/* Note that for some reason, a spurious space is tacked
onto the end of the args in some (at least one anyway)
implementations, so strip it off if it exists. */
= _bfd_elfcore_strndup (abfd, note->descdata + 56, 80);
}
/* Note that for some reason, a spurious space is tacked
onto the end of the args in some (at least one anyway)
implementations, so strip it off if it exists. */
- command = elf_tdata (abfd)->core
_
command;
+ command = elf_tdata (abfd)->core
->
command;
n = strlen (command);
if (0 < n && command[n - 1] == ' ')
n = strlen (command);
if (0 < n && command[n - 1] == ' ')
@@
-2687,7
+2688,7
@@
elf64_hppa_modify_segment_map (bfd *abfd,
s = bfd_get_section_by_name (abfd, ".interp");
if (! s)
{
s = bfd_get_section_by_name (abfd, ".interp");
if (! s)
{
- for (m = elf_
tdata (abfd)->segment_map
; m != NULL; m = m->next)
+ for (m = elf_
seg_map (abfd)
; m != NULL; m = m->next)
if (m->p_type == PT_PHDR)
break;
if (m == NULL)
if (m->p_type == PT_PHDR)
break;
if (m == NULL)
@@
-2703,12
+2704,12
@@
elf64_hppa_modify_segment_map (bfd *abfd,
m->p_paddr_valid = 1;
m->includes_phdrs = 1;
m->p_paddr_valid = 1;
m->includes_phdrs = 1;
- m->next = elf_
tdata (abfd)->segment_map
;
- elf_
tdata (abfd)->segment_map
= m;
+ m->next = elf_
seg_map (abfd)
;
+ elf_
seg_map (abfd)
= m;
}
}
}
}
- for (m = elf_
tdata (abfd)->segment_map
; m != NULL; m = m->next)
+ for (m = elf_
seg_map (abfd)
; m != NULL; m = m->next)
if (m->p_type == PT_LOAD)
{
unsigned int i;
if (m->p_type == PT_LOAD)
{
unsigned int i;
@@
-2772,7
+2773,7
@@
elf64_hppa_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int sec_index,
if (bfd_bread (&sig, 4, abfd) != 4)
return FALSE;
if (bfd_bread (&sig, 4, abfd) != 4)
return FALSE;
- elf_tdata (abfd)->core
_
signal = sig;
+ elf_tdata (abfd)->core
->
signal = sig;
if (!_bfd_elf_make_section_from_phdr (abfd, hdr, sec_index, typename))
return FALSE;
if (!_bfd_elf_make_section_from_phdr (abfd, hdr, sec_index, typename))
return FALSE;
@@
-2841,7
+2842,7
@@
elf_hppa_unmark_useless_dynamic_symbols (struct elf_link_hash_entry *h,
Ultimately we should have better controls over the generic ELF BFD
linker code. */
Ultimately we should have better controls over the generic ELF BFD
linker code. */
- if (!
info->relocatable
+ if (!
bfd_link_relocatable (info)
&& info->unresolved_syms_in_shared_libs != RM_IGNORE
&& h->root.type == bfd_link_hash_undefined
&& h->ref_dynamic
&& info->unresolved_syms_in_shared_libs != RM_IGNORE
&& h->root.type == bfd_link_hash_undefined
&& h->ref_dynamic
@@
-2872,7
+2873,7
@@
elf_hppa_remark_useless_dynamic_symbols (struct elf_link_hash_entry *h,
Ultimately we should have better controls over the generic ELF BFD
linker code. */
Ultimately we should have better controls over the generic ELF BFD
linker code. */
- if (!
info->relocatable
+ if (!
bfd_link_relocatable (info)
&& info->unresolved_syms_in_shared_libs != RM_IGNORE
&& h->root.type == bfd_link_hash_undefined
&& !h->ref_dynamic
&& info->unresolved_syms_in_shared_libs != RM_IGNORE
&& h->root.type == bfd_link_hash_undefined
&& !h->ref_dynamic
@@
-2941,13
+2942,13
@@
elf_hppa_record_segment_addrs (bfd *abfd,
static bfd_boolean
elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info)
{
static bfd_boolean
elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info)
{
-
bfd_boolean retval
;
+
struct stat buf
;
struct elf64_hppa_link_hash_table *hppa_info = hppa_link_hash_table (info);
if (hppa_info == NULL)
return FALSE;
struct elf64_hppa_link_hash_table *hppa_info = hppa_link_hash_table (info);
if (hppa_info == NULL)
return FALSE;
- if (!
info->relocatable
)
+ if (!
bfd_link_relocatable (info)
)
{
struct elf_link_hash_entry *gp;
bfd_vma gp_val;
{
struct elf_link_hash_entry *gp;
bfd_vma gp_val;
@@
-3025,7
+3026,8
@@
elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info)
info);
/* Invoke the regular ELF backend linker to do all the work. */
info);
/* Invoke the regular ELF backend linker to do all the work. */
- retval = bfd_elf_final_link (abfd, info);
+ if (!bfd_elf_final_link (abfd, info))
+ return FALSE;
elf_link_hash_traverse (elf_hash_table (info),
elf_hppa_remark_useless_dynamic_symbols,
elf_link_hash_traverse (elf_hash_table (info),
elf_hppa_remark_useless_dynamic_symbols,
@@
-3033,10
+3035,17
@@
elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info)
/* If we're producing a final executable, sort the contents of the
unwind section. */
/* If we're producing a final executable, sort the contents of the
unwind section. */
- if (
retval && !info->relocatable
)
- ret
val = elf_hppa_sort_unwind (abfd)
;
+ if (
bfd_link_relocatable (info)
)
+ ret
urn TRUE
;
- return retval;
+ /* Do not attempt to sort non-regular files. This is here
+ especially for configure scripts and kernel builds which run
+ tests with "ld [...] -o /dev/null". */
+ if (stat (abfd->filename, &buf) != 0
+ || !S_ISREG(buf.st_mode))
+ return TRUE;
+
+ return elf_hppa_sort_unwind (abfd);
}
/* Relocate the given INSN. VALUE should be the actual value we want
}
/* Relocate the given INSN. VALUE should be the actual value we want
@@
-3190,7
+3199,7
@@
elf_hppa_final_link_relocate (Elf_Internal_Rela *rel,
if (hppa_info == NULL)
return bfd_reloc_notsupported;
if (hppa_info == NULL)
return bfd_reloc_notsupported;
-
+
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
local_offsets = elf_local_got_offsets (input_bfd);
insn = bfd_get_32 (input_bfd, hit_data);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
local_offsets = elf_local_got_offsets (input_bfd);
insn = bfd_get_32 (input_bfd, hit_data);
@@
-3273,7
+3282,7
@@
elf_hppa_final_link_relocate (Elf_Internal_Rela *rel,
&& value + addend + max_branch_offset >= 2*max_branch_offset)
{
(*_bfd_error_handler)
&& value + addend + max_branch_offset >= 2*max_branch_offset)
{
(*_bfd_error_handler)
- (_("%B(%A+0x" BFD_VMA_FMT "x): cannot reach %s"),
+ (_("%B(%A+0x
%
" BFD_VMA_FMT "x): cannot reach %s"),
input_bfd,
input_section,
offset,
input_bfd,
input_section,
offset,
@@
-3859,14
+3868,19
@@
elf64_hppa_relocate_section (bfd *output_bfd,
/* This is not a local symbol. */
struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
/* This is not a local symbol. */
struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
- /* It seems this can happen with erroneous or unsupported
+ /* It seems this can happen with erroneous or unsupported
input (mixing a.out and elf in an archive, for example.) */
if (sym_hashes == NULL)
return FALSE;
eh = sym_hashes[r_symndx - symtab_hdr->sh_info];
input (mixing a.out and elf in an archive, for example.) */
if (sym_hashes == NULL)
return FALSE;
eh = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (eh->root.type == bfd_link_hash_indirect
+ if (info->wrap_hash != NULL
+ && (input_section->flags & SEC_DEBUGGING) != 0)
+ eh = ((struct elf_link_hash_entry *)
+ unwrap_hash_lookup (info, input_bfd, &eh->root));
+
+ while (eh->root.type == bfd_link_hash_indirect
|| eh->root.type == bfd_link_hash_warning)
eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
|| eh->root.type == bfd_link_hash_warning)
eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
@@
-3886,23
+3900,22
@@
elf64_hppa_relocate_section (bfd *output_bfd,
else if (info->unresolved_syms_in_objects == RM_IGNORE
&& ELF_ST_VISIBILITY (eh->other) == STV_DEFAULT)
;
else if (info->unresolved_syms_in_objects == RM_IGNORE
&& ELF_ST_VISIBILITY (eh->other) == STV_DEFAULT)
;
- else if (!
info->relocatable
+ else if (!
bfd_link_relocatable (info)
&& elf_hppa_is_dynamic_loader_symbol (eh->root.root.string))
continue;
&& elf_hppa_is_dynamic_loader_symbol (eh->root.root.string))
continue;
- else if (!
info->relocatable
)
+ else if (!
bfd_link_relocatable (info)
)
{
bfd_boolean err;
err = (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
|| ELF_ST_VISIBILITY (eh->other) != STV_DEFAULT);
{
bfd_boolean err;
err = (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
|| ELF_ST_VISIBILITY (eh->other) != STV_DEFAULT);
- if (!info->callbacks->undefined_symbol (info,
- eh->root.root.string,
- input_bfd,
- input_section,
- rel->r_offset, err))
- return FALSE;
+ (*info->callbacks->undefined_symbol) (info,
+ eh->root.root.string,
+ input_bfd,
+ input_section,
+ rel->r_offset, err);
}
}
- if (!
info->relocatable
+ if (!
bfd_link_relocatable (info)
&& relocation == 0
&& eh->root.type != bfd_link_hash_defined
&& eh->root.type != bfd_link_hash_defweak
&& relocation == 0
&& eh->root.type != bfd_link_hash_defined
&& eh->root.type != bfd_link_hash_defweak
@@
-3911,12
+3924,9
@@
elf64_hppa_relocate_section (bfd *output_bfd,
if (info->unresolved_syms_in_objects == RM_IGNORE
&& ELF_ST_VISIBILITY (eh->other) == STV_DEFAULT
&& eh->type == STT_PARISC_MILLI)
if (info->unresolved_syms_in_objects == RM_IGNORE
&& ELF_ST_VISIBILITY (eh->other) == STV_DEFAULT
&& eh->type == STT_PARISC_MILLI)
- {
- if (! info->callbacks->undefined_symbol
- (info, eh_name (eh), input_bfd,
- input_section, rel->r_offset, FALSE))
- return FALSE;
- }
+ (*info->callbacks->undefined_symbol)
+ (info, eh_name (eh), input_bfd,
+ input_section, rel->r_offset, FALSE);
}
}
}
}
@@
-3924,7
+3934,7
@@
elf64_hppa_relocate_section (bfd *output_bfd,
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
rel, 1, relend, howto, 0, contents);
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
rel, 1, relend, howto, 0, contents);
- if (
info->relocatable
)
+ if (
bfd_link_relocatable (info)
)
continue;
r = elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
continue;
r = elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
@@
-3955,11
+3965,9
@@
elf64_hppa_relocate_section (bfd *output_bfd,
sym_name = bfd_section_name (input_bfd, sym_sec);
}
sym_name = bfd_section_name (input_bfd, sym_sec);
}
- if (!((*info->callbacks->reloc_overflow)
- (info, (eh ? &eh->root : NULL), sym_name,
- howto->name, (bfd_vma) 0, input_bfd,
- input_section, rel->r_offset)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (eh ? &eh->root : NULL), sym_name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
}
break;
}
}
break;
}
@@
-4012,7
+4020,7
@@
const struct elf_size_info hppa64_elf_size_info =
bfd_elf64_swap_reloca_out
};
bfd_elf64_swap_reloca_out
};
-#define TARGET_BIG_SYM
bfd_elf64_hppa
_vec
+#define TARGET_BIG_SYM
hppa_elf64
_vec
#define TARGET_BIG_NAME "elf64-hppa"
#define ELF_ARCH bfd_arch_hppa
#define ELF_TARGET_ID HPPA64_ELF_DATA
#define TARGET_BIG_NAME "elf64-hppa"
#define ELF_ARCH bfd_arch_hppa
#define ELF_TARGET_ID HPPA64_ELF_DATA
@@
-4057,7
+4065,7
@@
const struct elf_size_info hppa64_elf_size_info =
elf64_hppa_finish_dynamic_sections
#define elf_backend_grok_prstatus elf64_hppa_grok_prstatus
#define elf_backend_grok_psinfo elf64_hppa_grok_psinfo
elf64_hppa_finish_dynamic_sections
#define elf_backend_grok_prstatus elf64_hppa_grok_prstatus
#define elf_backend_grok_psinfo elf64_hppa_grok_psinfo
-
+
/* Stuff for the BFD linker: */
#define bfd_elf64_bfd_link_hash_table_create \
elf64_hppa_hash_table_create
/* Stuff for the BFD linker: */
#define bfd_elf64_bfd_link_hash_table_create \
elf64_hppa_hash_table_create
@@
-4094,13
+4102,11
@@
const struct elf_size_info hppa64_elf_size_info =
#include "elf64-target.h"
#undef TARGET_BIG_SYM
#include "elf64-target.h"
#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM
bfd_elf64_hppa
_linux_vec
+#define TARGET_BIG_SYM
hppa_elf64
_linux_vec
#undef TARGET_BIG_NAME
#define TARGET_BIG_NAME "elf64-hppa-linux"
#undef ELF_OSABI
#define ELF_OSABI ELFOSABI_GNU
#undef TARGET_BIG_NAME
#define TARGET_BIG_NAME "elf64-hppa-linux"
#undef ELF_OSABI
#define ELF_OSABI ELFOSABI_GNU
-#undef elf_backend_post_process_headers
-#define elf_backend_post_process_headers _bfd_elf_set_osabi
#undef elf64_bed
#define elf64_bed elf64_hppa_linux_bed
#undef elf64_bed
#define elf64_bed elf64_hppa_linux_bed
This page took
0.038424 seconds
and
4
git commands to generate.