3 * syms.c (bfd_print_symbol_vandf): Change PTR to FILE *.
4 * hosts/irix4.h (exit): Declare properly.
8 * bfd-in.h, hash.c: Change bfd_hash_allocate argument from size_t
9 to unsigned int, because size_t may not be defined in bfd.h.
12 * bfd-in.h (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
15 * libbfd.c (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
17 * targets.c (bfd_target): Change swap function pointers
19 * archive.c (do_slurp_coff_armap): Change swap accordingly.
20 * aix386-core.c: Change NO_GET and NO_GETS accordingly.
21 * hppabsd-core.c, hpux-core.c, irix-core.c, osf-core.c,
22 ptrace-core.c, trad-core.c: Change NO_GET and NO_SIGNED_GET
25 * libbfd-in.h (struct artdata): Added tdata field.
26 (_bfd_add_bfd_to_archive_cache): Declare.
27 (_bfd_get_elt_at_filepos): Declare.
28 (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
30 * archive.c: Cleaned up some more.
31 (_bfd_generic_mkarchive, bfd_generic_archive_p): Initialize
32 pointer elements of artdata.
33 (_bfd_add_bfd_to_archive_cache): Renamed from add_bfd_to_cache.
34 (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
35 (_bfd_get_elt_at_filepos): Renamed from get_elt_at_filepos.
36 (get_extended_arelt_filename, bfd_construct_extended_name_table,
37 bfd_ar_hdr_from_filesystem, compute_and_write_armap): Made static.
38 * ecoff.c: Some comment changes.
39 (ecoff_slurp_armap): Handle rename of snarf_ar_hdr. Set
40 ardata->tdata to raw_armap.
41 (ecoff_archive_p): Initialize pointer elements of artdata.
42 * coff-rs6000.c (rs6000coff_get_elt_at_filepos): Handle rename of
45 * hash.c: Added some documentation.
49 * aout-target.h, netbsd386.c: Replace NO_SWAP_MAGIC with SWAP_MAGIC,
50 and do the swapping here rather than calling ntohl from the N_*
51 macros. This cleans up assumptions about the size of a host long,
52 the existence to ntohl, etc.
56 * config.bfd: Add support for VSTa micro-kernel. It currently uses
61 * hosts/i386mach3.h (HOST_SEGMENT_SIZE): Fix value.
62 * i386mach3.c (SEGMENT_SIZE): Fix value.
66 Minor cleanups suggested by CodeCenter.
67 * aoutx.h, coffgen.c, ecoff.c, ecofflink.c, elf.c, libbfd.c,
68 linker.c, reloc.c, section.c, srec.c: Added /*ARGSUSED*/ as
70 * aoutx.h (struct external_exec): Removed unnecessary declaration.
71 (NAME(aout,some_aout_object_p)): Set some tdata pointers to NULL.
72 (adjust_z_magic): Removed useless variable data_vma.
73 (stringtab_init): Initialize hash_zero.
74 (add_to_stringtab): Removed unused fourth argument.
75 (NAME(aout,swap_std_reloc_out)): Removed useless variable
77 (aout_link_input_section): Added some casts.
78 * archive.c (get_extended_arelt_filename, do_slurp_coff_armap,
79 bfd_ar_hdr_from_filesystem, bsd_write_armap, coff_write_armap):
80 Minor code rewriting to make it more C like.
81 (do_slurp_bsd_armap): Added some casts.
82 * ecoff.c (ecoff_write_object_contents): Removed useless variable
84 (ecoff_write_armap): Added some casts. Use "" rather than "\0".
85 * ecofflink.c (bfd_ecoff_write_debug): Added a cast.
86 * libaout.h (struct internal_exec): Removed unnecessary
88 * linker.c (_bfd_generic_indirect_link_order): Added a cast.
89 * opncls.c (new_bfd): Removed a cast.
90 * reloc.c (bfd_generic_get_relocated_section_contents): Added
92 * srec.c (internal_srec_write_object_contents): Removed useless
93 variable bytes_written.
97 * i386mach3.c (N_TXTADDR): Don't define after all.
98 (TEXT_START_ADDR): Don't include exec header size in value.
102 * i386mach3.c (N_TXTADDR): Define.
106 Extensive changes to move the bulk of the linker into BFD so that
107 more efficient backend code can be written for specific object
108 files. Only existing efficient backend is a.out.
109 * seclet.c, seclet.h: Removed.
110 * hash.c, linker.c, genlink.h: New files.
111 * bfd-in.h: Removed bfd_error_vector. Declared hash table
112 structures and functions.
113 (JUMP_TABLE): Removed bfd_seclet_link, added
114 bfd_link_hash_table_create, bfd_link_add_symbols and
116 * All backends: Changed accordingly.
117 * bfd-in2.h: Rebuilt.
118 * bfd.c (struct _bfd): Added link_next and archive_pass fields.
119 Removed ld_symbols field.
120 (bfd_nonrepresentable_section, bfd_undefined_symbol,
121 bfd_reloc_value_truncated, bfd_reloc_is_dangerous,
122 bfd_error_vector): Removed.
123 (bfd_default_error_trap, bfd_error_trap,
124 bfd_error_nonrepresentabltrap): Removed.
125 (bfd_get_relocated_section_contents): Pass link_info. Pass
126 link_order instead of seclet. Pass symbols.
127 (bfd_relax_section): Pass link_info.
128 (bfd_seclet_link): Removed.
129 (bfd_link_hash_table_create, bfd_link_add_symbols,
130 bfd_final_link): New macros.
131 * libbfd-in.h: If __GNUC__ is defined and alloca is not, define
132 alloca as __builtin_alloca. Declare internal linking functions.
134 * libbfd.c (bfd_seek): Comment out fseek assertion. It's worked
136 * reloc.c (reloc_howto_type): Added error_message argument to
137 special_function field. Changed all callers and all definitions.
138 (bfd_get_reloc_size): Make argument a const pointer.
139 (bfd_perform_relocation): Add error_message argument to hold
140 string set if return value if bfd_reloc_dangerous. Changed all
142 (_bfd_final_link_relocate, _bfd_relocate_contents): New functions.
143 * section.c (asection): Renamed seclets_head and seclets_tail to
144 link_order_head and link_order_tail.
145 * targets.c (bfd_target): Replaced seclet argument with link_info
146 and link_order and symbols arguments in
147 bfd_get_relocated_section_contents. Added symbols argument to
148 bfd_relax_section. Removed bfd_seclet_link. Added
149 bfd_link_hash_table_create, bfd_link_add_symbols and
151 * libaout.h (struct aoutdata): Added external_syms,
152 external_sym_count, external_strings, sym_hashes fields.
153 (obj_aout_external_syms, obj_aout_external_sym_count,
154 obj_aout_external_strings, obj_aout_sym_hashes): New accessor
156 (WRITE_HEADERS): Only output symbols if outsymbols is not NULL.
157 * aoutx.h: Wrote new back end linker routines.
158 (translate_to_native_sym_flags): Return boolean value. Don't use
160 (NAME(aout,write_syms)): Return boolean value. Check return value
161 of translate_to_native_sym_flags and bfd_write.
162 * aout-target.h (final_link_callback): New function.
163 (MY_bfd_final_link): New function.
164 * aout-adobe.c (aout_adobe_write_object_contents): Check return
165 value of aout_32_write_syms.
166 * hp300hpux.c (MY(write_object_contents)): Likewise.
167 * i386lynx.c (WRITE_HEADERS): Likewise.
168 * libaout.h (WRITE_HEADERS): Likewise.
169 * bout.c: Changed functions to use link_info->callbacks rather
170 than bfd_error_vector, and link_orders rather than seclets.
171 * coff-alpha.c: Likewise.
172 * coff-h8300.c: Likewise.
173 * coff-h8500.c: Likewise.
174 * coff-sh.c: Likewise.
175 * coff-z8k.c: Likewise.
176 * elf32-hppa.c: Likewise.
177 * reloc16.c: Likewise.
178 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Look
179 up _gp in the hash table rather than in outsymbols.
180 * coff-a29k.c (a29k_reloc): Pass errors back in new error_message
181 argument rather than printing them.
182 * coffcode.h (bfd_coff_reloc16_extra_cases): Take link_info and
183 link_order arguments rather than seclet. Changed all uses and
185 (bfd_coff_reloc16_estimate): Pass link_info arguments. Changed
186 all uses and definitions.
187 * libcoff.h: Rebuilt.
188 * ecoff.c (ecoff_get_extr): If symbol is defined by linker, but
189 not by ECOFF, make it scAbs.
190 (ecoff_bfd_final_link): Renamed from ecoff_bfd_seclet_link and
192 * elf32-mips.c (mips_elf_final_link): Renamed from
193 mips_elf_seclet_link and rewritten.
194 * elf32-hppa.c (elf32_hppa_stub_description): Added link_info
196 (new_stub, add_stub_by_name, hppa_elf_build_arg_reloc_stub,
197 hppa_elf_build_long_branch_stub, hppa_look_for_stubs_in_section):
198 Added link_info arguments. Changed all callers.
199 * elfcode.h (elf_slurp_symbol_table): Don't quit if outsymbols is
201 * oasys.c (oasys_write_sections): Return boolean value rather than
202 using bfd_error_vector.
203 (oasys_write_object_contents): Check return value of
204 oasys_write_sections.
205 * hosts/std-host.h: Don't declare qsort or strtol.
206 * Makefile.in: Rebuild dependencies.
207 (BFD_LIBS): Removed seclet.o. Added hash.o and linker.o.
208 (CFILES): Removed seclet.c. Added hash.c and linker.c.
209 (HFILES): Removed seclet.h. Added genlink.h.
213 * section.c (bfd_get_section_contents): Return zero filled buffer
214 if section has no contents.
218 * elf.c (bfd_elf_generic_reloc): If this is not an inplace reloc,
219 then skip bfd_perform_relocation even if the addend is non-zero.
223 * coffcode.h (coff_write_relocs) [SWAP_OUT_RELOC_OFFSET]: Copy
224 addend to r_offset field.
226 * Makefile.in (CFILES): Added coff-sparc.c. Rebuild dependencies.
228 * coff-sparc.c (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET,
229 CALC_ADDEND): Define.
231 * aix386-core.c (aix386_core_file_p): Use cd_regs[0] for computing
232 the offsetof because AIX /bin/cc does not like to take the address
233 of an array. (From Minh Tran-Le.)
239 * elf32-hppa.c (hppa_elf_build_arg_reloc_stub): Make sure to copy
240 the return pointer into %r2 if no jump-in-call-delay-slot
241 optimization was done.
243 * hosts/hp300bsd.h: Correctly identify 4.3BSD vs 4.4BSD.
247 * hosts/std-host.h: (time): Don't declare; conflicts on Mach3.
249 * hosts/i386mach3.h (HOST_PAGE_SIZE): Set to 1 to avoid padding.
250 (HOST_SEGMENT_SIZE): Set to 0 for same reason.
252 * i386mach3.c (PAGE_SIZE, SEGMENT_SIZE): Same changes as above.
253 (TEXT_START_ADDR): Correct.
254 (MY_backend_data): Define.
256 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic):
257 New functions; code moved from aout_<size>_adjust_sizes_and_vmas.
261 * som.c (som_begin_writing): Fix thinkos in auxiliary header
263 (bfd_som_attach_aux_hdr): Likewise.
267 * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle 'T' field
268 selectors for PIC code.
270 * som.c (hppa_som_gen_reloc_type): Handle 'T' field selectors.
271 (som_write_fixups): Handle R_DLT_REL, R_FSEL, R_RSEL, R_LSEL
272 relocations needed by PIC.
274 Tue Dec 7 15:47:51 1993 Stu Grossman (grossman at cygnus.com)
276 * nlmcode.h: Fixes to avoid compiler warnings...
280 * libnlm.h (nlm_backend_data): Removed macro definition.
281 (nlm_alpha_backend_data): Adjusted accordingly.
285 * som.c (som_begin_writing): Flesh out code for handling simple
287 (bfd_som_attach_aux_hdr): New function.
289 * som.h (struct somdata): Add fields for attaching version and
290 copyright headers. Add accessor macros.
292 * som.c (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Add protected
293 definitions for old versions of HPUX which fail to define them.
294 (som_hppa_howto_talbe): Add R_DLT_REL, R_AUX_UNWIND, and R_SEC_STMT
295 now that they're safe. Delete bogus R_STATEMENT relocations.
297 * som.c (som_hppa_howto_table): Add missing R_END_TRY. Delete
298 extra R_DATA_OVERRIDE.
299 (hppa_som_gen_reloc_type): Generate a relocation for the rounding
300 mode selector if needed.
301 (som_write_fixups): Handle requests for a change in the default
302 rounding mode. Rounding modes do not consume input bytes, but
303 are just markers much like R_ENTRY and R_EXIT.
309 * elf32-hppa.c: (hppa_elf_reloc): Do not do code reordering when
310 the branch instruction as originally been nullified.
311 hppa_elf_reloc): Avoid useless call to bfd_put_32 () in the
312 case of no code reordering due to an LDO instruction in the
313 delay slot of the branch. Make sure to relocate the correct
314 instruction. Do not perform instruction reordering for millicode
316 (hppa_elf_build_arg_reloc_stub): Change the relocation type
317 to R_HPPA_STUB_CALL_17 when special processing might be needed.
318 (hppa_elf_build_long_branch_stub): Prevent code reordering on
319 a call from a linker stub to another linker stub and for millicode
320 calls. Do not trash the return register for calls from one linker
321 stub to a second linker stub.
323 * elf32-hppa.c: (elf_hppa_howto_table): PLABEL and DLT
324 relocations are not pc-relative.
326 * hppa_stubs.h: (BLE_N_XXX_0_31): New instruction used in
328 (COPY_2_31): Likewise.
332 * config/solaris2.mh (HDEFINES): Remove -Dconst=
333 * hosts/solaris.h: If not __GNUC__, define const as empty.
337 * ecoff.c: Added various casts for 32/64 bit cross targeting.
338 (ecoff_mkobject_hook): Set SEC_SHARED_LIBRARY for the .reginfo
339 section so that the linker ignores it.
340 * ecofflink.c: Added various casts for 32/64 bit cross targeting.
341 (ecoff_add_bytes): Changed need argument to size_t.
342 (bfd_ecoff_debug_link_other): Check return value of
345 * libbfd-in.h (new_bfd): Use void rather than an empty parameter
349 * libnlm.h (struct nlm_obj_tdata): New field backend_data.
350 (nlm_backend_data, nlm_alpha_backend_data): New accessor macros.
351 (struct nlm_backend_data): New field no_uninitialized_data.
352 (nlm_no_uninitialized_data): New accessor macro.
353 * nlmcode.h (nlm_compute_section_file_positions): Handle
354 no_uninitialized_data.
355 (nlm_external_reloc_compare): Sort relocs by address for a
356 particular symbol, to make the sort more stable.
357 (nlm_write_object_contents): Cast the arguments to qsort. Get the
358 value of a debugging symbol the same way we get the value of a
360 * nlm32-alpha.c: Various changes. Write out GP and .lita relocs.
361 Set no_uninitialized_data to true.
362 * nlm32-i386.c (nlm32_i386_backend), nlm32-sparc.c
363 (nlm32_sparc_backend): Set no_uninitialized_data field false.
364 * nlmswap.h (nlm_swap_fixed_header_out): Zero out destination
365 before filling it in.
369 * som.c (som_section_type, som_decode_symcalss): New functions.
370 (som_get_symbol_info): Use them.
371 (som_slurp_symbol_table): Set the section of common and undefined
376 * elfcode.h (write_relocs): Initialize local var LAST_SYM_IDX, to
379 * mipsbsd.c: Changes from Ralph Campbell:
380 (mips_howto_table_ext): MIPS_RELOC_LO16 should use
381 complain_overflow_dont.
382 (aout_mips_*_vec): Make name use "a.out" instead of "aout", to
385 * bfd.c (bfd_errmsgs): Reword invalid-target message.
387 * config.bfd: For sparc*-*-coff, use sparc-coff.
388 * configure.in: Handle sparccoff_vec.
389 * targets.c (sparccoff_vec): Declare.
391 * reloc.c (bfd_get_reloc_size): New function.
392 (struct reloc_howto_type): Update documentation of size field.
396 * nlm32-alpha.c: New file; preliminary Alpha NetWare support.
397 * config.bfd (alpha-*-netware*): New target; use alpha-nlm.
398 * config/alpha-nlm.mt: New file.
399 * configure.in (nlm32_alpha_vec): New vector; use nlm32-alpha.o,
401 * Makefile.in (BFD32_BACKENDS): Added nlm32-alpha.o.
402 (CFILES): Added nlm32-alpha.c.
403 Rebuilt dependencies.
404 * targets.c (nlm32_alpha_vec): Declare.
406 * libnlm.h (struct nlm_backend_data): New fields
407 optional_prefix_size, nlm_backend_object_p, nlm_write_prefix,
408 nlm_set_public_section, nlm_get_public_offset. Removed unused
409 nlm_write_reloc field. Changed nlm_write_import to remove
410 unnecessary symbol argument. Renamed nlm_write_externals to
411 nlm_write_external, and changed cound argument from bfd_vma to
413 (nlm_optional_prefix_size, nlm_backend_object_p_func,
414 nlm_write_prefix_func, nlm_set_public_section_func,
415 nlm_get_public_offset_func): New accessor macros.
416 (nlm_write_reloc_func): Removed.
417 (nlm_write_external_func): Adjusted for field renaming.
418 * nlm32-i386.c (nlm_i386_write_import): Renamed from
419 nlm_i386_write_reloc. Removed old nlm_i386_write_import which
420 just called old nlm_i386_write_reloc.
421 (nlm_i386_write_external): Renamed from nlm_i386_write_externals.
422 Declared. Changed second argument from bfd_vma to bfd_size_type.
423 (nlm32_i386_backend): Adjusted for changes to fields and names.
424 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Removed unused,
426 (nlm_sparc_write_import): Removed second argument.
427 (nlm_sparc_write_external): Renamed from
428 nlm_sparc_write_externals. Changed second argument from bfd_vma
430 (nlm32_sparc_backend): Adjusted for changes to fields and names.
431 * nlmcode.h: Removed some unused code.
432 (nlm_object_p): Don't destroy tdata pointer. Call
433 backend_object_p function if it exists.
434 (nlm_slurp_symbol_table): Removed unused variable rcount. Call
435 set_public_section_func if it exists instead of checking
437 (nlm_compute_section_file_positions): Account for
438 optional_prefix_size.
439 (nlm_write_object_contents): Account for optional_prefix_size.
440 Removed useless variable write_reloc_func. Changed declaration
441 and call of write_import_func. Call write_prefix_func if it
442 exists. Removed unused variables len and temp. Call
443 get_public_offset_func if it exists rather than setting NLM_HIBIT.
444 * nlmswap.h: Declare functions.
446 * bfd-in.h (uint64_typeLOW, uint64_typeHIGH): Fully parenthesize
448 (fprintf_vma, sprintf_vma): Use %lx, not %x.
449 * bfd-in2.h: Rebuilt.
450 * hosts/alphaosf.h (uint64_typeLOW, uint64_typeHIGH): Cast results
453 * config.bfd: Don't set target64 here, as the setting is ignored.
454 * configure.in (ecoffalpha_little_vec): Set target64.
456 * config/alphaosf.mt (TDEFINES): Removed; setting host parameters
457 in TDEFINES is wrong.
459 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
460 Remove unused variable output_section.
464 * irix-core.c: New file for Irix 4 and Irix 5 core support.
465 Functions taken out of coff-mips.c. Handle vmap type VMAPFILE.
466 * coff-mips.c: Irix 4 core file support moved to irix-core.c.
467 * targets.c: If IRIX_CORE defined, include irix_core_vec in
469 * config/irix4.mh (HDEFINES): Add -DIRIX_CORE.
470 (HDEPFILES): Define to be irix-core.o.
471 * config/irix5.mh (HDEFINES): Define to be -DIRIX_CORE.
472 (HDEPFILES): Define to be irix-core.o.
473 * Makefile.in (OPTIONAL_BACKENDS): Added irix-core.o. Removed
474 sco-core.o, which no longer exists.
475 (CFILES): Added all *-core.c files.
476 Rebuilt dependencies.
480 * elfcode.h (map_program_segments): Restore check of file_size !=
481 mem_size, but only if SHT_PROGBITS.
483 * ecofflink.c: New file to hold ECOFF debug information linking
485 * ecoff.c (ecoff_clear_output_flags, ecoff_rel, ecoff_dump_seclet,
486 ecoff_add_string, ecoff_get_debug): Removed. Functionality now in
488 (ecoff_get_extr, ecoff_set_index): New functions.
489 (ecoff_slurp_symbolic_info): Don't save raw_size.
490 (ecoff_bfd_seclet_link): Rewrote to use ecofflink.c functions.
491 (ecoff_compute_section_file_positions): Don't set EXEC_P just
492 because there is a start address.
493 (ecoff_write_object_contents): Handle external symbols here. Use
494 ecofflink.c functions to write out debugging information.
495 * elf32-mips.c (mips_elf_read_ecoff_info, mips_elf_get_extr,
496 mips_elf_set_index): New functions.
497 (mips_elf_seclet_link): Discard empty sections, the .options
498 section and .gptab sections. Handle linking .mdebug section.
499 * libecoff.h (ecoff_data_type): Removed raw_size and ifdbase.
500 * libelf.h (elf_symbol_type): Added mips_extr to tc_data union.
501 * bfd-in.h: Added prototypes for routines in ecofflink.c (some are
502 called by gas, so they are public).
503 * bfd-in2.h: Rebuilt.
504 * Makefile.in (BFD_LIBS): Added ecofflink.o.
505 (CFILES): Added ecofflink.c.
506 (ecofflink.o): New target. Rebuilt dependencies.
510 * som.c (hppa_object_p): Also recognize SHARED_MAGIC_CNX as
511 a valid magic number if it's been defined.
515 * ecoff.c (ecoff_mkobject): Don't create .scommon section; linker
516 no longer requires it.
517 (ecoff_bfd_seclet_link, ecoff_sizeof_headers,
518 ecoff_write_object_contents): Don't treat .scommon section
524 * bfd/config/delta88.mh (HDEFINES): Define this to be -DPTRACE_CORE.
525 * bfd/config/delta88.mh (HDEPFILES): Defined to be ptrace-core.o.
526 * bfd/ptrace-core.c: New file for dealing with core files with
527 start with the ptrace_user structure found on BCS compliant systems.
528 * bfd/targets.c (ptrace_core_vec): New vector.
532 * Minimal support for reading SOM fixup streams. Allows
533 objdump -r to do something reasonable.
534 * som.c (som_get_reloc_upper_bound): Implement.
535 (som_canonicalize_reloc): Implement.
536 (som_set_reloc_info, som_slurp_reloc_table): New functions.
540 * hosts/lynx.h (FPRINTF_ALREADY_DECLARED): Define.
541 * hosts/sparclynx.h: Include lynx.h instead of duplicating it.
545 * coff-a29k.c (a29k_reloc): For R_IREL, don't left shift
546 signed_value before sign extending it. Don't subtract out
547 reloc_entry->address. This makes it compatible with what gas is
550 * elfcode.h (elf_fake_sections): Accept .sbss as the name for a
552 (map_program_segments): Don't leave the loop after the first
554 (assign_file_positions_except_relocs): Only force sh_offset and
555 sh_addr to match modulo maxpagesize for a section which is not
556 SHT_NOBITS. Changed the method used to force page alignment after
557 a SHT_NOBITS section to only do it for the last such consecutive
558 section, and to really force page alignment.
562 * coffcode.h (coff_slurp_symbol_table): Print more verbose message
563 in the case of an unknown (or unhandled) storage class.
565 * config/i386-lynx.mt (TDEFINES): FPRINTF_ALREADY_DECLARED should
566 not be defined here, since it is a host attribute, not a target
568 * config/m68k-lynx.mt, config/sparc-lynx.mt: Ditto.
570 * coffcode.h (coff_bfd_reloc_type_lookup): Don't define if already
573 * coff-sparc.c: Define some relocations, based on ELF relocations.
574 (enum reloc_type, bfd_coff_generic_reloc, coff_sparc_howto_table,
575 struct coff_reloc_map, sparc_reloc_map,
576 coff_sparc_reloc_type_lookup): Borrowed from elf32-sparc.c and
578 (coff_bfd_reloc_type_lookup): Define to be coff_sparc_reloc_....
579 (rtype2howto): Index into coff_sparc_howto_table using
584 * config.bfd (mips*-*-irix5*): New target; use mipsbelf.
585 * configure.host (mips-sgi-irix5*) New host; use irix5 (no
586 hosts/irix5.h created; just use std-host.h).
587 * config/irix5.mh: New file; like irix4.mh, but don't use -G or
589 * Makefile.in: Rebuilt dependencies.
591 * ecoffswap.h: Changed type of internal pointers for swap out
592 functions to const *.
594 * elf32-mips.c (mips_elf_got16_reloc): New function. Handle GOT16
595 correctly for assembler, but linker support not implemented.
596 (elf_mips_howto_table): Use mips_elf_got16_reloc for GOT16.
597 (mips_elf_sym_is_global): New function; at least on Irix 5, all
598 non section symbols are considered global.
599 (elf_backend_sym_is_global): Define.
600 (mips_elf_final_write_processing): New function. Set the MIPS
601 architecture level correctly.
602 (elf_backend_final_write_processing): Define.
603 (mips_elf_section_from_shdr): Handle SHT_MIPS_OPTIONS.
604 (mips_elf_fake_sections): Set entsize of .mdebug or .reginfo
605 section to 1. Handle .options section.
606 (mips_elf_acom_section, mips_elf_acom_symbol,
607 mips_elf_acom_symbol_ptr): New static variables, used to build a
608 generic .acommon section to hold SHN_MIPS_ACOMMON symbols.
609 (mips_elf_symbol_processing): Handle SHN_MIPS_ACOMMON symbols by
610 putting them all in a global .acommon section.
612 * elfcode.h (bfd_section_from_shdr): Don't dump core if target
613 section has no ELF section data.
614 (elf_make_sections): Set addralign of reloc section to 4.
615 (elf_fake_sections): Likewise.
616 (map_program_segments): Don't consider section 0.
617 (assign_file_positions_except_relocs): Don't consider section 0.
618 In the main loop, skip the symtab and strtab sections, since their
619 positions are set elsewhere.
620 (swap_out_syms): Set addralign of symtab section to 4. Set
621 addralign of strtab sections to 1.
622 (assign_file_positions_for_relocs): Don't consider section 0.
623 (write_object_contents): Don't write out section 0.
625 * libelf.h (struct elf_backend_data): Added fields
626 elf_backend_sym_is_global and elf_backend_final_write_processing.
627 * elf32-target.h (elf32_bed): Added corresponding initializers.
628 * elf64-target.h (elf64_bed): Likewise.
629 * elfcode.h (sym_is_global): Take abfd argument. Call
630 elf_backend_sym_is_global if it is not NULL.
631 (elf_map_symbols): Pass abfd to sym_is_global.
632 (write_object_contents): Call elf_backend_final_write_processing
637 * libecoff.h: Include coff/ecoff.h.
638 (struct ecoff_backend_data): Move external debugging information
639 fields into a single field pointing to an ecoff_debug_swap
641 (ecoff_data_type): Move debugging information fields into a single
642 field pointing to an ecoff_debug_info structure.
643 * coff-alpha.c, coff-mips.c, ecoff.c: Corresponding changes.
647 * nlmswap.h: New file to swap fixed header. Included by NLM
649 * libnlm.h (struct reloc_and_sec): Define.
650 (struct nlm_backend_data): Add fields fixed_header_size,
651 nlm_read_import, nlm_write_import, nlm_swap_fhdr_in,
653 (nlm_fixed_header_size, nlm_read_import_func,
654 nlm_write_import_func, nlm_swap_fixed_header_in_func,
655 nlm_swap_fixed_header_out_func, nlm_write_external_func): New
657 * nlmcode.h: Use new functions.
658 * nlm32-i386.c: Provide new functions.
659 * nlm32-sparc.c: New file; SPARC NLM backend.
663 * i386lynx.c (swap_std_reloc_in, swap_ext_reloc_in): Ignore
664 garbage bits appearing in the upper end of symbolnums.
666 * config/sparc-lynx.mt (TDEFINES): Add -DFPRINTF_ALREADY_DECLARED.
668 Tue Nov 16 17:03:41 1993 Stu Grossman (grossman at cygnus.com)
670 * lynx-core.c (lynx_core_file_p): Change bfd_zalloc to bfd_alloc.
671 * m68klynx.c: Define core file macros.
672 * hosts/i386lynx.h, hosts/m68klynx.h, hosts/lynx.h: Move all
673 non-architecture specific stuff into lynx.h.
677 * i386linux.c: Define new macro ZMAGIC_DISK_BLOCK_SIZE to 1024, and
678 change PAGE_SIZE to 4096.
682 * Makefile.in (diststuff): New target.
688 * som.c (som_object_setup): Do not create dummy ".text", ".data",
690 (setup_sections): Do not set SEC_HAS_CONTENTS if a section's size
691 is zero. Recognize BSS type sections and turn off SEC_LOAD and
692 SEC_DATA (so binutils/size works). Set the correct value for
693 a section's _raw_size.
694 (som_slurp_symbol_table): Program entry points, and millicode are
695 also functions. Mark them as such. Also mark L$* symbols as
698 * bfd-in2.h: Rebuilt.
702 * som.c (som_bfd_reloc_type_lookup): Add missing prototype. Returns
703 a pointer to constant data. Delete bogus #define which made the
706 * som.c (som_prep_for_fixups): New function.
707 (som_write_fixups): New function.
708 (som_write_space_strings): New function.
709 (som_write_symbol_strings): New function.
710 (som_begin_writing): New function.
714 * som.c (som_write_object_contents): Do not abort. Flesh out.
715 (som_set_section_contents): Do not abort. Flesh out.
717 * som.c (som_write_headers): New function.
718 (som_prep_headers): New function.
719 (som_build_and_write_symbol_table): New function.
721 * som.c (som_sizeof_headers): Add missing prototype.
722 (som_set_arch_mach): Do not abort.
724 * som.c (som_count_spaces): New function.
725 (som_count_subspaces): New function.
726 (compare_syms): New function.
727 (som_compute_checksum): New function.
729 * som.c (hppa_som_gen_reloc_type): New function.
730 (som_bfd_reloc_type_lookup): New function.
732 * som.c (try_prev_fixup): New function.
733 (som_reloc_skip): New function.
734 (som_reloc_addend): New function.
735 (som_reloc_call): New function.
737 * som.c (som_initialize_reloc_queue): New function.
738 (som_reloc_queue_insert): Likewise.
739 (som_reloc_queue_fix): Likewise.
740 (som_reloc_queue_find): Likewise.
742 * som.c (som_hppa_howto_table): SOM howto relocation table.
743 (hppa_som_reloc): New function.
745 * som.c (struct reloc_queue): New structure to keep track of
746 the last four multibyte relocations emitted.
747 (enum pa_symbol_type): Type to fully describe the symbol types
748 associated with .import/.export assembler directives.
750 * som.c: Include libhppa.h
752 * som.c (bfd_som_set_section_attributes): New function.
753 (bfd_som_set_subsection_attributes): Likewise.
754 (bfd_som_set_symboL_type): Likewise.
755 (bfd_som_attach_unwind_info): Likewise.
756 * som.h: Declare new exported functions.
758 * som.h (struct som_symbol): Add new fields to hold additional
759 information needed to build/write symbol tables and fixup streams.
760 (struct som_section_data_struct): Add new fields to hold additional
761 information needed to build/write space and subspace headers.
762 (som_symbol_data): New accessor macro for SOM symbol information.
763 (R_HPPA_*): Basic relocation types to be used by the assembler.
767 * trad-core.c (trad_unix_core_file_p): If new hook
768 TRAD_CORE_ALLOW_ANY_EXTRA_SIZE defined, then skip the check for the
769 corefile being too big.
770 * hosts/i386sco.h: Define it.
774 * bfd.c (struct _bfd): Add hppabsd_core_data.
775 * targets.c (target_vector): Add hppabsd_core_vec.
776 * hpux-core.c (hpux_core_core_file_p): Fail if an unknown core
777 section is encountered during core section scanning.
778 * hppabsd-core.c: New file.
779 * config/hppabsd.mh: Enable HPPA BSD core files.
781 * elf32-hppa.c (hppa_elf_reloc): Remove DEFUN crud. Remove code
782 which is either commented out or ifdef'd out. Add, update and
783 clean comments. Fix various indention and spacing problems. Handle
784 problems related to using "ble" to jump to a stub rather than "bl"
785 (%r31 is trashed by "ble", but not by "bl").
786 (NEW_INSTRUCTION): Put inside curly braces.
787 (CURRENT_STUB_OFFSET): Fix indention problems.
788 (hppa_elf_build_arg_reloc_stub): Fix indention and spacing problems.
789 Add, update and clean comments. Handle "ble" %r31 lossage problems.
790 (hppa_elf_build_long_branch_stub): Likewise.
791 (hppa_look_for_stubs_in_section): Likewise.
792 (hppa_elf_stub_check): Remove obsolete function.
794 * hppa_stubs.h: Add new instructions to deal with %r31 lossage
795 problems. Delete unused instructions.
799 * m68klynx.c (TARGET_IS_BIG_ENDIAN_P): Define.
803 * elfcode.h (elf_object_p): Rather than looking through an array
804 of architectures, get the ELF EM_xxx code from the backend
805 information. Let the generic ELF target match any EM_xxx code not
806 matched by another ELF target. Call elf_backend_object_p to let
807 the backend do more checks and set global information.
808 * libelf.h (struct elf_backend_data): Added elf_machine_code and
809 elf_backend_object_p fields.
810 (struct bfd_elf_arch_map): Removed.
811 (bfd_elf_arch_map, bfd_elf_arch_map_size): Don't declare.
812 * elf32-target.h, elf64-target.h: Initialize elf_machine_code
813 field with ELF_MACHINE_CODE. Initialize elf_backend_object_p
814 field with elf_backend_object_p (if it is defined).
815 * elf32-gen.c, elf32-hppa.c, elf32-i386.c, elf32-i860.c,
816 elf32-m68k.c, elf32-m88k.c, elf32-mips.c, elf32-sparc.c,
817 elf64-gen.c (ELF_MACHINE_CODE): Defined.
818 * elf32-mips.c: Include ecoffswap.h to get ECOFF swapping
820 (mips_elf_object_p): Set the right machine number.
821 (mips_elf_ecoff_debug_swap): Defined.
822 (elf_backend_object_p): Defined to be mips_elf_object_p.
823 (elf_backend_ecoff_debug_swap): Defined to be
824 mips_elf_ecoff_debug_swap.
825 * elf.c (bfd_elf_arch_map, bfd_elf_arch_map_size): Removed.
827 * libbfd-in.h (target_vector, default_vector): Declare.
829 * format.c (target_vector, default_vector): Don't declare.
831 * elf32-mips.c (elf_mips_howto_table): Don't complain on overflow
832 for R_MIPS_26. Correct overflow detection requires matching the
833 upper four bits of the destination against the PC. From Ted Lemon
836 * bout.c (b_out_reloc_type_lookup): Return type should point to
838 * coff-i960.c (coff_i960_reloc_type_lookup): Likewise.
839 * elf32-hppa.c (elf_hppa_reloc_type_lookup): Likewise.
840 * mipsbsd.c (MY(reloc_howto_type_lookup)): Likewise.
841 * coff-i386.c (coff_i386_reloc): Made howto const.
842 * oasys.c (oasys_write_data): Made how const.
844 * libelf.h: Added some comments.
845 (struct elf_backend_data): Added elf_backend_ecoff_debug_swap
846 field. Removed unused write_relocs field.
847 * elf32-target.h: Adjusted elf_backend_data initialization
849 * elf64-target.h: Corrected elf_backend_data initialization to
850 fill in all fields and to set elf_64_p to 1.
854 * elfcode.h (bfd_section_from_shdr): Remove duplicate assignment
855 to filepos in SHT_STRTAB case.
856 (assign_file_position_for_section): Set BFD section filepos as
857 well as ELF section sh_offset.
859 * reloc.c: Use const instead of CONST.
860 (bfd_perform_relocation): Make variable howto a const pointer.
861 * bfd-in2.h, libbfd.h: Rebuilt.
865 * Makefile.in (realclean): Don't remove generated headers. Reverts
866 change of 2 Jul 1993.
870 * configure.bfd: make unixware equivalent to sysv4.
872 * config/i386-nlm.mt: bring in elf config; make it the default.
876 * libbfd.c (bfd_put_8): Add parens around reference to "val"
881 * hosts/i386mach3.h (HOST_SEGMENT_SIZE),
882 i386mach3.c (SEGMENT_SIZE, TEXT_START_ADDR): Correct values (?).
886 * coffcode.h (coff_write_object_contents): Zero out internal_a.
890 * aoutx.h, archive.c, archures.c, bfd.c, cache.c, coffcode.h,
891 core.c, ctor.c, format.c, init.c, libbfd.c, opncls.c, reloc.c,
892 section.c, syms.c, targets.c:
893 Doc cleanup (spelling, punctuation, grammar, formatting).
894 * bfd-in2.h, libbfd.h: Rebuild.
898 * bfd-in.h (bfd_get_cacheable, bfd_set_cacheable): New accessors.
899 * bfd.c, opncls.c: Improve comments on file descriptor cacheing.
904 * elf32-hppa.c (hppa_elf_get_section_contents): Fix logic error
905 in last change. Always rebuild symbol extension section the first
906 time though if output sections exist (fixes ld -r problems).
910 * Makefile.in: Add .PHONY for check and installcheck rules.
914 * libbfd-in.h (artdata): Use long, not time_t for portability, at
915 least to HPUX. File below is a derived file.
919 * libbfd.h (artdata): Use long, not time_t for portability, at
924 * config.bfd: Use bigmips for mips*-*-bsd*.
928 * elfcode.h (elf_slurp_reloca_table, elf_slurp_reloc_table):
929 Handle symbol number of zero.
931 * reloc.c (enum bfd_reloc_code_real): Added
932 BFD_RELOC_MIPS_LITERAL, BFD_RELOC_MIPS_GOT16,
933 BFD_RELOC_MIPS_CALL16, BFD_RELOC_MIPS_GPREL32.
934 * bfd-in2.h: Rebuilt.
935 * coff-mips.c (mips_bfd_reloc_type_lookup): Handle
936 BFD_RELOC_MIPS_LITERAL.
937 * elf32-mips.c (mips_reloc_map): Handle new relocs.
938 (mips_elf_hi16_reloc, mips_elf_lo16_reloc): Rearrange _gp_disp
941 * aout-target.h (MY_bfd_debug_info_start, MY_bfd_debug_info_end,
942 MY_bfd_debug_info_accumulat [sic]): Remove unused definitions.
943 (MY_bfd_get_relocated_section_contents, MY_bfd_relax_section,
944 MY_bfd_seclet_link): Define.
945 (MY_bfd_reloc_type_lookup): Rename from
946 MY_reloc_howto_type_lookup.
947 (MY_bfd_make_debug_symbol): Rename from MY_make_debug_symbol.
948 (MY(vec)): Use JUMP_TABLE rather than listing functions.
949 * hp300hpux.c (MY_get_symtab, MY_get_symtab_upper_bound,
950 MY_canonicalize_reloc, MY_write_object_contents): Don't define in
951 terms of MY, because that causes a recusive invocation of CAT when
952 expanded within JUMP_TABLE, and ANSI compilers don't expand
954 * mipsbsd.c (MY_bfd_reloc_type_lookup): Rename from
955 MY_reloc_howto_type_lookup, and don't define in terms of MY.
956 (MY_canonicalize_reloc): Don't define in terms of MY.
957 (aout_mips_little_vec, aout_mips_big_vec): Use JUMP_TABLE rather
958 than listing functions.
962 * config.bfd: Use m68k-elf for m68*-*-sysv4*.
971 version-control: never