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-mmix.c
diff --git
a/bfd/elf64-mmix.c
b/bfd/elf64-mmix.c
index 499bcd609ad0089aff9604bb0e1647cdebd27c13..b15ef9f9bb375b346e12debfeca53463e583a521 100644
(file)
--- a/
bfd/elf64-mmix.c
+++ b/
bfd/elf64-mmix.c
@@
-1,7
+1,5
@@
/* MMIX-specific support for 64-bit ELF.
/* MMIX-specific support for 64-bit ELF.
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011,
- 2012
- Free Software Foundation, Inc.
+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com>
This file is part of BFD, the Binary File Descriptor library.
Contributed by Hans-Peter Nilsson <hp@bitrange.com>
This file is part of BFD, the Binary File Descriptor library.
@@
-194,11
+192,11
@@
static reloc_howto_type elf_mmix_howto_table[] =
/* This reloc does nothing. */
HOWTO (R_MMIX_NONE, /* type */
0, /* rightshift */
/* This reloc does nothing. */
HOWTO (R_MMIX_NONE, /* type */
0, /* rightshift */
-
2
, /* size (0 = byte, 1 = short, 2 = long) */
-
32,
/* bitsize */
+
3
, /* size (0 = byte, 1 = short, 2 = long) */
+
0,
/* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
FALSE, /* pc_relative */
0, /* bitpos */
- complain_overflow_
bitfield
, /* complain_on_overflow */
+ complain_overflow_
dont
, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_MMIX_NONE", /* name */
FALSE, /* partial_inplace */
bfd_elf_generic_reloc, /* special_function */
"R_MMIX_NONE", /* name */
FALSE, /* partial_inplace */
@@
-1261,7
+1259,11
@@
mmix_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
unsigned int r_type;
r_type = ELF64_R_TYPE (dst->r_info);
unsigned int r_type;
r_type = ELF64_R_TYPE (dst->r_info);
- BFD_ASSERT (r_type < (unsigned int) R_MMIX_max);
+ if (r_type >= (unsigned int) R_MMIX_max)
+ {
+ _bfd_error_handler (_("%B: invalid MMIX reloc number: %d"), abfd, r_type);
+ r_type = 0;
+ }
cache_ptr->howto = &elf_mmix_howto_table[r_type];
}
cache_ptr->howto = &elf_mmix_howto_table[r_type];
}
@@
-1413,12
+1415,13
@@
mmix_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
}
else
{
}
else
{
- bfd_boolean unresolved_reloc;
+ bfd_boolean unresolved_reloc
, ignored
;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, undefined_signalled);
+ unresolved_reloc, undefined_signalled,
+ ignored);
name = h->root.root.string;
}
name = h->root.root.string;
}
@@
-1426,7
+1429,7
@@
mmix_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
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)
)
{
/* This is a relocatable link. For most relocs we don't have to
change anything, unless the reloc is against a section
{
/* This is a relocatable link. For most relocs we don't have to
change anything, unless the reloc is against a section
@@
-1867,7
+1870,7
@@
mmix_elf_check_common_relocs (bfd *abfd,
DSO-related stuff if that member is non-NULL. */
case R_MMIX_BASE_PLUS_OFFSET:
/* We don't do anything with this reloc for a relocatable link. */
DSO-related stuff if that member is non-NULL. */
case R_MMIX_BASE_PLUS_OFFSET:
/* We don't do anything with this reloc for a relocatable link. */
- if (
info->relocatable
)
+ if (
bfd_link_relocatable (info)
)
break;
if (bpo_greg_owner == NULL)
break;
if (bpo_greg_owner == NULL)
@@
-1991,7
+1994,7
@@
mmix_elf_check_relocs (bfd *abfd,
if (!mmix_elf_check_common_relocs (abfd, info, sec, relocs))
return FALSE;
if (!mmix_elf_check_common_relocs (abfd, info, sec, relocs))
return FALSE;
- if (
info->relocatable
)
+ if (
bfd_link_relocatable (info)
)
return TRUE;
rel_end = relocs + sec->reloc_count;
return TRUE;
rel_end = relocs + sec->reloc_count;
@@
-2111,9
+2114,7
@@
static asymbol *mmix_elf_reg_section_symbol_ptr;
/* Handle the special section numbers that a symbol may use. */
void
/* Handle the special section numbers that a symbol may use. */
void
-mmix_elf_symbol_processing (abfd, asym)
- bfd *abfd ATTRIBUTE_UNUSED;
- asymbol *asym;
+mmix_elf_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED, asymbol *asym)
{
elf_symbol_type *elfsym;
{
elf_symbol_type *elfsym;
@@
-2300,7
+2301,7
@@
mmix_set_relaxable_size (bfd *abfd ATTRIBUTE_UNUSED,
/* For use in relocatable link, we start with a max stubs size. See
mmix_elf_relax_section. */
/* For use in relocatable link, we start with a max stubs size. See
mmix_elf_relax_section. */
- if (
info->relocatable
&& sec->output_section)
+ if (
bfd_link_relocatable (info)
&& sec->output_section)
mmix_elf_section_data (sec->output_section)->pjs.stubs_size_sum
+= (mmix_elf_section_data (sec)->pjs.n_pushj_relocs
* MAX_PUSHJ_STUB_SIZE);
mmix_elf_section_data (sec->output_section)->pjs.stubs_size_sum
+= (mmix_elf_section_data (sec)->pjs.n_pushj_relocs
* MAX_PUSHJ_STUB_SIZE);
@@
-2323,7
+2324,7
@@
_bfd_mmix_before_linker_allocation (bfd *abfd ATTRIBUTE_UNUSED,
bfd *ibfd;
/* Set the initial size of sections. */
bfd *ibfd;
/* Set the initial size of sections. */
- for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link
_
next)
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link
.
next)
bfd_map_over_sections (ibfd, mmix_set_relaxable_size, info);
/* The bpo_greg_owner bfd is supposed to have been set by
bfd_map_over_sections (ibfd, mmix_set_relaxable_size, info);
/* The bpo_greg_owner bfd is supposed to have been set by
@@
-2488,9
+2489,8
@@
bpo_reloc_request_sort_fn (const void * p1, const void * p2)
from base-plus-offset relocs. */
void
from base-plus-offset relocs. */
void
-mmix_dump_bpo_gregs (link_info, pf)
- struct bfd_link_info *link_info;
- bfd_error_handler_type pf;
+mmix_dump_bpo_gregs (struct bfd_link_info *link_info,
+ bfd_error_handler_type pf)
{
bfd *bpo_greg_owner;
asection *bpo_gregs_section;
{
bfd *bpo_greg_owner;
asection *bpo_gregs_section;
@@
-2621,7
+2621,7
@@
mmix_elf_relax_section (bfd *abfd,
/* We process relocs in a distinctly different way when this is a
relocatable link (for one, we don't look at symbols), so we avoid
mixing its code with that for the "normal" relaxation. */
/* We process relocs in a distinctly different way when this is a
relocatable link (for one, we don't look at symbols), so we avoid
mixing its code with that for the "normal" relaxation. */
- if (
link_info->relocatable
)
+ if (
bfd_link_relocatable (link_info)
)
{
/* The only transformation in a relocatable link is to generate
a full stub at the location of the stub calculated for the
{
/* The only transformation in a relocatable link is to generate
a full stub at the location of the stub calculated for the
@@
-2903,7
+2903,7
@@
mmix_elf_relax_section (bfd *abfd,
alignment. */
#define ELF_MAXPAGESIZE 0x100
alignment. */
#define ELF_MAXPAGESIZE 0x100
-#define TARGET_BIG_SYM
bfd_elf64_mmix
_vec
+#define TARGET_BIG_SYM
mmix_elf64
_vec
#define TARGET_BIG_NAME "elf64-mmix"
#define elf_info_to_howto_rel NULL
#define TARGET_BIG_NAME "elf64-mmix"
#define elf_info_to_howto_rel NULL
This page took
0.026611 seconds
and
4
git commands to generate.