[gas]
2010-09-09 Gunther Nikl <gnikl@users.sourceforge.net>
* gas/config/tc-m68k.c (tc_gen_reloc): Handle references to defined
weak symbols first if generating an a.out object.
2009-10-013 Vincent Riviere <vincent.riviere@freesbee.fr>
PR gas/3041
* config/tc-m68k.c (tc_gen_reloc): Fix addend for relocations
located in data section an referencing a weak symbol.
2007-05-15 Vincent Riviere <vincent.riviere@freesbee.fr>
PR gas/3041
* config/tc-m68k.c (relaxable_symbol): Make sure that the correct
addend is stored for relocs against weak symbols.
(md_apply_fix): So not loose track of addend for relocs against
weak symbols.
2007-05-03 Vincent Riviere <vincent.riviere@freesbee.fr>
Nick Clifton <nickc@redhat.com>
PR gas/3041
* config/tc-m68k.c (relaxable_symbol): Do not relax weak symbols.
(tc_gen_reloc): Adjust the addend of relocs against weak symbols.
(md_apply_fix): Put zero values into the frags referencing weak
symbols.
[bfd]
2007-05-03 Vincent Riviere <vincent.riviere@freesbee.fr>
Nick Clifton <nickc@redhat.com>
PR gas/3041
* aoutx.h (swap_std_reloc_out): Treat relocs against weak symbols
in the same way as relocs against external symbols.
Weak fixes for the non-bfd assembler:
* gas/config/tc-m68k.h (S_IS_WEAK): Define for !BFD_ASSEMBLER.
* gas/config/tc-m68k.c (tc_aout_fix_to_chars): Check weak symbol state.
* gas/write.c (fixup_segment): Treat a weak symbol as undefined.
* gas/config/aout_gnu.h (BYTES_IN_WORD): New define.
(struct exec_bytes): Use it.
(EXEC_BYTES_SIZE): Likewise.
* gas/config/obj-aout.c (CROSS_COMPILE): Convert to a compile time constant
of 0 or 1.
(obj_header_append): Use "struct exec_bytes" when cross compiling.
(obj_symbol_to_chars): Output symbol data with a local "struct nlist_bytes"
utilizing BYTES_IN_WORD.
(obj_crawl_symbol_chain): Ignore symbols without a valid name like BFD.
(obj_emit_strings): Use BYTES_IN_WORD to output string table size when
cross compiling.
Suppress symbols without a valid name like BFD.
* gas/write.c (write_object_file): Replace "sizeof (string_byte_count)" with
BYTES_IN_WORD.
"reloc_count". Better error message for a relocation against an omitted
section. Replace BFD_FAIL with "bfd_set_error/return FALSE" since linking
cannot succeed. Prevent a possible endless loop when writing relocations.
Fail link operation if not all relocations could be written.
unused values.
* ld/emulparams/amiga_bss.sh (PAGE_SIZE, NONPAGED_TEXT_START_ADDR): Likewise.
* ld/scripttempl/amiga.sc (___machtype): Move out of .text section and drop
ABSOLUTE.
(___text_size): Move out of .text section and replace ABSOLUTE with SIZEOF
to compute its value.
(___data_size): Move out of .data section and replace ABSOLUTE with SIZEOF
to compute its value.
(___bss_size): Move out of .bss section and replace ABSOLUTE with SIZEOF
to compute its value.
* ld/scripttempl/amiga_bss.sc (___machtype): Move out of .text section and
drop ABSOLUTE.
(___text_size): Move out of .text section and replace ABSOLUTE with SIZEOF
to compute its value.
(___data_size): Move out of .data section and replace ABSOLUTE with SIZEOF
on .data and .bss to compute its value.
(___bss_size): Move out of .data section and drop useless ABSOLUTE.
(__edata): Move to its expected place at the end of .data section.
(__bss_start): Move to its expected place at the start of .bss section.
to really catch an amiga link when computing maximal symbol alignment.
(_bfd_generic_link_add_one_symbol): Likewise. Add the same kludge to case
'BIG' as used for case 'COM'.
(link_add_symbols): New wrapper function to handle symbols the same way
as the amiga backend by using a generic linker function when doing a
final link. This makes --wrap option of ld work.
requested in that mask either signed or unsigned.
(amiga_perform_reloc): Test final relocation always signed. Request reading
the addend of baserel relocations as unsigned value. Note that this is not
always correct but should only be done for symbols that came from the same
unit as the relocation.
(aout_perform_reloc): Likewise.
Change p from "signed char" to "bfd_byte" to avoid warnings. Always read
addends as a signed value (this is not always correct and will be fixed
with a later change).
(amiga_perform_reloc): Adapt arguments to new world order.
(aout_perform_reloc): Likewise.
(aout_perform_reloc): Do not adjust relocation with r->address, but use the
value the assembler left at *r->address. This fixes the relocation values
for mc68020+ instructions with an extension word and obsoletes the kludge
for 8bit pcrel relocations.
Reduce differences to aout_perform_reloc (more verbose return debug).
(aout_perform_reloc): Use a single debug statement to print reloc type.
Reduce differences to amiga_perform_reloc (enhanced/added comments).
* amigaos.c (amiga_add_reloc): Do not cache target_hunk.
(amiga_get_reloc_upper_bound): Remove format check since this is already
done in bfd_get_reloc_upper_bound before going into the bfd.
* amigaos.c (amiga_slurp_symbol_table): Remember reference count for
HUNK_EXT entries when applicable.
(amiga_print_symbol): Replace a.out style information with more relevant
amiga specific data.
(amiga_read_ar_hdr): Strip path part from read hunk name. If object file does
not have a valid hunk name, fake an unique object name to match expectations
of eg. the GCC build machinery about extracted object names from a link lib.
symbol names in write_name.
(write_name): Fix 64bit bug. The old code used a structure with an embedded
long and assumed its size as 4 bytes. The new code writes all data with
single writes. Now the AmigaOS backend should really be 64bit clean.
The length of a symbol name is no longer restricted to MAX_NAME_SIZE
characters. The old behaviour can be re-enabled by setting it to a non-zero
value which will then be used as length limit.
(amiga_archive_p): Do not preset a BFD error condition because it might be
clobbered by later code. Order initialization of amiga_ardata.
(amiga_generic_stat_arch_elt): Use more sane 0644 as st_mode. Use the more
correct 1.1.1978 as st_mtime. Set st_size using arelt_size.