* emultempl/alphaelf.em (alpha_after_open): Use elf_object_id.
* emultempl/hppaelf.em (hppaelf_create_output_section_statements): Likewise. * emultempl/ppc64elf.em (ppc_create_output_section_statements): Likewise. * emultempl/ppc32elf.em (is_ppc_elf32_vec): Delete. Replace all uses with.. (is_ppc_elf): ..this new macro.
This commit is contained in:
parent
0c8d6e5c6d
commit
5503fea1b9
11
ld/ChangeLog
11
ld/ChangeLog
@ -1,3 +1,14 @@
|
||||
2008-02-15 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* emultempl/alphaelf.em (alpha_after_open): Use elf_object_id.
|
||||
* emultempl/hppaelf.em (hppaelf_create_output_section_statements):
|
||||
Likewise.
|
||||
* emultempl/ppc64elf.em (ppc_create_output_section_statements):
|
||||
Likewise.
|
||||
* emultempl/ppc32elf.em (is_ppc_elf32_vec): Delete. Replace all
|
||||
uses with..
|
||||
(is_ppc_elf): ..this new macro.
|
||||
|
||||
2008-02-15 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* ldmain.h (output_bfd): Delete.
|
||||
|
@ -32,8 +32,6 @@ static bfd_boolean limit_32bit;
|
||||
static bfd_boolean disable_relaxation;
|
||||
|
||||
extern bfd_boolean elf64_alpha_use_secureplt;
|
||||
extern const bfd_target bfd_elf64_alpha_vec;
|
||||
extern const bfd_target bfd_elf64_alpha_freebsd_vec;
|
||||
|
||||
|
||||
/* Set the start address as in the Tru64 ld. */
|
||||
@ -42,8 +40,8 @@ extern const bfd_target bfd_elf64_alpha_freebsd_vec;
|
||||
static void
|
||||
alpha_after_open (void)
|
||||
{
|
||||
if (link_info.output_bfd->xvec == &bfd_elf64_alpha_vec
|
||||
|| link_info.output_bfd->xvec == &bfd_elf64_alpha_freebsd_vec)
|
||||
if (bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour
|
||||
&& elf_object_id (link_info.output_bfd) == ALPHA_ELF_TDATA)
|
||||
{
|
||||
unsigned int num_plt;
|
||||
lang_output_section_statement_type *os;
|
||||
|
@ -67,13 +67,8 @@ hppaelf_after_parse (void)
|
||||
static void
|
||||
hppaelf_create_output_section_statements (void)
|
||||
{
|
||||
extern const bfd_target bfd_elf32_hppa_linux_vec;
|
||||
extern const bfd_target bfd_elf32_hppa_nbsd_vec;
|
||||
extern const bfd_target bfd_elf32_hppa_vec;
|
||||
|
||||
if (link_info.output_bfd->xvec != &bfd_elf32_hppa_linux_vec
|
||||
&& link_info.output_bfd->xvec != &bfd_elf32_hppa_nbsd_vec
|
||||
&& link_info.output_bfd->xvec != &bfd_elf32_hppa_vec)
|
||||
if (!(bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour
|
||||
&& elf_object_id (link_info.output_bfd) == HPPA_ELF_TDATA))
|
||||
return;
|
||||
|
||||
stub_file = lang_add_input_file ("linker stubs",
|
||||
|
@ -27,17 +27,9 @@ fragment <<EOF
|
||||
#include "libbfd.h"
|
||||
#include "elf32-ppc.h"
|
||||
|
||||
extern const bfd_target bfd_elf32_powerpc_vec;
|
||||
extern const bfd_target bfd_elf32_powerpcle_vec;
|
||||
extern const bfd_target bfd_elf32_powerpc_vxworks_vec;
|
||||
|
||||
static inline int
|
||||
is_ppc_elf32_vec(const bfd_target * vec)
|
||||
{
|
||||
return (vec == &bfd_elf32_powerpc_vec
|
||||
|| vec == &bfd_elf32_powerpc_vxworks_vec
|
||||
|| vec == &bfd_elf32_powerpcle_vec);
|
||||
}
|
||||
#define is_ppc_elf(bfd) \
|
||||
(bfd_get_flavour (bfd) == bfd_target_elf_flavour \
|
||||
&& elf_object_id (bfd) == PPC32_ELF_TDATA)
|
||||
|
||||
/* Whether to run tls optimization. */
|
||||
static int notlsopt = 0;
|
||||
@ -52,7 +44,7 @@ static int old_got = 0;
|
||||
static void
|
||||
ppc_after_open (void)
|
||||
{
|
||||
if (is_ppc_elf32_vec (link_info.output_bfd->xvec))
|
||||
if (is_ppc_elf (link_info.output_bfd))
|
||||
{
|
||||
int new_plt;
|
||||
int keep_new;
|
||||
@ -109,7 +101,7 @@ ppc_after_open (void)
|
||||
static void
|
||||
ppc_before_allocation (void)
|
||||
{
|
||||
if (is_ppc_elf32_vec (link_info.output_bfd->xvec))
|
||||
if (is_ppc_elf (link_info.output_bfd))
|
||||
{
|
||||
if (ppc_elf_tls_setup (link_info.output_bfd, &link_info) && !notlsopt)
|
||||
{
|
||||
|
@ -72,11 +72,8 @@ static int non_overlapping_opd = 0;
|
||||
static void
|
||||
ppc_create_output_section_statements (void)
|
||||
{
|
||||
extern const bfd_target bfd_elf64_powerpc_vec;
|
||||
extern const bfd_target bfd_elf64_powerpcle_vec;
|
||||
|
||||
if (link_info.output_bfd->xvec != &bfd_elf64_powerpc_vec
|
||||
&& link_info.output_bfd->xvec != &bfd_elf64_powerpcle_vec)
|
||||
if (!(bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour
|
||||
&& elf_object_id (link_info.output_bfd) == PPC64_ELF_TDATA))
|
||||
return;
|
||||
|
||||
link_info.wrap_char = '.';
|
||||
|
Loading…
Reference in New Issue
Block a user