@@ -2828,8 +2828,8 @@ bool bfd_set_private_flags (bfd *abfd, flagword flags);
BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
bfd_byte *bfd_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
- bool, asymbol **);
+ (bfd *, struct bfd_link_info *, const struct bfd_link_order *,
+ bfd_byte *, bool, asymbol **);
bool bfd_record_phdr
(bfd *, unsigned long, bool, flagword, bool, bfd_vma,
@@ -7709,7 +7709,7 @@ typedef struct bfd_target
bfd_byte *
(*_bfd_get_relocated_section_contents) (bfd *,
struct bfd_link_info *,
- struct bfd_link_order *,
+ const struct bfd_link_order *,
bfd_byte *, bool,
struct bfd_symbol **);
@@ -2736,8 +2736,8 @@ FUNCTION
SYNOPSIS
bfd_byte *bfd_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
- bool, asymbol **);
+ (bfd *, struct bfd_link_info *, const struct bfd_link_order *,
+ bfd_byte *, bool, asymbol **);
DESCRIPTION
Read and relocate the indirect link_order section, into DATA
@@ -2748,13 +2748,13 @@ DESCRIPTION
bfd_byte *
bfd_get_relocated_section_contents (bfd *abfd,
struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
+ const struct bfd_link_order *link_order,
bfd_byte *data,
bool relocatable,
asymbol **symbols)
{
bfd *abfd2;
- bfd_byte *(*fn) (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ bfd_byte *(*fn) (bfd *, struct bfd_link_info *, const struct bfd_link_order *,
bfd_byte *, bool, asymbol **);
if (link_order->type == bfd_indirect_link_order)
@@ -771,12 +771,13 @@ write_bit_field (bfd *abfd, asection *sec,
assembler is going to handle this. */
static bfd_byte *
-alpha_ecoff_get_relocated_section_contents (bfd *abfd,
- struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
- bfd_byte *data,
- bool relocatable,
- asymbol **symbols)
+alpha_ecoff_get_relocated_section_contents
+ (bfd *abfd,
+ struct bfd_link_info *link_info,
+ const struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bool relocatable,
+ asymbol **symbols)
{
bfd *input_bfd = link_order->u.indirect.section->owner;
asection *input_section = link_order->u.indirect.section;
@@ -2895,7 +2895,7 @@ sh_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
static bfd_byte *
sh_coff_get_relocated_section_contents (bfd *output_bfd,
struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
+ const struct bfd_link_order *link_order,
bfd_byte *data,
bool relocatable,
asymbol **symbols)
@@ -333,7 +333,7 @@ reloc_processing (arelent *relent,
static bool
extra_case (bfd *in_abfd,
struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
+ const struct bfd_link_order *link_order,
arelent *reloc,
bfd_byte *data,
size_t *src_ptr,
@@ -196,7 +196,7 @@ reloc_processing (arelent *relent,
static bool
extra_case (bfd *in_abfd,
struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
+ const struct bfd_link_order *link_order,
arelent *reloc,
bfd_byte *data,
size_t *src_ptr,
@@ -1505,7 +1505,7 @@ CODE_FRAGMENT
. combined_entry_type *, unsigned int);
.
. bool (*_bfd_coff_reloc16_extra_cases)
-. (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
+. (bfd *, struct bfd_link_info *, const struct bfd_link_order *, arelent *,
. bfd_byte *, size_t *, size_t *);
.
. int (*_bfd_coff_reloc16_estimate)
@@ -5475,13 +5475,14 @@ dummy_reloc16_estimate (bfd *abfd ATTRIBUTE_UNUSED,
#define coff_reloc16_extra_cases dummy_reloc16_extra_cases
static bool
-dummy_reloc16_extra_cases (bfd *abfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
- struct bfd_link_order *link_order ATTRIBUTE_UNUSED,
- arelent *reloc ATTRIBUTE_UNUSED,
- bfd_byte *data ATTRIBUTE_UNUSED,
- size_t *src_ptr ATTRIBUTE_UNUSED,
- size_t *dst_ptr ATTRIBUTE_UNUSED)
+dummy_reloc16_extra_cases
+ (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+ const struct bfd_link_order *link_order ATTRIBUTE_UNUSED,
+ arelent *reloc ATTRIBUTE_UNUSED,
+ bfd_byte *data ATTRIBUTE_UNUSED,
+ size_t *src_ptr ATTRIBUTE_UNUSED,
+ size_t *dst_ptr ATTRIBUTE_UNUSED)
{
return false;
}
@@ -1266,12 +1266,13 @@ mn10200_elf_symbol_address_p (bfd *abfd,
which uses mn10200_elf_relocate_section. */
static bfd_byte *
-mn10200_elf_get_relocated_section_contents (bfd *output_bfd,
- struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
- bfd_byte *data,
- bool relocatable,
- asymbol **symbols)
+mn10200_elf_get_relocated_section_contents
+ (bfd *output_bfd,
+ struct bfd_link_info *link_info,
+ const struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bool relocatable,
+ asymbol **symbols)
{
Elf_Internal_Shdr *symtab_hdr;
asection *input_section = link_order->u.indirect.section;
@@ -4407,12 +4407,13 @@ mn10300_elf_relax_section (bfd *abfd,
which uses mn10300_elf_relocate_section. */
static bfd_byte *
-mn10300_elf_get_relocated_section_contents (bfd *output_bfd,
- struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
- bfd_byte *data,
- bool relocatable,
- asymbol **symbols)
+mn10300_elf_get_relocated_section_contents
+ (bfd *output_bfd,
+ struct bfd_link_info *link_info,
+ const struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bool relocatable,
+ asymbol **symbols)
{
Elf_Internal_Shdr *symtab_hdr;
asection *input_section = link_order->u.indirect.section;
@@ -3084,11 +3084,12 @@ elf32_avr_relax_section (bfd *abfd, asection *sec,
seems to be important. */
static bfd_byte *
-elf32_avr_get_relocated_section_contents (bfd *output_bfd,
- struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
- bfd_byte *data, bool relocatable,
- asymbol **symbols)
+elf32_avr_get_relocated_section_contents
+ (bfd *output_bfd,
+ struct bfd_link_info *link_info,
+ const struct bfd_link_order *link_order,
+ bfd_byte *data, bool relocatable,
+ asymbol **symbols)
{
Elf_Internal_Shdr *symtab_hdr;
asection *input_section = link_order->u.indirect.section;
@@ -1460,12 +1460,13 @@ elf32_cr16_relocate_section (struct bfd_link_info *info,
which uses elf32_cr16_relocate_section. */
static bfd_byte *
-elf32_cr16_get_relocated_section_contents (bfd *output_bfd,
- struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
- bfd_byte *data,
- bool relocatable,
- asymbol **symbols)
+elf32_cr16_get_relocated_section_contents
+ (bfd *output_bfd,
+ struct bfd_link_info *link_info,
+ const struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bool relocatable,
+ asymbol **symbols)
{
Elf_Internal_Shdr *symtab_hdr;
asection *input_section = link_order->u.indirect.section;
@@ -42,7 +42,7 @@ static int elf32_crx_relocate_section
static bool elf32_crx_relax_section
(bfd *, asection *, struct bfd_link_info *, bool *);
static bfd_byte * elf32_crx_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ (bfd *, struct bfd_link_info *, const struct bfd_link_order *,
bfd_byte *, bool, asymbol **);
/* crx_reloc_map array maps BFD relocation enum into a CRGAS relocation type. */
@@ -717,12 +717,13 @@ elf32_crx_relax_delete_bytes (struct bfd_link_info *link_info, bfd *abfd,
which uses elf32_crx_relocate_section. */
static bfd_byte *
-elf32_crx_get_relocated_section_contents (bfd *output_bfd,
- struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
- bfd_byte *data,
- bool relocatable,
- asymbol **symbols)
+elf32_crx_get_relocated_section_contents
+ (bfd *output_bfd,
+ struct bfd_link_info *link_info,
+ const struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bool relocatable,
+ asymbol **symbols)
{
Elf_Internal_Shdr *symtab_hdr;
asection *input_section = link_order->u.indirect.section;
@@ -41,7 +41,7 @@ static bool elf32_h8_relax_delete_bytes
(bfd *, asection *, bfd_vma, int);
static bool elf32_h8_symbol_address_p (bfd *, asection *, bfd_vma);
static bfd_byte *elf32_h8_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ (bfd *, struct bfd_link_info *, const struct bfd_link_order *,
bfd_byte *, bool, asymbol **);
static bfd_reloc_status_type elf32_h8_final_link_relocate
(unsigned long, bfd *, bfd *, asection *,
@@ -1596,12 +1596,13 @@ elf32_h8_symbol_address_p (bfd *abfd, asection *sec, bfd_vma addr)
which uses elf32_h8_relocate_section. */
static bfd_byte *
-elf32_h8_get_relocated_section_contents (bfd *output_bfd,
- struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
- bfd_byte *data,
- bool relocatable,
- asymbol **symbols)
+elf32_h8_get_relocated_section_contents
+ (bfd *output_bfd,
+ struct bfd_link_info *link_info,
+ const struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bool relocatable,
+ asymbol **symbols)
{
Elf_Internal_Shdr *symtab_hdr;
asection *input_section = link_order->u.indirect.section;
@@ -13154,12 +13154,13 @@ nds32_fag_remove_unused_fpbase (bfd *abfd, asection *sec,
The variety only modify function call for reading in the section. */
static bfd_byte *
-nds32_elf_get_relocated_section_contents (bfd *abfd,
- struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
- bfd_byte *data,
- bool relocatable,
- asymbol **symbols)
+nds32_elf_get_relocated_section_contents
+ (bfd *abfd,
+ struct bfd_link_info *link_info,
+ const struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bool relocatable,
+ asymbol **symbols)
{
bfd *input_bfd = link_order->u.indirect.section->owner;
asection *input_section = link_order->u.indirect.section;
@@ -5062,7 +5062,7 @@ sh_elf_relocate_section (struct bfd_link_info *info,
static bfd_byte *
sh_elf_get_relocated_section_contents (bfd *output_bfd,
struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
+ const struct bfd_link_order *link_order,
bfd_byte *data,
bool relocatable,
asymbol **symbols)
@@ -13503,7 +13503,7 @@ bfd_byte *
_bfd_elf_mips_get_relocated_section_contents
(bfd *abfd,
struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
+ const struct bfd_link_order *link_order,
bfd_byte *data,
bool relocatable,
asymbol **symbols)
@@ -116,7 +116,7 @@ extern bool _bfd_mips_elf_find_inliner_info
extern bool _bfd_mips_elf_set_section_contents
(bfd *, asection *, const void *, file_ptr, bfd_size_type) ATTRIBUTE_HIDDEN;
extern bfd_byte *_bfd_elf_mips_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ (bfd *, struct bfd_link_info *, const struct bfd_link_order *,
bfd_byte *, bool, asymbol **) ATTRIBUTE_HIDDEN;
extern bool _bfd_mips_elf_relax_section
(bfd *abfd, asection *sec, struct bfd_link_info *link_info,
@@ -495,7 +495,7 @@ extern bool _bfd_generic_set_section_contents
extern int _bfd_nolink_sizeof_headers
(bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN;
extern bfd_byte *_bfd_nolink_bfd_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ (bfd *, struct bfd_link_info *, const struct bfd_link_order *,
bfd_byte *, bool, asymbol **) ATTRIBUTE_HIDDEN;
extern bool _bfd_nolink_bfd_relax_section
(bfd *, asection *, struct bfd_link_info *, bool *) ATTRIBUTE_HIDDEN;
@@ -675,17 +675,17 @@ extern bool _bfd_generic_section_already_linked
/* Generic reloc_link_order processing routine. */
extern bool _bfd_generic_reloc_link_order
- (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *)
+ (bfd *, struct bfd_link_info *, asection *, const struct bfd_link_order *)
ATTRIBUTE_HIDDEN;
/* Default link order processing routine. */
extern bool _bfd_default_link_order
- (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *)
+ (bfd *, struct bfd_link_info *, asection *, const struct bfd_link_order *)
ATTRIBUTE_HIDDEN;
/* Count the number of reloc entries in a link order list. */
extern unsigned int _bfd_count_link_order_relocs
- (struct bfd_link_order *) ATTRIBUTE_HIDDEN;
+ (const struct bfd_link_order *) ATTRIBUTE_HIDDEN;
/* Final link relocation routine. */
extern bfd_reloc_status_type _bfd_final_link_relocate
@@ -501,7 +501,7 @@ extern bool _bfd_generic_set_section_contents
extern int _bfd_nolink_sizeof_headers
(bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN;
extern bfd_byte *_bfd_nolink_bfd_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ (bfd *, struct bfd_link_info *, const struct bfd_link_order *,
bfd_byte *, bool, asymbol **) ATTRIBUTE_HIDDEN;
extern bool _bfd_nolink_bfd_relax_section
(bfd *, asection *, struct bfd_link_info *, bool *) ATTRIBUTE_HIDDEN;
@@ -681,17 +681,17 @@ extern bool _bfd_generic_section_already_linked
/* Generic reloc_link_order processing routine. */
extern bool _bfd_generic_reloc_link_order
- (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *)
+ (bfd *, struct bfd_link_info *, asection *, const struct bfd_link_order *)
ATTRIBUTE_HIDDEN;
/* Default link order processing routine. */
extern bool _bfd_default_link_order
- (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *)
+ (bfd *, struct bfd_link_info *, asection *, const struct bfd_link_order *)
ATTRIBUTE_HIDDEN;
/* Count the number of reloc entries in a link order list. */
extern unsigned int _bfd_count_link_order_relocs
- (struct bfd_link_order *) ATTRIBUTE_HIDDEN;
+ (const struct bfd_link_order *) ATTRIBUTE_HIDDEN;
/* Final link relocation routine. */
extern bfd_reloc_status_type _bfd_final_link_relocate
@@ -3475,7 +3475,7 @@ bool bfd_generic_lookup_section_flags
bfd_byte *bfd_generic_get_relocated_section_contents
(bfd *abfd,
struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
+ const struct bfd_link_order *link_order,
bfd_byte *data,
bool relocatable,
asymbol **symbols) ATTRIBUTE_HIDDEN;
@@ -418,7 +418,7 @@ extern int coff_sizeof_headers
extern bool bfd_coff_reloc16_relax_section
(bfd *, asection *, struct bfd_link_info *, bool *) ATTRIBUTE_HIDDEN;
extern bfd_byte *bfd_coff_reloc16_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ (bfd *, struct bfd_link_info *, const struct bfd_link_order *,
bfd_byte *, bool, asymbol **) ATTRIBUTE_HIDDEN;
extern bfd_vma bfd_coff_reloc16_get_value
(arelent *, struct bfd_link_info *, asection *) ATTRIBUTE_HIDDEN;
@@ -422,7 +422,7 @@ extern int coff_sizeof_headers
extern bool bfd_coff_reloc16_relax_section
(bfd *, asection *, struct bfd_link_info *, bool *) ATTRIBUTE_HIDDEN;
extern bfd_byte *bfd_coff_reloc16_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ (bfd *, struct bfd_link_info *, const struct bfd_link_order *,
bfd_byte *, bool, asymbol **) ATTRIBUTE_HIDDEN;
extern bfd_vma bfd_coff_reloc16_get_value
(arelent *, struct bfd_link_info *, asection *) ATTRIBUTE_HIDDEN;
@@ -846,7 +846,7 @@ typedef struct
combined_entry_type *, unsigned int);
bool (*_bfd_coff_reloc16_extra_cases)
- (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
+ (bfd *, struct bfd_link_info *, const struct bfd_link_order *, arelent *,
bfd_byte *, size_t *, size_t *);
int (*_bfd_coff_reloc16_estimate)
@@ -424,9 +424,9 @@ static bool generic_link_add_symbol_list
static bool generic_add_output_symbol
(bfd *, size_t *psymalloc, asymbol *);
static bool default_data_link_order
- (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *);
+ (bfd *, struct bfd_link_info *, asection *, const struct bfd_link_order *);
static bool default_indirect_link_order
- (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *,
+ (bfd *, struct bfd_link_info *, asection *, const struct bfd_link_order *,
bool);
static bool _bfd_generic_link_output_symbols
(bfd *, bfd *, struct bfd_link_info *, size_t *);
@@ -1924,7 +1924,7 @@ _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info)
{
bfd *sub;
asection *o;
- struct bfd_link_order *p;
+ const struct bfd_link_order *p;
size_t outsymalloc;
struct generic_write_global_symbol_info wginfo;
@@ -2439,7 +2439,7 @@ bool
_bfd_generic_reloc_link_order (bfd *abfd,
struct bfd_link_info *info,
asection *sec,
- struct bfd_link_order *link_order)
+ const struct bfd_link_order *link_order)
{
arelent *r;
@@ -2564,7 +2564,7 @@ bool
_bfd_default_link_order (bfd *abfd,
struct bfd_link_info *info,
asection *sec,
- struct bfd_link_order *link_order)
+ const struct bfd_link_order *link_order)
{
switch (link_order->type)
{
@@ -2587,7 +2587,7 @@ static bool
default_data_link_order (bfd *abfd,
struct bfd_link_info *info,
asection *sec,
- struct bfd_link_order *link_order)
+ const struct bfd_link_order *link_order)
{
bfd_size_type size;
size_t fill_size;
@@ -2648,7 +2648,7 @@ static bool
default_indirect_link_order (bfd *output_bfd,
struct bfd_link_info *info,
asection *output_section,
- struct bfd_link_order *link_order,
+ const struct bfd_link_order *link_order,
bool generic_linker)
{
asection *input_section;
@@ -2796,10 +2796,10 @@ default_indirect_link_order (bfd *output_bfd,
list. */
unsigned int
-_bfd_count_link_order_relocs (struct bfd_link_order *link_order)
+_bfd_count_link_order_relocs (const struct bfd_link_order *link_order)
{
- register unsigned int c;
- register struct bfd_link_order *l;
+ unsigned int c;
+ const struct bfd_link_order *l;
c = 0;
for (l = link_order; l != NULL; l = l->next)
@@ -3506,7 +3506,7 @@ bfd_byte *
_bfd_nolink_bfd_get_relocated_section_contents
(bfd *abfd,
struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
- struct bfd_link_order *link_order ATTRIBUTE_UNUSED,
+ const struct bfd_link_order *link_order ATTRIBUTE_UNUSED,
bfd_byte *data ATTRIBUTE_UNUSED,
bool relocatable ATTRIBUTE_UNUSED,
asymbol **symbols ATTRIBUTE_UNUSED)
@@ -8049,7 +8049,7 @@ SYNOPSIS
bfd_byte *bfd_generic_get_relocated_section_contents
(bfd *abfd,
struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
+ const struct bfd_link_order *link_order,
bfd_byte *data,
bool relocatable,
asymbol **symbols);
@@ -8060,12 +8060,13 @@ DESCRIPTION
*/
bfd_byte *
-bfd_generic_get_relocated_section_contents (bfd *abfd,
- struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
- bfd_byte *data,
- bool relocatable,
- asymbol **symbols)
+bfd_generic_get_relocated_section_contents
+ (bfd *abfd,
+ struct bfd_link_info *link_info,
+ const struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bool relocatable,
+ asymbol **symbols)
{
bfd *input_bfd = link_order->u.indirect.section->owner;
asection *input_section = link_order->u.indirect.section;
@@ -243,7 +243,7 @@ bfd_byte *
bfd_coff_reloc16_get_relocated_section_contents
(bfd *in_abfd,
struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
+ const struct bfd_link_order *link_order,
bfd_byte *data,
bool relocatable,
asymbol **symbols)
@@ -482,7 +482,7 @@ BFD_JUMP_TABLE macros.
. bfd_byte *
. (*_bfd_get_relocated_section_contents) (bfd *,
. struct bfd_link_info *,
-. struct bfd_link_order *,
+. const struct bfd_link_order *,
. bfd_byte *, bool,
. struct bfd_symbol **);
.