Ian Lance Taylor
d7775b4355
* elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
...
rather than SEC_LOAD when aligning the file offset for the first
section in a segment.
Fixes the case in which . is set just before the .bss section in a
linker script.
1996-09-11 15:59:34 +00:00
Fred Fish
ea3f058549
* syms.c (coff_section_type): Make arg const.
...
* irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
to make_bfd_asection().
* elf-bfd.h (bfd_section_from_phdr): Add prototype.
* elfcode.h (bfd_section_from_phdr): Remove prototype.
(_bfd_elf_stringtab_init): Remove prototype.
* netbsd-core.c (swap_abort): Add prototype.
* aix386-core.c (swap_abort): Ditto & make static
* hpux-core.c (swap_abort): Ditto & make static.
* irix-core.c (swap_abort): Ditto & make static.
* ptrace-core.c (swap_abort): Ditto & make static.
* trad-core.c (swap_abort): Ditto & make static.
* coffswap.h (coff_swap_reloc_in): Ditto.
(coff_swap_reloc_out): Ditto.
(coff_swap_filehdr_in): Ditto.
(coff_swap_filehdr_out): Ditto.
(coff_swap_sym_in): Ditto.
(coff_swap_sym_out): Ditto.
(coff_swap_aux_in): Ditto.
(coff_swap_aux_out): Ditto.
(coff_swap_lineno_in): Ditto.
(coff_swap_lineno_out): Ditto.
(coff_swap_aouthdr_in): Ditto.
(coff_swap_aouthdr_out): Ditto.
(coff_swap_scnhdr_in): Ditto.
(coff_swap_scnhdr_out): Ditto.
* ihex.c (ihex_sizeof_headers): Ditto.
* tekhex.c (getsym): Ditto.
(find_chunk): Ditto & make static.
(insert_byte): Ditto.
(first_phase): Ditto.
(pass_over): Ditto.
(tekhex_get_symtab): Ditto & make static.
(tekhex_get_symtab_upper_bound): Ditto & make static.
(tekhex_mkobject): Ditto.
(tekhex_object_p): Ditto.
(move_section_contents): Ditto.
(tekhex_get_section_contents): Ditto.
(tekhex_set_arch_mach): Ditto & make static.
(tekhex_set_section_contents): Ditto.
(writevalue): Ditto.
(writesym): Ditto.
(out): Ditto.
(tekhex_write_object_contents): Ditto.
(tekhex_sizeof_headers): Ditto.
(tekhex_make_empty_symbol): Ditto.
(tekhex_get_symbol_info): Ditto.
(tekhex_print_symbol): Ditto.
* irix-core.c (make_bfd_asection): Ditto.
(irix_core_core_file_p): Ditto.
(irix_core_core_file_failing_command): Ditto.
(irix_core_core_file_failing_signal): Ditto.
(irix_core_core_file_matches_executable_p): Ditto.
(irix_core_make_empty_symbol): Ditto.
* coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
* srec.c (srec_new_symbol): Ditto.
(srec_get_section_contents): Ditto.
(srec_set_arch_mach): Ditto.
(srec_set_section_contents): Ditto.
(internal_srec_write_object_contents): Ditto.
(srec_write_object_contents): Ditto.
(symbolsrec_write_object_contents): Ditto.
(srec_sizeof_headers): Ditto.
(srec_make_empty_symbol): Ditto.
(srec_get_symtab_upper_bound): Ditto.
(srec_get_symtab): Ditto.
(srec_print_symbol): Ditto and make static.
* elf.c (elf_read): Ditto
(assign_section_numbers): Ditto.
(elf_fake_sections): Ditto.
(sym_is_global): Ditto.
(elf_map_symbols): Ditto.
(get_program_header_size): Ditto.
* coffgen.c (make_a_section_from_file): Ditto.
(coff_real_object_p): Ditto.
(fixup_symbol_value): Ditto.
(build_debug_section): Ditto.
(copy_name): Ditto.
* syms.c (coff_section_type): Ditto.
1996-09-11 04:25:57 +00:00
Jeff Law
00d7a64b5f
* bfd-in2.h: Rebuilt after m32r changes.
1996-09-10 04:35:48 +00:00
David Edelsohn
f0c12b7340
* config.bfd,configure.in,configure: Add m32r support.
...
* Makefile.in,archures.c,elf.c,targets.c: Likewise.
1996-09-09 22:59:40 +00:00
David Edelsohn
66e4c22978
* config.bfd,configure.in,configure: Add m32r support.
1996-09-09 19:37:47 +00:00
David Edelsohn
71d7d44f19
* config.bfd: Keep target list alphabetically sorted.
1996-09-09 19:32:40 +00:00
Jeff Law
629f776abf
* elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
...
to add in the constant part found in the instruction itself.
(case R_V850_HI16_S): Likewise.
Fixes plumhall/lang.exp failures.
1996-09-09 17:49:30 +00:00
Martin Hunt
9c85b19ddf
Fri Sep 6 17:04:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
...
* elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
and R_D10V_18 to be 1 (word).
1996-09-07 00:06:53 +00:00
Ian Lance Taylor
4be2140e68
* stabs.c (_bfd_link_section_stabs): If the output_section field
...
of either section is bfd_abs_section, then the linker is
discarding the section and we should not optimize it.
PR 10555.
1996-09-05 19:24:08 +00:00
Jeff Law
e73b6ae634
* elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
...
low order sign bit propogationfor R_V850_HI16_S.
Fixes c-torture execute/950221-1.c, maybe others.
1996-09-04 03:03:53 +00:00
David Edelsohn
0cd98b92ab
* Makefile.in (aout-sparcle.o): New target.
...
* aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
* config.bfd (sparclet-*-aout*): Add case.
* configure.in (sparcle_aout_vec): Add case.
* configure: Regenerated.
* libaout.h (machine_type): Add M_SPARCLET_LE.
* targets.c (sparcle_aout_vec): Declare.
(bfd_target_vector): Add sparcle_aout_vec.
* aout-sparcle.c: New file.
1996-09-03 19:52:15 +00:00
Jeff Law
7b0af209eb
* elf32-v850.c (bfd_elf3_v850_reloc): New function for
...
handling V850 specific relocs.
(elf_v850_howto_table): Use the new function for some
relocations. Twiddle masks & shifts for some relocs.
Set partial_inplace where needed.
Fixing more stuff.
1996-09-03 08:14:53 +00:00
Mark Alexander
b5ef63c4fc
* .Sanitize: Remove reloc.c from v850_files.
1996-09-01 22:25:50 +00:00
Ian Lance Taylor
bde9d87544
* rs6000-core.c (rs6000coff_core_file_matches_executable_p):
...
Rewrite to use BFD file read routines and to avoid using a fixed
length for the file name.
1996-09-01 19:44:40 +00:00
Jeff Law
237b5c4c9a
* elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
...
(elf_v850_howto_table): Add support for R_V850_{32,16,8}.
(v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
to R_V850_{32,16,8}.
So we don't get "reloc XXX not supported" messages anymore.
1996-08-31 16:24:18 +00:00
J.T. Conklin
01b49cb35b
* elf32-v850.c (reloc_type): Add R_V850_HI16_S.
...
(elf_v850_howto_table): Add info for HI16_S reloc.
(v850_reloc_map): Add HI_16_S reloc.
* reloc.c: Define BFD_RELOC_V850_* relocs.
1996-08-31 01:32:13 +00:00
Ian Lance Taylor
c86158e591
Add SH ELF support.
...
* elf32-sh.c: New file.
* elf.c (prep_headers): Handle bfd_arch_sh.
* elfcode.h (write_relocs): Handle absolute symbol.
* elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
(_bfd_elf64_link_read_relocs): Declare.
* elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
elf_link_read_relocs. Make globally visible. Change all
callers.
(elf_link_input_bfd): Get external symbols from cache in
symtab_hdr->contents. Get contents from cache in
elf_section_data.
* elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
already defined.
* reloc.c: Define BFD_RELOC_SH_* relocs.
* libbfd-in.h (_bfd_sh_align_load_span): Declare.
* coff-sh.c (sh_insns_conflict): Fix a return value.
(_bfd_sh_align_load_span): New globally visible function, broken
out of sh_align_load.
(sh_align_load): Call _bfd_sh_align_load_span.
(sh_swap_insns): Change relocs parameter to PTR.
* bfd-in2.h, libbfd.h: Rebuild.
* targets.c (bfd_elf32_sh_vec): Declare.
(bfd_elf32_shl_vec): Declare.
* config.bfd (sh-*-elf*): New target.
* configure.in (bfd_elf32_sh_vec): New target vector.
(bfd_elf32_shl_vec): New target vector.
* configure: Rebuild.
* Makefile.in: Rebuild dependencies.
(BFD32_BACKENDS): Add elf32-sh.o.
(BFD32_BACKENDS_CFILES): Add elf32-sh.c.
* elf.c (map_sections_to_segments): Check that LMA does not skip a
page before checking D_PAGED.
1996-08-30 22:09:51 +00:00
Ian Lance Taylor
492cfc71b8
* ihex.c (ihex_scan): Removed unnecessary extbase variable.
...
(ihex_write_object_contents): Remove extbase; always use segbase
instead.
1996-08-30 15:52:40 +00:00
Michael Meissner
f7954d868f
Recognize i686-*-* for pentium pro
1996-08-29 21:16:27 +00:00
Ian Lance Taylor
4da624ddb3
* elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
...
R_MIPS_32 and R_MIPS_REL32. Set sgot and g as soon as possible.
(mips_elf_size_dynamic_sections): Don't require .got to exist.
(mips_elf_finish_dynamic_sections): Likewise.
1996-08-27 04:14:13 +00:00
Ian Lance Taylor
1c952df609
* configure.host (HLDENV): New variable to set. Set it for
...
*-*-sysv4*, since those linkers may not support -R but they always
support LD_RUN_PATH.
1996-08-23 00:07:59 +00:00
Ian Lance Taylor
9461513b04
* libieee.h (NSECTIONS): Don't define.
...
(ieee_data_struct): Change section_table to asection **. Add
section_table_size.
* ieee.c (get_section_entry): If the table isn't big enough, make
it bigger.
(ieee_slurp_sections): Remove assertion about number of sections.
(ieee_object_p): Adjust initialization of ieee to match changes to
the structure.
PR 10377.
1996-08-23 00:02:55 +00:00
J.T. Conklin
0c1d95c791
* Makefile.in (ALL_MACHINES): Add cpu-v850.o.
...
(BFD32_BACKENDS) Add elf32-v850.o.
* archures.c: Add bfd_v850_arch.
* bfd-in2.h: Add bfd_v850_arch.
* config.bfd (v850-*-*): New target.
* configure: (bfd_elf32_v850_vec) New vector.
* configure.in: (bfd_elf32_v850_vec) New vector.
* cpu-v850.c: New file.
* elf.c (prep_headers): Added case bfd_arch_v850.
* elf32-v850.c: New file.
* targets.c (bfd_elf32_v850_vec): New vector.
1996-08-20 22:09:25 +00:00
Stan Shebs
22edd54732
* mpw-config.in: Update editing of autoconf vars to reflect
...
Jul 18 configure.in change.
* mpw-make.sed: Update editing of include pathnames to be
more general, add @DASH_C_FLAG@ to explicit compile rule edit.
1996-08-15 19:41:17 +00:00
Jackie Smith Cashion
53ef6e6076
Thu Aug 15 16:40:30 1996 James G. Smith <jsmith@cygnus.co.uk>
...
* reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
Added, for internal use by the ARM gas.
* libbfd.h: Rebuilt
* bfd-in2.h: Rebuilt
1996-08-15 15:58:35 +00:00
Ian Lance Taylor
37d7888d03
Wed Aug 14 17:02:09 1996 Richard Henderson <rth@tamu.edu>
...
* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
in section dynidx start.
1996-08-15 00:03:50 +00:00
Ian Lance Taylor
e38d6d362f
* elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
...
name begins with .gnu.linkonce as SEC_LINK_ONCE. This is an
optimization for g++.
1996-08-13 21:39:37 +00:00
Michael Meissner
ae20860e9d
If one module has -mrelocatable-lib and the other doesn't, clear the -mrelocatable-lib bit
1996-08-13 21:09:06 +00:00
Ian Lance Taylor
4596421b67
* elflink.h (elf_link_add_object_symbols): Do not resolve a common
...
symbol against a STT_FUNC symbol in a shared library.
1996-08-11 03:39:46 +00:00
Ian Lance Taylor
410bc61d0c
* xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
...
symbol is found, automatically define the corresponding function
code.
PR 10299.
1996-08-10 00:15:30 +00:00
Ian Lance Taylor
d92099f198
* cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
...
if sym.n_numaux is not zero.
(_bfd_coff_link_input_bfd): Permit the symbol and the hash table
entry to disagree about the number of aux entries if the symbol
has zero.
1996-08-09 18:46:54 +00:00
Ian Lance Taylor
f11e3f6278
* elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
...
section if it might be needed, not just if info->shared.
(mips_elf_adjust_dynamic_symbol): Make room for a null element at
the start of .rel.dyn if we are going to use it.
(mips_elf_finish_dynamic_sections): Only clear the first element
of .rel.dyn if the size is greater than zero.
Fix this case from c-torture:
extern int abort();
typedef int (*frob)();
frob f[] = {abort};
main()
{
exit(0);
}
1996-08-09 16:47:15 +00:00
Ian Lance Taylor
b2a05baf21
* xcofflink.c (xcoff_link_input_bfd): If we already called the
...
undefined_symbol callback for a symbol, then don't issue any more
warnings about loader relocs.
(_bfd_ppc_xcoff_relocate_section): Don't do any further processing
after calling the undefined_symbol callback.
1996-08-08 21:15:32 +00:00
Ian Lance Taylor
fbc4ed7ded
* xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
...
(xcoff_link_add_symbols): Permit multiple definitions of a symbol
as the AIX linker seems to do.
PR 10304.
1996-08-08 20:33:39 +00:00
Ian Lance Taylor
8612a388f7
Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
...
* evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
(evax_initialize): Remove evax_reloc_table.
(evax_close_and_cleanup): Ditto.
(reloc_nil): Ditto.
(alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
entries.
(evax_bfd_reloc_type_lookup): Ditto.
* evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
cooked_size == raw_size.
* evax-emh.c (_bfd_evax_register_filename): Remove.
* evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
* evax-misc.c (add_new_contents): Malloc section at full size.
(_bfd_save_evax_section): Memcpy section contents directly.
* evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
(evax_reloc_table): Remove.
* hosts/alphavms.h (O_ACCMODE): Define if needed.
* makefile.vms: Add better support for DEC C compilation
Add evax.h dependencies
* reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
(BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
(BFD_RELOC_ALPHA_BASEREG): Remove.
* bfd-in2.h, libbfd.h: Rebuild.
1996-08-08 16:27:21 +00:00
Stu Grossman
320a5c6b18
* archive.c (bsd_write_armap): Ifdef around calls to getuid and
...
getgid if _WIN32 is defined.
* opncls.c (bfd_fdopenr): Remove unnecessary WINGDB ifdef.
1996-08-08 15:23:01 +00:00
Stu Grossman
2055bf857d
* aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
...
Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
include file.
* libbfd.c: Create dummy getpagesize() macro if HAVE_GETPAGESIZE
isn't defined.
1996-08-08 06:27:01 +00:00
Ian Lance Taylor
cc425b5558
* cpu-i386.c (i8086_arch): Architecture info for the i8086.
1996-08-07 20:10:14 +00:00
Ian Lance Taylor
85fe9d3e46
Wed Aug 7 14:11:44 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
...
* configure.in: Call BFD_NEEDED_DECLARATION on strstr and
realloc.
* acconfig.h (NEED_DECLARATION_STRSTR): New macro.
(NEED_DECLARATION_REALLOC): New macro.
* configure, config.in: Rebuild.
* sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
(realloc): Declare if NEED_DECLARATION_REALLOC.
1996-08-07 18:17:22 +00:00
Ian Lance Taylor
9b3307b0a0
Based on patches from Eric Valette <valette@crf.canon.fr>:
...
* elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
(elf_howto_table): Add entries for new relocs.
(elf_i386_reloc_type_lookup): Handle new relocs.
(elf_i386_info_to_howto): Just call abort.
(elf_i386_info_to_howto_rel): Check that the reloc type is valid.
(elf_i386_relocate_section): Likewise.
1996-08-07 16:14:09 +00:00
Martin Hunt
75e3a45a0d
Tue Aug 6 12:54:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
...
* elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
1996-08-06 19:56:21 +00:00
Ian Lance Taylor
b944e7e855
* elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
...
only get the LMA from the phdr if they are in the same part of the
file.
1996-08-05 20:45:55 +00:00
Ian Lance Taylor
191d910cb9
* elf.c (map_sections_to_segments): Rewrite tests for starting a
...
new segment to make them more comprehensible. If the relationship
between the LMA and the VMA changed, start a new segment. Don't
check dynsec when deciding whether to start a new segment for a
writeable section; -N will now handle this.
1996-08-05 17:45:58 +00:00
Jeff Law
e751d5068f
* libhppa.h: Remove "esel" changes. Not the right approach.
...
* som.c: Corresponding changes.
(som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
which don't have a SOM symbol type associated with them.
Reverses a 1994 change.
More PA EH tweakage (to get exception handling tables properly relocated
in shared libraries).
1996-08-02 04:50:08 +00:00
Ian Lance Taylor
cdb88e8764
Make ld -N more reasonable for ELF:
...
* elf.c (map_sections_to_segments): If D_PAGED is not set, set
phdr_in_section to false, and always use a single load segment.
(elf_sort_sections): Sort sections by LMA after VMA.
(assign_file_positions_for_segments): If D_PAGED is not set, don't
align to maxpagesize.
(assign_file_positions_except_relocs): Likewise.
* elfcode.h (elf_object_p): If a section is loaded but not page
aligned, clear D_PAGED.
1996-07-31 19:58:05 +00:00
Jackie Smith Cashion
d1b40d8eeb
Wed Jul 31 15:00:12 1996 James G. Smith <jsmith@cygnus.co.uk>
...
* reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
Added, for internal use by the ARM gas.
* libbfd.h: Rebuilt
* bfd-in2.h: Rebuilt
1996-07-31 14:34:21 +00:00
Jeff Law
ad240a8289
* libhppa.h (R_HPPA_ESEL): New field selector.
...
(e_esel): Similarly.
* som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
(som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
Making another stab at EH support on the PA.
1996-07-30 20:16:27 +00:00
Ian Lance Taylor
fb4dc1eb5f
* xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
...
archive search before looking for stripped dynamic objects.
PR 10187.
1996-07-30 17:39:33 +00:00
Ian Lance Taylor
b223f95038
* xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
...
symbol a warning rather than an error.
PR 10208.
1996-07-26 21:53:08 +00:00
Ian Lance Taylor
64f808f92b
* elf.c (assign_file_positions_for_segments): Track the virtual
...
memory position separately from the file position, and use it to
compute the alignment adjustment.
PR 10039.
1996-07-24 16:05:32 +00:00