Jeff Law
af2903b4f0
Update some comments to reflect current reality.
1997-02-24 18:13:23 +00:00
Jeff Law
7b951eed4d
* elf32-mn10200.c (mn10200_elf_final_link_relocate): Simplify
...
somewhat.
(mn10200_elf_relax_section): Correctly compute a symbol's value
when the symbol is local, but not in the same section as we are
relaxing. Implement abs24 -> abs16, imm24 -> imm16 and d24 -> d16
relaxing.
Another 1.3% size reduction for hello world. Only relaxing left todo is
imm16 -> imm8 and d16 -> d8 where applicable.
1997-02-21 23:19:34 +00:00
David Edelsohn
77dd1a25d8
* elf32-m32r.c: Rewrite to use ELF backend linker.
...
Store lower 16 bits of addend in R_M32R_HI16_[SU]LO insns.
Add small data area support (R_M32R_SDA16).
* reloc.c: Document BFD_RELOC_M32R_SDA16.
* bfd-in2.h,libbfd.h: Regenerated.
1997-02-21 22:09:40 +00:00
Jeff Law
7c49f021ca
Twiddle some comments to more accurately reflect reality.
1997-02-21 07:21:32 +00:00
Jeff Law
c17db7cfb4
Remove debugging printf.
1997-02-21 07:18:35 +00:00
Jeff Law
fd39566111
* elf32-mn10200.c (mn10200_elf_relax_section): New function.
...
(mn10200_elf_relax_delete_bytes): Likewise.
(mn10200_elf_symbol_address_p): Likewise.
(mn10200_elf_get_relocated_section_contents): Likewise.
(bfd_elf32_bfd_relax_section): Define.
(bfd_elf32_bfd_get_relocated_section_contents): Likewise.
First cut at relaxing linker for the mn10200:
jsr:24 -> jsr:16
jmp:24 -> jmp:16
jmp:16 -> bra:8
bCC .+4;bra:8 -> bCC':8
Reduces code size by about 2.5% for hello world.
1997-02-21 07:14:30 +00:00
Ian Lance Taylor
db986c6049
fix with make headers
1997-02-20 22:49:40 +00:00
Jeff Law
64af667971
* elf32-mn10200.c (mn10200_elf_final_link_relocate): New function.
...
(mn10200_elf_relocate_section): Likewise.
(elf_backend_relocate_section): Define.
New style linker for the mn10200.
1997-02-20 20:54:28 +00:00
Michael Meissner
c6c7035cfb
Since d10v is public now, remove all sanitization statements
1997-02-20 16:05:18 +00:00
Martin Hunt
fd8d7c31c0
Tue Feb 18 17:22:59 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
...
* Makefile.in, archures.c, config.bfd, configure.in, elf.c,
reloc.c, targets.c: New target, elf-*-D30V.
* bfd-in2.h, configure, libbfd.h: Rebuilt.
* cpu-d30v.c, elf32-d30v.c: New files.
1997-02-19 01:29:29 +00:00
Fred Fish
92a956e87d
* reloc.c (struct reloc_howto_struct): Fix typo in comment.
...
* bfd-in2.h: Regenerated.
start-sanitize-tic80
* coff-tic80.c (RTYPE2HOWTO): Replace abort with real function.
(rtype2howto): Add function.
(tic80_howto_table): Add.
end-sanitize-tic80
1997-02-18 23:01:02 +00:00
Jeff Law
8d1ba96ecc
* elf32-v850.c (v850_elf_relocate_section): Make sure r_symndx
...
is initialized before it is used.
Something Doug noticed.
1997-02-18 17:06:20 +00:00
Ian Lance Taylor
8ceca98345
* hp300hpux.c (convert_sym_type): Don't convert a secondary common
...
symbol into a weak undefined symbol; leave it as a common symbol.
1997-02-17 16:29:21 +00:00
Ian Lance Taylor
54626f1aa4
* elflink.h (elf_link_add_object_symbols): Don't issue a warning
...
about a symbol defined in a dynamic object if it has already been
defined in a regular object.
1997-02-15 00:12:47 +00:00
Ian Lance Taylor
8696b2db70
Thu Feb 13 20:53:22 1997 Klaus Kaempf (kkaempf@progis.de)
...
* reloc.c (BFD_RELOC_ALPHA_CODEADDR): New relocation for
openVMS/Alpha.
* evax.h (ALPHA_R_CODEADDR): New relocation.
* evax-alpha.c (ALPHA_R_CODEADDR): 64 bit procedure relocation for
openVMS/Alpha.
* evax-etir.c (ALPHA_R_CODEADDR): Output object code for this
relocation.
* bfd-in2.h, libbfd.h: Rebuild.
Restrict symbol length to 64 bytes, case preserving:
* evax-emh.c (_bfd_evax_write_emh): Remove case hacking.
* evax-misc.c (_bfd_evax_case_hack_symbol): Remove.
(_bfd_evax_length_hash_symbol): Added.
* evax-etir.c (_bfd_evax_write_etir): Call
_bfd_evax_length_hash_symbol before output of symbol.
* evax-egsd.c (_bfd_evax_write_egsd): Likewise.
* evax.h (flag_hash_long_names, flag_show_after_trunc): Remove.
* evax-emh.c: Output filename to object file without path.
* evax-egsd.c: New sections for local and global commons.
* evax-alpha.c, evax-emh.c, evax-egsd.c, evax-etir.c,
evax-misc.c, evax.h: Remove 8 bit characters from copyright
notices. Replace AXP with Alpha.
1997-02-14 02:13:19 +00:00
Ian Lance Taylor
236969ac80
Thu Feb 13 20:53:22 1997 Klaus Kaempf (kkaempf@progis.de)
...
* makefile.vms: Add gcc flags to allow compiling with current gcc
snapshot
(targmatch.h): New dependency.
1997-02-14 01:54:51 +00:00
Ian Lance Taylor
3a8dddb286
Thu Feb 13 20:50:02 1997 Klaus Kaempf (kkaempf@progis.de)
...
* makefile.vms: New file.
1997-02-14 01:50:50 +00:00
Ian Lance Taylor
62332d05fd
* sunos.c (sunos_create_dynamic_sections): We need the dynamic
...
sections if we are creating a shared library.
1997-02-12 23:14:36 +00:00
David Edelsohn
3883007ed1
* configure.host (i386-windows): Don't set host64=true.
1997-02-11 23:46:10 +00:00
Ian Lance Taylor
a4183ba5c9
* elf32-mips.c (reloc_type): Add R_MIPS16_GPREL.
...
(elf_mips16_gprel_howto): New static variable.
(mips16_gprel_reloc): New static function.
(bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_GPREL.
(mips_info_to_howto_rel): Handle R_MIPS16_GPREL.
(mips_elf_relocate_section): Handle R_MIPS16_GPREL.
* reloc.c (BFD_RELOC_MIPS16_GPREL): Define.
* bfd-in2.h, libbfd.h: Rebuild.
1997-02-11 20:30:12 +00:00
David Edelsohn
b9c5ee689d
* elf32-m32r.c (elf_m32r_howto_table): Change partial_inplace to true
...
for R_M32R_{16,32,24,HI16_ULO,HI16_SLO,LO16}.
1997-02-11 19:45:51 +00:00
Gavin Romig-Koch
276c2d7dc8
Add r5900
1997-02-11 13:26:34 +00:00
Ian Lance Taylor
ba4a45946c
* elflink.h (elf_link_input_bfd): If we've discarded a section,
...
the output section will be the absolute section; don't print an
assertion message for that case when doing a relocateable link.
PR 11647.
1997-02-07 17:40:24 +00:00
Ian Lance Taylor
e900e695a2
* elf32-mips.c (FN_STUB, CALL_STUB, CALL_FP_STUB): Define.
...
(struct mips_elf_link_hash_entry): Add new fields fn_stub,
need_fn_sub, call_stub, and call_fp_stub.
(struct mips_elf_link_hash_table): Add field mips16_stubs_seen.
(mips_elf_link_hash_newfunc): Initialize new fields.
(mips_elf_link_hash_table_create): Likewise.
(mips_elf_relocate_section): Redirect relocations to use mips16
stubs when appropriate.
(mips_elf_check_relocs): Attach stub sections to the appropriate
symbol. Set need_fn_stub when appropriate.
(mips_elf_always_size_sections): New static function.
(mips_elf_check_mips16_stubs): New static function.
(elf_backend_always_size_sections): Define.
* elf-bfd.h (struct elf_obj_tdata): Add local_stubs field.
1997-02-06 22:15:37 +00:00
Ian Lance Taylor
258b1f5d18
* elflink.h (elf_link_input_bfd): Discard local symbols that are
...
attached to sections which are not being included in the link.
1997-02-06 22:02:51 +00:00
Ian Lance Taylor
5b61a02aae
* cofflink.c (_bfd_coff_generic_relocate_section): Ignore the
...
symbol value when computing the addend for a pc_relative
pcrel_offset reloc.
1997-02-05 18:21:08 +00:00
Ian Lance Taylor
5a50eec623
* cofflink.c (_bfd_coff_generic_relocate_section): If doing a
...
relocateable link, just skip pc_relative pcrel_offset relocs.
* coff-arm.c (coff_arm_rtype_to_howto): Return a different howto
structure for an ARM26 reloc which can be resolved.
(coff_arm_adjust_symndx): Only convert ARM26 to ARM26D if the
reloc can be resolved.
PR 11599.
1997-02-03 20:31:39 +00:00
Ian Lance Taylor
bcb686ca09
* coff-h8300.c (h8300_reloc16_extra_cases): Correct off by one
...
error in overflow check for R_RELBYTE.
PR 11591.
1997-02-03 16:54:36 +00:00
Ian Lance Taylor
e9797c8ae5
comment fix
1997-01-31 23:15:42 +00:00
Ian Lance Taylor
6c58561e7a
* ieee.c (ieee_slurp_section_data): Pick up the start address.
...
From Mark Rasin <mark.rasin@telrad.co.il>.
1997-01-31 19:15:40 +00:00
Ian Lance Taylor
167dc907f2
* aoutx.h (aout_link_write_symbols): Don't apply discard_l to
...
debugging symbols.
Mentioned in PR 11540.
1997-01-31 19:08:31 +00:00
Jeff Law
1a2faf1f1e
* elf32-mn10200.c (reloc_type): Add 16bit pc-relative reloc.
...
(elf_mn10200_howto_table): Likewise.
(mn10200_reloc_map): Likewise.
How did I miss the 16bit pc-relative relocs?!?
1997-01-29 07:02:22 +00:00
David Edelsohn
1d5c6cfdf0
* reloc.c: Add relocs BFD_RELOC_M32R_{HI16_[US]LO,LO16}.
...
* bfd-in2.h, libbfd.h: Regenerated.
* elf32-m32r.c: Add support for them.
1997-01-27 20:35:24 +00:00
Ian Lance Taylor
54aa1deab3
* aout-arm.c (MY_swap_std_reloc_in): Remove unused r_length.
...
* elf32-ppc.c (ppc_elf_check_relocs): Remove unused plt.
start-sanitize-v850
* elf32-v850.c (v850_elf_final_link_relocate): Remove used
r_format and r_pcrel. Always return a value.
end-sanitize-v850
* riscix.c (MY_final_link_callback): Define to dummy value.
1997-01-27 18:22:54 +00:00
Ian Lance Taylor
9950f925f7
* elf32-i386.c (elf_i386_size_dynamic_sections): When checking for
...
relocations against the text segment, look up the output name of
the reloc section.
* elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
* elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
* elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1997-01-27 18:13:01 +00:00
Fred Fish
8c00b01dee
* coff-tic80.c (tic80coff_vec): Use correct data put/get
...
routines for little endian data.
* coffcode.h (coff_write_object_contents): Set magic to
TIC80_ARCH_MAGIC for TIc80.
1997-01-23 03:09:05 +00:00
Fred Fish
0716c2e910
* coff-tic80.c (tic80coff_vec): Change to little endian data
...
as the default.
1997-01-21 20:15:46 +00:00
Ian Lance Taylor
db109ca2d8
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Change type of
...
auxiliary_filters parameter to be const char * const *. Accept a
NULL terminated array.
* bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
(bfd_elf32_size_dynamic_sections): Update declaration.
* bfd-in2.h: Rebuild.
1997-01-16 22:48:57 +00:00
Ian Lance Taylor
c7f8d0a524
update copyright
1997-01-16 22:48:24 +00:00
David Edelsohn
e1616e16d8
* libaout.h (machine_type): Reserve several values for sparclet.
1997-01-14 16:47:40 +00:00
Michael Meissner
91eb4378ee
Fix sanitize string
1997-01-14 03:45:40 +00:00
Michael Meissner
4af93ad0dc
Allow tic80-*-*, not just tic80-*-coff
1997-01-14 03:45:03 +00:00
Michael Meissner
0ce71ebd3d
Cleanup; fix some aborts
1997-01-14 00:41:55 +00:00
Jeff Law
09a7bde377
Fix typo.
1997-01-06 22:23:08 +00:00
Jeff Law
4013169286
* elf32-mn10200.c (elf_mn10200_howto): Don't ever set partial-inplace.
...
Use bfd_elf_generic_reloc as special function for all relocs.
(bfd_elf32_mn10200_reloc): Remove unnecessary function.
Working on relocs for the mn10200.
1997-01-06 22:20:38 +00:00
Jeff Law
483e1b9161
* elf32-mn10200.c (elf_mn10200_howto): Set partial_inplace for
...
24bit pc-relative reloc.
1997-01-06 20:33:53 +00:00
Fred Fish
28eb95aa33
* Makefile.in (coff-tic80.o): Add coffcode.h to dependency list.
...
* coff-tic80.c (tic80coff_vec): Data byte order is big endian and
header byte order is little endian. Use correct bfd_get and
bfd_put routines for little endian headers.
* coffcode.h (coff_set_arch_mach_hook): Set arch to
bfd_arch_tic80 for TIC80_ARCH_MAGIC number.
1997-01-04 01:24:50 +00:00
Jeff Law
b3ef389468
* reloc.c: Add BFD_RELOC_24.
...
* elf32-mn10200.c (enum reloc_type): Add 24bit and pcrel relocs.
(elf_mn10200_howto, mn10200_reloc_map): Corresponding changes.
* bfd-in2.h, libbfd.h: Rebuilt.
Starting on relocs for the mn10200.
1997-01-04 00:02:12 +00:00
Ian Lance Taylor
56f3b62cf5
fix copyrights
1997-01-03 22:17:57 +00:00
Ian Lance Taylor
ff12f30335
Fri Jan 3 16:58:31 1997 Richard Henderson <rth@tamu.edu>
...
elf64-alpha multiple .got rewrite:
* elf-bfd.h (struct elf_backend_data): Add always_size_sections entry.
(bfd_elf*_mkobject): Don't define here ...
* elfxx-target.h: ... but rather here. Default always_size_sections
hook to NULL.
* elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was
what the #defines in elf-bfd.h transmuted it to anyway.
* section.c: Add SEC_LINKER_CREATED flag.
* bfd-in2.h: Rebuild.
* elf32-i386.c (elf_i386_check_relocs): Add SEC_LINKER_CREATED to
relocation section flags.
(elf_i386_size_dynamic_sections): Use SEC_LINKER_CREATED instead of
SEC_IN_MEMORY to recognize generated bits.
* elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_size_dynamic_sections):
Likewise.
* elf32-mips.c (mips_elf_final_link, mips_elf_create_dynamic_sections,
mips_elf_create_compact_rel_section, mips_elf_create_got_section,
mips_elf_check_relocs, mips_elf_size_dynamic_sections): Likewise.
* elf32-ppc.c (ppc_elf_create_linker_section,
ppc_elf_size_dynamic_sections): Likewise.
* elf32-sparc.c (elf32_sparc_check_relocs,
elf32_sparc_size_dynamic_sections): Likewise.
* elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to
section flags.
(_bfd_elf_create_dynamic_sections): Likewise.
(_bfd_elf_make_linker_section_rela): Likewise.
* elflink.h (elf_link_create_dynamic_sections): Likewise.
(bfd_elf,size_dynamic_sections): Call the always_size_sections hook.
(elf_bfd_final_link): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY
to identify generated bits.
(elf_link_input_bfd): Likewise.
* elf64-alpha.c: Rewrite everything touching relocations.
1997-01-03 22:09:40 +00:00