3 * elfcode.h (write_relocs): Initialize local var LAST_SYM_IDX, to
6 * mipsbsd.c: Changes from Ralph Campbell:
7 (mips_howto_table_ext): MIPS_RELOC_LO16 should use
8 complain_overflow_dont.
9 (aout_mips_*_vec): Make name use "a.out" instead of "aout", to
12 * bfd.c (bfd_errmsgs): Reword invalid-target message.
14 * config.bfd: For sparc*-*-coff, use sparc-coff.
15 * configure.in: Handle sparccoff_vec.
16 * targets.c (sparccoff_vec): Declare.
18 * reloc.c (bfd_get_reloc_size): New function.
19 (struct reloc_howto_type): Update documentation of size field.
23 * nlm32-alpha.c: New file; preliminary Alpha NetWare support.
24 * config.bfd (alpha-*-netware*): New target; use alpha-nlm.
25 * config/alpha-nlm.mt: New file.
26 * configure.in (nlm32_alpha_vec): New vector; use nlm32-alpha.o,
28 * Makefile.in (BFD32_BACKENDS): Added nlm32-alpha.o.
29 (CFILES): Added nlm32-alpha.c.
31 * targets.c (nlm32_alpha_vec): Declare.
33 * libnlm.h (struct nlm_backend_data): New fields
34 optional_prefix_size, nlm_backend_object_p, nlm_write_prefix,
35 nlm_set_public_section, nlm_get_public_offset. Removed unused
36 nlm_write_reloc field. Changed nlm_write_import to remove
37 unnecessary symbol argument. Renamed nlm_write_externals to
38 nlm_write_external, and changed cound argument from bfd_vma to
40 (nlm_optional_prefix_size, nlm_backend_object_p_func,
41 nlm_write_prefix_func, nlm_set_public_section_func,
42 nlm_get_public_offset_func): New accessor macros.
43 (nlm_write_reloc_func): Removed.
44 (nlm_write_external_func): Adjusted for field renaming.
45 * nlm32-i386.c (nlm_i386_write_import): Renamed from
46 nlm_i386_write_reloc. Removed old nlm_i386_write_import which
47 just called old nlm_i386_write_reloc.
48 (nlm_i386_write_external): Renamed from nlm_i386_write_externals.
49 Declared. Changed second argument from bfd_vma to bfd_size_type.
50 (nlm32_i386_backend): Adjusted for changes to fields and names.
51 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Removed unused,
53 (nlm_sparc_write_import): Removed second argument.
54 (nlm_sparc_write_external): Renamed from
55 nlm_sparc_write_externals. Changed second argument from bfd_vma
57 (nlm32_sparc_backend): Adjusted for changes to fields and names.
58 * nlmcode.h: Removed some unused code.
59 (nlm_object_p): Don't destroy tdata pointer. Call
60 backend_object_p function if it exists.
61 (nlm_slurp_symbol_table): Removed unused variable rcount. Call
62 set_public_section_func if it exists instead of checking
64 (nlm_compute_section_file_positions): Account for
66 (nlm_write_object_contents): Account for optional_prefix_size.
67 Removed useless variable write_reloc_func. Changed declaration
68 and call of write_import_func. Call write_prefix_func if it
69 exists. Removed unused variables len and temp. Call
70 get_public_offset_func if it exists rather than setting NLM_HIBIT.
71 * nlmswap.h: Declare functions.
73 * bfd-in.h (uint64_typeLOW, uint64_typeHIGH): Fully parenthesize
75 (fprintf_vma, sprintf_vma): Use %lx, not %x.
77 * hosts/alphaosf.h (uint64_typeLOW, uint64_typeHIGH): Cast results
80 * config.bfd: Don't set target64 here, as the setting is ignored.
81 * configure.in (ecoffalpha_little_vec): Set target64.
83 * config/alphaosf.mt (TDEFINES): Removed; setting host parameters
86 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
87 Remove unused variable output_section.
91 * irix-core.c: New file for Irix 4 and Irix 5 core support.
92 Functions taken out of coff-mips.c. Handle vmap type VMAPFILE.
93 * coff-mips.c: Irix 4 core file support moved to irix-core.c.
94 * targets.c: If IRIX_CORE defined, include irix_core_vec in
96 * config/irix4.mh (HDEFINES): Add -DIRIX_CORE.
97 (HDEPFILES): Define to be irix-core.o.
98 * config/irix5.mh (HDEFINES): Define to be -DIRIX_CORE.
99 (HDEPFILES): Define to be irix-core.o.
100 * Makefile.in (OPTIONAL_BACKENDS): Added irix-core.o. Removed
101 sco-core.o, which no longer exists.
102 (CFILES): Added all *-core.c files.
103 Rebuilt dependencies.
107 * elfcode.h (map_program_segments): Restore check of file_size !=
108 mem_size, but only if SHT_PROGBITS.
110 * ecofflink.c: New file to hold ECOFF debug information linking
112 * ecoff.c (ecoff_clear_output_flags, ecoff_rel, ecoff_dump_seclet,
113 ecoff_add_string, ecoff_get_debug): Removed. Functionality now in
115 (ecoff_get_extr, ecoff_set_index): New functions.
116 (ecoff_slurp_symbolic_info): Don't save raw_size.
117 (ecoff_bfd_seclet_link): Rewrote to use ecofflink.c functions.
118 (ecoff_compute_section_file_positions): Don't set EXEC_P just
119 because there is a start address.
120 (ecoff_write_object_contents): Handle external symbols here. Use
121 ecofflink.c functions to write out debugging information.
122 * elf32-mips.c (mips_elf_read_ecoff_info, mips_elf_get_extr,
123 mips_elf_set_index): New functions.
124 (mips_elf_seclet_link): Discard empty sections, the .options
125 section and .gptab sections. Handle linking .mdebug section.
126 * libecoff.h (ecoff_data_type): Removed raw_size and ifdbase.
127 * libelf.h (elf_symbol_type): Added mips_extr to tc_data union.
128 * bfd-in.h: Added prototypes for routines in ecofflink.c (some are
129 called by gas, so they are public).
130 * bfd-in2.h: Rebuilt.
131 * Makefile.in (BFD_LIBS): Added ecofflink.o.
132 (CFILES): Added ecofflink.c.
133 (ecofflink.o): New target. Rebuilt dependencies.
137 * som.c (hppa_object_p): Also recognize SHARED_MAGIC_CNX as
138 a valid magic number if it's been defined.
142 * ecoff.c (ecoff_mkobject): Don't create .scommon section; linker
143 no longer requires it.
144 (ecoff_bfd_seclet_link, ecoff_sizeof_headers,
145 ecoff_write_object_contents): Don't treat .scommon section
151 * bfd/config/delta88.mh (HDEFINES): Define this to be -DPTRACE_CORE.
152 * bfd/config/delta88.mh (HDEPFILES): Defined to be ptrace-core.o.
153 * bfd/ptrace-core.c: New file for dealing with core files with
154 start with the ptrace_user structure found on BCS compliant systems.
155 * bfd/targets.c (ptrace_core_vec): New vector.
159 * Minimal support for reading SOM fixup streams. Allows
160 objdump -r to do something reasonable.
161 * som.c (som_get_reloc_upper_bound): Implement.
162 (som_canonicalize_reloc): Implement.
163 (som_set_reloc_info, som_slurp_reloc_table): New functions.
167 * hosts/lynx.h (FPRINTF_ALREADY_DECLARED): Define.
168 * hosts/sparclynx.h: Include lynx.h instead of duplicating it.
172 * coff-a29k.c (a29k_reloc): For R_IREL, don't left shift
173 signed_value before sign extending it. Don't subtract out
174 reloc_entry->address. This makes it compatible with what gas is
177 * elfcode.h (elf_fake_sections): Accept .sbss as the name for a
179 (map_program_segments): Don't leave the loop after the first
181 (assign_file_positions_except_relocs): Only force sh_offset and
182 sh_addr to match modulo maxpagesize for a section which is not
183 SHT_NOBITS. Changed the method used to force page alignment after
184 a SHT_NOBITS section to only do it for the last such consecutive
185 section, and to really force page alignment.
189 * coffcode.h (coff_slurp_symbol_table): Print more verbose message
190 in the case of an unknown (or unhandled) storage class.
192 * config/i386-lynx.mt (TDEFINES): FPRINTF_ALREADY_DECLARED should
193 not be defined here, since it is a host attribute, not a target
195 * config/m68k-lynx.mt, config/sparc-lynx.mt: Ditto.
197 * coffcode.h (coff_bfd_reloc_type_lookup): Don't define if already
200 * coff-sparc.c: Define some relocations, based on ELF relocations.
201 (enum reloc_type, bfd_coff_generic_reloc, coff_sparc_howto_table,
202 struct coff_reloc_map, sparc_reloc_map,
203 coff_sparc_reloc_type_lookup): Borrowed from elf32-sparc.c and
205 (coff_bfd_reloc_type_lookup): Define to be coff_sparc_reloc_....
206 (rtype2howto): Index into coff_sparc_howto_table using
211 * config.bfd (mips*-*-irix5*): New target; use mipsbelf.
212 * configure.host (mips-sgi-irix5*) New host; use irix5 (no
213 hosts/irix5.h created; just use std-host.h).
214 * config/irix5.mh: New file; like irix4.mh, but don't use -G or
216 * Makefile.in: Rebuilt dependencies.
218 * ecoffswap.h: Changed type of internal pointers for swap out
219 functions to const *.
221 * elf32-mips.c (mips_elf_got16_reloc): New function. Handle GOT16
222 correctly for assembler, but linker support not implemented.
223 (elf_mips_howto_table): Use mips_elf_got16_reloc for GOT16.
224 (mips_elf_sym_is_global): New function; at least on Irix 5, all
225 non section symbols are considered global.
226 (elf_backend_sym_is_global): Define.
227 (mips_elf_final_write_processing): New function. Set the MIPS
228 architecture level correctly.
229 (elf_backend_final_write_processing): Define.
230 (mips_elf_section_from_shdr): Handle SHT_MIPS_OPTIONS.
231 (mips_elf_fake_sections): Set entsize of .mdebug or .reginfo
232 section to 1. Handle .options section.
233 (mips_elf_acom_section, mips_elf_acom_symbol,
234 mips_elf_acom_symbol_ptr): New static variables, used to build a
235 generic .acommon section to hold SHN_MIPS_ACOMMON symbols.
236 (mips_elf_symbol_processing): Handle SHN_MIPS_ACOMMON symbols by
237 putting them all in a global .acommon section.
239 * elfcode.h (bfd_section_from_shdr): Don't dump core if target
240 section has no ELF section data.
241 (elf_make_sections): Set addralign of reloc section to 4.
242 (elf_fake_sections): Likewise.
243 (map_program_segments): Don't consider section 0.
244 (assign_file_positions_except_relocs): Don't consider section 0.
245 In the main loop, skip the symtab and strtab sections, since their
246 positions are set elsewhere.
247 (swap_out_syms): Set addralign of symtab section to 4. Set
248 addralign of strtab sections to 1.
249 (assign_file_positions_for_relocs): Don't consider section 0.
250 (write_object_contents): Don't write out section 0.
252 * libelf.h (struct elf_backend_data): Added fields
253 elf_backend_sym_is_global and elf_backend_final_write_processing.
254 * elf32-target.h (elf32_bed): Added corresponding initializers.
255 * elf64-target.h (elf64_bed): Likewise.
256 * elfcode.h (sym_is_global): Take abfd argument. Call
257 elf_backend_sym_is_global if it is not NULL.
258 (elf_map_symbols): Pass abfd to sym_is_global.
259 (write_object_contents): Call elf_backend_final_write_processing
264 * libecoff.h: Include coff/ecoff.h.
265 (struct ecoff_backend_data): Move external debugging information
266 fields into a single field pointing to an ecoff_debug_swap
268 (ecoff_data_type): Move debugging information fields into a single
269 field pointing to an ecoff_debug_info structure.
270 * coff-alpha.c, coff-mips.c, ecoff.c: Corresponding changes.
274 * nlmswap.h: New file to swap fixed header. Included by NLM
276 * libnlm.h (struct reloc_and_sec): Define.
277 (struct nlm_backend_data): Add fields fixed_header_size,
278 nlm_read_import, nlm_write_import, nlm_swap_fhdr_in,
280 (nlm_fixed_header_size, nlm_read_import_func,
281 nlm_write_import_func, nlm_swap_fixed_header_in_func,
282 nlm_swap_fixed_header_out_func, nlm_write_external_func): New
284 * nlmcode.h: Use new functions.
285 * nlm32-i386.c: Provide new functions.
286 * nlm32-sparc.c: New file; SPARC NLM backend.
290 * i386lynx.c (swap_std_reloc_in, swap_ext_reloc_in): Ignore
291 garbage bits appearing in the upper end of symbolnums.
293 * config/sparc-lynx.mt (TDEFINES): Add -DFPRINTF_ALREADY_DECLARED.
295 Tue Nov 16 17:03:41 1993 Stu Grossman (grossman at cygnus.com)
297 * lynx-core.c (lynx_core_file_p): Change bfd_zalloc to bfd_alloc.
298 * m68klynx.c: Define core file macros.
299 * hosts/i386lynx.h, hosts/m68klynx.h, hosts/lynx.h: Move all
300 non-architecture specific stuff into lynx.h.
304 * i386linux.c: Define new macro ZMAGIC_DISK_BLOCK_SIZE to 1024, and
305 change PAGE_SIZE to 4096.
309 * Makefile.in (diststuff): New target.
315 * som.c (som_object_setup): Do not create dummy ".text", ".data",
317 (setup_sections): Do not set SEC_HAS_CONTENTS if a section's size
318 is zero. Recognize BSS type sections and turn off SEC_LOAD and
319 SEC_DATA (so binutils/size works). Set the correct value for
320 a section's _raw_size.
321 (som_slurp_symbol_table): Program entry points, and millicode are
322 also functions. Mark them as such. Also mark L$* symbols as
325 * bfd-in2.h: Rebuilt.
329 * som.c (som_bfd_reloc_type_lookup): Add missing prototype. Returns
330 a pointer to constant data. Delete bogus #define which made the
333 * som.c (som_prep_for_fixups): New function.
334 (som_write_fixups): New function.
335 (som_write_space_strings): New function.
336 (som_write_symbol_strings): New function.
337 (som_begin_writing): New function.
341 * som.c (som_write_object_contents): Do not abort. Flesh out.
342 (som_set_section_contents): Do not abort. Flesh out.
344 * som.c (som_write_headers): New function.
345 (som_prep_headers): New function.
346 (som_build_and_write_symbol_table): New function.
348 * som.c (som_sizeof_headers): Add missing prototype.
349 (som_set_arch_mach): Do not abort.
351 * som.c (som_count_spaces): New function.
352 (som_count_subspaces): New function.
353 (compare_syms): New function.
354 (som_compute_checksum): New function.
356 * som.c (hppa_som_gen_reloc_type): New function.
357 (som_bfd_reloc_type_lookup): New function.
359 * som.c (try_prev_fixup): New function.
360 (som_reloc_skip): New function.
361 (som_reloc_addend): New function.
362 (som_reloc_call): New function.
364 * som.c (som_initialize_reloc_queue): New function.
365 (som_reloc_queue_insert): Likewise.
366 (som_reloc_queue_fix): Likewise.
367 (som_reloc_queue_find): Likewise.
369 * som.c (som_hppa_howto_table): SOM howto relocation table.
370 (hppa_som_reloc): New function.
372 * som.c (struct reloc_queue): New structure to keep track of
373 the last four multibyte relocations emitted.
374 (enum pa_symbol_type): Type to fully describe the symbol types
375 associated with .import/.export assembler directives.
377 * som.c: Include libhppa.h
379 * som.c (bfd_som_set_section_attributes): New function.
380 (bfd_som_set_subsection_attributes): Likewise.
381 (bfd_som_set_symboL_type): Likewise.
382 (bfd_som_attach_unwind_info): Likewise.
383 * som.h: Declare new exported functions.
385 * som.h (struct som_symbol): Add new fields to hold additional
386 information needed to build/write symbol tables and fixup streams.
387 (struct som_section_data_struct): Add new fields to hold additional
388 information needed to build/write space and subspace headers.
389 (som_symbol_data): New accessor macro for SOM symbol information.
390 (R_HPPA_*): Basic relocation types to be used by the assembler.
394 * trad-core.c (trad_unix_core_file_p): If new hook
395 TRAD_CORE_ALLOW_ANY_EXTRA_SIZE defined, then skip the check for the
396 corefile being too big.
397 * hosts/i386sco.h: Define it.
401 * bfd.c (struct _bfd): Add hppabsd_core_data.
402 * targets.c (target_vector): Add hppabsd_core_vec.
403 * hpux-core.c (hpux_core_core_file_p): Fail if an unknown core
404 section is encountered during core section scanning.
405 * hppabsd-core.c: New file.
406 * config/hppabsd.mh: Enable HPPA BSD core files.
408 * elf32-hppa.c (hppa_elf_reloc): Remove DEFUN crud. Remove code
409 which is either commented out or ifdef'd out. Add, update and
410 clean comments. Fix various indention and spacing problems. Handle
411 problems related to using "ble" to jump to a stub rather than "bl"
412 (%r31 is trashed by "ble", but not by "bl").
413 (NEW_INSTRUCTION): Put inside curly braces.
414 (CURRENT_STUB_OFFSET): Fix indention problems.
415 (hppa_elf_build_arg_reloc_stub): Fix indention and spacing problems.
416 Add, update and clean comments. Handle "ble" %r31 lossage problems.
417 (hppa_elf_build_long_branch_stub): Likewise.
418 (hppa_look_for_stubs_in_section): Likewise.
419 (hppa_elf_stub_check): Remove obsolete function.
421 * hppa_stubs.h: Add new instructions to deal with %r31 lossage
422 problems. Delete unused instructions.
426 * m68klynx.c (TARGET_IS_BIG_ENDIAN_P): Define.
430 * elfcode.h (elf_object_p): Rather than looking through an array
431 of architectures, get the ELF EM_xxx code from the backend
432 information. Let the generic ELF target match any EM_xxx code not
433 matched by another ELF target. Call elf_backend_object_p to let
434 the backend do more checks and set global information.
435 * libelf.h (struct elf_backend_data): Added elf_machine_code and
436 elf_backend_object_p fields.
437 (struct bfd_elf_arch_map): Removed.
438 (bfd_elf_arch_map, bfd_elf_arch_map_size): Don't declare.
439 * elf32-target.h, elf64-target.h: Initialize elf_machine_code
440 field with ELF_MACHINE_CODE. Initialize elf_backend_object_p
441 field with elf_backend_object_p (if it is defined).
442 * elf32-gen.c, elf32-hppa.c, elf32-i386.c, elf32-i860.c,
443 elf32-m68k.c, elf32-m88k.c, elf32-mips.c, elf32-sparc.c,
444 elf64-gen.c (ELF_MACHINE_CODE): Defined.
445 * elf32-mips.c: Include ecoffswap.h to get ECOFF swapping
447 (mips_elf_object_p): Set the right machine number.
448 (mips_elf_ecoff_debug_swap): Defined.
449 (elf_backend_object_p): Defined to be mips_elf_object_p.
450 (elf_backend_ecoff_debug_swap): Defined to be
451 mips_elf_ecoff_debug_swap.
452 * elf.c (bfd_elf_arch_map, bfd_elf_arch_map_size): Removed.
454 * libbfd-in.h (target_vector, default_vector): Declare.
456 * format.c (target_vector, default_vector): Don't declare.
458 * elf32-mips.c (elf_mips_howto_table): Don't complain on overflow
459 for R_MIPS_26. Correct overflow detection requires matching the
460 upper four bits of the destination against the PC. From Ted Lemon
463 * bout.c (b_out_reloc_type_lookup): Return type should point to
465 * coff-i960.c (coff_i960_reloc_type_lookup): Likewise.
466 * elf32-hppa.c (elf_hppa_reloc_type_lookup): Likewise.
467 * mipsbsd.c (MY(reloc_howto_type_lookup)): Likewise.
468 * coff-i386.c (coff_i386_reloc): Made howto const.
469 * oasys.c (oasys_write_data): Made how const.
471 * libelf.h: Added some comments.
472 (struct elf_backend_data): Added elf_backend_ecoff_debug_swap
473 field. Removed unused write_relocs field.
474 * elf32-target.h: Adjusted elf_backend_data initialization
476 * elf64-target.h: Corrected elf_backend_data initialization to
477 fill in all fields and to set elf_64_p to 1.
481 * elfcode.h (bfd_section_from_shdr): Remove duplicate assignment
482 to filepos in SHT_STRTAB case.
483 (assign_file_position_for_section): Set BFD section filepos as
484 well as ELF section sh_offset.
486 * reloc.c: Use const instead of CONST.
487 (bfd_perform_relocation): Make variable howto a const pointer.
488 * bfd-in2.h, libbfd.h: Rebuilt.
492 * Makefile.in (realclean): Don't remove generated headers. Reverts
493 change of 2 Jul 1993.
497 * configure.bfd: make unixware equivalent to sysv4.
499 * config/i386-nlm.mt: bring in elf config; make it the default.
503 * libbfd.c (bfd_put_8): Add parens around reference to "val"
508 * hosts/i386mach3.h (HOST_SEGMENT_SIZE),
509 i386mach3.c (SEGMENT_SIZE, TEXT_START_ADDR): Correct values (?).
513 * coffcode.h (coff_write_object_contents): Zero out internal_a.
517 * aoutx.h, archive.c, archures.c, bfd.c, cache.c, coffcode.h,
518 core.c, ctor.c, format.c, init.c, libbfd.c, opncls.c, reloc.c,
519 section.c, syms.c, targets.c:
520 Doc cleanup (spelling, punctuation, grammar, formatting).
521 * bfd-in2.h, libbfd.h: Rebuild.
525 * bfd-in.h (bfd_get_cacheable, bfd_set_cacheable): New accessors.
526 * bfd.c, opncls.c: Improve comments on file descriptor cacheing.
531 * elf32-hppa.c (hppa_elf_get_section_contents): Fix logic error
532 in last change. Always rebuild symbol extension section the first
533 time though if output sections exist (fixes ld -r problems).
537 * Makefile.in: Add .PHONY for check and installcheck rules.
541 * libbfd-in.h (artdata): Use long, not time_t for portability, at
542 least to HPUX. File below is a derived file.
546 * libbfd.h (artdata): Use long, not time_t for portability, at
551 * config.bfd: Use bigmips for mips*-*-bsd*.
555 * elfcode.h (elf_slurp_reloca_table, elf_slurp_reloc_table):
556 Handle symbol number of zero.
558 * reloc.c (enum bfd_reloc_code_real): Added
559 BFD_RELOC_MIPS_LITERAL, BFD_RELOC_MIPS_GOT16,
560 BFD_RELOC_MIPS_CALL16, BFD_RELOC_MIPS_GPREL32.
561 * bfd-in2.h: Rebuilt.
562 * coff-mips.c (mips_bfd_reloc_type_lookup): Handle
563 BFD_RELOC_MIPS_LITERAL.
564 * elf32-mips.c (mips_reloc_map): Handle new relocs.
565 (mips_elf_hi16_reloc, mips_elf_lo16_reloc): Rearrange _gp_disp
568 * aout-target.h (MY_bfd_debug_info_start, MY_bfd_debug_info_end,
569 MY_bfd_debug_info_accumulat [sic]): Remove unused definitions.
570 (MY_bfd_get_relocated_section_contents, MY_bfd_relax_section,
571 MY_bfd_seclet_link): Define.
572 (MY_bfd_reloc_type_lookup): Rename from
573 MY_reloc_howto_type_lookup.
574 (MY_bfd_make_debug_symbol): Rename from MY_make_debug_symbol.
575 (MY(vec)): Use JUMP_TABLE rather than listing functions.
576 * hp300hpux.c (MY_get_symtab, MY_get_symtab_upper_bound,
577 MY_canonicalize_reloc, MY_write_object_contents): Don't define in
578 terms of MY, because that causes a recusive invocation of CAT when
579 expanded within JUMP_TABLE, and ANSI compilers don't expand
581 * mipsbsd.c (MY_bfd_reloc_type_lookup): Rename from
582 MY_reloc_howto_type_lookup, and don't define in terms of MY.
583 (MY_canonicalize_reloc): Don't define in terms of MY.
584 (aout_mips_little_vec, aout_mips_big_vec): Use JUMP_TABLE rather
585 than listing functions.
589 * config.bfd: Use m68k-elf for m68*-*-sysv4*.
598 version-control: never