mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 14:59:31 +08:00
* bfd-in.h: bump version to 1.96
Major change; changed calling convention for bfd_get_relocated_section_contents so that caller allocates memory for section data. * coffcode.h (bfd_coff_get_relocated_section_contents), reloc.c, seclet.c, targets.c, bfd.c: reflect new convention. * coffcode.h (styp_to_sec_flags): if styp_flags is not a special case, then use reasonable default values for SEC_* flags.
This commit is contained in:
@ -1,3 +1,14 @@
|
|||||||
|
Mon May 4 11:49:15 1992 Steve Chamberlain (sac@thepub.cygnus.com)
|
||||||
|
|
||||||
|
* bfd-in.h: bump version to 1.96
|
||||||
|
Major change; changed calling convention for
|
||||||
|
bfd_get_relocated_section_contents so that caller allocates
|
||||||
|
memory for section data.
|
||||||
|
* coffcode.h (bfd_coff_get_relocated_section_contents), reloc.c,
|
||||||
|
seclet.c, targets.c, bfd.c: reflect new convention.
|
||||||
|
* coffcode.h (styp_to_sec_flags): if styp_flags is not a special
|
||||||
|
case, then use reasonable default values for SEC_* flags.
|
||||||
|
|
||||||
Fri May 1 12:58:34 1992 Steve Chamberlain (sac@thepub.cygnus.com)
|
Fri May 1 12:58:34 1992 Steve Chamberlain (sac@thepub.cygnus.com)
|
||||||
|
|
||||||
* coffcode.h (coff_write_object_contents): use RELSZ to work out
|
* coffcode.h (coff_write_object_contents): use RELSZ to work out
|
||||||
|
@ -52,7 +52,7 @@ here. */
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BFD_VERSION "0.18"
|
#define BFD_VERSION "1.96"
|
||||||
|
|
||||||
/* forward declaration */
|
/* forward declaration */
|
||||||
typedef struct _bfd bfd;
|
typedef struct _bfd bfd;
|
||||||
@ -226,7 +226,7 @@ typedef struct bfd_error_vector {
|
|||||||
|
|
||||||
} bfd_error_vector_type;
|
} bfd_error_vector_type;
|
||||||
|
|
||||||
PROTO (char *, bfd_errmsg, ());
|
PROTO (char *, bfd_errmsg, (bfd_ec error_tag));
|
||||||
PROTO (void, bfd_perror, (CONST char *message));
|
PROTO (void, bfd_perror, (CONST char *message));
|
||||||
|
|
||||||
|
|
||||||
@ -235,7 +235,7 @@ typedef enum bfd_print_symbol
|
|||||||
bfd_print_symbol_name,
|
bfd_print_symbol_name,
|
||||||
bfd_print_symbol_more,
|
bfd_print_symbol_more,
|
||||||
bfd_print_symbol_all,
|
bfd_print_symbol_all,
|
||||||
bfd_print_symbol_nm, /* Pretty format suitable for nm program. */
|
bfd_print_symbol_nm /* Pretty format suitable for nm program. */
|
||||||
} bfd_print_symbol_type;
|
} bfd_print_symbol_type;
|
||||||
|
|
||||||
|
|
||||||
@ -281,7 +281,8 @@ CAT(NAME,_sizeof_headers),\
|
|||||||
CAT(NAME,_bfd_debug_info_start),\
|
CAT(NAME,_bfd_debug_info_start),\
|
||||||
CAT(NAME,_bfd_debug_info_end),\
|
CAT(NAME,_bfd_debug_info_end),\
|
||||||
CAT(NAME,_bfd_debug_info_accumulate),\
|
CAT(NAME,_bfd_debug_info_accumulate),\
|
||||||
CAT(NAME,_bfd_get_relocated_section_contents)
|
CAT(NAME,_bfd_get_relocated_section_contents),\
|
||||||
|
CAT(NAME,_bfd_relax_section)
|
||||||
|
|
||||||
#define COFF_SWAP_TABLE \
|
#define COFF_SWAP_TABLE \
|
||||||
coff_swap_aux_in, coff_swap_sym_in, coff_swap_lineno_in, \
|
coff_swap_aux_in, coff_swap_sym_in, coff_swap_lineno_in, \
|
||||||
|
@ -61,12 +61,13 @@ asymbol *symbol;
|
|||||||
/* this function is in charge of performing all the 29k relocations */
|
/* this function is in charge of performing all the 29k relocations */
|
||||||
|
|
||||||
static bfd_reloc_status_type
|
static bfd_reloc_status_type
|
||||||
DEFUN(a29k_reloc,(abfd, reloc_entry, symbol_in, data, input_section),
|
DEFUN(a29k_reloc,(abfd, reloc_entry, symbol_in, data, input_section, output_bfd),
|
||||||
bfd *abfd AND
|
bfd *abfd AND
|
||||||
arelent *reloc_entry AND
|
arelent *reloc_entry AND
|
||||||
asymbol *symbol_in AND
|
asymbol *symbol_in AND
|
||||||
PTR data AND
|
PTR data AND
|
||||||
asection *input_section)
|
asection *input_section AND
|
||||||
|
bfd *output_bfd)
|
||||||
{
|
{
|
||||||
/* the consth relocation comes in two parts, we have to remember
|
/* the consth relocation comes in two parts, we have to remember
|
||||||
the state between calls, in these variables */
|
the state between calls, in these variables */
|
||||||
@ -79,12 +80,18 @@ DEFUN(a29k_reloc,(abfd, reloc_entry, symbol_in, data, input_section),
|
|||||||
unsigned short r_type;
|
unsigned short r_type;
|
||||||
long signed_value;
|
long signed_value;
|
||||||
|
|
||||||
unsigned long addr = reloc_entry->address + input_section->vma;
|
unsigned long addr = reloc_entry->address ; /*+ input_section->vma*/
|
||||||
bfd_byte *hit_data =addr + (bfd_byte *)(data);
|
bfd_byte *hit_data =addr + (bfd_byte *)(data);
|
||||||
|
|
||||||
r_type = reloc_entry->howto->type;
|
r_type = reloc_entry->howto->type;
|
||||||
|
|
||||||
/* FIXME: Do we need to check for partial linking here */
|
if (output_bfd) {
|
||||||
|
/* Partial linking - do nothing */
|
||||||
|
reloc_entry->address += input_section->output_offset;
|
||||||
|
return bfd_reloc_ok;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (symbol_in && (symbol_in->section == &bfd_und_section))
|
if (symbol_in && (symbol_in->section == &bfd_und_section))
|
||||||
{
|
{
|
||||||
/* Keep the state machine happy in case we're called again */
|
/* Keep the state machine happy in case we're called again */
|
||||||
@ -191,7 +198,7 @@ DEFUN(a29k_reloc,(abfd, reloc_entry, symbol_in, data, input_section),
|
|||||||
return(bfd_reloc_overflow);
|
return(bfd_reloc_overflow);
|
||||||
}
|
}
|
||||||
|
|
||||||
bfd_put_16(abfd, insn, hit_data);
|
bfd_put_16(abfd, insn, hit_data);
|
||||||
break;
|
break;
|
||||||
case R_WORD:
|
case R_WORD:
|
||||||
insn = bfd_get_32(abfd, hit_data);
|
insn = bfd_get_32(abfd, hit_data);
|
||||||
|
@ -57,10 +57,11 @@ DEFUN(rel,(abfd, seclet, output_section),
|
|||||||
bfd_seclet_type *seclet AND
|
bfd_seclet_type *seclet AND
|
||||||
asection *output_section)
|
asection *output_section)
|
||||||
{
|
{
|
||||||
bfd_byte *data;
|
|
||||||
if (output_section->flags & SEC_HAS_CONTENTS )
|
if (output_section->flags & SEC_HAS_CONTENTS )
|
||||||
{
|
{
|
||||||
data = bfd_get_relocated_section_contents(abfd, seclet);
|
bfd_byte *data = alloca(seclet->size);
|
||||||
|
data = bfd_get_relocated_section_contents(abfd, seclet, data);
|
||||||
if(bfd_set_section_contents(abfd,
|
if(bfd_set_section_contents(abfd,
|
||||||
output_section,
|
output_section,
|
||||||
data,
|
data,
|
||||||
@ -69,6 +70,7 @@ DEFUN(rel,(abfd, seclet, output_section),
|
|||||||
{
|
{
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user