aboutsummaryrefslogtreecommitdiff
path: root/bfd/bout.c
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1992-04-29 19:40:35 +0000
committerSteve Chamberlain <sac@cygnus>1992-04-29 19:40:35 +0000
commit5022aea5df73e56d0d52338024e364a185d96bfc (patch)
tree81183fa181b6177acd466ce692bcc5fa63289af8 /bfd/bout.c
parent836e9ea06f7f5a2903cced799cfa2832e3ad8f38 (diff)
downloadgdb-5022aea5df73e56d0d52338024e364a185d96bfc.zip
gdb-5022aea5df73e56d0d52338024e364a185d96bfc.tar.gz
gdb-5022aea5df73e56d0d52338024e364a185d96bfc.tar.bz2
* aoutx.h (aout_swap_ext_reloc_out, aout_swap_std_reloc_out)
bout.c (b_out_squirt_out_relocs): treat abs sumbols the right way. * reloc.c (bfd_perform-relocation): don't relocate refs to absolute symbols if doing a partial link.
Diffstat (limited to 'bfd/bout.c')
-rw-r--r--bfd/bout.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/bfd/bout.c b/bfd/bout.c
index 58df3d1..867f2fd 100644
--- a/bfd/bout.c
+++ b/bfd/bout.c
@@ -269,16 +269,14 @@ asymbol *symbol_in;
PTR data;
asection *input_section;
{
- int word = bfd_get_32(abfd, data+reloc_entry->address);
+ int word = bfd_get_32(abfd, (bfd_byte *)data + reloc_entry->address);
aout_symbol_type *symbol = aout_symbol(symbol_in);
if (IS_OTHER(symbol->other)) {
/* Call to a system procedure - replace code with system
- procedure number
- */
-
+ procedure number */
word = CALLS | (symbol->other - 1);
- bfd_put_32(abfd, word, data+reloc_entry->address); /* replace */
+ bfd_put_32(abfd, word, (bfd_byte *)data + reloc_entry->address); /* rplc */
return bfd_reloc_ok;
}
@@ -298,7 +296,7 @@ asection *input_section;
( input_section->output_section->vma + input_section->output_offset))
& BAL_MASK);
- bfd_put_32(abfd, word, data+reloc_entry->address); /* replace */
+ bfd_put_32(abfd, word, (bfd_byte *) data + reloc_entry->address); /* rplc */
return bfd_reloc_ok;
}
return bfd_reloc_continue;
@@ -438,10 +436,10 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
break;
case N_ABS:
case N_ABS | N_EXT:
- bfd_assert(0);
+ BFD_ASSERT(0);
break;
default:
- bfd_assert(0);
+ BFD_ASSERT(0);
break;
}
@@ -511,7 +509,6 @@ else
{
arelent *g = *generic;
unsigned char *raw = (unsigned char *)natptr;
- unsigned int symnum;
asymbol *sym = *(g->sym_ptr_ptr);
asection *output_section = sym->section->output_section;
@@ -532,14 +529,9 @@ else
else {
raw[7] = len_2;
}
- if (output_section == &bfd_abs_section)
- {
- r_extern = 0;
- r_idx = N_ABS;
- r_addend += sym->value;
- }
- else if (output_section == &bfd_com_section
- || output_section == &bfd_und_section)
+ if (output_section == &bfd_com_section
+ output_section == &bfd_abs_section
+ || output_section == &bfd_und_section)
{
/* Fill in symbol */
r_extern = 1;