#ifndef MY_canonicalize_reloc
#define MY_canonicalize_reloc NAME (aout, canonicalize_reloc)
#endif
-#ifndef MY_set_reloc
-#define MY_set_reloc _bfd_generic_set_reloc
+#ifndef MY_finalize_section_relocs
+#define MY_finalize_section_relocs _bfd_generic_finalize_section_relocs
#endif
#ifndef MY_make_empty_symbol
#define MY_make_empty_symbol NAME (aout, make_empty_symbol)
long bfd_canonicalize_reloc
(bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
-void bfd_set_reloc
+void bfd_finalize_section_relocs
(bfd *abfd, asection *sec, arelent **rel, unsigned int count);
-#define bfd_set_reloc(abfd, asect, location, count) \
- BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count))
+#define bfd_finalize_section_relocs(abfd, asect, location, count) \
+ BFD_SEND (abfd, _bfd_finalize_section_relocs, \
+ (abfd, asect, location, count))
bool bfd_set_file_flags (bfd *abfd, flagword flags);
int bfd_get_arch_size (bfd *abfd);
#define BFD_JUMP_TABLE_RELOCS(NAME) \
NAME##_get_reloc_upper_bound, \
NAME##_canonicalize_reloc, \
- NAME##_set_reloc, \
+ NAME##_finalize_section_relocs, \
NAME##_bfd_reloc_type_lookup, \
NAME##_bfd_reloc_name_lookup
long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **,
struct bfd_symbol **);
- void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int);
+ void (*_bfd_finalize_section_relocs) (bfd *, sec_ptr, arelent **,
+ unsigned int);
/* See documentation on reloc types. */
reloc_howto_type *
(*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
/*
FUNCTION
- bfd_set_reloc
+ bfd_finalize_section_relocs
SYNOPSIS
- void bfd_set_reloc
+ void bfd_finalize_section_relocs
(bfd *abfd, asection *sec, arelent **rel, unsigned int count);
DESCRIPTION
- Set the relocation pointer and count within
- section @var{sec} to the values @var{rel} and @var{count}.
- The argument @var{abfd} is ignored.
-
-.#define bfd_set_reloc(abfd, asect, location, count) \
-. BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count))
+ Set the relocation pointer and count within section @var{sec}
+ to the values @var{rel} and @var{count}, and take any other
+ actions required at the conclusion of section relocation
+ processing.
+
+.#define bfd_finalize_section_relocs(abfd, asect, location, count) \
+. BFD_SEND (abfd, _bfd_finalize_section_relocs, \
+. (abfd, asect, location, count))
*/
/*
#define _bfd_ecoff_bfd_link_check_relocs _bfd_generic_link_check_relocs
/* Installing internal relocations in a section is also generic. */
-#define _bfd_ecoff_set_reloc _bfd_generic_set_reloc
+#define _bfd_ecoff_finalize_section_relocs _bfd_generic_finalize_section_relocs
const bfd_target alpha_ecoff_le_vec =
{
#define _bfd_ecoff_bfd_define_common_symbol bfd_generic_define_common_symbol
#define _bfd_ecoff_bfd_link_hide_symbol _bfd_generic_link_hide_symbol
#define _bfd_ecoff_bfd_define_start_stop bfd_generic_define_start_stop
-#define _bfd_ecoff_set_reloc _bfd_generic_set_reloc
+#define _bfd_ecoff_finalize_section_relocs _bfd_generic_finalize_section_relocs
extern const bfd_target mips_ecoff_be_vec;
/* For reloc entry points. */
#define _bfd_xcoff_get_reloc_upper_bound coff_get_reloc_upper_bound
#define _bfd_xcoff_canonicalize_reloc coff_canonicalize_reloc
-#define _bfd_xcoff_set_reloc _bfd_generic_set_reloc
+#define _bfd_xcoff_finalize_section_relocs _bfd_generic_finalize_section_relocs
#define _bfd_xcoff_bfd_reloc_type_lookup _bfd_xcoff_reloc_type_lookup
#define _bfd_xcoff_bfd_reloc_name_lookup _bfd_xcoff_reloc_name_lookup
/* Reloc */
coff_get_reloc_upper_bound,
coff_canonicalize_reloc,
- _bfd_generic_set_reloc,
+ _bfd_generic_finalize_section_relocs,
xcoff64_reloc_type_lookup,
xcoff64_reloc_name_lookup,
/* Reloc */
coff_get_reloc_upper_bound,
coff_canonicalize_reloc,
- _bfd_generic_set_reloc,
+ _bfd_generic_finalize_section_relocs,
xcoff64_reloc_type_lookup,
xcoff64_reloc_name_lookup,
return section->reloc_count;
}
-#ifndef coff_set_reloc
-#define coff_set_reloc _bfd_generic_set_reloc
+#ifndef coff_finalize_section_relocs
+#define coff_finalize_section_relocs _bfd_generic_finalize_section_relocs
#endif
#ifndef coff_reloc16_estimate
/* Install a new set of internal relocs. */
static void
-elf64_sparc_set_reloc (bfd *abfd ATTRIBUTE_UNUSED,
- asection *asect,
- arelent **location,
- unsigned int count)
+elf64_sparc_finalize_section_relocs (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *asect,
+ arelent **location,
+ unsigned int count)
{
asect->orelocation = location;
canon_reloc_count (asect) = count;
elf64_sparc_canonicalize_reloc
#define bfd_elf64_canonicalize_dynamic_reloc \
elf64_sparc_canonicalize_dynamic_reloc
-#define bfd_elf64_set_reloc \
- elf64_sparc_set_reloc
+#define bfd_elf64_finalize_section_relocs \
+ elf64_sparc_finalize_section_relocs
#define elf_backend_add_symbol_hook \
elf64_sparc_add_symbol_hook
#define elf_backend_get_symbol_type \
#ifndef bfd_elfNN_canonicalize_reloc
#define bfd_elfNN_canonicalize_reloc _bfd_elf_canonicalize_reloc
#endif
-#ifndef bfd_elfNN_set_reloc
-#define bfd_elfNN_set_reloc _bfd_generic_set_reloc
+#ifndef bfd_elfNN_finalize_section_relocs
+#define bfd_elfNN_finalize_section_relocs _bfd_generic_finalize_section_relocs
#endif
#ifndef bfd_elfNN_find_nearest_line
#define bfd_elfNN_find_nearest_line _bfd_elf_find_nearest_line
#define msdos_minisymbol_to_symbol _bfd_nosymbols_minisymbol_to_symbol
#define msdos_canonicalize_reloc _bfd_norelocs_canonicalize_reloc
-#define msdos_set_reloc _bfd_norelocs_set_reloc
+#define msdos_finalize_section_relocs _bfd_norelocs_finalize_section_relocs
#define msdos_get_reloc_upper_bound _bfd_norelocs_get_reloc_upper_bound
#define msdos_32_bfd_link_split_section _bfd_generic_link_split_section
(bfd *, asection *) ATTRIBUTE_HIDDEN;
extern long _bfd_norelocs_canonicalize_reloc
(bfd *, asection *, arelent **, asymbol **) ATTRIBUTE_HIDDEN;
-extern void _bfd_norelocs_set_reloc
+extern void _bfd_norelocs_finalize_section_relocs
(bfd *, asection *, arelent **, unsigned int) ATTRIBUTE_HIDDEN;
extern reloc_howto_type *_bfd_norelocs_bfd_reloc_type_lookup
(bfd *, bfd_reloc_code_real_type) ATTRIBUTE_HIDDEN;
}
void
-_bfd_norelocs_set_reloc (bfd *abfd ATTRIBUTE_UNUSED,
- asection *sec ATTRIBUTE_UNUSED,
- arelent **relptr ATTRIBUTE_UNUSED,
- unsigned int count ATTRIBUTE_UNUSED)
+_bfd_norelocs_finalize_section_relocs (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ arelent **relptr ATTRIBUTE_UNUSED,
+ unsigned int count ATTRIBUTE_UNUSED)
{
/* Do nothing. */
}
(bfd *, asection *) ATTRIBUTE_HIDDEN;
extern long _bfd_norelocs_canonicalize_reloc
(bfd *, asection *, arelent **, asymbol **) ATTRIBUTE_HIDDEN;
-extern void _bfd_norelocs_set_reloc
+extern void _bfd_norelocs_finalize_section_relocs
(bfd *, asection *, arelent **, unsigned int) ATTRIBUTE_HIDDEN;
extern reloc_howto_type *_bfd_norelocs_bfd_reloc_type_lookup
(bfd *, bfd_reloc_code_real_type) ATTRIBUTE_HIDDEN;
bool relocatable,
asymbol **symbols) ATTRIBUTE_HIDDEN;
-void _bfd_generic_set_reloc
+void _bfd_generic_finalize_section_relocs
(bfd *abfd,
sec_ptr section,
arelent **relptr,
#define bfd_mach_o_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
#define bfd_mach_o_core_file_matches_executable_p generic_core_file_matches_executable_p
#define bfd_mach_o_core_file_pid _bfd_nocore_core_file_pid
-#define bfd_mach_o_set_reloc _bfd_generic_set_reloc
+#define bfd_mach_o_finalize_section_relocs _bfd_generic_finalize_section_relocs
#define bfd_mach_o_get_dynamic_symtab_upper_bound bfd_mach_o_get_symtab_upper_bound
#define bfd_mach_o_canonicalize_dynamic_symtab bfd_mach_o_canonicalize_symtab
/*
INTERNAL_FUNCTION
- _bfd_generic_set_reloc
+ _bfd_generic_finalize_section_relocs
SYNOPSIS
- void _bfd_generic_set_reloc
+ void _bfd_generic_finalize_section_relocs
(bfd *abfd,
sec_ptr section,
arelent **relptr,
*/
void
-_bfd_generic_set_reloc (bfd *abfd ATTRIBUTE_UNUSED,
- sec_ptr section,
- arelent **relptr,
- unsigned int count)
+_bfd_generic_finalize_section_relocs (bfd *abfd ATTRIBUTE_UNUSED,
+ sec_ptr section,
+ arelent **relptr,
+ unsigned int count)
{
section->orelocation = relptr;
section->reloc_count = count;
#define som_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
#define som_find_inliner_info _bfd_nosymbols_find_inliner_info
#define som_bfd_link_check_relocs _bfd_generic_link_check_relocs
-#define som_set_reloc _bfd_generic_set_reloc
+#define som_finalize_section_relocs _bfd_generic_finalize_section_relocs
const bfd_target hppa_som_vec =
{
.#define BFD_JUMP_TABLE_RELOCS(NAME) \
. NAME##_get_reloc_upper_bound, \
. NAME##_canonicalize_reloc, \
-. NAME##_set_reloc, \
+. NAME##_finalize_section_relocs, \
. NAME##_bfd_reloc_type_lookup, \
. NAME##_bfd_reloc_name_lookup
.
. long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
. long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **,
. struct bfd_symbol **);
-. void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int);
+. void (*_bfd_finalize_section_relocs) (bfd *, sec_ptr, arelent **,
+. unsigned int);
. {* See documentation on reloc types. *}
. reloc_howto_type *
. (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
/* Install a new set of internal relocs. */
-#define alpha_vms_set_reloc _bfd_generic_set_reloc
+#define alpha_vms_finalize_section_relocs _bfd_generic_finalize_section_relocs
\f
/* This is just copied from ecoff-alpha, needs to be fixed probably. */
}
if (relsize == 0)
- bfd_set_reloc (obfd, osection, NULL, 0);
+ bfd_finalize_section_relocs (obfd, osection, NULL, 0);
else
{
if (isection->orelocation != NULL)
*w_relpp = 0;
}
- bfd_set_reloc (obfd, osection, relcount == 0 ? NULL : relpp, relcount);
+ bfd_finalize_section_relocs (obfd, osection,
+ relcount == 0 ? NULL : relpp, relcount);
}
return true;
}
return false;
}
- bfd_set_reloc (abfd, sec, cwi.relocs, cwi.reloc_count);
+ bfd_finalize_section_relocs (abfd, sec, cwi.relocs, cwi.reloc_count);
offset = 0;
for (d = cwi.dirs.d; d != NULL; d = d->next)
secsym = section_symbol (sec);
/* This is an estimate; we'll plug in the real value using
- SET_SECTION_RELOCS later */
+ FINALIZE_SECTION_RELOCS later */
#ifdef OBJ_XCOFF
if (S_GET_STORAGE_CLASS (secsym) == C_DWARF)
SA_SET_SECT_NRELOC (secsym, nrelocs);
in its aux entry. */
void
-obj_coff_set_section_relocs (asection *sec, arelent **relocs, unsigned int n)
+obj_coff_finalize_section_relocs (asection *sec, arelent **relocs,
+ unsigned int n)
{
symbolS *sect_sym;
- bfd_set_reloc (stdoutput, sec, n ? relocs : NULL, n);
+ bfd_finalize_section_relocs (stdoutput, sec, n ? relocs : NULL, n);
sect_sym = section_symbol (sec);
#ifdef OBJ_XCOFF
if (S_GET_STORAGE_CLASS (sect_sym) == C_DWARF)
#define INIT_STAB_SECTION(stab, str) obj_coff_init_stab_section (stab, str)
/* We need to store the number of relocations in the section aux entry. */
-#define SET_SECTION_RELOCS(sec, relocs, n) \
- obj_coff_set_section_relocs (sec, relocs, n)
-extern void obj_coff_set_section_relocs (asection *, arelent **, unsigned int);
+#define FINALIZE_SECTION_RELOCS(sec, relocs, n) \
+ obj_coff_finalize_section_relocs (sec, relocs, n)
+extern void obj_coff_finalize_section_relocs (asection *, arelent **,
+ unsigned int);
extern int S_SET_DATA_TYPE (symbolS *, int);
extern int S_SET_STORAGE_CLASS (symbolS *, int);
rels[i] = rels[n - i - 1];
rels[n - i - 1] = r;
}
- bfd_set_reloc (stdoutput, sec, rels, n);
+ bfd_finalize_section_relocs (stdoutput, sec, rels, n);
}
/* Relocation rules are different in frame sections. */
#define obj_frob_file_after_relocs obj_mach_o_frob_file_after_relocs
extern void obj_mach_o_frob_file_after_relocs (void);
-#define SET_SECTION_RELOCS(sec, relocs, n) \
+#define FINALIZE_SECTION_RELOCS(sec, relocs, n) \
obj_mach_o_reorder_section_relocs (sec, relocs, n)
extern void obj_mach_o_reorder_section_relocs (asection *, arelent **,
unsigned int);
If you define this macro, GAS will call it after the relocs have been
generated.
-@item SET_SECTION_RELOCS (@var{sec}, @var{relocs}, @var{n})
-@cindex SET_SECTION_RELOCS
-If you define this, it will be called to set relocations for the section
+@item FINALIZE_SECTION_RELOCS (@var{sec}, @var{relocs}, @var{n})
+@cindex FINALIZE_SECTION_RELOCS
+If you define this, it will be called to finalize relocations for the section
@var{sec}. The list of relocations is in @var{relocs}, and the number of
relocations is in @var{n}.
@end table
#include "compress-debug.h"
#include "codeview.h"
-#ifndef SET_SECTION_RELOCS
-#define SET_SECTION_RELOCS(sec, relocs, n) \
- bfd_set_reloc (stdoutput, sec, n ? relocs : NULL, n)
+#ifndef FINALIZE_SECTION_RELOCS
+#define FINALIZE_SECTION_RELOCS(sec, relocs, n) \
+ bfd_finalize_section_relocs (stdoutput, sec, n ? relocs : NULL, n)
#endif
#ifndef TC_FORCE_RELOCATION
}
#endif
- SET_SECTION_RELOCS (sec, relocs, n);
+ FINALIZE_SECTION_RELOCS (sec, relocs, n);
#ifdef DEBUG3
{
}
if (relsize == 0)
- bfd_set_reloc (obfd, osection, NULL, 0);
+ bfd_finalize_section_relocs (obfd, osection, NULL, 0);
else
{
relpp = (arelent **) xmalloc (relsize);
goto loser;
}
- bfd_set_reloc (obfd, osection,
- relcount == 0 ? NULL : relpp, relcount);
+ bfd_finalize_section_relocs (obfd, osection,
+ relcount == 0 ? NULL : relpp, relcount);
if (relcount == 0)
free (relpp);
}