diff options
author | John Gilmore <gnu@cygnus> | 1992-10-15 09:44:59 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1992-10-15 09:44:59 +0000 |
commit | 5f9ca9603825b26fca8625e98e34e75aa599f26f (patch) | |
tree | d5b5adf2cecc2c3c0bb325af699c3f1bb983ce36 /bfd/bout.c | |
parent | f8e01940189dfd4a06f8818d4442ce6d39fd9539 (diff) | |
download | gdb-5f9ca9603825b26fca8625e98e34e75aa599f26f.zip gdb-5f9ca9603825b26fca8625e98e34e75aa599f26f.tar.gz gdb-5f9ca9603825b26fca8625e98e34e75aa599f26f.tar.bz2 |
* aout-adobe.c, aoutf1.h, aoutx.h, bout.c coff-m68k.c, coff-z8k.c,
coffcode.h, elf.c, libaout.h, libbfd.h, srec.c: Lint.
Diffstat (limited to 'bfd/bout.c')
-rw-r--r-- | bfd/bout.c | 20 |
1 files changed, 5 insertions, 15 deletions
@@ -888,6 +888,7 @@ DEFUN(get_value,(reloc, seclet), { bfd_vma value; asymbol *symbol = *(reloc->sym_ptr_ptr); + /* A symbol holds a pointer to a section, and an offset from the base of the section. To relocate, we find where the section will live in the output and add that in */ @@ -904,8 +905,7 @@ DEFUN(get_value,(reloc, seclet), symbol->section->output_offset + symbol->section->output_section->vma; } - - + /* Add the value contained in the relocation */ value += (short)((reloc->addend) & 0xffff); @@ -962,7 +962,6 @@ DEFUN(abs32code,(input_section, symbols, r, shrink), if (-1<<23 < (long)gap && (long)gap < 1<<23 ) { - /* Change the reloc type from 32bitcode possible 24, to 24bit possible 32 */ @@ -973,8 +972,6 @@ DEFUN(abs32code,(input_section, symbols, r, shrink), /* This will be four bytes smaller in the long run */ shrink += 4 ; perform_slip(symbols, 4, input_section, r->address-shrink +4); - - } return shrink; } @@ -986,20 +983,17 @@ DEFUN(aligncode,(input_section, symbols, r, shrink), arelent *r AND unsigned int shrink) { - bfd_vma value = get_value(r,0); - bfd_vma dot = input_section->output_section->vma + input_section->output_offset + r->address; bfd_vma gap; bfd_vma old_end; bfd_vma new_end; - int shrink_delta; -int size = r->howto->size; + int shrink_delta; + int size = r->howto->size; + /* Reduce the size of the alignment so that it's still aligned but smaller - the current size is already the same size as or bigger than the alignment required. */ - - /* calculate the first byte following the padding before we optimize */ old_end = ((dot + size ) & ~size) + size+1; /* work out where the new end will be - remember that we're smaller @@ -1013,7 +1007,6 @@ int size = r->howto->size; if (shrink_delta) { - /* Change the reloc so that it knows how far to align to */ r->howto = howto_done_align_table + (r->howto - howto_align_table); @@ -1022,9 +1015,6 @@ int size = r->howto->size; r->addend = old_end ; /* This will be N bytes smaller in the long run, adjust all the symbols */ - - - perform_slip(symbols, shrink_delta, input_section, r->address - shrink ); shrink += shrink_delta; } |