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
/
elf32-dlx.c
diff --git
a/bfd/elf32-dlx.c
b/bfd/elf32-dlx.c
index 3bb1765675e489d774e2d383d68fff704597ddba..b5c7d6e8a80387191eb9ddf9de0de59ef8b2f3bb 100644
(file)
--- a/
bfd/elf32-dlx.c
+++ b/
bfd/elf32-dlx.c
@@
-1,6
+1,5
@@
/* DLX specific support for 32-bit ELF
/* DLX specific support for 32-bit ELF
- Copyright 2002, 2003, 2004, 2005, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 2002-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.
@@
-139,9
+138,8
@@
elf32_dlx_relocate16 (bfd *abfd,
/* Can not support a long jump to sections other then .text. */
if (strcmp (input_section->name, symbol->section->output_section->name) != 0)
{
/* Can not support a long jump to sections other then .text. */
if (strcmp (input_section->name, symbol->section->output_section->name) != 0)
{
- fprintf (stderr,
- "BFD Link Error: branch (PC rel16) to section (%s) not supported\n",
- symbol->section->output_section->name);
+ (*_bfd_error_handler) (_("BFD Link Error: branch (PC rel16) to section (%s) not supported"),
+ symbol->section->output_section->name);
return bfd_reloc_undefined;
}
return bfd_reloc_undefined;
}
@@
-202,9
+200,8
@@
elf32_dlx_relocate26 (bfd *abfd,
/* Can not support a long jump to sections other then .text */
if (strcmp (input_section->name, symbol->section->output_section->name) != 0)
{
/* Can not support a long jump to sections other then .text */
if (strcmp (input_section->name, symbol->section->output_section->name) != 0)
{
- fprintf (stderr,
- "BFD Link Error: jump (PC rel26) to section (%s) not supported\n",
- symbol->section->output_section->name);
+ (*_bfd_error_handler) (_("BFD Link Error: jump (PC rel26) to section (%s) not supported"),
+ symbol->section->output_section->name);
return bfd_reloc_undefined;
}
return bfd_reloc_undefined;
}
@@
-240,7
+237,7
@@
static reloc_howto_type dlx_elf_howto_table[]=
/* No relocation. */
HOWTO (R_DLX_NONE, /* Type. */
0, /* Rightshift. */
/* No relocation. */
HOWTO (R_DLX_NONE, /* Type. */
0, /* Rightshift. */
-
0
, /* size (0 = byte, 1 = short, 2 = long). */
+
3
, /* size (0 = byte, 1 = short, 2 = long). */
0, /* Bitsize. */
FALSE, /* PC_relative. */
0, /* Bitpos. */
0, /* Bitsize. */
FALSE, /* PC_relative. */
0, /* Bitpos. */
@@
-428,18
+425,15
@@
elf32_dlx_check_relocs (bfd *abfd,
const Elf_Internal_Rela *relocs)
{
Elf_Internal_Shdr *symtab_hdr;
const Elf_Internal_Rela *relocs)
{
Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes
, **sym_hashes_end
;
+ struct elf_link_hash_entry **sym_hashes;
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- if (
info->relocatable
)
+ if (
bfd_link_relocatable (info)
)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
- sym_hashes_end = sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
- if (!elf_bad_symtab (abfd))
- sym_hashes_end -= symtab_hdr->sh_info;
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
@@
-456,6
+450,10
@@
elf32_dlx_check_relocs (bfd *abfd,
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ /* PR15323, ref flags aren't set for references in the same
+ object. */
+ h->root.non_ir_ref = 1;
}
switch (ELF32_R_TYPE (rel->r_info))
}
switch (ELF32_R_TYPE (rel->r_info))
@@
-548,7
+546,11
@@
dlx_rtype_to_howto (unsigned int r_type)
case R_DLX_RELOC_16_LO:
return & elf_dlx_reloc_16_lo;
default:
case R_DLX_RELOC_16_LO:
return & elf_dlx_reloc_16_lo;
default:
- BFD_ASSERT (r_type < (unsigned int) R_DLX_max);
+ if (r_type >= (unsigned int) R_DLX_max)
+ {
+ _bfd_error_handler (_("Invalid DLX reloc number: %d"), r_type);
+ r_type = 0;
+ }
return & dlx_elf_howto_table[r_type];
}
}
return & dlx_elf_howto_table[r_type];
}
}
@@
-573,7
+575,7
@@
elf32_dlx_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
return;
}
return;
}
-#define TARGET_BIG_SYM
bfd_elf32_dlx_big
_vec
+#define TARGET_BIG_SYM
dlx_elf32_be
_vec
#define TARGET_BIG_NAME "elf32-dlx"
#define ELF_ARCH bfd_arch_dlx
#define ELF_MACHINE_CODE EM_DLX
#define TARGET_BIG_NAME "elf32-dlx"
#define ELF_ARCH bfd_arch_dlx
#define ELF_MACHINE_CODE EM_DLX
This page took
0.028383 seconds
and
4
git commands to generate.