1 Sat Jul 16 13:55:38 1994 Stan Shebs (shebs@andros.cygnus.com)
3 * config.bfd (m88*-harris-cxux*): Recognize.
4 * hosts/harris.h (POSIX_UTIME, HAVE_PROCFS): Define.
6 * configure.host (m68*-atari-sysv4*): New host.
7 (m68*-cbm-sysv4*): Use m68kv4 instead of amix.
8 * hosts/amix.h: Remove.
9 * hosts/m68kv4.h: New file, was amix.h.
11 Thu Jul 14 15:12:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
13 * reloc.c (enum bfd_reloc_code_real, bfd_type, struct
14 reloc_howto_struct, reloc_howto_type, HOWTO, HOWTO2): Copied
15 changes over from bfd-in2.h so they get generated properly next
16 time someone runs "make headers".
19 * targets.c (netbsd532_vec, pc532mach_vec): Declare const.
20 (m88kmach3_vec): Restore deleted declaration.
22 * configure.in: Alphabetize target vector names.
24 * config/pc532mach.mh: New file.
25 (HDEPFILES, HDEFINES): Define here.
26 * config/pc532-mach.mt (HDEPFILES, HDEFINES): Deleted.
27 * config/ns32k-netbsd.mt (HDEPFILES, HDEFINES): Deleted.
29 Sun Jul 10 00:04:20 1994 Ian Dall (dall@hfrd.dsto.gov.au)
31 * pc532-mach.c: New File. pc532-mach a.out format.
33 * netbsd532.c: New file. pc532-netbsd532 a.out format.
35 * hosts/pc532mach.h: New file. pc532-mach host support.
37 * cpu-ns32k.c: New file. ns32k support cpu specific code rather
38 than format specific code.
40 * config/pc532-mach.mt: New file. Support for pc532-mach target.
42 * config/ns32k-netbsd.mt: New file. Support for netbsd532 target.
44 * aout-ns32k.c, aout-ns32k.h: New files supporting aout format for
47 * targets.c: Add netbsd532_vec and pc532machaout_vec into
48 bfd_target_vector array. Move netbsd386_vec to alphabetic order
51 * reloc.c (_bfd_final_link_relocate) Add support for
52 special_function1 in howto.
54 * libaout.h: add M_NS32032, M_NS32532, M_532_NETBSD entries in
57 * configure.in: add pc532mach_vec and netbsd532_vec entries.
59 * config.bfd: add pc532mach host entries. Use for both
60 ns32k-pc532-mach and ns32k-pc532-netbsd.
62 * config.bfd: it doesn't work to use i386-mach3 for ns32k*-*-mach.
63 add ns32k-pc532-mach* and ns32k-*-netbsd* entries.
65 * bfd-in2.h: Add ns32k specific relocations to bfd_reloc_code_real
68 * bfd-in2.h: Add special_function1 to struct howto. Change HOWTO
69 and NEWHOWTO macros to make special_function1 NULL. Neww HOWTO2
72 * bfd-in2.h: Split definition of struct reloc_howto_struct
73 and corresponding typedef into two statements.
75 * bfd-in2.h: Add entry bfd_arch_ns32k to bfd_architecture enum.
77 * archures.c: Add bfd_ns32k_arch prototype, and entry in
80 * aoutx.h (aout_link_reloc_link_order): Allow for target dependent
81 MY_put_reloc macro. Allow for target dependent special_function1
82 to apply the relocation.
84 * aoutx.h (aout_link_input_section_std): Allow for target
85 dependent determination of reloc howto. Allow for target dependent
86 special_function1 to apply the relocation.
88 * aoutx.h (get_reloc_upper_bound): Detect bss and return 0.
90 * aoutx.h (slurp_reloc_table): Detect bss and succesfully read
93 * aoutx.h (machine_type): Add bfd_arch_ns32k case.
95 * aoutx.h: Stat to determine executable status if STAT_FOR_EXEC
96 is defined (not just MACH). Use fstat instead of stat and check
99 * aoutx.h: Allow target dependent swap_std_reloc_{in,out}.
101 * aoutx.h: Allow CTORS reloc info to be in target dependent reloc
104 * aout-target.h: Apply SWAP_MAGIC (if defined) after
105 swap_exec_header_in, otherwise we have magic in the wrong order.
107 Thu Jul 14 11:47:27 1994 Stan Shebs (shebs@andros.cygnus.com)
109 * coff-sparc.c (sparccoff_vec): Have leading underscores.
111 Tue Jul 12 12:08:10 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
113 * aix386-core.c, aoutf1.h, cisco-core.c, elfcode.h, hppabsd-core.c,
114 hpux-core.c, irix-core.c, lynx-core.c, osf-core.c, ptrace-core.c,
115 rs6000-core.c, trad-core.c: Remove SEC_ALLOC flag from .reg
116 sections, .reg sections are not allocated and contain debug
118 * osf-core.c (make_bfd_asection, osf_core_core_file_p): Use
119 bfd_make_section_anyway instead of building unique section names.
121 Tue Jul 12 11:41:22 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
123 * libelf.h (bfd_elf32_swap_symbol_in): Declare.
124 (bfd_elf32_swap_symbol_out): Declare.
125 (bfd_elf64_swap_symbol_in, bfd_elf64_swap_symbol_out): Declare.
126 * elf32-hppa.c (elf32_hppa_args_hash_table_init): Correct cast.
128 * aout-encap.c (ARCH): Don't define. Obsolete.
129 * aout0.c, aoutx.h, gen-aout.c, hp300bsd.c, hp300hpux.c: Likewise.
130 * i386aout.c, i386bsd.c, i386dynix.c, i386linux.c: Likewise.
131 * i386lynx.c, m68klynx.c, mipsbsd.c, netbsd386.c: Likewise.
132 * newsos3.c, sparclynx.c, sunos.c: Likewise.
134 Mon Jul 11 20:08:23 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
136 * section.c (STD_SECTION): Make the sixth argument boolean, not
137 the seventh. From gary@tuva.pacsemi.oz.au (gary kopff).
139 Sun Jul 10 09:12:02 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
141 * aoutx.h (bfd_free_cached_info): Change name of FREE to BFCI_FREE
142 in order not to collide with LynxOS's definition of FREE in
143 /usr/include/sys/proc.h
145 Thu Jul 7 14:18:06 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
147 * reloc.c (bfd_perform_relocation): Don't clobber the relocation
148 value for coff-Intel-little or coff-Intel-big. Hack upon hack.
150 Thu Jul 7 10:10:34 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
152 * aoutx.h (howto_table_std): Add entry for GOT relocations
153 which are present in sun3 shared libraries, to avoid assertions
154 when reading the dynamic relocations.
156 Thu Jul 7 10:19:20 1994 Jeff Law (law@snake.cs.utah.edu)
158 * som.h (R_HPPA_COMPLEX): Fix dumb typo.
160 Wed Jul 6 19:21:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
162 * hosts/sysv4.h (qsort, strtol): Don't declare.
164 * elfcode.h (elf_link_output_sym): Don't call output_symbol_hook
167 * elf32-mips.c (mips_elf_final_write_processing): Add ignored info
168 argument to correspond to recent libelf.h change.
170 Wed Jul 6 00:48:57 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
172 * coff-alpha.c (alpha_ecoff_mkobject_hook): New hook to
173 additionally copy object type information from the alpha file
174 header to the BFD flags.
175 (alpha_ecoff_backend_data): Use it.
176 (ecoffalpha_little_vec): Add DYNAMIC to object_flags.
177 * aout64.c: Fix typo in conditional QMAGIC definition.
179 Wed Jul 6 00:13:17 1994 Jeff Law (law@snake.cs.utah.edu)
181 * hppabsd-core.c (hppabsd_core_core_file_p): Sanity check the
182 value of clicksz to help weed out non HPPA BSD core files.
184 Tue Jul 5 13:26:02 1994 Stan Shebs (shebs@andros.cygnus.com)
187 * config.bfd (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*):
189 * configure.host (i[34]86-*-mach3*, ns32k-*-mach3*): Recognize
190 "mach3" instead of "mach".
191 (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*): New hosts.
192 * targets.c (m88kmach3_vec): New target vector.
193 (bfd_target_vector): Add i386mach3_vec and m88kmach3_vec, but
195 * aoutx.h (some_aout_object_p) [MACH]: Recognize executables by
196 checking for execute permission, instead of looking at entry
198 * i386mach3.c: Update, define MACH, N_TXTOFF, N_TXTADDR,
199 N_SHARED_LIB, don't include aout/*.h files, etc.
200 * m88kmach3.c: New file, m88k Mach 3 target.
201 * config/m88k-mach3.mt, config/mips-mach3.mt: New files, target
203 * config/i386mach3.mh, config/m88kmach3.mh, config/mipsmach3.mh:
204 New files, host makefile fragments.
205 * hosts/m88kmach3.h, hosts/mipsmach3.h: New files, host definitions.
207 Tue Jul 5 13:56:52 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
209 * elfcode.h (swap_out_syms): Get alignment of common symbol from
210 st_value field of saved ELF symbol information, if there is any.
212 Mon Jul 4 19:13:32 1994 Jeff Law (law@snake.cs.utah.edu)
214 * som.h (R_HPPA_COMPLEX): Define.
215 * elf32-hppa.h (R_HPPA_COMPLEX): Define.
216 (elf32_hppa_reloc_type): Delete R_PARISC_STUB_CALL_17.
218 Fri Jul 1 12:07:41 1994 Jeff Law (law@snake.cs.utah.edu)
220 * Support code for enabling the new style linker for PA ELF.
221 * elfcode.h (swap_symbol_in, swap_symbol_out): Externalize.
222 (elf_compute_section_file_positions): Pass link_info to
223 the begin_write_processing hook.
224 (bfd_elf_write_object_contents): Pass NULL for new link_info
225 argument to final_write_processing hook.
226 (elf_link_output_sym): Accept new "input_section" argument for
227 the symbols's input section. All callers changed. Call the
228 link_output_symbol_hook if it's defined.
229 (elf_bfd_final_link): Call the final_write_processing hook if
231 * libelf.h (elf_backend_link_output_symbol_hook): Declare.
232 (elf_backend_begin_write_processing): Add new "info" argument.
233 (elf_backend_final_write_processing): Likewise.
234 * elf32-target.h (elf_backend_link_output_symbol_hook): Provide
235 a default definition.
236 (elf32_bed): Add elf_backend_link_output_symbol_hook.
237 * elf64-target.h: Likewise.
239 * Major rework of the PA ELF code. Uses the new style BFD
240 linker, major cleanups.
241 * hppa_stubs.h: Rewrite from scratch. Much smaller and simpler.
242 * elf32-hppa.h: Delete all symbol extension related code.
243 (hppa_look_for_stubs_in_section): Delete decl.
244 (elf32_hppa_size_stubs, elf32_hppa_build_stubs): New decls.
245 * elf32-hppa.c: Symbol extension stuff moved form elf32-hppa.h
246 into elf32-hppa.c. Do not include aout64.h.
247 (typdef hppa_stub_type): Delete.
248 (elf32_hppa_stub_name_list_struct): Delete.
249 (elf32_hppa_stub_description_struct): Delete.
250 (arg_reloc_type): Use simpler enumerations. All references changed.
251 (arg_location, arg_reloc_relocation): Likewise.
252 (elf32_hppa_symextn_map_struct): Delete.
253 (get_symbol_value): Delete.
254 (elf32_hppa_get_sym_extn): Delete.
255 (find_stubs, new_stubs, type_of_mismatch): Delete.
256 (find_stub_by_name, add_stub_by_name): Delete.
257 (hppa_elf_stub_finish, hppa_elf_stub_reloc): Delete.
258 (hppa_elf_arg_reloc_needed): Renamed. Simplify.
259 (hppa_elf_build_linker_stub, hppa_elf_create_stub_sec): Delete.
260 (hppa_elf_long_branch_needed_p): Delete.
261 (hppa_look_for_stubs_in_section): Delete.
262 (hppa_elf_get_section_contents): Delete.
263 (elf32_hppa_backend_symbol_processing): Delete.
264 (elf32_hppa_backend_section_processing): Delete.
265 (elf32_hppa_backend_section_from_shdr): Delete.
266 (elf32_hppa_backend_fake_sections): Delete.
267 (elf32_hppa_backend_section_from_bfd_section): Delete.
268 (NEW_INSTRUCTION): Delete.
269 (CURRENT_STUB_OFFSET): Delete.
270 (elf32_hppa_relocate_section): New function.
271 (elf32_hppa_bfd_final_link_relocate): New function.
272 (elf32_hppa_size_symext): New function.
273 (elf32_hppa_link_output_symbol_hook): New function.
274 (elf32_hppa_read_symext_info): New function.
275 (elf32_hppa_add_symbol_hook): New function.
276 (elf32_hppa_name_of_stub): New function.
277 (elf32_hppa_size_of_stub): New function.
278 (elf32_hppa_build_one_sub): New function.
279 (elf32_hppa_build_stubs): New function.
280 (elf32_hppa_size_stubs): New function.
281 (linker, stub and argument hash tables): Add appropriate
282 structures, definitions and functions to implement all three
284 (hppa_elf_relocate_insn): Don't need argument location information
286 (add_entry_to_symext_chain): Accept a symbol's argument location
287 information rather than the symbol itself. All callers changed.
288 (hppa_elf_gen_reloc_type): Simplify.
289 (hppa_elf_set_section_contents): Stub section is no longer special.
290 (hppa_elf_reloc): Greatly simplify.
291 (elf32_hppa_begin_write_processing): Accept link_info argument.
292 Handle being called from the BFD backend linker.
293 (elf32_hppa_final_write_processing): Likewise.
294 (elf_hppa_tc_make_sections): No longer call stub_finish.
296 Mon Jun 27 18:07:06 1994 Steve Chamberlain (sac@cirdan.cygnus.com)
298 * section.c (bfd_get_section_contents): Put in parens to get
301 Sun Jun 26 18:08:29 1994 Jeff Law (law@snake.cs.utah.edu)
303 * libelf.h (relocate_section): New argument "output_names" added
305 * elfcode.h (elf_link_input_bfd): New argument "output_names"
306 added to prototype of relocate_section. Pass the output symbol
307 names to relocate_section.
308 * elf32-i386.c (elf_i386_relocate_section): Use "output_names" to
309 determine the name of a local symbol.
310 * elf32-mips.c (mips_elf_relocate_section): Likewise.
311 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
313 Fri Jun 24 08:15:42 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
315 Add Solaris BCP (the part of Solaris which allows it to run
316 SunOS4 a.out files) core file handling.
317 * aoutf1.h (external_solaris_bcp_core, swapcore_solaris_bcp):
318 New structure and its swap in function.
319 (internal_sunos_core): New member c_data_addr, to receive the
320 start address of the data section in the core file.
321 (swapcore_sun3, swapcore_sparc, sunos4_core_file_p): Use it.
322 (sunos4_core_file_p): Recognize Solaris BCP core file.
323 (sunos4_core_file_matches_executable_p): Always indicate match
324 for Solaris BCP core files.
326 Thu Jun 23 15:31:28 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
328 Preliminary support for generating shared libraries, from Eric
329 Youngdale <ericy@cais.cais.com>.
330 * elfcode.h (prep_headers): If DYNAMIC, set e_type to ET_DYN.
331 (elf_link_add_object_symbols): If generating a shared library,
332 create dynamic sections for first input BFD with the right format.
333 (elf_link_create_dynamic_sections): Don't create .interp section
334 if creating a shared library.
335 (elf_link_input_bfd): Skip dynamic sections in input file.
336 (elf_bfd_final_link): If creating a shared library, it's OK for
337 dynobj to have sections which are not SEC_IN_MEMORY.
338 * elf32-i386.c (elf_i386_size_dynamic_sections): Only set .interp
339 section if not creating a shared library.
340 * elf32-sparc.c (elf_sparc_size_dynamic_sections): Likewise.
342 * elfcode.h (elf_object_p): Don't set DYNAMIC just because there
343 is an SHT_DYNAMIC section.
345 * cf-i386lynx.c (i386coff_vec): Don't include DYNAMIC in
347 * coff-sparc.c (sparccoff_vec): Likewise.
348 * hppabsd-core.c (hppabsd_core_vec): Likewise.
350 * aoutx.h (NAME(aout,some_aout_object_p)): Don't set SEC_RELOC
351 just because DYNAMIC is set.
353 Thu Jun 23 12:53:41 1994 David J. Mackenzie (djm@rtl.cygnus.com)
355 * configure.in: Change --with-targets to --enable-targets and
356 --with-64-bit-bfd to --enable-64-bit-bfd.
357 * Makefile.in, mpw-make.in, targets.c: Change comments.
359 Wed Jun 22 17:59:59 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
361 * config.bfd (powerpc-*-elf*): New target, just like
364 * linker.c (FAIL): Undefine macro before defining as enum.
366 Wed Jun 22 10:52:47 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
368 * linker.c (_bfd_generic_link_add_archive_symbols): Initialize
369 pass from abfd->archive_pass, and save it there as well.
371 * hash.c (bfd_hash_allocate): Don't call bfd_set_error if
372 obstack_alloc returns NULL unless the size is non-zero.
374 * linker.c (archive_hash_allocate): Define.
375 (_bfd_generic_link_add_archive_symbols): Use archive_hash_allocate
376 rather than obstack_alloc, for clarity.
378 * elfcode.h (elf_get_reloc_upper_bound): Correct.
380 * aout64.c (BMAGIC, QMAGIC): Define if not already defined. From
381 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>.
383 Linux ZMAGIC support from Eric Youngdale <ericy@cais.cais.com>.
384 * libaout.h (struct aoutdata): Add field zmagic_disk_block_size.
385 * aout-target.h (MY(callback)): Only set alignment according to
386 architecture if the section sizes are aligned to that alignment,
387 for backward compatibility.
388 (MY(set_sizes)): Initialize zmagic_disk_block_size field.
389 * aoutx.h (adjust_z_magic): Set ztih if using q_magic_format. Set
390 text section filepos to zmagic_disk_block_size if not ztih. Use a
391 different padding algorithm if not ztih.
392 * i386linux.c (MY_text_includes_header): Don't define.
394 * aoutx.h (aout_link_check_ar_symbols): Just skip N_STAB and N_FN
395 symbols; don't look them up in the hash table. From
396 ralphc@pyramid.com (Ralph Campbell).
398 Tue Jun 21 11:47:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
400 * coff-go32.c (go32coff_archive_p): Remove unused function.
402 * section.c (bfd_abs_section): Make const.
403 (bfd_abs_section_ptr, bfd_is_abs_section): Define.
404 (bfd_und_section): Make const.
405 (bfd_und_section_ptr, bfd_is_und_section): Define.
406 (bfd_com_section): Make const.
407 (bfd_com_section_ptr): Define.
408 (bfd_ind_section): Make const.
409 (bfd_ind_section_ptr, bfd_is_ind_section): Define.
410 (bfd_abs_symbol, bfd_com_symbol): Make const.
411 (bfd_und_symbol, bfd_ind_symbol): Likewise.
412 (global_syms): Cast initialization of section field.
413 (STD_SECTION): Define as const, and cast initializations.
414 * bfd-in2.h: Rebuilt.
415 * Many files: Change uses of bfd_abs_section, etc., to use
416 bfd_abs_section_ptr or bfd_is_abs_section, etc.
418 Mon Jun 20 11:06:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
420 * Many files: change all bfd_target vectors to be const. Change
421 all uses of bfd_target * to be const bfd_target *. Change
422 bfd_target_vector and bfd_default_vector arrays to be const
423 bfd_target * const *.
425 * ecoff.c, libecoff.h, ecoffswap.h, coff-alpha.c, coff-mips.c,
426 elf32-mips.c: Renamed all externally visible ECOFF routines which
427 are local to BFD to start with _bfd_ecoff instead of just ecoff.
429 * ecoff.c (ecoff_swap_tir_in): Change input argument to const.
430 (ecoff_swap_tir_out): Likewise.
431 (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Likewise.
432 (ecoff_slurp_symbolic_info): Add new arguments to correspond to
433 read_debug_info entry point in ecoff_debug_swap structure.
435 * libecoff.h (ecoff_slurp_symbolic_info): Change declaration.
436 * ecoffswap.h (ecoff_swap_tir_in, ecoff_swap_tir_out): Declare.
437 (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Declare.
438 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new
439 ecoff_debug_swap fields.
440 * coff-mips.c (mips_ecoff_backend_data): Likewise.
441 * elf32-mips.c (mips_elf_read_ecoff_info): Undefine READ.
442 (mips_elf_ecoff_debug_swap): Initialize new ecoff_debug_swap
444 * configure.in (bfd_elf32_bigmips_vec): Use ecoff.o and
446 (bfd_elf32_littlemips_vec): Likewise.
447 (ecoff_big_vec, ecoff_little_vec): Likewise.
448 (ecoffalpha_little_vec): Likewise.
449 * Makefile.in (BFD_LIBS): Remove ecoff.o and ecofflink.o.
450 (BFD32_BACKENDS): Add ecoff.o and ecofflink.o.
452 * aoutx.h (NAME(aout,final_link)): Check flavour of sub, not abfd,
453 when computing reloc sizes. From Eric Youngdale
454 <ericy@cais.cais.com>.
455 * elfcode.h (elf_bfd_final_link): Don't try to compute maximum
456 reloc count or size for a non-ELF file.
458 * mipsbsd.c (MY_final_link_callback): Define to avoid warning.
460 * hp300hpux.c (MY_final_link_callback): Define to avoid warning.
461 (BMAGIC, QMAGIC): Define; used by aoutx.h.
462 (MY(slurp_symbol_table)): Change translate_from_native_sym_flags
463 calls to use new parameters.
465 Fri Jun 17 14:45:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
467 * aout-target.h (MY(callback)): Set the alignments of the text,
468 data and bss sections after determining the architecture.
470 * sunos.c (sunos_add_one_symbol): Treat a common symbol from a
471 dynamic object as being in the .bss section of the object, rather
472 than as being undefined.
474 Fri Jun 17 11:16:50 1994 Jeff Law (law@snake.cs.utah.edu)
476 * libhppa.h (bfd_hppa_insn2fmt, hppa_rebuild_insn): Make INLINE.
478 * elf32-hppa.h (elf_hppa_final_processing): Delete decl.
480 Thu Jun 16 23:36:23 1994 Jeff Law (law@snake.cs.utah.edu)
482 * elfcode.h (elf_link_input_bfd): Don't try to read local symbols
483 if there aren't any in the input file.
485 Thu Jun 16 14:25:22 1994 Eric Youngdale (ericy@cais.cais.com)
487 * i386linux.c: Many new functions and definitions for linker
488 support for Linux shared libraries.
489 * bfd-in.h (bfd_linux_size_dynamic_sections): Declare.
490 * bfd-in2.h: Rebuild.
492 Thu Jun 16 14:23:46 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
494 * config.bfd: If second argument is ``_'', then, instead of
495 echoing config file name, echo whether target uses leading
496 underscores on symbol names. Add appropriate settings to
497 different cases. Used by binutils/configure.in to set default for
500 * elfcode.h (elf_bfd_final_link): If trying to generate a shared
501 object, warn and return false.
503 * aoutx.h (NAME(aout,some_aout_object_p)): Accept BMAGIC objects
504 and treat them as OMAGIC.
506 Wed Jun 15 18:02:21 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
508 Enable sparc v9 support for release. Note that this is still a
509 work in progress, pending release of an ABI specification.
510 * config.bfd, configure.in: Include sparc v9 elf config.
511 * elfcode.h (prep_headers): Handle sparc v9 (64 bit).
512 * reloc.c (bfd_reloc_code_real): New reloc types.
513 * elf64-sparc.c: Implement elf64-sparc target.
514 * Makefile.in, targets.c: Updated.
516 Wed Jun 15 01:34:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
518 * libelf.h (struct elf_obj_tdata): New field dt_needed_name.
519 (elf_dt_needed_name): New accessor macro.
520 * elfcode.h (elf_link_add_object_symbols): If elf_dt_needed_name
521 is set, use that instead of the filename for the DT_NEEDED dynamic
523 * elf.c (bfd_elf_set_dt_needed_name): New function.
524 * bfd-in.h (bfd_elf_set_dt_needed_name): Declare.
525 * bfd-in2.h: Rebuilt.
527 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add sinterpptr
528 argument, and set it to the .interp section.
529 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
530 (bfd_elf64_size_dynamic_sections): Likewise.
531 * bfd-in2.h: Rebuilt.
533 * coff-sparc.c (SWAP_OUT_RELOC_EXTRA): Define to clear the r_spare
534 field of the reloc rather than letting it be garbage.
536 * archive.c (bfd_slurp_armap): Recognize __.SYMDEF/ as well as
537 __.SYMDEF; the former was used in old Linux archives. From
538 jrs@world.std.com (Rick Sladkey).
540 * i386linux.c (i386linux_write_object_contents): Define; like
541 MY(write_object_contents) in aout-target.h, but set MACHTYPE to
542 M_386. From jrs@world.std.com (Rick Sladkey).
543 (MY_write_object_contents): Define.
545 * aoutx.h (translate_from_native_sym_flags): Treat N_SETV symbols
547 (aout_link_add_symbols): Likewise.
549 * aoutx.h: Rewrite symbol duplicate elimination to use BFD hash
551 (struct stringtab_entry, struct stringtab_data): Remove.
552 (HASHMAXLEN, HASH_CHAR, hash, compare, log2, emit_strtab): Remove.
553 (struct strtab_hash_entry, struct strtab_hash): Define.
554 (strtab_hash_newfunc, strtab_hash_lookup): Define.
555 (stringtab_free, emit_stringtab): Define.
556 (stringtab_init, add_to_stringtab): Rewrite.
557 (NAME(aout,write_syms)): Use new stringtab code.
558 (struct aout_final_link_info, NAME(aout,final_link)): Likewise.
559 (aout_link_write_symbols, aout_link_write_other_symbol): Likewise.
561 * bfd-in.h (BFD_TRADITIONAL_FORMAT): Define new BFD flag to
562 request BFD to write object in the traditional format, whatever
563 that means for the particular backend.
564 * bfd-in2.h: Rebuilt.
566 * hash.c (bfd_hash_allocate): If obstack_alloc fails, set
569 Tue Jun 14 13:00:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
571 * libaout.h (struct aoutdata): Add q_magic_format to subformat
573 * aout-target.h (MY_bfd_copy_private_bfd_data): Define as function
574 if not already defined. Copy subformat information.
575 (MY_text_includes_header): Define as 0 if not already defined.
576 (MY(backend_data)): Use MY_text_includes_header rather than 0.
577 (MY_final_link_callback): Rename from final_link_callback, and
578 define only if MY_final_link_callback is not already defined.
579 (MY_bfd_final_link): Rename use of final_link_callback to
580 MY_final_link_callback.
581 * aoutx.h (NAME(aout,some_aout_object_p)): Handle QMAGIC like
582 ZMAGIC, but set the subformat to q_magic_format. Abort if the
583 magic number if not recognized.
584 (adjust_z_magic): Use QMAGIC if q_magic_format.
585 * i386linux.c (MY_text_includes_header): Define as 1.
586 (i386linux_bfd_final_link): New static function.
587 (MY_bfd_final_link): Define as i386linux_bfd_final_link.
589 * aoutx.h (translate_to_native_sym_flags): Check both section and
590 output_section against sections of abfd.
592 * libecoff.h (struct ecoff_link_hash_entry): Change type of
593 written from boolean to char. Add new field small.
594 * ecoff.c (ecoff_link_hash_newfunc): Initialize written to 0
595 rather than false. Initialize small to 0.
596 (ecoff_link_add_externals): If ECOFF type is scSUndefined, set
597 small. If small is set, and hash table type is common, force the
598 symbol into a section named SCOMMON and change the ECOFF type from
599 scCommon to scSCommon.
600 (ecoff_link_write_external): Set written to 1 rather than true.
601 * coff-mips.c (mips_relocate_section): Correct JMPADDR reloc
602 overflow check to consider section VMA of input file.
604 Mon Jun 13 14:20:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
606 * aoutf1.h (aout_32_sunos4_write_object_contents): Handle a
607 machine type of 68000.
608 * aoutx.h (NAME(aout,machine_type)): Add new argument unknown.
609 Set *unknown to true if machine type is really unknown, as opposed
610 to M_UNKNOWN for the 68000.
611 (NAME(aout,set_arch_mach)): Change NAME(aout,machine_type) call
613 * libaout.h (NAME(aout,machine_type)): Add new argument to
616 Sun Jun 12 20:21:03 1994 Jeff Law (law@snake.cs.utah.edu)
618 * som.c (EXEC_AUX_ID): Define based on availablity of HPUX_AUX_ID
620 (som_begin_writing): Use EXEC_AUX_ID instead of HPUX_AUX_ID.
621 (som_write_armap): Use CPU_PA_RISC1_0 as the magic number. Note
622 som.c is careful to always define CPU_PA_RISC1_0.
624 Sat Jun 11 16:32:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
626 Add weak symbols as an extension to a.out.
627 * aoutx.h (sym_in_text_section): Don't define.
628 (sym_in_data_section, sym_in_bss_section): Likewise.
629 (sym_is_undefined, sym_is_global_defn): Likewise.
630 (sym_is_debugger_info, sym_is_fortrancommon): Likewise.
631 (sym_is_absolute, sym_is_indirect): Likewise.
632 (translate_from_native_sym_flags): Rewrite for clarity. Rearrange
633 arguments and change caller. Handle weak symbols.
634 (translate_to_native_sym_flags): Likewise.
635 (aout_link_check_ar_symbols): Don't ignore weak symbols. Pull
636 object in from archive if a weak defintion is found for an
637 existing undefined symbol.
638 (aout_link_add_symbols): Put all cases in switch. Set flags of an
639 undefined symbol to 0. Handle weak symbols.
640 (aout_link_write_symbols): Handle weak symbols.
641 (aout_link_write_other_symbol): Likewise.
642 (aout_link_input_section_std): Likewise.
643 (aout_link_input_section_ext): Likewise.
644 * sunos.c (sunos_write_dynamic_symbol): Likewise.
646 Fri Jun 10 13:25:13 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
648 * aoutx.h (NAME(aout,canonicalize_reloc)): Handle .bss section.
649 (NAME(aout,get_reloc_upper_bound)): Likewise.
651 * coff-i960.c (coff_i960_reloc_type_lookup): Add BFD_RELOC_CTOR.
652 * linker.c (_bfd_generic_link_write_global_symbol): Don't assume
653 the section of a common symbol is not NULL.
655 Wed Jun 8 23:15:53 1994 Stu Grossman (grossman@cygnus.com)
657 * nlmcode.h (nlm_object_p): Set EXEC_P and start address for GDB.
659 Wed Jun 8 23:57:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
661 * aoutx.h (aout_get_external_symbols): Don't try to read the
662 strings if there are no symbols.
663 (aout_link_write_other_symbol): Use the output section when
664 working out the type.
666 Tue Jun 7 13:25:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
668 * elfcode.h (assign_section_numbers): Put shstrtab, symtab and
669 strtab sections at end of file. Avoids bug in some versions of
670 SVR4 strip. From Eric Youngdale <eric@tantalus.nrl.navy.mil>.
672 * coffcode.h (styp_to_sec_flags): If COFF_PAGE_SIZE is defined,
673 set SEC_DEBUGGING for STYP_INFO sections.
674 (coff_compute_section_file_positions): If COFF_PAGE_SIZE is
675 defined, and D_PAGED is set, set the file position equal to the
676 section VMA modulo COFF_PAGE_SIZE.
677 * coffgen.c (coff_real_object_p): If F_EXEC is set, set D_PAGED.
678 * coff-i386.c: Set D_PAGED in BFD target.
679 (COFF_PAGE_SIZE): Define.
680 * coff-m68k.c, coff-sparc.c: Likewise.
682 Mon Jun 6 10:57:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
684 * elfcode.h (bfd_section_from_shdr): Don't turn a reloc section
685 into a BFD section just because SHF_ALLOC is set; require that it
686 not use the normal symbol table.
687 (elf_section_from_bfd_section): Corresponding change.
689 Better indirect and warning symbol handling inspired by Stuart
690 Quick <stuck@cs.man.ac.uk>.
691 * linker.c (enum link_action): Add REF, MIND, CWARN, REFC.
692 (link_action): Change UNDEF_ROW/def and UNDEFW_ROW/def from NOACT
693 to REF. Change UNDEF_ROW/indr and UNDEFW_ROW/indr from CYCLE to
694 REFC. Change DEF_ROW/indr and COMMON_ROW/indr from CYCLE to MDEF.
695 Change DEFW_ROW/indr from CYCLE to NOACT. Change INDR_ROW/indr
696 from MDEF to MIND. Change INDR_ROW/warn from WARNC to CYCLE.
697 Change WARN_ROW/def and WARN_ROW/indr from MWARN to CWARN. Change
698 WARN_ROW/com from MWARN to WARN. Change WARN_ROW/warn from NOACT
699 to CYCLE. Change SET_ROW/warn from WARNC to CYCLE>
700 (_bfd_generic_link_add_one_symbol): Handle REF, MIND, CWARN and
701 REFC. If a new indirect symbol has been referenced, push the
702 reference down to the symbol it points to. FIx handling of WARN.
703 * aoutx.h (translate_from_native_sym_flags): If N_WARNING, don't
704 clobber e_type of next symbol.
705 (translate_to_native_sym_flags): Likewise.
706 (aout_link_write_symbols): Loop on bfd_link_hash_warning as well
707 as bfd_link_hash_indirect.
709 * libaout.h (struct aout_link_hash_entry): New field written.
710 * aoutx.h (NAME(aout,link_hash_newfunc)): Initialize written.
711 (aout_link_write_symbols): Use written, not root.written.
712 (aout_link_write_other_symbol): Likewise.
713 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
714 * libecoff.h (struct ecoff_link_hash_entry): New field written.
715 * ecoff.c (ecoff_link_hash_newfunc): Initialize written.
716 (ecoff_link_write_external): use written, not root.written.
717 * genlink.h (struct generic_link_hash_entry): New field written.
718 * linker.c (_bfd_link_hash_newfunc): Don't initialize written.
719 (generic_link_hash_newfunc): Initialize written.
720 (_bfd_generic_link_output_symbols): Use written, not root.written.
721 (_bfd_generic_link_write_global_symbol): Likewise.
722 (_bfd_generic_reloc_link_order): Likewise.
724 * libecoff.h (ecoff_data_type): Add linker field.
725 * ecoff.c (ecoff_write_object_contents): Check new tdata linker
726 field, rather than outsymbols being non-NULL, to decide whether to
727 output the symbols and relocs.
728 (ecoff_bfd_final_link): Set new tdata linker field to true.
730 * ecoff.c (ecoff_bfd_copy_private_bfd_data): Don't try to copy
731 data to a non-ECOFF file.
733 * libbfd-in.h: Add warning that libbfd.h is a generated file.
736 Sun Jun 5 15:02:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
738 Changes to support ELF strip and objcopy on dynamically linked
740 * elfcode.h (elf_fake_sections): Add prototype.
741 (bfd_section_from_shdr): Make a BFD section from an SHT_HASH
742 section, and from an SHT_DYNSYM section, and from the dynamic
743 string table section.
744 (elf_object_p): Set D_PAGED if there is a program header.
745 (elf_make_sections): Remove.
746 (fix_up_strtabs): Remove.
747 (elf_fake_sections): Rewrite. Now sets sh_entsize.
748 (assign_section_numbers): Rewrite. Now sets sh_link and sh_info
750 (elf_compute_section_file_positions): Don't call obsolete
751 functions elf_make_sections or fix_up_strtabs.
752 (swap_out_syms): Set sh_addralign to FILE_ALIGN rather than 4.
753 (NAME(bfd_elf,write_object_contents)): Permit writing DYNAMIC
755 (elf_section_from_bfd_section): Treat SHT_DYNSYM like other normal
756 sections. If an SHT_REL or SHT_RELA section is allocated or uses
757 an unusual symbol table, permit a BFD section to map to it.
758 Permit most SHT_STRTAB sections to have a BFD section mapped to
760 (elf_bfd_final_link): Don't set sh_link, sh_info or sh_entsize
761 fields of dynamic sections here; do it in assign_section_numbers.
762 * elf32-target.h, elf64-target.h: Add D_PAGED to permitted object
765 * elf.c (_bfd_elf_make_section_from_shdr): Only set SEC_DATA if
766 SEC_LOAD is set, rather than checking SEC_ALLOC.
768 * libbfd-in.h (bfd_realloc): Change last arg to "size_t size".
770 Fri Jun 3 10:58:02 1994 Jeff Law (law@snake.cs.utah.edu)
772 * som.c (som_write_object_contents): Don't compute the file header's
774 (som_write_headers): Instead do it here.
776 * libbfd.h (bfd_realloc): Change last arg to "size_t size".
778 Thu Jun 2 17:39:22 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
780 * hosts/sun3.h: Include <stdlib.h>. Don't declare free, exit or
783 Add linker support for SunOS shared libraries.
784 * sunos.c: Include bfdlink.h. Add many new functions and
785 definitions for SunOS shared library support.
786 * bfd-in.h (bfd_sunos_record_link_assignment): Declare.
787 (bfd_sunos_size_dynamic_sections): Declare.
788 * bfd-in2.h: Rebuilt.
789 * aoutx.h (struct aout_link_hash_entry): Move to libaout.h.
790 (struct aout_link_hash_table): Likewise.
791 (aout_link_hash_lookup, aout_link_hash_traverse): Likewise.
792 (aout_hash_table): Likewise.
793 (NAME(aout,link_hash_newfunc)): Rename from aout_link_hash_newfunc
794 and make externally visible.
795 (NAME(aout,link_hash_table_init)): New function.
796 (NAME(aout,link_hash_table_create)): Call
797 NAME(aout,link_hash_table_init), not _bfd_link_hash_table_init.
798 (aout_link_add_symbols): Don't fail if no symbols. If it exists,
799 call add_dynamic_symbols backend entry point for dynamic objects.
800 Use add_one_symbol backend entry point if it exists.
801 (NAME(aout,final_link)): Call finish_dynamic_link backend entry
803 (aout_link_input_bfd): For a dynamic object, call
804 link_dynamic_object backend entry point, if it exists.
805 (aout_link_write_other_symbol): Call write_dynamic_symbol backend
806 entry point, if it exists.
807 (aout_link_input_section): Don't read the relocs if they have
809 (aout_link_input_section_std): When doing a final link, for a
810 reloc against an external symbol, call check_dynamic_reloc backend
811 entry point, if it exists.
812 (aout_link_input_section_ext): Likewise.
813 * libaout.h: Protect against multiple inclusion. Include
815 (struct aout_link_hash_entry): Move in from aoutx.h.
816 (struct aout_link_hash_table): Likewise.
817 (aout_link_hash_lookup, aout_link_hash_traverse): Likewise.
818 (aout_hash_table): Likewise.
819 (struct aout_backend_data): Add fields add_dynamic_symbols,
820 add_one_symbol, link_dynamic_object, write_dynamic_symbol,
821 check_dynamic_reloc, and finish_dynamic_link.
822 (struct aout_section_data_struct): Define new structure.
823 (aout_section_data): Define new accessor macro.
824 (NAME(aout,link_hash_newfunc)): Declare.
825 (NAME(aout,link_hash_table_init)): Declare.
826 * aoutf1.h (sunos4_aout_backend): Initialize new aout_backend_data
828 * aout-target.h (MY(backend_data)): Likewise.
829 * i386aout.c (MY(backend_data)): Likewise.
830 * i386mach3.c (MY(backend_data)): Likewise.
831 * mipsbsd.c (MY(backend_data)): Likewise.
832 * sparclynx.c (sparclynx_aout_backend): Likewise.
834 * aoutx.h (NAME(aout,slurp_symbol_table)): Don't zero out cached
835 until we know it is non-NULL.
836 (aout_link_write_symbols): Don't skip a warning symbol even if it
837 has already been written out. If skipping an indirect symbol,
838 skip the next symbol as well.
840 Wed Jun 1 14:37:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
842 * hosts/sun3.h: Don't declare qsort, malloc or realloc.
844 Thu May 26 13:56:03 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
846 * nlmcode.h (nlm_swap_auxiliary_headers_in): Cast bfd_byte pointer
847 to char pointer to avoid compiler warnings.
849 * dep-in.sed: Remove spaces before colons.
851 Merged changes back in from FSF gas release 2.3:
853 * Makefile.in (stmp-bfd.h): Wrap `if' block around grep
854 invocation, to avoid a bug in BSD 4.4 make.
857 * mipsbsd.c (mips_fix_jmp_addr): If symbol is undefined, return an
859 (mips_fix_hi16_s): Ditto.
861 Fri May 13 21:21:00 1994 DJ Delorie (dj@ctron.com)
863 * makefile.dos: define a default target, or archives won't work
864 due to multiple matches.
866 Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com)
868 * configure.bat: update for latest files
869 * makefile.dos: update for correct targets and sources
870 * coff-go32.c: [new] go32's COFF format (i386coff with underscores)
871 * targets.c: add go32coff target
872 * makefile.in: add coff-go32.c support
874 Thu May 26 10:10:21 1994 Jeff Law (law@snake.cs.utah.edu)
876 * som.c (som_prep_headers): Do not set the system_id here, private
877 bfd data has not been copied yet.
878 (som_write_headers): Instead do it here.
880 Tue May 24 16:17:18 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
882 Make MIPS ELF use new ELF backend linker. No shared library
884 * elf32-mips.c (bfd_mips_elf32_swap_gptab_in): New function.
885 (bfd_mips_elf32_swap_gptab_out): New function.
886 (mips_elf_object_p): If last symbol is LOCAL, set elf_bad_symtab.
887 (mips_elf_final_write_processing): Set sh_info field for .gptab.*
889 (mips_elf_fake_sections): Set sh_entsize for .gptab.* sections.
890 (mips_elf_read_ecoff_info): Read and free external symbols last,
891 not first, for clarity.
892 (struct mips_elf_link_hash_entry): Define new structure.
893 (struct mips_elf_link_hash_table): Define new structure.
894 (mips_elf_link_hash_lookup): Define new macro.
895 (mips_elf_link_hash_traverse): Define new macro.
896 (mips_elf_hash_table): Define new macro.
897 (mips_elf_link_hash_newfunc): New static function.
898 (mips_elf_link_hash_table_create): New static function.
899 (mips_elf_add_symbol_hook): New static function.
900 (struct extsym_info): Define new structure.
901 (mips_elf_get_extr, mips_elf_set_index): Remove.
902 (mips_elf_output_extsym): New static function.
903 (gptab_compare): New static function.
904 (mips_elf_final_link): Rewrite to use ELF backend linker, and to
905 merge gptab information in input files.
906 (mips_elf_relocate_hi16): New static function.
907 (mips_elf_relocate_section): New static function.
908 (bfd_elf32_bfd_link_hash_table_create): Define as macro before
909 including elf32-target.h.
910 (elf_backend_relocate_section): Likewise.
911 (elf_backend_add_symbol_hook): Likewise.
912 * elf.c (_bfd_elf_link_hash_newfunc): Rename from
913 elf_link_hash_newfunc and make globally visible. Change caller.
914 (_bfd_elf_link_hash_table_init): New function, broken out of
915 _bfd_elf_link_hash_table_create.
916 (_bfd_elf_link_hash_table_create): Use
917 _bfd_elf_link_hash_table_init.
918 * libelf.h (struct elf_obj_tdata): Add new field bad_symtab.
919 (elf_bad_symtab): Define new accessor macro.
920 (_bfd_elf_link_hash_newfunc): Declare.
921 (_bew_elf_link_hash_table_init): Declare.
922 * elfcode.h (elf_object_p): Call backend object_p hook after
923 swapping in all the section headers.
924 (map_program_segments): Correct typo: Internal for External.
925 (elf_link_add_object_symbols): If elf_bad_symtab is set, read all
926 the symbols. Skip STB_LOCAL symbols rather than giving an error.
927 (elf_bfd_final_link): If elf_bad_symtab is set, allocate space for
928 all symbols, not just locals.
929 (elf_link_output_extsym): Only skip a symbol not mentioned by a
930 regular file if it is mentioned by a dynamic object.
931 (elf_link_input_bfd): If elf_bad_symtab is set, read all the
934 Fri May 20 13:38:23 1994 Jeff Law (law@snake.cs.utah.edu)
936 * som.c (som_set_reloc_info): Do not set any relocation info
937 for SOM fixups which are never passed to BFD.
939 Fri May 20 11:57:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
941 * coff-mips.c (mips_relocate_section): Add MIPS_R_JMPADDR overflow
944 * elf32-i386.c (elf_i386_size_dynamic_sections): Add DT_DEBUG to
945 the dynamic linking information for the benefit of the debugger.
947 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
949 * elf.c (_bfd_elf_make_section_from_shdr): New function, based on
950 code repeated three times in bfd_section_from_shdr in elfcode.h.
951 * libelf.h (_bfd_elf_make_section_from_shdr): Declare.
952 * elfcode.h (bfd_section_from_shdr): Use new function
953 _bfd_elf_make_section_from_shdr to create BFD sections. If a
954 reloc section does not use the main symbol table, or it is part of
955 the process image, treat it as a normal section, not relocs.
956 * elf32-mips.c (mips_elf_section_from_shdr): Use new function
957 _bfd_elf_make_section_from_shdr.
959 Thu May 19 11:37:11 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
961 * elf32-target.h, elf64-target.h: Change ar_max_namelen value from
962 15 to 14 to match SVR4 ar.
964 Add support for ELF shared libraries. Loosely based on work by
965 Eric Youngdale <ericy@cais.com>.
966 * libelf.h (struct elf_backend_data): Add new fields for dynamic
967 linking: elf_backend_create_dynamic_sections,
968 elf_backend_adjust_dynamic_symbol,
969 elf_backend_size_dynamic_sections,
970 elf_backend_finish_dynamic_symbol,
971 elf_backend_finish_dynamic_sections.
972 (struct elf_link_hash_entry): Change type of align field to
973 bfd_size_type. Add fields dynindx, dynstr_index, weakdef,
975 (struct elf_link_hash_table): Add fields dynobj, dynsymcount,
977 (bfd_elf32_swap_reloc_in, bfd_elf32_swap_reloc_out): Declare.
978 (bfd_elf32_swap_reloca_in, bfd_elf32_swap_reloca_out): Declare.
979 (bfd_elf32_swap_dyn_in, bfd_elf32_swap_dyn_out): Declare.
980 (bfd_elf32_add_dynamic_entry): Declare.
981 (bfd_elf64_swap_reloc_in, bfd_elf64_swap_reloc_out): Declare.
982 (bfd_elf64_swap_reloca_in, bfd_elf64_swap_reloca_out): Declare.
983 (bfd_elf64_swap_dyn_in, bfd_elf64_swap_dyn_out): Declare.
984 (bfd_elf64_add_dynamic_entry): Declare.
985 * elfcode.h (Elf_External_Dyn): Define.
986 (elf_swap_reloc_in): Define as macro using NAME. Make externally
988 (elf_swap_reloc_out): Likewise.
989 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
990 (elf_swap_dyn_in, elf_swap_dyn_out): Define as macro using NAME
991 and as new externally visible function.
992 (elf_fake_sections): Set section type of dynamic sections based on
994 (elf_write_phdrs): Remove.
995 (assign_file_position_for_section): Add new align argument.
997 (get_program_header_size): New static function.
998 (struct seg_info): Remove.
999 (map_program_segments): Completely rewrite.
1000 (assign_file_positions_except_relocs): Completely rewrite.
1001 (assign_file_positions_for_relocs): Don't set a file position for
1002 sections which already have one. Don't bother to align the file
1004 (section_from_elf_index): Handle SHT_HASH and SHT_DYNAMIC
1006 (elf_section_from_bfd_section): Likewise.
1007 (elf_slurp_symbol_table): If section_from_elf_index fails, just
1008 use bfd_abs_section rather than returning an error.
1009 (elf_sizeof_headers): Make useful.
1010 (elf_link_record_dynamic_symbol): New static function.
1011 (elf_link_add_object_symbols): Handle dynamic objects.
1012 (elf_link_create_dynamic_sections): New static function.
1013 (elf_add_dynamic_entry): Define as macro using NAME and as new
1014 externally visible function.
1015 (NAME(bfd_elf,record_link_assignment)): New function.
1016 (elf_buckets): New static variable.
1017 (NAME(bfd_elf,size_dynamic_sections)): New function.
1018 (struct elf_final_link_info): Add dynsym_sec and hash_sec fields.
1019 (elf_bfd_final_link): Handle dynamic linking. Create a section
1020 symbol for all ELF sections, not all BFD sections. Store section
1021 symbol index in target_index field, not index field. Traverse
1022 over global symbols even if stripping.
1023 (elf_link_output_extsym): Output dynamic symbols. Mark symbols
1024 defined by dynamic objects as undefined.
1025 (elf_link_input_bfd): Ignore dynamic objects. Use target_index
1026 field for section relocs, and make sure it is set.
1027 (elf_reloc_link_order): Use target_index field for section relocs,
1028 and make sure it is set.
1029 * elf.c (elf_link_hash_newfunc): Initialize dynindx, dynstr_index,
1030 weakdef and elf_link_hash_flags fields.
1031 (_bfd_elf_link_hash_table_create): Initialize dynobj, dynsymcount,
1032 dynstr and bucketcount fields.
1033 * elf32-target.h: Initialize new dynamic linking fields.
1034 * elf64-target.h: Likewise.
1035 * elf32-i386.c: New functions for dynamic linking support.
1036 * elf32-sparc.c: Likewise.
1037 * bfd-in.h (bfd_elf32_record_link_assignment): Declare.
1038 (bfd_elf64_record_link_assignment): Declare.
1039 (bfd_elf32_size_dynamic_sections): Declare.
1040 (bfd_elf64_size_dynamic_sections): Declare.
1041 * bfd-in2.h: Rebuilt.
1043 Wed May 18 08:29:04 1994 Ian Lance Taylor (ian@cygnus.com)
1045 * som.c: Don't include <sys/dir.h> or <sys/user.h>.
1046 (som_reloc_queue_find): Call memcmp instead of bcmp.
1047 (som_bfd_reloc_type_lookup): Change first argument to bfd *.
1048 (compare_syms): Change types of arguments to const void *.
1049 (bfd_section_from_som_symbol): Removed unused local found.
1050 (som_write_armap): Add elength, map, orl_count and int arguments.
1051 (som_write_armap): Use %ld and cast to long for getuid result.
1053 Wed May 18 09:09:32 1994 Jeff Law (law@snake.cs.utah.edu)
1055 * elf32-hppa.h (R_HPPA_ABS_CALL): Define.
1056 * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle absolute calls.
1058 * som.h (R_HPPA_ABS_CALL): Define.
1059 * som.c (hppa_som_gen_reloc_type): Delete complex relocation types.
1061 Tue May 17 19:33:12 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
1063 * coff-i960.c (icoff_little_vec, icoff_big_vec): Indicate leading
1064 underscore, for compatibility with Intel tool chain (gnu960v2).
1066 Mon May 16 10:09:22 1994 Jeff Law (law@snake.cs.utah.edu)
1068 * bfd-in2.h: Rebuilt.
1070 * elf32-hppa.c: Change .hppa_linker_stubs to .PARISC.stubs,
1071 likewise for other PA specific sections.
1072 (hppa_elf_relocate_unwind_table): Delete unused
1074 (elf_hppa_howto_table): Completely new table based on 94-02-02
1075 draft PA ELF spec. Change relocation tags appropriately
1076 throughout elf32-hppa.c
1077 (hppa_elf_gen_reloc_type): Rewrite and simplify based on 94-02-02
1079 (hppa_elf_reloc): Likewise.
1080 (hppa_look_for_stubs_in_section): Likewise
1081 (ELF_MACHINE_CODE): Change to EM_PARISC.
1082 * elf32-hppa.h: Include "elf/hppa.h". Change relocation tags
1083 appropriately throughout elf32-hppa.h.
1084 (elf32_hppa_reloc_type): New table based on 94-02-02 draft PA ELF
1086 (R_HPPA_ABS_CALL, R_HPPA_COMPLEX*, R_HPPA_UNWIND): Delete definitions.
1087 * elfcode.h (prep_headers): Use EM_PARISC instead of EM_HPPA.
1088 * reloc.c (bfd_reloc_code_real): Delete unused HPPA relocations.
1089 * som.h (R_HPPA_ABS_CALL, R_HPPA_COMPLEX): Delete definitions.
1091 * libhppa.h (hppa_field_adjust): Avoid adding constant_value into
1092 the final value twice for LR and RR field selectors.
1094 Sat May 14 09:09:19 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
1096 * aoutx.h (add_to_stringtab): Use BFD_ASSERT not assert. This
1097 avoids __eprintf troubles.
1099 Fri May 13 10:51:21 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1101 * bout.c (b_out_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR.
1103 * config/mipsbelf.mt (SELECT_VECS): Add ecoff_big_vec and
1104 ecoff_little_vec since Irix 5 supports ECOFF executables.
1106 Wed May 11 00:31:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1108 * ecoff.c (ecoff_find_nearest_line): Handle fdr.adr != pdr.adr
1111 * Makefile.in (stmp-bfd.h): Use || instead of ; to force SunOS
1112 make to invoke the shell.
1114 Tue May 10 14:23:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1116 * section.c (SEC_COFF_SHARED_LIBRARY): Renamed from
1117 SEC_SHARED_LIBRARY for clarity. Changed all uses.
1118 * bfd-in2.h: Rebuilt.
1119 * coffcode.h (sec_to_styp_flags): If SEC_COFF_SHARED_LIBRARY is
1120 set, set STYP_NOLOAD.
1121 * coffgen.c (coff_section_from_bfd_index): Don't get an assertion
1122 failure because of a bad shared library.
1124 Mon May 9 18:53:40 1994 Bill Cox (bill@rtl.cygnus.com)
1126 * linker.c: Add missing comment terminator.
1128 Mon May 9 11:53:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1130 * linker.c (_bfd_generic_link_add_one_symbol): If hashp and *hashp
1131 are not NULL, assume the caller has already looked up the symbol
1132 in the hash table and has stored the entry in *hashp.
1133 (generic_link_add_symbol_list): Set h to NULL before calling
1134 _bfd_generic_link_add_one_symbol.
1135 * ecoff.c (ecoff_link_add_externals): Likewise.
1137 * elfcode.h (assign_file_positions_except_relocs): Don't require
1138 page shared between .data and .bss segments to contain zeroes.
1140 * elfcode.h: Include bfdlink.h. Added several new functions to do
1142 (ELF_R_TYPE): Define.
1143 (bfd_add_to_strtab): Return unsigned long. Change check for
1145 (elf_fake_sections): Check return value of bfd_add_to_strtab.
1146 (elf_compute_section_file_positions): Add link_info argument.
1147 Call elf_backend_begin_write_processing hook and prep_headers
1148 here. Only call swap_out_syms if link_info is NULL. Set up
1149 .shstrtab section here. Pass dosyms argument to
1150 assign_file_positions_except_relocs. Set output_has_begun flag.
1151 (assign_file_positions_for_symtab_and_strtabs): Add dosyms
1152 argument, and use it to control setting .symtab and .strtab file
1154 (assign_file_positions_except_relocs): Add dosyms argument, and
1156 (prep_headers): Check return value of bfd_add_to_strtab.
1157 (swap_out_syms): Likewise. Also, don't set up .shstrtab here.
1158 (NAME(bfd_elf,write_object_contents)): Some calls moved into
1159 elf_compute_section_file_positions.
1160 (elf_set_section_contents): Likewise.
1161 (elf_slurp_symbol_table): SHN_LORESERV corrected to SHN_LORESERVE.
1162 * libelf.h: Include bfdlink.h.
1163 (struct elf_backend_data): Add fields collect,
1164 elf_add_symbol_hook, elf_backend_relocate_section.
1165 (struct bfd_elf_section_data): Add field rel_hashes.
1166 (struct elf_obj_tdata): Remove fields internal_syms and symbols.
1167 Add field sym_hashes.
1168 (obj_symbols, obj_internal_syms): Remove definitions.
1169 (elf_sym_hashes): Define.
1170 (struct elf_link_hash_entry): Define.
1171 (struct elf_link_hash_table): Define.
1172 (elf_link_hash_lookup): Define.
1173 (elf_link_hash_traverse): Define.
1174 (elf_hash_table): Define.
1175 (_bfd_elf_link_hash_table_create): Declare.
1176 (bfd_elf32_bfd_link_add_symbols): Declare.
1177 (bfd_elf32_bfd_final_link): Declare.
1178 (bfd_elf64_bfd_link_add_symbols): Declare.
1179 (bfd_elf64_bfd_final_link): Declare.
1180 * elf.c: Include bfdlink.h.
1181 (elf_link_hash_newfunc): New function.
1182 (_bfd_elf_link_hash_table_create): New function.
1183 * elf32-target.h (elf_backend_relocate_section): If not defined,
1184 define as 0 and use generic linker. Otherwise, use ELF backend
1186 (elf_backend_collect): If not defined, define as false.
1187 (elf_backend_add_symbol_hook): If not defined, define as 0.
1188 (elf32_bed): Initialize new fields.
1189 * elf64-target.h: Same changes as elf32-target.h.
1190 * elf32-i386.c: Include bfdlink.h.
1191 (elf_i386_relocate_section): New function.
1192 (elf_backend_relocate_section): Define.
1193 * elf32-sparc.c: Include bfdlink.h.
1194 (elf_info_to_howto): Change type of dst from Elf32_Internal_Rela
1195 to Elf_Internal_Rela (they're the same type anyhow).
1196 (elf_sparc_relocate_section): New function.
1197 (elf_backend_relocate_section): Define.
1198 * elf32-mips.c (elf_backend_collect): Define.
1200 * Makefile.in (stmp-bfd.h): Avoid useless make error message in a
1201 different way; touch takes a numeric argument on some systems.
1203 Fri May 6 13:34:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1205 * nlmcode.h (nlm_swap_auxiliary_headers_in): Rework custom header
1206 handling for latest suggested format.
1207 (nlm_swap_auxiliary_headers_out): Likewise.
1208 (nlm_compute_section_file_positions): Likewise.
1210 Fri May 6 11:11:50 1994 D. V. Henkel-Wallace (gumby@rtl.cygnus.com)
1212 * config.bfd: handle erricsson config (for OSE).
1214 Thu May 5 15:40:47 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
1216 Patches from Ralph Campbell:
1217 * mipsbsd.c (mips_fix_jmp_addr): New function.
1218 (mips_fix_hi16_s): Use bfd_is_com_section.
1219 (mips_howto_table_ext): Call mips_fix_jmp_addr for MIPS_RELOC_JMP.
1221 Fri May 6 11:48:55 1994 Steve Chamberlain (sac@cygnus.com)
1223 * config/go32.mh: XX support.
1226 * Makefile.in: Build sysdep.h without causing worrying but
1227 harmless error message.
1229 Wed May 4 11:09:53 1994 Ian Lance Taylor (ian@cygnus.com)
1231 Changed m68k-aout to set flags to 0; m68k-sunos still uses 1.
1232 * aout0.c: New file.
1233 * targets.c (aout0_big_vec): Declare.
1234 (bfd_target_vector): Add aout0_big_vec.
1235 * config.bfd (m68*-*-aout*): Use m68k-0aout, not m68k-aout.
1236 * config/m68k-aout.mt (SELECT_VECS): Removed.
1237 * config/m68k-0aout.mt: New file.
1238 * configure.in (aout0_big_vec): New target vector: use aout0.o,
1239 aout32.o and stab-syms.o.
1240 * Makefile.in: Rebuilt dependencies.
1241 (BFD32_BACKENDS): Add aout0.o.
1242 (CFILES): Add aout0.c.
1244 * libaout.h (struct aout_backend_data): Add field exec_hdr_flags.
1245 * aout-target.h (MY_exec_hdr_flags): If not defined, define as 0.
1246 MY(backend_data): Initialize exec_hdr_flags field.
1247 * aoutf1.h (sunos_32_set_arch_mach): Make static.
1248 (aout32_sunos4_write_object_contents): Set flags from backend
1250 (MY_exec_hdr_flags): If not defined, define as 1.
1251 (sunos4_aout_backend): Initialize exec_hdr_flags field.
1252 * aout-encap.c (encap_write_object_contents): Set flags from
1254 (MY_exec_hdr_flags): Define as N_FLAGS_COFF_ENCAPSULATE.
1255 * hp300hpux.c (MY_exec_hdr_flags): Define as 0x2.
1256 (MY(write_object_contents)): Set flags from backend info.
1257 * i386aout.c (MY(backend_data)): Initialize exec_hdr_flags field.
1258 * i386mach3.c (MY(backend_data)): Likewise.
1259 * mipsbsd.c (MY(backend_data)): Likewise.
1260 * sparclynx.c (NAME(aout,sparclynx_write_object_contents)): Set
1261 flags from backend info.
1262 (sparclynx_aout_backend): Initialize exec_hdr_flags field.
1264 Wed May 4 02:56:00 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
1266 * config.bfd (i386-*-gnu*): Treat like i386-*-mach*.
1267 (m68*-apollo-*): Treat all Apollo configs the same, don't handle
1270 Tue May 3 19:43:21 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1272 * cache.c: Rewrote to work correctly.
1273 * libbfd.h: Rebuilt.
1274 * opncls.c (bfd_cache_init, bfd_open_file): Don't declare.
1275 (bfd_fdopenr): Check return value of bfd_cache_init.
1277 Fri Apr 29 15:08:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1279 * cf-m68klynx.c (CALC_ADDEND): Check for PC relative relocs by
1280 enumerating them, since the reloc type can not serve as an index
1281 into the m68k COFF howto_table.
1283 Fri Apr 29 09:42:39 1994 Steve Chamberlain (sac@cygnus.com)
1285 * config.bfd (*-go32): Changed to coff.
1286 * coff-h8300.c (JMPL1): Get HOWTO right for 24bit branches.
1287 * srec.c (srec_write_symbols): Write out the correct number of
1288 symbols and don't stick in extra nulls.
1290 Tue Apr 26 15:07:24 1994 Stan Shebs (shebs@andros.cygnus.com)
1292 * cf-sparclynx.c (LYNXOS, COFF_LONG_FILENAMES): Define.
1293 * coff-sparc.c (BADMAG): Recognize LYNXCOFFMAGIC.
1294 (COFF_SPARC): Define.
1295 * coffcode.h (coff_new_section_hook): If COFF_SPARC, set alignment
1296 power of data and bss sections to 3.
1297 * hosts/lynx.h (__LYNXOS): Define.
1299 Tue Apr 26 15:04:26 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
1301 * elf32-hppa.c (hppa_elf_reloc): Adjust the addend of relocations
1302 against section symbols to avoid losing during ld -r.
1304 Tue Apr 26 12:16:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1306 * elfcode.h (shstrtab_length_fixed): Remove useless static
1308 (struct elf_sect_data): Remove unused structure.
1309 (elf_object_p): Free memory if error occurs. Check return value
1310 of bfd_default_set_arch_mach. If elf_get_str_section fails,
1311 preserve error code rather than setting wrong_format.
1312 (null_shdr): Remove static variable.
1313 (assign_section_numbers): Remove shstrtab_length_fixed assignment.
1314 Allocate first section header on BFD obstack rather than using
1316 (bfd_prpsinfo): Remove unused local variable newsect.
1318 Mon Apr 25 15:31:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1320 * elfcode.h (write_relocs): Undo patch of Apr 10; breaks Solaris.
1322 * elfcode.h (bfd_section_from_shdr): Use bfd_make_section_anyway
1323 to create sections. Check return value of recursive calls.
1324 (bfd_section_from_phdr): Check return value of bfd_make_section.
1325 (elf_symbol_from_bfd_symbol): Likewise.
1326 (elf_object_p): Check return value of bfd_section_from_shdr.
1327 (section_from_elf_index): Likewise.
1328 (elf_slurp_symbol_table): Check return value of
1329 section_from_elf_index.
1330 (bfd_prstatus): Return boolean value. Check return value of
1332 (bfd_fpregset): Likewise.
1333 (bfd_prpsinfo): Return boolean value.
1334 (elf_corefile_note): Check return values of bfd_prstatus,
1335 bfd_fpregset, and bfd_prpsinfo.
1336 (elf_core_file_p): Check return value of elf_corefile_note.
1338 Fri Apr 22 11:08:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1340 Get rid of the ECOFF .reginfo section hack.
1341 * ecoff.c (ecoff_mkobject_hook): Don't create a .reginfo section.
1342 (ecoff_new_section_hook): Don't handle the .reginfo section.
1343 (ecoff_sizeof_headers): Likewise.
1344 (ecoff_get_section_contents): Likewise.
1345 (ecoff_compute_section_file_positions): Likewise.
1346 (ecoff_compute_reloc_file_positions): Likewise.
1347 (ecoff_set_section_contents): Likewise.
1348 (ecoff_write_object_contents): Likewise.
1349 (ecoff_bfd_final_link): Likewise.
1350 (ecoff_bfd_copy_private_bfd_data): Copy the GP value and the
1352 (bfd_ecoff_get_gp_value): New function.
1353 (bfd_ecoff_set_gp_value): New function.
1354 (bfd_ecoff_set_regmasks): New function.
1355 * bfd-in.h (bfd_ecoff_get_gp_value): Declare.
1356 (bfd_ecoff_set_gp_value): Declare.
1357 (bfd_ecoff_set_regmasks): Declare.
1358 * bfd-in2.h: Rebuilt.
1360 Fix ECOFF objcopy to actually copy debugging information.
1361 * ecoff.c (ecoff_bfd_copy_private_bfd_data): New function.
1362 (ecoff_get_extr): Assume that any ECOFF symbol with local clear is
1363 an external symbol, rather than checking the symbol flags. Only
1364 check the flags for non-ECOFF symbols.
1365 * ecofflink.c (bfd_ecoff_debug_externals): Don't crash if the
1366 output_section field of the symbol section is NULL.
1367 * libecoff.h (ecoff_bfd_copy_private_bfd_data): Declare as
1368 function rather than defining as macro.
1370 * ieee.c (ieee_object_p): Set bfd_error_got_wrong_format if
1373 * targets.c (bfd_target_vector): Add bfd_elf32_powerpc_vec.
1375 * aout-adobe.c (aout_adobe_set_arch_mach): Check return value of
1376 bfd_default_set_arch_mach. Accept bfd_arch_m68k as well as
1378 * coffcode.h (coff_set_arch_mach): Check return value of
1379 bfd_default_set_arch_mach.
1380 * elfcode.h (elf_set_arch_mach): Don't check a list of ELF
1381 architectures, just see if the desired architecture matches what
1382 the ELF backend permits.
1384 * coffcode.h (coff_set_arch_mach_hook): Rename SHMAGIC to
1385 SH_ARCH_MAGIC to match change in coff/sh.h.
1386 (coff_set_flags): Likewise.
1388 Follow convention in which each NLM header has an 8 byte stamp
1389 followed by a four byte length.
1390 * libnlm.h (struct nlm_obj_tdata): Rename nlm_cygnus_section_hdr
1391 to nlm_cygnus_ext_header, and change type to
1392 Nlm_Internal_Cygnus_Ext_Header.
1393 (nlm_cygnus_ext_header): Rename from nlm_cygnus_section_header.
1394 * nlmcode.h (nlm_swap_auxiliary_headers_in): Use CyGnUsEx instead
1395 of CyGnUsSeCs. Rename from cygnus_section to cygnus_ext. Require
1396 length word to be 8.
1397 (nlm_swap_auxiliary_headers_out): Rename from cygnus_section to
1398 cygnus_ext. Set length word to 8.
1399 (nlm_compute_section_file_positions): Rename from cygnus_section
1402 Thu Apr 21 22:54:22 1994 Stu Grossman (grossman at cygnus.com)
1404 * nlmcode.h (nlm_swap_auxiliary_headers_in): Keep section table
1405 (from CyGnUsSeCs) in more permanent memory to keep section names
1406 from getting trashed.
1408 Thu Apr 21 09:29:37 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1410 * libelf.h (elf_obj_tdata): Add members for dynamic symbol table
1412 * elfcode.h (bfd_section_from_shdr): Handle dynamic symbol table.
1413 * elfcode.h (elf_slurp_symbol_table): Take additional parameter
1414 to select static or dynamic symbol table and return number of
1415 symbols slurped or -1 on error.
1416 * elfcode.h (elf_get_symtab): Set bfd symcount from
1417 elf_slurp_symbol_table result.
1418 * elfcode.h (elf_get_dynamic_symtab_upper_bound,
1419 elf_canonicalize_dynamic_symtab): New functions to handle dynamic
1421 * elf32-target.h, elf64-target.h (BFD_JUMP_TABLE_DYNAMIC):
1422 Change to handle dynamic symbol table, provide default definitions
1424 * aoutx.h (howto_table_std, NAME(aout,swap_std_reloc_out),
1425 NAME(aout,swap_std_reloc_in), aout_link_input_section_std,
1426 aout_link_reloc_link_order): Handle r_jmptable and r_relative
1429 Thu Apr 21 11:58:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1431 Clean up uses of _bfd_dummy_target (from Peter Schauer).
1432 * libbfd.c (_bfd_dummy_target): Set bfd_error_wrong_format.
1433 * nlm-target.h (nlm_core_file_p): Define as _bfd_dummy_target, not
1435 * srec.c (srec_vec): Use _bfd_dummy_target, not NULL, in
1437 (symbolsrec_vec): Likewise.
1438 * tekhex.c (tekhex_vec): Likewise.
1440 * libnlm.h (struct nlm_obj_tdata): Add nlm_cygnus_section_hdr
1442 (nlm_cygnus_section_header): New accessor macro.
1443 * nlmcode.h (nlm_object_p): Free new tdata structure if failure.
1444 Add fixed sections before swapping in auxiliary headers. After
1445 adding sections, treat errors as real, not as wrong format.
1446 (nlm_swap_auxiliary_headers_in): Swap in the sections header; add
1447 sections to the BFD for each section it describes.
1448 (nlm_swap_auxiliary_headers_out): Swap out the sections header.
1449 (nlm_compute_section_file_positions): Account for the size of the
1452 Wed Apr 20 16:45:51 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
1454 * coff-sparc.c (sparccoff_vec): Change minimum alignment power to
1455 2, so that stab sections can be multiples of 4 bytes only.
1457 * hosts/i386aix.h: Changes to avoid prototypes conflicts with the
1458 ones defined in stdlib.h. (From Minh Tran-Le.)
1460 Wed Apr 20 14:15:21 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1462 * nlm32-ppc.c: Complete rewrite for new version of PowerPC
1463 NetWare. Old code still present, but ifdeffed out.
1465 * nlmcode.h (nlm_swap_auxiliary_headers_in): Don't assume a
1466 particular format for the customer header. Allocate a block of
1467 memory and read it into that.
1468 (nlm_swap_auxiliary_headers_out): Write out the block of memory.
1469 (nlm_compute_section_file_positions): Include length of customer
1470 header when computing its size.
1472 Mon Apr 18 14:27:17 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
1474 * som.c (som_prep_headers): Get the space's number from the
1475 backend private section data rather than target_index.
1476 (bfd_som_set_section_attributes): Store the space's number
1477 in the backend private section data rather than target_index.
1479 * som.h (som_copyable_section_data_struct): Add space_number.
1481 Fri Apr 15 12:22:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1483 * coff-a29k.c (reloc_processing): Always set the address of a
1484 R_IHCONST reloc to that of the immediately preceding R_IHIHALF.
1485 gas does this anyhow, but some other assemblers seem to leave
1486 garbage in the R_IHCONST address field.
1488 * bfd/archive.c: Consistently use ARFMAG; from
1489 schwab@issan.informatik.uni-dortmund.de (Andreas Schwab).
1490 (_bfd_write_archive_contents): Use ARFMAG rather than '`' and
1492 (bsd_write_armap): Likewise.
1493 (coff_write_armap): Likewise.
1495 * coff-mips.c (mips_relocate_section): When relaxing, adjust local
1496 relocs against the .text section as required.
1497 * ecofflink.c (bfd_ecoff_debug_accumulate): When relaxing, adjust
1498 PDR addresses as required.
1500 * ecoff.c (ecoff_emit_aggregate): Take fdr argument. Map fdr
1501 index through rfd map if it exists. Check for a couple of cases
1502 which gdb handles specially. Change all callers.
1503 (ecoff_type_to_string): Take fdr argument rather than aux_ptr and
1504 bigendian argument. Change all callers.
1505 (ecoff_print_symbol): Handle stStruct, stUnion and stEnum.
1507 Thu Apr 14 13:05:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1509 * coff-mips.c (mips_howto_table): Add dummy entries to account for
1510 numbering changes in include/coff/mips.h. Add entries for
1511 MIPS_R_RELHI and MIPS_R_RELLO.
1512 (mips_ecoff_swap_reloc_in): Handle an extra bit for the reloc type
1513 when little endian. Treat internal MIPS_R_RELLO or MIPS_R_RELHI
1514 relocs like MIPS_R_SWITCH, and convert r_offset from 24 to 32
1516 (mips_ecoff_swap_reloc_out): Likewise.
1517 (mips_adjust_reloc_in): Handle internal MIPS_R_RELLO or
1518 MIPS_R_RELHI relocs like MIPS_R_SWITCH.
1519 (mips_adjust_reloc_out): Likewise.
1520 (mips_relhi_addr, mips_relhi_addend): New static variables.
1521 (mips_relhi_reloc, mips_rello_reloc): New functions.
1522 (mips_bfd_reloc_type_lookup): Turn BFD_RELOC_PCREL_HI16_S into
1523 MIPS_R_RELHI and turn BFD_RELOC_PCREL_LO16 into MIPS_R_RELLO.
1524 (mips_relocate_hi): Rename from mips_relocate_refhi, and add pcrel
1525 argument. Changed all callers.
1526 (mips_relocate_section): Rename got_reflo to got_lo and
1527 reflo_int_rel to lo_int_rel. Handle MIPS_R_RELLO and MIPS_R_RELHI
1529 (mips_relax_section): Adjust MIPS_R_RELHI/MIPS_R_RELLO pairs when
1530 expanding a PC relative call.
1532 * reloc.c (bfd_reloc_code_real_type): Add BFD_RELOC_PCREL_HI16_S
1533 and BFD_RELOC_PCREL_LO16.
1534 * bfd-in2.h: Rebuilt.
1536 Wed Apr 13 11:50:07 1994 Stan Shebs (shebs@andros.cygnus.com)
1538 * coff-sparc.c (sparccoff_vec): Set minimum alignment power to 3.
1540 Tue Apr 12 13:36:20 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
1542 * som.c (som_write_fixups): Always emit at least
1543 one relocation for any non-bss section.
1545 Mon Apr 11 14:41:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1547 * elfcode.h (assign_file_positions_except_relocs): Don't require
1548 the file alignment to correspond to the page size when linking
1551 Sun Apr 10 01:02:24 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
1553 * elfcode.h (write_relocs): For rela relocations, adjust the
1554 addend for relocations involving section symbols to account
1555 for the lossage of 1:1 mapping from input section symbols to
1556 output section symbols.
1558 Fri Apr 8 12:22:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1560 * aoutx.h (NAME(aout,make_sections)): New function.
1561 (NAME(aout,some_aout_object_p)): Call NAME(aout,make_sections)
1562 rather than making sections inline.
1563 (NAME(aout,mkobject)): Don't make any sections.
1564 (NAME(aout,adjust_sizes_and_vmas)): Call NAME(aout,make_sections).
1565 (NAME(aout,final_link)): Don't dereference obj_textsec (abfd) or
1566 obj_datasec (abfd) if they are NULL.
1567 * libaout.h (NAME(aout,make_sections)): Declare.
1568 * bout.c (b_out_mkobject): Don't make any sections.
1569 (b_out_write_object_contents): Call aout_32_make_sections.
1570 (b_out_set_section_contents): Likewise.
1571 * i386os9k.c (os9k_mkobject): Don't make any sections.
1572 (os9k_write_object_contents): Call aout_32_make_sections.
1573 (os9k_set_section_contents): Likewise.
1575 * aoutx.h (NAME(aout,new_section_hook)): Don't set N_EXT in target
1578 Wed Apr 6 20:44:56 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1580 * config.bfd, configure.host: Add mips-*-sysv4* support.
1582 Thu Apr 7 14:23:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1584 * coff-mips.c (mips_howto_table): Add entry for MIPS_R_SWITCH.
1585 (mips_ecoff_swap_reloc_in): For MIPS_R_SWTICH, copy r_symndx into
1586 r_offset and set r_symndx to RELOC_SECTION_TEXT.
1587 (mips_ecoff_swap_reloc_out): For MIPS_R_SWITCH, get the r_symndx
1588 value from the r_offset field.
1589 (mips_adjust_reloc_in): Maximum r_type value is now MIPS_R_SWITCH.
1590 For MIPS_R_SWITCH, copy the r_offset field into the addend field.
1591 (mips_adjust_reloc_out): For MIPS_R_SWITCH, copy the addend field
1592 into the r_offset field.
1593 (mips_switch_reloc): New function.
1594 (mips_bfd_reloc_type_lookup): Translate BFD_RELOC_GPREL32 into
1596 (mips_relocate_section): Handle MIPS_R_SWITCH.
1597 (mips_relax_section): Adjust MIPS_R_SWITCH offset if necessary.
1599 Thu Apr 7 11:10:51 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
1601 * elfcode.h (elf_set_section_contents): Support calling the backend
1602 function elf_backend_begin_write_processing when just beginning to
1603 write an object file.
1605 * libelf.h (elf_backend_begin_write_processing): Declare.
1607 * elf{32,64}-target.h (elf_backend_begin_write_processing): Provide
1608 a default definition.
1609 (elf{32,64}_bed): Add elf_backend_begin_write_processing.
1611 * elf32-hppa.h (elf_hppa_tc_symbol): Delete extern declaration.
1612 (elf_hppa_tc_make_sections): Likewise.
1614 * elf32-hppa.c (symext_chain_built): Delete.
1615 (symext_chain_size): Renamed from symextn_contents_real_size.
1616 (elf32_hppa_backend_{begin,final}_write_processing): New functions.
1617 (add_entry_to_symext_chain): New function.
1618 (hppa_elf_set_section_contents): Ignore writes to the symbol extension
1619 section until it's been rebuilt internally.
1620 (hppa_elf_get_section_contents): Symbol extension section is no
1622 (elf_backend_{begin,final}_write_processing): Define.
1623 (elf_hppa_tc_make_sections): Simplify now that much code has
1624 migrated into elf32_hppa_backend_{being,final}_write_processing.
1626 Wed Apr 6 17:24:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1628 Add new target vectors to read the dynamic symbols and dynamic
1629 relocs. Change a.out to use these rather than reading the dynamic
1630 symbols and relocs along with the normal symbols and relocs.
1631 * targets.c (bfd_target): Add fields
1632 _bfd_get_dynamic_symtab_upper_bound,
1633 _bfd_canonicalize_dynamic_symtab,
1634 _bfd_get_dynamic_reloc_upper_bound,
1635 _bfd_canonicalize_dynamic_reloc.
1636 (BFD_JUMP_TABLE_DYNAMIC): Define.
1637 * libbfd-in.h (_bfd_nodynamic_get_dynamic_symtab_upper_bound):
1639 (_bfd_nodynamic_canonicalize_dynamic_symtab): Define.
1640 (_bfd_nodynamic_get_dynamic_reloc_upper_bound): Define.
1641 (_bfd_nodynamic_canonicalize_dynamic_reloc): Define.
1642 * bfd.c (bfd_get_dynamic_symtab_upper_bound): Define.
1643 (bfd_canonicalize_dynamic_symtab): Define.
1644 (bfd_get_dynamic_reloc_upper_bound): Define.
1645 (bfd_canonicalize_dynamic_reloc): Define.
1646 * sunos.c (MY_read_dynamic_symbols): Don't define.
1647 (MY_read_dynamic_relocs): Don't define.
1648 (MY_get_dynamic_symtab_upper_bound): Define.
1649 (MY_canonicalize_dynamic_symtab): Define.
1650 (MY_get_dynamic_reloc_upper_bound): Define.
1651 (MY_canonicalize_dynamic_reloc): Define.
1652 (struct sunos_dynamic_info): Change type of dynsym_count and
1653 dynrel_count to long. Add fields canonical_dynsym and
1655 (sunos_read_dynamic_info): Check that BFD had DYNAMIC flag set.
1656 Clear info->canonical_dynsym and info->canonical_dynrel.
1657 (MY(read_dynamic_symbols)): Removed.
1658 (MY(read_dynamic_relocs)): Removed.
1659 (sunos_get_dynamic_symtab_upper_bound): New function.
1660 (sunos_canonicalize_dynamic_symtab): New function.
1661 (sunos_get_dynamic_reloc_upper_bound): New function.
1662 (sunos_canonicalize_dynamic_reloc): New function.
1663 * libaout.h: Declare struct reloc_ext_external and
1664 reloc_std_external to avoid prototype problems.
1665 (struct aout_backend_data): Remove fields read_dynamic_symbols and
1666 read_dynamic_relocs.
1667 (NAME(aout,translate_symbol_table)): Declare.
1668 (NAME(aout,swap_ext_reloc_in)): Declare.
1669 (NAME(aout,swap_std_reloc_in)): Declare.
1670 * aoutx.h (NAME(aout,translate_symbol_table)): Renamed from
1671 translate_symbol_table and made non-static. Changed all callers.
1672 (NAME(aout,slurp_symbol_table)): Don't read dynamic symbols.
1673 (NAME(aout,slurp_reloc_table)): Don't read dynamic relocs.
1674 (NAME(aout,get_reloc_upper_bound)): Don't count dynamic relocs.
1675 * aoutf1.h (aout_32_sunos4_write_object_contents): Don't bother to
1676 remove dynamic symbols and relocs. They will no longer be
1678 (MY_read_dynamic_symbols): Don't define.
1679 (MY_read_dynamic_relocs): Don't define.
1680 (sunos4_aout_backend): Don't initialize dynamic entry points.
1681 * aout-target.h (MY_read_dynamic_symbols): Don't define.
1682 (MY_read_dynamic_relocs): Don't define.
1683 (MY(backend_data)): Don't initialize dynamic entry points.
1684 (MY_get_dynamic_symtab_upper_bound): If not defined, define to
1685 _bfd_nodynamic version.
1686 (MY_canonicalize_dynamic_symtab): Likewise.
1687 (MY_get_dynamic_reloc_upper_bound): Likewise.
1688 (MY_canonicalize_dynamic_reloc): Likewise.
1689 * All backends: Added BFD_JUMP_TABLE_DYNAMIC to target vector.
1690 * bfd-in2.h: Rebuilt.
1691 * libbfd.h: Rebuilt.
1693 * cf-m68klynx.c: Include sysdep.h.
1695 * hp300hpux.c: Removed some spaces in uses of NAME to avoid
1696 problems with traditional C compilers.
1698 * targets.c (bfd_target): Rearranged fields in target vector.
1699 Removed _bfd_debug_info_start, _bfd_debug_info_end and
1700 _bfd_debug_info_accumulate, which were never used.
1701 (BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
1702 (BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
1703 (BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
1704 (BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
1705 * All backends: Changed to use the new BFD_JUMP_TABLE_* macros
1706 rather than the single JUMP_TABLE macro. Removed many of the
1707 weird macro definitions needed to support the monolithic
1709 * bfd-in.h (JUMP_TABLE): Removed.
1710 * libbfd-in.h: Define a bunch of macros, and declare a few
1711 functions, for use with the new BFD_JUMP_TABLE_* macros.
1712 * libbfd.c (_bfd_dummy_new_section_hook): Removed.
1713 (bfd_false): Set bfd_error_invalid_operation.
1714 (bfd_nullvoidptr): Likewise.
1715 (bfd_n1): New function.
1716 (_bfd_nocore_core_file_matches_executable_p): Renamed from
1717 _bfd_dummy_core_file_matches_executable_p.
1718 (_bfd_nocore_core_file_failing_command): Similar rename. Set
1719 bfd_error_invalid_operation.
1720 (_bfd_nocore_core_file_failing_signal): Likewise.
1721 (_bfd_generic_get_section_contents): Renamed from
1722 bfd_generic_get_section_contents. Changed all callers.
1723 (_bfd_generic_set_section_contents): Similar rename.
1724 * ieee.c: #if 0 out ieee_bfd_debug_info_start,
1725 ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
1727 * bfd-in2.h: Rebuilt.
1728 * libbfd.h: Rebuilt.
1730 Tue Apr 5 22:10:04 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
1732 * Crude support for examining dynamic libraries.
1733 * som.c (som_object_setup): Set DYNAMIC flag for SHL_MAGIC and
1735 (som_prep_headers): Preserve the system_id for DYNAMIC objects.
1736 Use SHL_MAGIC as the magic number of the DYNAMIC flag is set.
1737 Write exec headers for DYNAMIC objects.
1738 (som_begin_writing): DYNAMIC objects have the same alignment
1739 restrictions as D_PAGED objects.
1740 (bfd_section_from_som_symbol): Treat DYNAMIC objects like EXEC_P
1742 (object_flags): Add DYNAMIC.
1744 Tue Apr 5 17:48:52 1994 Stan Shebs (shebs@andros.cygnus.com)
1746 * i386lynx.c, sparclynx.c (NAME): Remove embedded whitespace in
1747 macro uses, confuses some non-ANSI compilers.
1749 Tue Apr 5 15:50:01 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
1751 * som.c (som_bfd_free_cached_info): Add missing PARAMS decl.
1752 Don't free anything if we don't have a bfd_object.
1753 (som_close_and_cleanup): Call som_bfd_free_cached_info.
1755 Tue Apr 5 11:22:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1757 * elf32-mips.c (mips_elf_final_link): Don't remove empty sections.
1758 It turns out not to be required on Irix 5, and it causes problems
1759 if the sections happen to contain symbols.
1761 * elfcode.h (write_shdrs_and_ehdr): Correct bfd_write check.
1763 * aoutx.h (NAME(aout,canonicalize_reloc)): Don't error out if
1764 section->relocation is NULL; malloc might have returned NULL when
1765 given a zero size if there were no relocations.
1766 * bout.c (b_out_canonicalize_reloc): Likewise.
1767 * coffcode.h (coff_canonicalize_reloc): Likewise.
1768 * ecoff.c (ecoff_canonicalize_reloc): Likewise.
1769 * elfcode.h (elf_canonicalize_reloc): Likewise.
1770 * mipsbsd.c (MY(canonicalize_reloc)): Likewise.
1771 * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
1772 * nlmcode.h (nlm_canonicalize_reloc): Likewise.
1773 * som.c (som_canonicalize_reloc): Likewise.
1774 * hp300hpux.c (MY(slurp_reloc_table)): Likewise. Also, if malloc
1775 returns NULL, don't report an error if we asked for zero bytes.
1776 * i386lynx.c (NAME(lynx,slurp_reloc_table)): If malloc returns
1777 NULL, don't report an error if we asked for zero bytes.
1778 * nlmcode.h (nlm_slurp_reloc_fixups): Likewise.
1780 Mon Apr 4 15:30:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1782 * aoutx.h (NAME(aout,bfd_free_cached_info)): Don't free anything
1783 if we don't have a bfd_object.
1785 Made sure that every call to bfd_read, bfd_write, and bfd_seek
1786 checks the return value and handled bfd_error correctly. These
1787 changes are not itemised. Also:
1788 * aoutx.h (emit_strtab): Change return type to boolean, and return
1790 (NAME(aout,write_syms)): Check emit_strtab return value.
1791 (NAME(aout,final_link)): Likewise.
1792 * coffcode.h (coff_write_relocs): Change return type to boolean,
1794 (coff_write_object_contents): Check coff_write_relocs return
1796 * i386os9k.c (os9k_swap_exec_header_in): Change return type to
1798 (os9k_object_p): Check os9k_swap_exec_header_in return value.
1799 * oasys.c (oasys_read_record): Change return type to boolean.
1800 (oasys_slurp_symbol_table: Check oasys_read_record return value.
1801 (oasys_object_p, oasys_slurp_section_data): Likewise.
1802 (oasys_write_record): Change return type to boolean.
1803 (oasys_write_syms): Likewise. Also, check oasys_write_record
1805 (oasys_write_sections): Check oasys_write_record return value.
1806 (oasys_write_header): Change return type to boolean. Check
1807 oasys_write_record return value.
1808 (oasys_write_end, oasys_write_data): Likewise.
1809 (oasys_write_object_contents): Check return values of
1810 oasys_write_header, oasys_write_syms, oasys_write_data, and
1812 * srec.c (srec_write_record): Change return type to boolean.
1813 (srec_write_header): Likewise. Also, check srec_write_record
1815 (srec_write_section, srec_write_terminator): Likewise.
1816 (srec_write_symbols): Change return type to boolean.
1817 (internal_srec_write_object_contents): Check return value of
1818 srec_write_symbols, srec_write_header, srec_write_section, and
1819 srec_write_terminator.
1821 * Makefile.in: Rebuilt dependencies.
1823 Mon Apr 4 10:56:45 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1825 * aix386-core.c (aix386_bfd_is_local_label): Correct cast from
1826 asection to asymbol.
1827 * ptrace-core.c (ptrace_unix_bfd_is_local_label): Correct cast from
1829 * trad-core.c (trad_unix_bfd_is_local_label): Correct cast from
1830 asection to asymbol.
1832 Sun Apr 3 18:27:29 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
1834 * som.c (som_slurp_string_table): Use malloc to allocate space
1835 for the cached copy of the native string table.
1836 (som_slurp_symbol_table): Likewise for the native symbol table.
1837 (som_slurp_reloc_table): Likewise for the native and generic
1839 (som_bfd_free_cached_info): Free the cached native strings,
1840 symbols, and relocations. Also free the canonical cached
1843 Fri Apr 1 12:40:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1845 * aoutx.h (aout_link_write_symbols): If keep_memory is false, make
1846 sure the symbol name is stored in permanent memory before adding
1847 it to the string table.
1849 * archive.c (_bfd_write_archive_contents): Once we've found an
1850 object, don't bother to look for more when deciding whether to
1852 (compute_and_write_armap): After adding the symbols for a BFD,
1853 call bfd_free_cached_info on it.
1855 Add bfd_free_cached_info support to a.out backends.
1856 * aoutx.h (aout_get_external_symbols): Renamed from
1857 aout_link_get_symbols. Read strings even if symbols have been
1858 read. Store string size in obj_aout_string_size.
1859 (NAME(aout,slurp_symbol_table)): Call aout_get_external_symbols to
1860 read the symbols. Allocate the cached symbols with malloc, not
1862 (NAME(aout,slurp_reloc_table)): Allocate the cached relocs with
1863 malloc, not bfd_alloc.
1864 (NAME(aout,bfd_free_cached_info)): New function; free cached
1866 * libaout.h (struct aoutdata): Add external_string_size field.
1867 (obj_aout_external_string_size): New accessor macro.
1868 (NAME(aout,close_and_cleanup)): Don't declare.
1869 (NAME(aout,bfd_free_cached_info)): Declare.
1870 (aout_32_close_and_cleanup): Don't define.
1871 (aout_64_close_and_cleanup): Don't define.
1872 * aout-target.h (MY_bfd_free_cached_info): If not already defined,
1873 define as NAME(aout,free_cached_info).
1874 (MY_close_and_cleanup): If not already defined, define as
1875 MY_bfd_free_cached_info.
1876 * aout-adobe.c (aout_32_close_and_cleanup): Define.
1877 (aout_32_bfd_free_cached_info): Don't define.
1878 * bout.c (aout_32_close_and_cleanup): Define.
1879 (aout_32_bfd_free_cached_info): Don't define.
1880 * hp300hpux.c (MY_bfd_free_cached_info): Define as bfd_true.
1881 (MY_close_and_cleanup): Don't define.
1882 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Allocate the cached
1883 relocs with malloc, not bfd_alloc.
1884 * i386os9k.c (aout_32_close_and_cleanup): Define.
1885 (aout_32_bfd_free_cached_info): Don't define.
1887 Add a new entry point to free memory cached by a BFD.
1888 * targets.c (bfd_target): Add _bfd_free_cached_info field.
1889 * bfd.c (bfd_free_cached_info): Define.
1890 * bfd-in.h (JUMP_TABLE): Add _bfd_free_cached_info.
1891 * bfd-in2.h: Rebuilt.
1892 * All backends: Initialize bfd_free_cached_info entry point to
1895 * elf32-hppa.c (elf_hppa_reloc_type_lookup): Correct type of
1896 first, unused, argument.
1897 (hppa_elf_is_local_label): Declare instead of
1898 som_bfd_is_local_label.
1900 * coff-a29k.c (a29k_reloc): Add reloc_entry->address to value of
1901 absolute R_IREL reloc.
1903 Thu Mar 31 11:52:15 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1905 Added some support for Irix 4 shared libraries.
1906 * ecoff.c (ecoff_new_section_hook): Set SEC_SHARED_LIBRARY for a
1908 (ecoff_sec_to_styp_flags): Set SEC_SHARED_LIBRARY if
1909 STYP_ECOFF_LIB bit is set.
1910 (ecoff_compute_section_file_positions): Round the contents of a
1911 .lib section up to the next page boundary.
1912 (ecoff_set_section_contents): If we see a .lib section, increment
1913 the vma by one to count the number of shared libraries we have.
1914 (ecoff_write_object_contents): Don't crash if we see a
1915 STYP_ECOFF_LIB section, and don't adjust text_start or data_start
1918 * coffcode.h (CALC_ADDEND): Change to fetch original symbol value
1919 from original BFD, rather than using value of current BFD symbol.
1920 Needed for new linker.
1921 * coff-sparc.c (CALC_ADDEND): Likewise.
1923 * ecoff.c (ecoff_write_object_contents): Set the text_start and
1924 data_start entries in the optional header correctly even if a text
1925 or data section starts at location zero.
1927 * reloc.c (bfd_reloc_code_real_type): Added BFD_RELOC_26 (from sef
1929 * bfd-in2.h: Rebuilt.
1931 * nlm32-i386.c (nlm_i386_read_import): Null terminate the symbol
1933 * nlm32-alpha.c (nlm_alpha_read_import): Likewise.
1934 * nlm32-sparc.c (nlm_sparc_read_import): Likewise.
1936 * coffgen.c (coff_write_symbol): Reindented. Changed to return
1937 boolean, and changed written to unsigned int *. Check error
1938 returns from called functions.
1939 (coff_write_alien_symbol): Likewise.
1940 (coff_write_native_symbol): Likewise.
1941 (coff_write_symbols): Likewise. Reworked checks on whether to
1942 write symbol name to string table for clarity and to avoid core
1943 dumping when given a non COFF symbol.
1944 * libcoff-in.h (coff_write_symbols): Declare as returning boolean.
1945 * libcoff.h: Rebuilt.
1946 * coffcode.h (coff_write_object_contents): Check return value of
1949 Wed Mar 30 16:25:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1951 Changes to let BFD return an error indication from
1952 get_symtab_upper_bound, bfd_canonicalize_symtab,
1953 bfd_get_reloc_upper_bound, and bfd_canonicalize_reloc. They now
1954 return long instead of unsigned int, and use -1 to indicate an
1955 error. Along the way, rename get_symtab_upper_bound to
1956 bfd_get_symtab_upper_bound.
1957 * bfd.c (bfd_get_reloc_upper_bound): Return long, and -1 on
1959 (bfd_canonicalize_reloc): Likewise.
1960 * syms.c (bfd_get_symtab_upper_bound): Renamed from
1961 get_symtab_upper_bound.
1962 * targets.c (bfd_target): Renamed _get_symtab_upper_bound to
1963 _bfd_get_symtab_upper_bound, and changed it and
1964 _bfd_canonicalize_symtab and _get_reloc_upper_bound and
1965 _bfd_canonicalize_reloc to all return long.
1966 * aoutx.h (NAME(aout,get_symtab)): Return long, and -1 on errors.
1967 (NAME(aout,canonicalize_reloc)): Likewise.
1968 (NAME(aout,get_reloc_upper_bound)): Likewise.
1969 (NAME(aout,get_symtab_upper_bound)): Likewise.
1970 * bout.c (b_out_canonicalize_reloc): Likewise.
1971 (b_out_get_reloc_upper_bound): Likewise.
1972 * coffcode.h (coff_canonicalize_reloc): Likewise.
1973 * coffgen.c (coff_get_symtab_upper_bound): Likewise.
1974 (coff_get_symtab): Likewise.
1975 (coff_get_reloc_upper_bound): Likewise.
1976 * ecoff.c (ecoff_get_symtab_upper_bound): Likewise.
1977 (ecoff_get_symtab): Likewise.
1978 (ecoff_canonicalize_reloc): Likewise.
1979 * elfcode.h (elf_get_symtab_upper_bound): Likewise.
1980 (elf_get_reloc_upper_bound): Likewise.
1981 (elf_canonicalize_reloc): Likewise.
1982 (elf_get_symtab): Likewise.
1983 * hp300hpux.c (MY(get_symtab)): Likewise.
1984 (MY(get_symtab_upper_bound)): Likewise.
1985 (MY(canonicalize_reloc)): Likewise.
1986 * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
1987 * ieee.c (ieee_slurp_external_symbols): Change return type to
1988 boolean. Check for errors from get_symbol.
1989 (ieee_slurp_symbol_table): Change return type to boolean. Check
1990 for errors from ieee_slurp_external_symbols.
1991 (ieee_get_symtab_upper_bound): Return long, and -1 on errors.
1992 (ieee_get_symtab): Likewise.
1993 (ieee_get_reloc_upper_bound): Likewise.
1994 (ieee_canonicalize_reloc): Likewise.
1995 * mipsbsd.c (MY(canonicalize_reloc)): Likewise.
1996 * nlmcode.h (nlm_get_symtab_upper_bound): Likewise.
1997 (nlm_get_symtab): Likewise.
1998 (nlm_get_reloc_upper_bound): Likewise.
1999 (nlm_canonicalize_reloc): Likewise.
2000 * oasys.c (oasys_get_symtab_upper_bound): Likewise.
2001 (oasys_get_symtab): Likewise.
2002 (oasys_get_reloc_upper_bound): Likewise.
2003 (oasys_canonicalize_reloc): Likewise.
2004 * som.c (som_get_symtab_upper_bound): Likewise.
2005 (som_get_symtab): Likewise.
2006 (som_get_reloc_upper_bound): Likewise.
2007 (som_canonicalize_reloc): Likewise.
2008 * srec.c (srec_get_symtab_upper_bound): Likewise.
2009 (srec_get_symtab): Likewise.
2010 (srec_get_reloc_upper_bound): Define as bfd_0l.
2011 (srec_canonicalize_reloc): Likewise.
2012 * tekhex.c (tekhex_get_symtab): Return long, and -1 on errors.
2013 (tekhex_get_symtab_upper_bound): Likewise.
2014 (tekhex_get_reloc_upper_bound): Define as bfd_0l.
2015 (tekhex_canonicalize_reloc): Likewise.
2016 * libaout.h (NAME(aout,get_symtab_upper_bound)): Change
2017 declaration to return long.
2018 (NAME(aout,get_symtab)): Likewise.
2019 (NAME(aout,canonicalize_reloc)): Likewise.
2020 (NAME(aout,get_reloc_upper_bound)): Likewise.
2021 * libcoff-in.h (coff_get_symtab_upper_bound): Likewise.
2022 (coff_get_symtab): Likewise.
2023 (coff_get_reloc_upper_bound): Likewise.
2024 * libecoff.h (ecoff_get_symtab_upper_bound): Likewise.
2025 (ecoff_get_symtab): Likewise.
2026 (ecoff_canonicalize_reloc): Likewise.
2027 * libelf.h (bfd_elf32_get_symtab_upper_bound): Likewise.
2028 (bfd_elf32_get_symtab): Likewise.
2029 (bfd_elf32_get_reloc_upper_bound): Likewise.
2030 (bfd_elf32_canonicalize_reloc): Likewise.
2031 (bfd_elf64_get_symtab_upper_bound): Likewise.
2032 (bfd_elf64_get_symtab): Likewise.
2033 (bfd_elf64_get_reloc_upper_bound): Likewise.
2034 (bfd_elf64_canonicalize_reloc): Likewise.
2035 * libnlm.h (nlmNAME(get_symtab_upper_bound)): Likewise.
2036 (nlmNAME(get_symtab)): Likewise.
2037 (nlmNAME(get_reloc_upper_bound)): Likewise.
2038 (nlmNAME(canonicalize_reloc)): Likewise.
2039 * archive.c (compute_and_write_armap): Use error_return and
2040 no_memory_return labels rather than freeing information in various
2041 places. Change storage, symcount and src_count to long. Check
2042 errors from bfd_get_symtab_upper_bound and
2043 bfd_canonicalize_symtab.
2044 * bout.c (b_out_relax_section): Change reloc_size to long. Check
2045 for errors from bfd_get_reloc_upper_bound and
2046 bfd_canonicalize_reloc.
2047 (b_out_get_relocated_section_contents): Likewise.
2048 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
2050 * elf32-mips.c: Likewise.
2051 * elf32-hppa.c (hppa_elf_stub_finish): Likewise.
2052 (hppa_look_for_stubs_in_section): Check for errors from
2053 bfd_get_symtab_upper_bound, bfd_canonicalize_symtab, and
2054 bfd_canonicalize_reloc.
2055 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Check for errors
2056 from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
2057 * linker.c (generic_link_read_symbols): Likewise.
2058 (_bfd_generic_final_link): Check for errors from
2059 bfd_get_reloc_upper_bound and bfd_canonicalize_reloc.
2060 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
2061 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
2062 (bfd_coff_reloc16_get_relocated_section_contents): Likewise.
2063 * libbfd.c (bfd_0l): New function.
2064 * libbfd-in.h (bfd_0l): Declare.
2065 * aix386-core.c: Change get_symtab_upper_bound, get_symtab,
2066 get_reloc_upper_bound, and canonicalize_reloc to use bfd_0l rather
2068 * cisco-core.c, hppabsd-core.c, hpux-core.c: Likewise.
2069 * irix-core.c, osf-core.c, ptrace-core.c, trad-core.c: Likewise.
2070 * bfd-in2.h: Rebuilt.
2071 * libbfd.h: Rebuilt.
2072 * libcoff.h: Rebuilt.
2074 * nlm32-sparc.c (nlm_sparc_read_reloc): Remove unused variables
2077 Wed Mar 30 08:33:04 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
2079 * hosts/dpx2.h: Define POSIX_UTIME.
2081 Wed Mar 30 00:31:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
2083 * i386dynix.c, config/i386-dynix.mt: New files, handling Dynix
2085 * configure.in, config.bfd: Use them for Dynix.
2086 * Makefile.in: Add dependencies for i386dynix.o.
2087 * targets.c: Add definition for i386dynix_vec.
2088 * hosts/symmetry.h: Do not define TRAD_CORE_USER_OFFSET for Dynix.
2089 Define HOST_DATA_START_ADDR and TRAD_UNIX_CORE_FILE_FAILING_SIGNAL
2090 for Dynix. Remove inclusion of dynix3.h, Dynix bfd is now handled by
2093 Mon Mar 28 12:53:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2095 * Makefile.in (BFD32_BACKENDS): Add coff-sparc.o.
2097 * coffcode.h (coff_set_flags): Handle bfd_arch_powerpc like
2100 * config.bfd (powerpc-*-aix*): New target; use rs6000.mt.
2101 * config/rs6000.mt (SELECT_ARCHITECTURES): Add bfd_powerpc_arch.
2103 * aoutx.h (translate_from_native_sym_flags): Set SEC_RELOC flag
2104 for generated constructor section.
2106 Sun Mar 27 16:25:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2108 * som.c (som_begin_writing): New approach at dealing with holes
2109 in executables left by the HP linker. Does not rely on subspace
2110 alignments as subspaces are *NOT* guaranteed to be properly
2111 aligned in an executable (can you believe that!).
2113 Sat Mar 26 10:25:43 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2115 * som.c (som_get_section_contents): New function. Do not try
2116 to actually read data from a section that doesn't have either
2117 SEC_LOAD or SEC_DEBUGGING set (eg $BSS$) just return true.
2119 * libbfd.c (bfd_read): Set bfd_error as appropriate for a short
2120 read. (bfd_error_system_call or bfd_error_file_truncated).
2122 * som.c: Do not blindly set bfd_error_system_call after a
2123 failing bfd_read, bfd_write, or bfd_seek. In a few places
2124 (like som_object_p) override the error status set by bfd_read.
2126 * aix386-core.c, aout-encap,c archive.c, bout.c: Likewise.
2127 * coff-rs6000.c, coffgen.c ecoff.c, elf.c: Likewise.
2128 * elf32-hppa.c, elfcode.h, hp300hpux.c, i386lynx.c: Likewise.
2129 * nlm32-alpha.c, nlm32-i386.c, nlm32-sparc.c: Likewise.
2131 * som.c: Check return values from several bfd_{seek,read,write}
2132 calls that we just assumed were not failing.
2134 Fri Mar 25 11:44:06 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
2136 * hosts/sysv4.h (HAVE_PROCFS): Add comments about ptx4.
2137 * config/sysv4.mh: Add comment.
2138 * config/symmetry.mh: Change comment.
2139 * configure.host: Use sysv4, not symmetry, for i[34]86-sequent-sysv4*.
2141 Fri Mar 25 17:10:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2143 Changes to support linker relaxing of embedded MIPS PIC code to
2144 use a five instruction sequence for function calls which are out of
2145 range of the bal instruction.
2146 * libecoff.h (struct ecoff_section_tdata): Define.
2147 (ecoff_section_data): Define.
2148 (ecoff_bfd_relax_section): Don't define.
2149 * ecoff.c (ecoff_final_link_debug_accumulate): Don't read or free
2150 the debugging information if it has already been read.
2151 (ecoff_indirect_link_order): Handle _cooked_size being different
2152 from _raw_size. Don't reread the contents or the relocs if they
2153 have already been read in.
2154 * coff-mips.c (mips_howto_table): Change bitsize of PCREL16 from
2156 (PCREL16_EXPANSION_ADJUSTMENT): Define.
2157 (mips_relocate_refhi): Take adjust argument.
2158 (mips_relocate_section): Handle reloc offsets stored in section
2159 used_by_bfd field. Call mips_relax_pcrel16 to handle details of
2160 expanding an out of range PCREL16. Keep trace of adjustments
2161 required by expansions. Set s and unset h when converting a reloc
2162 from undefined to section. Change handling of PC relative relocs:
2163 if against a section, they are correct in the object file, if
2164 against an external symbol they are pcrel_offset.
2165 (mips_relax_section): New function.
2166 (mips_relax_pcrel16): New function.
2167 (ecoff_bfd_relax_section): Define.
2168 * coff-alpha.c (ecoff_bfd_relax_section): Define.
2169 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle adjustments
2170 built by mips_relax_section when writing out addresses.
2171 * elf32-mips.c (mips_elf_read_ecoff_info): Clear adjust field.
2173 * aoutx.h (NAME(aout,find_nearest_line)): The caller expects
2174 functionname_ptr to be set to a symbol name, so prepend
2175 symbol_leading_char.
2177 Thu Mar 24 11:33:46 1994 Steve Chamberlain (sac@jonny.cygnus.com)
2179 * coff-h8300.c (h8300_reloc16_extra_cases): Add relaxing info
2180 for 16bit relative branches.
2181 * coff-h8500.c (r_high8, r_low16, r_high16): Don't complain on
2184 Thu Mar 24 09:21:13 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2186 * som.c (som_bfd_prep_for_ar_write): Ignore non-SOM objects.
2187 (som_bfd_ar_write_symbol_stuff, som_write_armap): Likewise.
2189 Wed Mar 23 14:29:31 1994 David J. Mackenzie (djm@rtl.cygnus.com)
2191 * netbsd386.c (N_SET_FLAGS): Delete the old definition.
2193 Wed Mar 23 14:58:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2195 Clean up the relaxing code for the new linker.
2196 * targets.c (_bfd_relax_section): Take boolean *again argument
2197 rather than asymbol list.
2198 * bfd.c (bfd_relax_section): Change name of fourth argument from
2200 * reloc.c (bfd_generic_relax_section): Take boolean *again
2201 argument rather than asymbol list. Always return true.
2202 * bout.c: Include genlink.h.
2203 (aligncode, perform_slip): Declare.
2204 (perform_slip): Take BFD argument rather than asymbol list.
2205 Changed all callers. Get the symbols from the BFD. Change the
2206 hash table entry value as well as the symbol value.
2207 (abs32code): Take BFD argument rather than asymbol list. Changed
2209 (aligncode): Likewise.
2210 (b_out_relax_section): Take boolean *again argument rather than
2211 asymbol list. Only return false if an error occurred. Set *again
2212 to false. Get symbols from BFD.
2213 * reloc16.c: Include genlink.h.
2214 (bfd_perform_slip): Take BFD argument rather than asymbol list.
2215 Get the symbols from the BFD. Change the hash table entry value
2216 as well as the symbol value.
2217 (bfd_coff_reloc16_relax_section): Take boolean *again argument
2218 rather than asymbol list. Only return false if an error occurred.
2219 Set *again to false. Get symbols from BFD.
2220 * coffcode.h (bfd_coff_backend_data): Change
2221 _bfd_coff_reloc16_estimate to take BFD argument rather than
2223 (bfd_coff_reloc16_estimate): Corresponding change.
2224 (dummy_reloc16_estimate): Corresponding change.
2225 * libcoff-in.h (bfd_coff_reloc16_relax_section): Change
2226 declaration to take boolean * rather than asymbol list.
2227 (bfd_perform_slip): Change declaration to take BFD rather than
2229 * coff-h8300.c (h300_reloc16_estimate): Take BFD argument rather
2230 than asymbol list. Changed calls to bfd_perform_slip.
2231 * bfd-in2.h: Rebuilt.
2232 * libbfd.h: Rebuilt.
2233 * libcoff.h: Rebuilt.
2234 * Makefile.in: Rebuilt dependencies.
2236 * genlink.h (_bfd_generic_link_get_symbols): Define.
2237 (_bfd_generic_link_get_symcount): Define.
2238 * linker.c (generic_link_read_symbols): New function.
2239 (generic_link_add_object_symbols): Use it. Use
2240 _bfd_generic_link_get_symbols and _bfd_generic_link_get_symcount
2241 to get the symbols from the BFD.
2242 (generic_link_check_archive_element): Likewise.
2243 (_bfd_generic_final_link): Likewise.
2244 (_bfd_generic_link_output_symbols): Likewise.
2245 (default_indirect_link_order): Likewise.
2246 (generic_link_add_symbol_list): Store pointer to hash table entry
2247 in asymbol udata field.
2249 Tue Mar 22 13:09:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2251 * coff-mips.c (mips_howto_table): Add entry for new MIPS_R_PCREL16
2252 reloc, used in embedded PIC code.
2253 (mips_adjust_reloc_in): Change sanity check to permit new reloc.
2254 (mips_bfd_reloc_type_lookup): Turn BFD_RELOC_16_PCREL_S2 into
2257 * elf32-mips.c (mips_elf_final_link): Account for link_order
2258 relocs when allocating space for relocations. Set SEC_RELOC flag
2259 for any section which has relocs. Handle link_order relocs in
2260 link_order loop. Use _bfd_generic_link_add_symbols_collect for
2261 add_symbls entry point.
2263 * linker.c (_bfd_generic_final_link): Set reloc_count to 0 before
2264 counting relocs. Set SEC_RELOC flag for any section which has
2267 * linker.c (_bfd_default_link_order): Handle bfd_data_link_order.
2269 * linker.c (_bfd_generic_link_add_symbols): Just call
2270 generic_link_add_symbols.
2271 (_bfd_generic_link_add_symbols_collect): New function, like
2272 _bfd_generic_link_add_symbols but also collect constructors and
2273 destructors by name as collect2 does.
2274 (generic_link_add_symbols): New function, like old
2275 _bfd_generic_link_add_symbols but with collect argument.
2276 (generic_link_add_object_symbols): Take collect argument.
2277 (generic_link_check_archive_element_no_collect): New function.
2278 (generic_link_check_archive_element_collect): New function.
2279 (generic_link_check_archive_element): Take collect argument.
2280 (generic_link_add_symbol_list): Take collect argument.
2281 (_bfd_generic_link_add_one_symbol): Rename constructor argument to
2283 * libbfd-in.h (_bfd_generic_link_add_symbols_collect): Declare.
2284 * libbfd.h: Rebuilt.
2286 Tue Mar 22 10:04:00 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2288 * archive.c (bfd_construct_extended_name_table): Use ar_padchar
2289 for first character in an extended name.
2290 (_bfd_write_archive_contents): If ar_padchar == '/', then use
2291 "//" as the name of the special archive member holding the
2292 extended name table.
2294 Mon Mar 21 12:28:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2296 Support for link_order types which generate relocs in order to
2297 support -Ur in the linker.
2298 * linker.c (generic_link_add_symbol_list): Remove bitsize argument
2299 from call to _bfd_generic_link_add_one_symbol.
2300 (_bfd_generic_link_add_one_symbol): Remove bitsize argument.
2301 Don't pass bitsize to constructor call back. Pass BFD_RELOC_CTOR
2302 instead of bitsize to add_to_set call back.
2303 (_bfd_generic_final_link): Account for link_order relocs when
2304 allocating space for relocations. Handle them in link_order loop.
2305 (_bfd_generic_reloc_link_order): New function.
2306 (_bfd_default_link_order): If a reloc_link_order is seen here,
2308 (_bfd_count_link_order_relocs): New function.
2309 * libbfd-in.h (_bfd_generic_link_add_one_symbol): Remove bitsize
2310 argument from declaration.
2311 (_bfd_generic_reloc_link_order): Declare.
2312 (_bfd_count_link_order_relocs): Declare.
2313 * libbfd.h: Rebuilt.
2314 * aoutx.h (aout_link_add_symbols): Remove bitsize argument from
2315 call to _bfd_generic_link_add_one_symbol.
2316 (NAME(aout,final_link)): Account for link_order relocs when
2317 allocating space for relocations. Handle them after handling all
2319 (aout_link_reloc_link_order): New function.
2320 * ecoff.c (ecoff_link_add_externals): Remove bitsize argument from
2321 call to _bfd_generic_link_add_one_symbol.
2322 (ecoff_bfd_final_link): Account for link_order relocs when
2323 allocating space for relocations. Handle them in link_order loop.
2324 (ecoff_link_write_external): Set the storage class of a defined
2325 linker created symbol based on the section it is in. Correct
2326 bfd_link_hash_weak case to use .sc rather than .st.
2327 (ecoff_reloc_link_order): New function.
2328 * coff-alpha.c (alpha_bfd_reloc_type_lookup): Handle
2330 * coff-mips.c (mips_bfd_reloc_type_lookup): Likewise.
2332 * sunos.c (sunos_read_dynamic_info): Remove unused locals dynsym
2335 * cisco-core.c (cisco_core_file_p): Only pass one argument to
2336 bfd_zmalloc. Free a pointer, not a union.
2337 (cisco_bfd_is_local_label): Correct cast from asection to asymbol.
2339 Sun Mar 20 09:24:36 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2341 * bfd/som.c (som_begin_writing): Fix thinko (off by one error).
2343 * som.c (bfd_section_from_som_symbol): Only to do the value
2344 comparison for function symbols within executables.
2346 * som.c (bfd_section_from_som_symbol): Renamed from
2347 som_section_from_subspace_index. Pass in a native SOM symbol.
2348 For executables, iterate through the sections to find out
2349 which contains the symbol's address rather than using the
2350 symbol_info field. (symbol_info has a different meaning for
2351 dynamicly linked executables.)
2353 * trad-core.c (trad_unix_core_file_p): Don't pass abfd to
2356 * som.c (som_begin_writing): Fix braino (one call to align
2357 space/subspace data was done unconditionally rather than
2358 just for executables.)
2360 * som.c (som_begin_writing): Align text in all executables to
2361 make HPUX kernel happy. Fixes strip/objcopy for shared
2364 Sat Mar 19 07:06:59 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2366 * som.c (som_begin_writing): Account for alignment needs of
2367 subspaces too when writing executables. Never request a negative
2368 bss size. Fixes some problems with demand paged executables,
2369 still having problems with pure executables and shared executables.
2371 Fri Mar 18 19:12:47 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
2373 * trad-core.c (trad_unix_core_file_p): Call bfd_zmalloc not
2374 bfd_zalloc for rawptr, because later on we may call free, not
2377 * bfd.c (struct _bfd): Add cisco_core_struct to tdata union.
2378 * libbfd.c (bfd_read, bfd_seek): Add comments regarding errors.
2379 * cisco-core.c: New file.
2380 * Makefile.in: Change accordingly.
2381 * configure.in: Recognize cisco_core_vec.
2382 * config/m68k-aout.mt (SELECT_VECS): Add cisco_core_vec.
2383 * targets.c: Add cisco_core_vec.
2384 * bfd-in2.h: Rebuilt.
2386 Fri Mar 18 18:13:49 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2388 * som.h (som_copyable_section_data_struct): New structure
2389 containing all the private section information which needs
2390 to be copied from input section to output section during
2392 (som_section_data_struct): Remove several fields now in
2393 som_copyable_section_data_struct. Make the space and
2394 subspace dictionaries be pointers (to save space when
2395 only reading objects).
2397 * som.c (bfd_som_set_section_attributes): Now returns a boolean;
2398 some references changed. Allocate a copyable data stucture if
2399 none exists. Store info into the copyable data structure.
2400 (bfd_som_set_subsection_attributes): Likewise.
2401 (som_is_space, som_is_subspace, som_is_container): New functions.
2402 Use these instead of directly accessing private data.
2403 (som_prep_headers): Allocate space and subspace headers here.
2404 Fill in some fields in the space/subspace headers from the
2406 (som_bfd_copy_private_section_data): Only copy the stuff
2407 that we really need to make objcopy and strip work. Allocate
2408 the copy_data structure for the output bfd before copying.
2410 * som.h (struct som_exec_data): New structure to hold exec
2411 info that must be preserved when running objcopy/strip.
2412 (struct somdata): Add new "exec_data" field and accessor
2413 macro. Add some comments on how the various fields are used.
2414 (som_section_data_struct): Make is_space and is_subspace bitfields.
2415 Delete unused subspace_index. All references now use the
2416 target_index field within the section structure itself.
2418 * som.c (make_unique_section): Delete unused declaration.
2419 (som_bfd_copy_private_bfd_data): New function.
2420 (som_object_setup): Allocate space for and save exec information
2421 that needs to be copied during objcopy/strip.
2422 (som_mkobject): Do not allocate space for a file header here.
2423 It is not used when only reading SOM objects.
2424 (som_prep_headers): Allocate space for and attach a file header
2425 to the output bfd. For executables, use the saved system_id
2426 value rather than trying to guess the right value. Do not abort
2427 wwhen setting file_hdr->entry* for executables.
2428 (som_begin_writing): For executables, set the exec_entry and
2430 (som_copy_private_backend_section_data): Always return a value.
2432 * libhppa.h (PA_PAGESIZE): Define.
2434 * som.c (SOM_ALIGN): Define.
2435 (som_begin_writing): If writing an executable, initialize all
2436 fields in the exec header to zero. Update fields in the exec
2437 header as sizes of loadable subspaces are computed. Carefully
2438 preserve alignments when building executables. Actually write the
2439 exec after all the fields are filled in.
2441 * Better long-filename handling. Reads SOM ABI compliant extended
2442 names, but doesn't quite write compliant extended names yet.
2443 * som.c (som_slurp_extended_name_table): Delete function. The
2444 generic code will handle things correctly.
2445 (som_slurp_armap): Seek to the beginning of the next member.
2446 (normalize): New function.
2447 (som_bfd_ar_write_symbol_stuff): Take the size of the extended
2448 name table into account when computing the file offsets in the
2449 SOM dictionary. Make sure to align to an even boundary.
2450 (som_write_armap): Initialize the checksum to zero.
2451 (ar_maxchars): Fix. Opps.
2453 Fri Mar 18 20:35:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
2455 * aoutx.h (reloc_type_lookup): Handle BFD_RELOC_CTOR on a 64-bit
2456 machine. Handle BFD_RELOC_SPARC13 and BFD_RELOC_SPARC_BASE13.
2458 Thu Mar 17 18:26:46 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
2460 * bfd-in.h (BFD_VERSION): Use @VERSION@.
2461 * Makefile.in (bfd.h): Replace it with contents of VERSION file.
2462 * bfd-in2.h: Regenerated.
2464 * trad-core.c (trad_unix_bfd_is_local_label): Fixed typo where
2465 this was also named trad_unix_bfd_copy_private_bfd_data.
2467 Thu Mar 17 10:37:07 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
2469 * aoutx.h, elfcode.h, coff-alpha.c, bout.c, ecoff.c, ecofflink.c,
2470 elf32-hppa.c, elf32-mips.c, linker.c, som.c, sunos.c: If malloc(0)
2471 returns NULL, it is not an error. It's possible that some of
2472 these checks are not necessary (because the size can never be
2473 zero), but putting in the checks is the conservative thing to do
2474 in light of the fact that some of these malloc calls replaced
2475 unchecked alloca calls, in which a zero argument would work fine.
2477 Thu Mar 17 11:44:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2479 * osf-core.c (osf_core_bfd_copy_private_bfd_data): Remove
2480 duplicate definition.
2481 (osf_core_bfd_is_local_label): Define.
2483 * reloc.c (bfd_generic_get_relocated_section_contents): Don't fail
2484 if malloc (0) fails. bfd_canonicalize_reloc returning 0 is not a
2485 failure indication, it merely means there are no relocs.
2487 * elfcode.h (NAME(bfd_elf,write_object_contents)): Don't use space
2488 after NAME, since SunOS /bin/cc can't handle it.
2490 Wed Mar 16 16:43:33 1994 David J. Mackenzie (djm@thepub.cygnus.com)
2492 * netbsd386.c (N_SET_FLAGS): Don't nuke the machine id field.
2493 From sukes@glue.umd.edu (Tasuki Hirata).
2495 Wed Mar 16 07:55:54 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
2497 * aoutf1.h (4 places): Use a simple #if on ARCH_SIZE, rather than
2498 all that convoluted stuff with NAME, CAT3, etc. The convoluted
2499 stuff broke for SunOS4 /bin/cc (due to DEFUN elimination, I guess).
2501 Wed Mar 16 00:02:05 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2503 * som.c (som_prep_for_fixups): Detect section symbols based
2504 on either the lack of private data or the symbol flags. Do not
2505 munge section symbol names anymore -- they no longer confuse GDB.
2506 (som_begin_writing): Leave space for an exec header if writing
2508 (som_slurp_symbol_table): Recognize both forms of section symbol
2509 names "L$0\002" and "$<FOO>$". Change the name of "L$0\002"
2510 section symbols to be the name of the section they represent.
2511 Debugging symbols begin with "L$0\001", not just "L$".
2513 Tue Mar 15 22:58:28 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2515 * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.
2517 * bfd-in.h (JUMP_TABLE): Add new entries to the jump table
2518 for bfd_copy_private_section_data, bfd_copy_private_bfd_data,
2519 and bfd_is_local_label.
2521 * targets.c: Add new entries to the bfd_target structure.
2523 * bfd.c (bfd_copy_private_bfd_data): New definition.
2525 * section.c (bfd_copy_private_section_data): New definition.
2527 * syms.c (bfd_is_local_label): New definition.
2529 * libbfd-in.h (bfd_generic_is_local_label): Declare.
2531 * libbfd.c (bfd_generic_is_local_label): New function.
2533 * *-core.c: Provide default definitions for new functions in
2534 the target vector which all point to bfd_false.
2536 * aout-target.h, coffcode.h, elf32-target.h elf64-target.h, ieee.c
2537 libaout.h, libecoff.h, nlm-target.h, oasys.c, srec.c, tekhex.c
2538 Default new vectors for copying private backend data to bfd_true.
2539 Default new vector for determining if a symbol is a local label
2540 to bfd_generic_is_local_label.
2542 * som.c (som_bfd_copy_private_section_data): New function.
2543 (som_bfd_is_local_label): New function.
2544 (som_bfd_copy_private_bfd_data): For now default to bfd_true.
2546 * elf32-hppa.c (hppa_elf_is_local_label): New function.
2548 Tue Mar 15 23:55:47 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2550 * cf-m68klynx.c (CALC_ADDEND): Use _bfd_m68klynx_howto_table.
2552 Tue Mar 15 04:41:13 1994 David J. Mackenzie (djm@rtl.cygnus.com)
2555 Replace DEFUN and DEFUN_VOID with K&R-style function definition.
2556 Indent some of them to GNU standards.
2558 * aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
2559 cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
2560 elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
2561 libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
2562 Update copyright years.
2564 Mon Mar 14 11:41:23 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2566 * som.c (som_prep_for_fixups): A relocation involving the section
2567 symbol for the *ABS* section is really a relocation involving
2569 (som_slurp_symbol_table): Do not set BSF_GLOBAL or BSF_EXPORT for
2570 undefined symbols. Correctly distinguish between debugger symbols
2571 and section symbols.
2573 * som (setup_sections): Set SEC_DEBUGGING and the section attributes
2574 for spaces and subspaces.
2576 * som.c (som_bfd_count_ar_symbols): Fix typo.
2578 * som.c (som_object_setup): Set EXEC_P, D_PAGED, WP_TEXT, and
2579 HAS_RELOC based on the object's magic number.
2580 (make_unique_section): Delete function. BFD and its users are
2581 prepared to handle multiple sections with the same name.
2582 (setup_sections): Allocate space on the BFD's obstack to hold
2583 section names. Use bfd_make_setion_anyway rather than the
2584 obsolete make_unique_section.
2585 (som_prep_headers): Choose the correct SOM magic number based
2587 (som_bfd_fill_in_ar_symbols): Return false, not NULL on error.
2589 Sat Mar 12 09:46:09 1994 Ian Lance Taylor (ian@cygnus.com)
2591 * elf32-ppc.c: Renamed from elf32-powerpc.c.
2592 * nlm32-ppc.c: Renamed from nlm32-powerpc.c.
2593 * Makefile.in, configure.in: Corresponding changes.
2595 Fri Mar 11 22:27:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2597 * elf32-powerpc.c: Extensive changes to update to preliminary ABI.
2599 Fri Mar 11 00:34:59 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
2601 * sunos.c (sunos_read_dynamic_info): Assume that dynamic info
2602 is always located at the start of the data section to allow
2603 recovery of the dynamic info from a stripped executable.
2604 * ecoff.c (ecoff_styp_to_sec_flags): Handle STYP_PDATA, STYP_XDATA
2607 Wed Mar 9 17:17:53 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
2609 * libbfd-in.h: Remove alloca cruft. It was missing some necessary
2610 cruft (like the #pragma alloca for AIX).
2611 In addition to that problem, the C alloca calls xmalloc, which
2612 means checking for being out of memory can't work right. The
2613 following changes remove all uses of alloca from BFD.
2614 * hosts/solaris2.h: Remove alloca cruft.
2615 * som.c: Replace alloca with a fixed size auto array.
2616 * aoutx.h, elfcode.h, nlmcode.h, bout.c, coff-alpha.c, ecoff.c,
2617 ecofflink.c, elf32-hppa.c, elf32-mips.c, linker.c, reloc.c, som.c,
2618 sunos.c: Replace alloca with malloc and appropriate error checking and
2620 * linker.c: Replace alloca with obstack_alloc.
2621 * libbfd.h: Rebuilt.
2623 Tue Mar 8 12:10:38 1994 Ian Lance Taylor (ian@cygnus.com)
2625 * coff-mips.c (mips_relocate_section): Handle MIPS_R_LITERAL like
2628 Sat Mar 5 14:08:54 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
2630 * elf32-hppa.h, elfcode.h: Replace uses of Elf*_Half, Elf*_Word,
2631 Elf*_Off typedefs by their expansion, the typedefs have been
2632 removed from include/elf/internal.h.
2633 * elfcode.h (bfd_section_from_shdr): Handle SHT_DYNAMIC section like
2634 SHT_PROGBITS section.
2636 Thu Mar 3 20:03:39 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2638 * som.h (_PA_RISC_ID): Treat HOST_HPPAOSF just like HOST_HPPABSD.
2640 Wed Mar 2 13:28:06 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
2642 * configure.host: Recognize i[34]86-sequent-*.
2644 * trad-core.c (trad_unix_core_file_p): A non-zero, not zero,
2645 return from bfd_seek indicates an error.
2646 New macro TRAD_CORE_DSIZE_INCLUDES_TSIZE to replace
2647 TRAD_CORE_STACK_OFFSET.
2648 * hosts/symmetry.h: Define TRAD_CORE_DSIZE_INCLUDES_TSIZE and
2649 TRAD_CORE_USER_OFFSET but not HOST_STACK_OFFSET.
2651 Wed Mar 2 11:57:03 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2653 * som.[ch]: Do not include libhppa.h in som.c, instead include
2656 * elf32-hppa.[ch]: Do not include libhppa.h in elf32-hppa.c, instead
2657 include it in elf32-hppa.h.
2659 * som.c (log2): Return -1 on error rather than aborting.
2660 (setup_sections): Bubble up an error from log2.
2662 * Changes to make HP C compiler happy in both traditional
2664 * som.c (hppa_som_gen_reloc_type): Use correct enum type for
2666 (bfd_som_set_section_attributes): Use unsigned int rather than
2667 unsigned char to avoid GNU-C extensions.
2668 (bfd_som_attach_aux_hdr): Return a boolean to indicate success
2669 or failure rather than aborting on failure.
2671 * som.h (bfd_som_set_section_attributes): Fix prototype to match
2673 (bfd_som_attach_aux_hdr): Add prototype.
2674 (hppa_som-gen_reloc_type): Likewise.
2676 * elf32-hppa.c: Add a couple casts to make HP compiler happy.
2677 (hppa_look_for_stubs_in_section): Do not return false on failure
2678 until rest of code is ready to handle it. Abort for now.
2680 Tue Mar 1 18:33:59 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
2682 * bfd-in2.h: Rebuilt.
2684 Tue Mar 1 13:06:53 1994 Kung Hsu (kung@mexican.cygnus.com)
2686 * i386os9k.c: use new functions bfd_set_error and bfd_get_error.
2687 * Makefile.in: delete an extra blank.
2688 * configure.in : Add i396os9k_vec.
2690 Mon Feb 28 15:41:01 1994 Kung Hsu (kung@mexican.cygnus.com)
2692 * config.bfd : Add i386-os9k.
2693 * config/i386-os9k.mt : Newly add os9k target makefile.
2695 * i386os9k.c : new file to handle os9k format bfd.
2696 * Makefile.in : Handle new file i386os9k.c
2697 * targets.c : Add bfd_target_os9k_flavour and i386os9k_vec.
2698 * cache.c : Initialize cache_sentinel to 0.
2700 Sun Feb 27 16:30:55 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2702 * elf32-hppa.c (mismatches, retval_mismatches): Fix mismatch
2703 action in case where caller specified no argument relocation.
2704 (hppa_elf_build_linker_stub): Try again to get the sym_ptr_ptr
2705 right in the original relocation and the stub's relocation.
2707 * elf32-hppa.h (hppa_look_for_stub_in_section): Fix typo. Delete
2708 unused symbols argument.
2710 * elf32-hppa.c (hppa_elf_stub_reloc): Accept asymbol ** rather
2711 than asymbol * for original target symbol. All callers changed.
2712 Set reloc->sym_ptr_ptr appropriately.
2713 (hppa_elf_build_linker_stub): Set reloc->sym_ptr_ptr correctly.
2714 (hppa_elf_look_for_stubs_in_section): No longer need symbols
2715 argument. Use the output symbols when canonicalizing the relocs,
2716 creating them if necessary.
2718 * linker.c (_bfd_generic_link_output_symbols): Do not
2719 rebuild/clobber the output symbols if they already exist.
2721 Sun Feb 27 15:22:36 1994 Stan Shebs (shebs@andros.cygnus.com)
2723 * targets.c (BFD_SEND, BFD_SEND_FMT): Add debugging versions that
2724 check all the pointer dereferences. Enabled via DEBUG_BFD_SEND.
2725 * bfd-in2.h: Rebuilt.
2727 * srec.c (hex_value): Always set to a size of 256 bytes.
2728 (srec_init): Cosmetic changes.
2730 Sun Feb 27 11:18:47 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2732 * elf32-hppa.c: Second half of major cleanup. More comments,
2733 PARAMize and staticize rest of functions. Delete unused
2734 functions. Delete unused/unnecessary arguments to some functions.
2735 Group static vars together. Abort for bad errors until we have
2736 error code propogation working. Work on spacing and indention.
2737 Add FIXMEs for unresolved problems. Use enums rather than
2738 #defines for lots of things. Merge two functions which build
2739 linker stubs into a single function (so they can easily share a
2740 ton of common code).
2742 Sat Feb 26 10:00:45 1994 Ian Lance Taylor (ian@cygnus.com)
2744 * reloc.c (_bfd_relocate_contents): Adjust handling of overflow to
2745 avoid depending upon right shifts of signed numbers, and to
2746 correct handling of src_mask with lower bits zero.
2748 * aoutx.h, archive.c: Add casts to avoid warnings from SVR4 cc.
2749 * ecoff.c, ecofflink.c, ecoffswap.h, srec.c: Likewise.
2750 * elf32-i386.c: Likewise.
2751 * elfcode.h (bfd_section_from_shdr): Make i unsigned; remove old
2753 (elf_write_phdrs): Make i unsigned.
2754 (map_program_segments): Make i and n_left unsigned.
2755 (assign_file_positions_except_relocs): Make i unsigned.
2756 (write_shdrs_and_ehdr): Make count unsigned.
2757 (assign_file_positions_for_relocs): Make i unsigned.
2758 (NAME(bfd,elf_write_object_contents)): Make count unsigned.
2759 (section_from_elf_index): Make index argument unsigned.
2761 Fri Feb 25 21:34:58 1994 Ian Lance Taylor (ian@cygnus.com)
2763 * elfcode.h: Don't include assert.h.
2764 (swap_out_syms): Use BFD_ASSERT rather than assert.
2766 * linker.c (_bfd_generic_link_write_global_symbol): Add missing
2769 * hosts/i386v4.h (qsort, strtol): Remove incorrect and useless
2772 Fri Feb 25 16:35:57 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2774 * libhppa.h (hppa_rebuild_insn): Moved here from elf32-hppa.c.
2776 * elf32-hppa.h (elf_hppa_tc_symbol): Add new arguments.
2777 (elf_hppa_tc_make_sections): Likewise.
2778 (elf_hppa_final_processing): Add extern decl.
2780 * elf32-hppa.c: First half of major cleanup. Add/cleanup lots of
2781 comments. PARAMize some static functions. Delete unused functions.
2782 Delete unused/unnecessary arguments to many functions. Group
2783 static vars together. Collapse common case statements together
2784 in many places. Use default case when possible instead of listing
2785 each case separately. Abort for bad errors until we get error
2786 code propogation working. Work on spacing and indention problems.
2787 Add FIXMEs for some unresolved problems. Delete hopelessly broken
2788 COMPLEX relocation support (it's never used anyway).
2789 (hppa_elf_rebuild_insn): Delete. Moved into libhppa.h.
2790 (elf_hppa_tc_symbol): Accept and use new arguments (symext chains).
2791 (elf_hppa_tc_make_sections): Likewise.
2793 * format.c (bfd_check_format_matches): Initialize matching_vector
2794 to keep gcc -Wall quiet.
2796 * elfcode.h (elf_slurp_reloca_table): Fix typo.
2798 * som.c (som_get_symtab_upper_bound): Use "sizeof (asymbol *)"
2799 not "sizeof (som_symbol_type *)".
2801 * elfcode.h (elf_get_symtab_upper_bound): Use "sizeof (asymbol *)"
2802 not "sizeof (asymbol"). Opps.
2804 Fri Feb 25 13:19:04 1994 Ted Lemon (mellon@pepper.ncd.com)
2806 * bfd.c (bfd_get_gp_size): Can't return gp value on an archive.
2807 (bfd_set_gp_size): Can't set gp value on an archive.
2809 Fri Feb 25 12:57:00 1994 Steve Chamberlain (sac@jonny.cygnus.com)
2811 * srec.c (pass_over): Don't skip too many characters when
2814 Fri Feb 25 11:41:57 1994 Ian Lance Taylor (ian@cygnus.com)
2816 * ecoff.c (ecoff_sizeof_headers): Align result to 16 byte
2819 Thu Feb 24 07:13:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2821 * som.c (som_bfd_derive_misc_symbol_info): Derive symbol_info
2822 field for absolute symbols in the same manner as undefined
2825 Thu Feb 24 04:29:19 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
2827 * elfcode.h (elf_core_file_p): Check for core file e_machine match
2828 like in elf_object_p.
2830 Wed Feb 23 18:28:37 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2832 * elfcode.h (alloca): Delete declaration.
2834 * som.c (som_prep_headers): Use CPU_PA_RISC1_0 for magic
2835 number rather than HP9000S800_ID. Note som.c is careful
2836 to make sure CPU_PA_RISC1_0 is always defined.
2838 Mon Feb 21 10:12:02 1994 Stan Shebs (shebs@andros.cygnus.com)
2840 * Makefile.in (targets.o, archures.o): Use ALL_CFLAGS to supply
2841 flags to explicit compile actions.
2843 Mon Feb 21 09:50:06 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
2845 * ecofflink.c (ecoff_write_symhdr): Set symhdr->magic here.
2846 * ecoff.c (ecoff_write_object_contents): Make sure .bss section
2847 ends on a page boundary if there is no symbol table.
2848 (ecoff_bfd_final_link): Don't set symhdr->magic here.
2850 * hosts/hp300.h: Include <stdlib.h>; don't declare free.
2852 * som.c (som_bfd_count_ar_symbols): Use a pointer and alloca
2853 rather than an array of variable size.
2854 (som_bfd_fill_in_ar_symbols): Likewise.
2855 (som_bfd_ar_write_symbol_stuff): Likewise.
2857 * coff-alpha.c (alpha_relocate_section): Rewrite mask and shift
2858 operation to avoid OSF 1.3 cc bug.
2859 * ecoff.c (ecoff_write_object_contents): Make text_size, data_size
2860 and bss_size bfd_size_type instead of unsigned long. Make
2861 text_start and data_start bfd_vma instead of unsigned long.
2862 * ecofflink.c (ecoff_add_string): Remove incorrect cast of return
2865 Sun Feb 20 16:06:54 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
2867 * linker.c (_bfd_generic_link_add_archive_symbols): Consider
2868 symbols in the order they appear in the archive map.
2870 Sat Feb 19 03:17:32 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
2872 * coff-alpha.c (reloc_nil): Add forward declaration, add missing
2873 error_message argument.
2874 * coff-sparc.c (bfd_coff_generic_reloc): Add forward declaration,
2875 add missing error_message argument.
2876 * mipsbsd.c (mips_fix_hi16_s): Add forward declaration, add missing
2877 error_message argument.
2879 Fri Feb 18 11:41:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2881 Support for PowerPC NetWare.
2882 * nlm32-powerpc.c: New file.
2883 * config.bfd (powerpc-*-netware*): New target; use ppc-nlm.
2884 * config/ppc-nlm.mt: New file.
2885 * configure.in (nlm32_powerpc_vec): New target vector; use
2886 nlm32-powerpc.o, nlm32.o, nlm.o.
2887 * targets.c (nlm32_powerpc_vec): Declare.
2888 * Makefile.in (BFD32_BACKENDS): Add nlm32-powerpc.o.
2889 (CFILES): Add nlm32-powerpc.c.
2891 Initial support for PowerPC ELF. Done without an ABI, and
2892 probably to be changed when I get an ABI.
2893 * config.bfd (powerpc-*-sysv4*): New target; use ppc-elf.
2894 * config/ppc-elf.mt: New file.
2895 * configure.in (bfd_elf32_powerpc_vec): New target vector; use
2896 elf32-powerpc.o, elf32.o, elf.o.
2897 * elf32-powerpc.c: New file.
2898 * elfcode.h (prep_headers): Add bfd_arch_powerpc case.
2899 (elf_set_arch_mach): Likewise.
2900 * targets.c (bfd_elf32_powerpc_vec): Declare.
2901 * Makefile.in (BFD32_BACKENDS): Add elf32-powerpc.o.
2902 (CFILES): Add elf32-powerpc.c.
2903 Rebuilt dependencies.
2905 Thu Feb 17 15:29:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2907 * coffgen.c (coff_write_linenumbers): Always return a value.
2909 * elfcode.h (elf_slurp_symbol_table): Handle zero symbols
2910 reasonably. Allocate x_symp using alloca.
2912 * elfcode.h (map_program_segments): ELF program header entries
2913 must be sorted by load address. This used to generate the entries
2916 * section.c (SEC_IN_MEMORY): Define.
2917 (asection): Rename unused field otheruserdata to contents, and
2919 (bfd_make_section_anyway): Initialize contents field to NULL.
2920 (bfd_get_section_contents): If SEC_IN_MEMORY is set, get section
2921 contents from contents field rather than from file.
2922 * bfd-in2.h: Rebuilt.
2924 Thu Feb 17 08:30:53 1994 David J. Mackenzie (djm@thepub.cygnus.com)
2926 * bfd.c (bfd_get_error, bfd_set_error): New functions.
2927 (bfd_error): Make static.
2928 (bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
2930 * bfd-in2.h: Regenerated.
2931 * aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
2932 aoutf1.h, aoutx.h, archive.c, archures.c,
2933 bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
2934 coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
2935 ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
2936 elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
2937 i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
2938 lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
2939 nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
2940 ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
2941 srec.c, sunos.c, syms.c, targets.c, tekhex.c,
2942 trad-core.c: Change callers.
2944 Tue Feb 15 22:27:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2946 * som.c: Remove FIXMEs for things which have been dealt with.
2948 Tue Feb 15 19:39:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
2950 * section.c (bfd_get_section_contents): Since this function reads
2951 unrelocated contents, the section's raw size is always the one to
2952 use for bounds checking.
2954 * linker.c (default_indirect_link_order): In assertion, compare
2955 link_order size field against cooked size, not raw size, of input
2958 * bout.c (b_out_get_reloc_upper_bound): For BSS section, just
2960 (aligncode): When shrinking, the addend should be set to the
2961 current offset in the section plus the number of bytes of padding
2962 that will actually be retained.
2963 (b_out_relax_section): If a section contains no relocations, don't
2964 bother processing them.
2965 (b_out_get_relocated_section_contents): Set reloc_done. Assert
2966 that bfd_get_section_contents returns true. Check that relocs are
2968 (b_out_get_relocated_section_contents, case ALIGNDONE): Assert
2969 that reloc->addend falls between the current source offset and the
2970 raw size of the input section.
2972 * config.bfd: Support i960 vxworks versions > 5.0 with coff, not
2973 bout. Default with no version number is still bout. Support
2974 explicit i960-coff target too.
2976 * bout.c: Changed some indentation, deleted trailing whitespace,
2977 fixed some comments, removed some "#if 1" lines.
2978 (output_addr): New macro.
2979 (calljx_callback, callj_callback, get_value, abs32code, aligncode,
2980 b_out_get_relocated_section_contents): Use it for readability.
2982 Tue Feb 15 09:00:16 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2984 * som.c (som_bfd_prep_for_ar_write): Iterate through the SOM
2985 symbols, not the BFD symbols.
2986 (som_bfd_ar_write_symbol_stuff): Likewise.
2988 Mon Feb 14 22:55:20 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
2990 * som.c (som_slurp_symbol_table): Do not die if a BFD doesn't
2993 * Finish basic read-write support for SOM archive libraries. Bugs
2994 surely remain as this hasn't been tested all that much.
2995 * som.c (SOM_LST_HASH_SIZE, SOM_LST_MODULE_LIMIT): Define.
2996 (struct som_misc_symbol_info): New structure to hold info necessary
2997 to build both normal and library symbol tables.
2998 (som_derive_misc_symbol_info): New function to derive info necessary
2999 to build both normal and library symbol tables.
3000 (som_build_and_write_symbol_table): Use new function to derive misc
3002 (som_slurp_symbol_table): Update backend private data for symbols
3004 (som_bfd_prep_for_ar_write): New function.
3005 (som_bfd_ar_symbol_hash): New function.
3006 (som_bfd_ar_write_symbol_stuff): New function.
3007 (som_write_armap): Flesh out.
3008 (som_vec): Fix ar padding character.
3010 * som.c: Consistently use memset rather than bzero.
3012 Mon Feb 14 17:02:28 1994 Stu Grossman (grossman at cygnus.com)
3014 * coff-rs6000.c: Add Lynx core file support, use HOST_AIX, where
3016 * rs6000-core.c: Use HOST_AIX instead of COREFILES_PLEASE.
3017 * config/rs6000.mh: Remove defs of ARCHIVES_PLEASE and
3019 * config/rs6000lynx.mh: Turn on Lynx core file support.
3020 * hosts/rs6000.h: #define HOST_AIX.
3021 * hosts/rs6000lynx.h: Create this to enable Lynx host support.
3023 Sun Feb 13 14:30:00 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3025 * som.h (som_symbol_data): Safely access backend private data
3026 for BFD symbols. All callers changed.
3028 * Read-only SOM archive support.
3029 * som.c (som_bfd_count_ar_symbols): New helper function.
3030 (som_bfd_fill_in_ar_symbols): New helper function.
3031 (som_slurp_armap): New function to read a SOM LST.
3033 * som.h: Include <lst.h> and <ar.h>.
3035 Sat Feb 12 22:34:14 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3037 * elfcode.h (elf_map_symbols): Fix typo.
3038 (write_object_contents): Check return values from prep_headers and
3039 elf_compute_section_file_positions.
3040 (set_section_contents): Likewise.
3042 Fri Feb 11 16:56:50 1994 David J. Mackenzie (djm@thepub.cygnus.com)
3044 * archive.c (normalize) [VMS]: Call malloc, not bfd_xmalloc.
3045 (bfd_construct_extended_name_table): Check result of normalize.
3047 Tue Feb 8 08:57:31 1994 David J. Mackenzie (djm@thepub.cygnus.com)
3049 Make all callers of malloc or realloc (including via obstacks)
3050 check the result for NULL. Most set bfd_error to no_memory and
3051 return in that case; a few are harder to fix, and are marked
3052 with "FIXME <return type>".
3054 * elf32-hppa.c (hppa_elf_build_arg_reloc_stub
3055 hppa_elf_build_long_branch_stub): Check bfd_make_empty_symbol return.
3056 * linker.c (_bfd_generic_link_output_symbols
3057 _bfd_generic_link_write_global_symbol): Ditto
3058 * section.c (bfd_make_section_anyway): Ditto.
3060 * tekhex.c (find_chunk tekhex_mkobject): Check bfd_alloc.
3061 (first_phase): Ditto. FIXME void
3062 (tekhex_make_empty_symbol): Check bfd_zalloc.
3064 * sunos.c (sunos_read_dynamic_info): Check bfd_zalloc.
3065 (MY(read_dynamic_symbols) MY(read_dynamic_relocs)): Check bfd_alloc.
3067 * stringhash.c (_bfd_stringtab_hash_newfunc): Check bfd_hash_allocate.
3070 (fillup_symbols): Check bfd_alloc. FIXME void
3071 (srec_mkobject srec_get_section_contents
3072 srec_set_section_contents): Check bfd_alloc.
3073 (srec_make_empty_symbol): Check bfd_zalloc.
3075 * som.c (hppa_som_gen_reloc_type): Check bfd_alloc_by_size_t.
3076 (make_unique_section): Check bfd_alloc.
3077 (som_new_section_hook): Check bfd_zalloc.
3078 (bfd_som_attach_aux_hdr): Ditto. FIXME void
3080 * rs6000-core.c (rs6000coff_core_p): Check bfd_zalloc.
3082 * osf-core.c (osf_core_make_empty_symbol): Check bfd_zalloc.
3083 (osf_core_core_file_p): Check bfd_alloc.
3085 * oasys.c (oasys_slurp_symbol_table oasys_archive_p
3086 oasys_mkobject oasys_object_p oasys_new_section_hook
3087 oasys_set_section_contents): Check bfd_alloc.
3088 (oasys_slurp_section_data): Check bfd_zalloc and bfd_alloc.
3089 (oasys_make_empty_symbol): Check bfd_zalloc.
3091 * nlmcode.h (nlm_make_empty_symbol): Check bfd_zalloc.
3092 (nlm_slurp_symbol_table): Check bfd_zalloc and bfd_alloc.
3094 * nlm32-sparc.c (nlm_sparc_read_import): Check bfd_alloc.
3096 * nlm32-i386.c (nlm_i386_read_import): Check bfd_alloc.
3098 * nlm32-alpha.c (nlm_alpha_read_import): Check bfd_alloc.
3100 * linker.c (_bfd_link_hash_newfunc
3101 (generic_link_hash_newfunc
3102 (archive_hash_newfunc
3103 (_bfd_generic_link_add_one_symbol): Check bfd_hash_allocate.
3104 (_bfd_generic_final_link
3105 (_bfd_generic_link_output_symbols
3106 (default_indirect_link_order): Check bfd_alloc.
3107 (bfd_new_link_order): Check bfd_alloc_by_size_t.
3109 * irix-core.c (irix_core_make_empty_symbol): Check bfd_zalloc.
3112 (read_id get_symbol get_section_entry ieee_archive_p ieee_object_p
3113 ieee_slurp_section_data ieee_new_section_hook): Check bfd_alloc.
3114 (do_one): Check bfd_alloc. Return a boolean.
3115 (ieee_slurp_section_data): Check it.
3116 (init_for_output): Check bfd_alloc. Return a boolean.
3117 (ieee_set_section_contents): Check it.
3118 (do_with_relocs): Check bfd_alloc. Return a boolean.
3119 (ieee_bfd_debug_info_accumulate): Ditto. FIXME void.
3120 (ieee_mkobject): Check bfd_zalloc.
3121 (ieee_make_empty_symbol): Check bfd_zmalloc.
3123 * hpux-core.c (hpux_core_make_empty_symbol): Check
3126 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Check
3128 (hppabsd_core_core_file_p): Check bfd_zalloc.
3130 * hp300hpux.c (MY(slurp_symbol_table)): Check bfd_alloc.
3132 * elfcode.h (elf_new_section_hook): Check bfd_alloc.
3133 (bfd_section_from_phdr): Ditto.
3134 (write_relocs): Ditto. FIXME void
3135 (elf_map_symbols assign_section_numbers map_program_segments):
3136 Ditto. Return a boolean.
3137 (swap_out_syms): Ditto. Check elf_map_symbols.
3138 (elf_slurp_symbol_table): Check bfd_zalloc.
3139 (elf_slurp_reloca_table): Check bfd_alloc.
3140 (elf_slurp_reloc_table): Ditto.
3141 (elf_compute_section_file_positions): Check assign_section_numbers.
3142 (assign_file_positions_except_relocs): Return a boolean.
3143 Check map_program_segments.
3144 (elf_compute_section_file_positions): Check it.
3146 * elf32-mips.c (mips_elf_final_link): Check bfd_alloc.
3148 * elf32-hppa.c (hppa_elf_stub_branch_reloc): Check bfd_zmalloc and
3150 (hppa_elf_stub_reloc): Ditto.
3151 (hppa_elf_build_arg_reloc_stub): Check bfd_zalloc.
3152 (hppa_elf_build_long_branch_stub): Ditto.
3153 (elf32_hppa_backend_symbol_table_processing): Ditto.
3155 * ecoff.c (ecoff_set_symbol_info): Check bfd_alloc. Return a boolean.
3156 (ecoff_slurp_symbol_table): Check it.
3157 (ecoff_slurp_armap): Check bfd_alloc.
3158 (ecoff_write_armap): Check bfd_zalloc.
3159 (ecoff_link_hash_newfunc): Check bfd_hash_allocate and
3160 _bfd_link_hash_newfunc.
3161 (ecoff_link_add_externals): Check bfd_alloc.
3163 * ctor.c (bfd_constructor_entry): Check bfd_alloc.
3165 * coffgen.c (coff_real_object_p): Check bfd_alloc.
3166 (coff_renumber_symbols): Check bfd_alloc_by_size_t. Return a boolean.
3167 (coff_write_symbol): Check bfd_alloc. FIXME int
3168 (coff_write_linenumbers): Check bfd_alloc. Return a boolean.
3169 (coff_section_symbol): Check bfd_alloc_by_size_t.
3170 (coff_get_normalized_symtab): Check bfd_alloc.
3171 (coff_bfd_make_debug_symbol): Check bfd_zalloc.
3172 * libcoff-in.h: Change decls of coff_renumber_symbols,
3173 coff_write_linenumbers.
3174 * libcoff.h: Rebuilt.
3175 * coffcode.h (coff_write_object_contents): Check
3176 coff_renumber_symbols, coff_write_linenumbers.
3178 * coffcode.h: Indent.
3179 (coff_add_missing_symbols): Check bfd_alloc_by_size_t. Return a
3181 (coff_write_object_contents): Check it.
3183 * coff-alpha.c (alpha_relocate_section): Check bfd_alloc.
3184 * coff-mips.c (mips_relocate_section): Ditto.
3186 * archive.c (bfd_slurp_bsd_armap_f2): Check bfd_alloc value.
3187 (do_slurp_bsd_armap): Ditto.
3188 (compute_and_write_armap): Check bfd_realloc value.
3190 * aoutx.h (translate_from_native_sym_flags): Check bfd_alloc
3191 return value. Return boolean value.
3192 (NAME(aout,make_empty_symbol)): Check bfd_zalloc return value.
3193 (NAME(aout,slurp_symbol_table)): Check bf_alloc and bfd_zalloc
3195 (add_to_stringtab): Ditto. FIXME void
3196 (aout_link_hash_newfunc): Check bfd_hash_allocate return value.
3197 (aout_link_add_symbols): Check bfd_alloc value.
3198 (translate_symbol_table): Check translate_from_native_sym_flags.
3199 * hp300hpux.c (MY(slurp_symbol_table)): Ditto.
3200 * aoutx.h (aout_link_hash_newfunc): Check _bfd_link_hash_newfunc.
3202 * opncls.c (bfd_zalloc bfd_realloc): Check result of bfd_alloc.
3204 * opncls.c (obstack_chunk_alloc): Define as malloc, not
3205 bfd_xmalloc_by_size_t.
3206 (_bfd_new_bfd): Check obstack_begin for 0 return.
3208 * ieee.c (obstack_chunk_alloc): Define as malloc, not
3209 bfd_xmalloc_by_size_t.
3210 (ieee_archive_p): Check obstack_begin for 0 return and
3211 obstack_finish for NULL return.
3213 * hash.c (obstack_chunk_alloc): Define as malloc, not
3214 bfd_xmalloc_by_size_t.
3215 (bfd_hash_table_init_n): Check obstack_begin for 0 return and
3216 obstack_finish for NULL return.
3217 (bfd_hash_lookup): Check obstack_alloc for NULL return.
3219 * ecofflink.c (obstack_chunk_alloc): Define as malloc, not
3220 bfd_xmalloc_by_size_t.
3221 bfd_ecoff_debug_accumulate
3222 bfd_ecoff_debug_accumulate_other): Check obstack_alloc.
3223 (add_file_shuffle add_memory_shuffle): Check obstack_alloc for
3224 NULL return. Return boolean, not void.
3225 (bfd_ecoff_debug_init): Check obstack_begin for 0 return.
3226 (bfd_ecoff_debug_accumulate): Check add_file_shuffle
3227 and add_memory_shuffle return.
3228 (string_hash_newfunc): Check bfd_hash_allocate and bfd_hash_newfunc.
3229 (bfd_ecoff_debug_accumulate): Check bfd_alloc.
3230 (ecoff_add_string): Check add_memory_shuffle return.
3232 * libbfd-in.h (xmalloc, bfd_xmalloc, bfd_xmalloc_by_size_t):
3234 * libbfd.h: Rebuilt.
3236 Fri Feb 11 15:35:32 1994 Stu Grossman (grossman at cygnus.com)
3238 * configure.host: Add Lynx/rs6000 support.
3239 * config/i386-nlm.mt: Enable a.out file support.
3240 * config/rs6000lynx.mh: Lynx/rs6000 host support.
3242 Fri Feb 11 17:25:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3244 * archive.c (compute_and_write_armap): Rewrite somewhat to improve
3247 Fri Feb 11 13:10:42 1994 Stan Shebs (shebs@andros.cygnus.com)
3249 * archive.c: Change all references to '\n' in archive magic
3250 to '\012', for greater portability.
3251 * ecoff.c (ecoff_write_armap): Ditto.
3253 Thu Feb 10 12:58:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3255 * aoutx.h (aout_link_write_other_symbol): Check strip settings to
3256 see whether symbol should be output.
3257 * genlink.h (struct generic_write_global_symbol_info): Added info
3259 * linker.c (_bfd_generic_final_link): Initialize wginfo.info.
3260 (_bfd_generic_link_write_global_symbol): Check strip settings to
3261 see whether symbol should be output.
3262 * elf32-mips.c (mips_elf_final_link): Initialize wginfo.info.
3264 Wed Feb 9 21:34:58 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3266 * som.c (som_reloc_queue_find): Do not examine a NULL queue entry.
3268 * som.c: Cast return values from BFD memory allocation routines to
3269 avoid warnings from the HP compiler.
3271 Wed Feb 9 12:55:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3273 * coff-alpha.c (alpha_relocate_section): Accept a LITERAL
3274 reloc on an "ldl" instruction too.
3276 * archive.c (bfd_ar_hdr_from_filesystem): Cast status elements
3277 when passing them to sprintf. Use %ld instead of %d.
3279 * coff-rs6000.c (rs6000coff_mkarchive): Return false.
3280 (rs6000_coff_snarf_ar_hdr): Don't declare errno; it's not used.
3281 Also removed unused variable namelen.
3282 (rs6000coff_write_armap): Declare orl_count and stridx parameters.
3284 Tue Feb 8 18:00:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3286 * libbfd-in.h (xmalloc): Don't declare parameter type, to avoid
3288 * libbfd.h: Rebuilt.
3290 Tue Feb 8 15:55:50 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
3292 * coff-alpha.c (reloc_nil): New function.
3293 (alpha_howto_table): Use it as special_function to prevent certain
3294 relocs from being adjusted by bfd_perform_relocation. IGNORE
3295 reloc should be partial_inplace.
3296 (alpha_ecoff_get_relocated_section_contents): Accept a LITERAL
3297 reloc on an "ldl" instruction too.
3299 Tue Feb 8 00:32:28 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3301 * elf32-hppa.c (CURRENT_STUB_OFFSET, hppa_elf_build_arg_reloc_stub,
3302 hppa_elf_build_long_branch_stub): Cast to char * instead of int
3303 before performing pointer arithmetic.
3305 Mon Feb 7 20:56:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3307 * config.bfd (hppa*-*-osf*): Use bfd_name hppaosf for this
3309 (hppa*-*-*elf*): This configuration used hppa-elf now.
3311 * som.c: This file is also used for HOST_HPPAOSF.
3313 * targets.c (bfd_target_vector): Enable som_vec for HOST_HPPAOSF.
3315 * hosts/hppaosf.h: New host configuration file.
3317 * config/hppabsd.mt (SELECT_VECS): Add bfd_elf32_hppa_vec as
3318 BSD handles both SOM and ELF object files.
3320 * config/hppaosf.mh (HDEFINES): Delete. No longer needed.
3321 (RANLIB): Doesn't do anything, define it to be "echo".
3323 * config/hppaosf.mt: New target makefile fragment for a PA running
3326 Mon Feb 7 15:02:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3328 * archures.c (enum bfd_architecture): Added bfd_arch_powerpc.
3329 (archures_init_table): If SELECT_ARCHITECTURES is not defined,
3330 added bfd_powerpc_arch.
3331 * bfd-in2.h: Rebuilt.
3332 * cpu-powerpc.c: New file.
3333 * Makefile.in (ALL_MACHINES, CFILES): Added cpu-powerpc.c.
3334 Rebuilt dependencies.
3336 * elfcode.h (bfd_section_from_shdr): Get vma and alignment_power
3337 of an SHT_STRTAB section from sh_addr and sh_addralign, rather
3338 than just setting them to zero.
3340 Sun Feb 6 20:04:10 1994 David J. Mackenzie (djm@thepub.cygnus.com)
3342 * elfcode.h (prep_headers, swap_out_syms): Check for NULL return
3343 from bfd_new_strtab.
3344 (elf_compute_section_file_positions): Check for false return from
3347 * linker.c (default_indirect_link_order): Check for NULL return
3348 from bfd_get_relocated_section_contents.
3350 * syms.c: Make example application in doc call xmalloc, not
3353 * aoutx.h (NAME(aout,slurp_symbol_table),
3354 aout_link_get_symbols, NAME(aout,link_hash_table_create)):
3355 * bout.c (b_out_slurp_reloc_table, b_out_squirt_out_relocs):
3356 * ecoff.c (ecoff_bfd_link_hash_table_create):
3357 * ecofflink.c (bfd_ecoff_debug_init):
3358 * format.c (bfd_check_format_matches):
3359 * linker.c (_bfd_generic_link_hash_table_create):
3360 (_bfd_generic_final_link):
3361 * reloc16.c (bfd_coff_reloc16_relax_section):
3362 (bfd_coff_reloc16_get_relocated_section_contents):
3363 * elf32-hppa.c (hppa_elf_build_arg_reloc_stub):
3364 * elf32-mips.c (mips_elf_final_link):
3365 * elfcode.h (bfd_new_strtab):
3366 (bfd_add_2_to_strtab):
3367 (elf_slurp_symbol_table):
3368 (elf_corefile_note):
3369 * libbfd.c (bfd_zmalloc):
3370 Use malloc and check the result, instead of bfd_xmalloc.
3372 Sat Feb 5 12:39:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
3374 * config.bfd: Put m68*-*-sysv* line after m68*-*-sysv4*.
3376 Sat Feb 5 05:32:44 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3378 * srec.c (srec_write_record): Put CONST keyword for "src" before
3379 "unsigned", some compilers don't like it after "unsigned".
3380 * libcoff.h, libcoff-in.h (bfd_perform_slip): Rename "value" to
3381 "val" in prototype declaration because some compilers don't like
3382 arguments whose names are the same as types.
3384 Sat Feb 5 01:14:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3386 * aoutx.h (aout_link_check_ar_symbols): Correct test for whether
3387 object file defines symbol. Also, if skipping a symbol, skip the
3388 second symbol of a N_WARNING or N_INDR symbol as well.
3390 Fri Feb 4 23:55:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3392 Add basic support for writing RS/6000 XCOFF files.
3393 * coff-rs6000.c (dummy_reloc): Removed.
3394 (rs6000coff_howto_table): Defined XCOFF relocs.
3395 (RTYPE2HOWTO): Defined to use rs6000coff_rtype2howto.
3396 (rs6000coff_rtype2howto): New function.
3397 (coff_bfd_reloc_type_lookup): Defined to use
3398 rs6000coff_reloc_type_lookup.
3399 (rs6000coff_reloc_type_lookup): New function.
3400 (SELECT_RELOC): Defined to set r_type and r_size fields.
3401 (COFF_LONG_FILENAMES): Defined.
3402 * coffcode.h (combined_entry_type): Changed fix_tag and fix_end
3403 fields to bitfields. Added fields fix_value and fix_scnlen.
3404 (sec_to_styp_flags): If STYP_DEBUG is defined, use it rather than
3405 STYP_INFO for the type of a section named .debug.
3406 (coff_add_missing_symbols): Don't define if RS6000COFF_C.
3407 (coff_write_object_contents): If RS6000COFF_C, don't call
3408 coff_add_missing_symbols.
3409 (coff_slurp_symbol_table): If RS6000COFF_C, then if the last aux
3410 entry has type STY_LD change the x_scnlen into a pointer to a
3411 symbol and set fix_scnlen. Also, for a C_BSTAT symbol, change the
3412 value into a pointer to a symbol and set fix_value.
3413 * libcoff.h: Rebuilt.
3414 * coffgen.c (coff_mangle_symbols): Reindent. If fix_value is set,
3415 get the symbol offset. Likewise for fix_scnlen.
3416 (string_size): Change type to bfd_size_type.
3417 (debug_string_size, debug_string_section): New static variables.
3418 (coff_fix_symbol_name): If bfd_coff_symname_in_debug returns true,
3419 write the symbol name into the .debug section; assume that the
3420 section has already been created with the right size.
3421 (coff_write_symbols): Initialize debug_string_size to 0. If
3422 bfd_coff_symname_in_debug returns true, don't put symbol name in
3423 usual string table. After writing out all symbols, if
3424 debug_string_size is not 0, check that it matches the size of the
3426 (coff_get_normalized_symtab): Clear new fix_value and fix_scnlen
3427 fields. If the string offset is 0, always use an empty string as
3429 (coff_make_empty_symbol): Zero out the symbol structure.
3430 * reloc.c (bfd_perform_relocation): Work around one gross hack
3431 with another: actually look at the target name to avoid the broken
3433 (bfd_reloc_code_real_type): Add BFD_RELOC_PPC_B26,
3434 BFD_RELOC_PPC_BA26 and BFD_RELOC_PPC_TOC16.
3435 * bfd-in2.h: Rebuilt.
3437 Fri Feb 4 17:28:32 1994 David J. Mackenzie (djm@thepub.cygnus.com)
3439 * libbfd.c (bfd_zmalloc): Call bfd_xmalloc instead of malloc.
3440 (bfd_xmalloc, bfd_xmalloc_by_size_t): Functions deleted.
3441 * libbfd-in.h: Define them as macros calling xmalloc and declare
3443 * libbfd.h: Rebuilt.
3445 Thu Feb 3 16:49:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3447 * ecofflink.c (bfd_ecoff_debug_externals): If a small undefined
3448 symbol has a value in the ECOFF symbol but not in the BFD symbol,
3449 keep the value in the ECOFF symbol. This helps gas.
3451 * linker.c (_bfd_generic_link_output_symbols,
3452 _bfd_generic_link_write_global_symbol): Don't require that all
3453 references to a common symbol be themselves common symbols.
3455 * aoutx.h (aout_reloc_index_to_section): Handle N_UNDF.
3457 Wed Feb 2 20:37:19 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
3459 * libbfd.c, bfd-in.h, hosts/alphaosf.h, hosts/sparc-ll.h, aoutf1.h,
3460 sparclynx.c, Makefile.in: Change HOST_64_BIT to BFD_HOST_64_BIT.
3461 * bfd-in2.h: Rebuilt.
3463 Wed Feb 2 12:30:13 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3465 * coffswap.h (coff_swap_reloc_out): If RS6000COFF_C, handle type
3467 (coff_swap_aux_in): If RS6000COFF_C, change x_csect.x_scnlen to
3468 x_csect.x_scnlen.l to match change in coff/internal.h.
3469 (coff_swap_aux_out): Likewise.
3471 * coff-mips.c (mips_ecoff_backend_data), coff-alpha.c
3472 (alpha_ecoff_backend_data): Change casts of aux_in and aux_out
3473 fields to match yesterday's changes.
3475 * coffcode.h (coff_write_relocs): If SELECT_RELOC is defined, pass
3476 in the internal_reloc itself, not the type.
3477 * coff-apollo.c, coff-h8300.c, coff-h8500.c, coff-i386.c,
3478 coff-m68k.c, coff-sh.c, coff-we32k.c, coff-z8k.c: Changed
3479 definition of SELECT_RELOC accordingly.
3481 Tue Feb 1 12:05:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3483 * coffcode.h (bfd_coff_backend_data): Added new arguments to
3484 _bfd_coff_swap_aux_in and _bfd_coff_swap_aux_out: aux index number
3485 and number of aux entries.
3486 (bfd_coff_swap_aux_in, bfd_coff_swap_aux_out): Changed
3488 * libcoff.h: Rebuilt.
3489 * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Accept new
3490 arguments. If RS6000COFF_C, only treat C_EXT and C_HIDEXT
3491 specially if this is the last aux entry.
3492 * coffgen.c (coff_write_symbol, coff_get_normalized_symtab): Pass
3493 new arguments to swap_aux functions.
3495 Sun Jan 30 15:14:36 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
3497 * gen-aout.c (main): Set DEFAULT_ARCH based on preprocessor macros
3498 (only testing for m68k and vax at the moment); do verify that the
3499 preprocessor didn't trash the arch name inside the string version.
3500 Don't print out "pagesize =" line that prevents output from
3501 compiling. Derive BYTES_IN_WORD and ARCH values from sizeof
3503 * Makefile.in (aout-params.h): Pass gen-aout a dummy target name.
3504 (check, installcheck): Identify directory in "no testsuites"
3507 Sun Jan 30 13:25:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3509 * aoutx.h (aout_link_write_symbols): Write out correct value for
3512 Fri Jan 28 18:34:05 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
3514 * hosts/vaxbsd.h (HOST_STACK_END_ADDR): Vax BSD doesn't define
3515 KERNBASE, so hard-code 0x80000000 instead.
3517 Thu Jan 27 13:54:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3519 * linker.c (generic_link_add_symbol_list): If symbol is common,
3520 set the BSF_OLD_COMMON flag.
3522 Wed Jan 26 13:47:15 1994 David J. Mackenzie (djm@thepub.cygnus.com)
3524 * format.c (bfd_check_format_matches): Put the new entry in the
3525 correct element of matching_vector.
3527 Tue Jan 25 11:43:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
3529 * som.c, som.h (bfd_som_set_section_attributes,
3530 bfd_som_set_subsection_attributes): Change parameters from char
3531 to int. Following a prototype with an old-style function definition
3532 in the presence of widened parameters is a GCC-ism not supported
3533 by the HP compiler in ANSI mode.
3535 Tue Jan 25 11:46:46 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3537 * reloc.c (bfd_get_reloc_size): Size of type -2 is 4 bytes, not 2.
3539 * hp300hpux.c (MY(write_object_contents)): Write out the symbols
3540 before writing out the relocs, so that the right symbol indices
3543 * archive.c (do_slurp_bsd_armap, bfd_slurp_bsd_armap_f2): Do not
3544 try to overlay the internal carsyms on the external symdefs. That
3545 can not work if the size of a host pointer is larger than 4 bytes.
3547 * format.c (bfd_check_format_matches): Cast result of
3548 bfd_xmalloc_by_size_t.
3549 * opncls.c (_bfd_new_bfd): Avoid ANSI C prototype.
3551 * archive.c: Reindented to GNU standards.
3553 Mon Jan 24 14:41:23 1994 David J. Mackenzie (djm@thepub.cygnus.com)
3555 * opncls.c (_bfd_new_bfd, _bfd_new_bfd_contained_in): Add
3556 "_bfd_" to function names.
3557 * archive.c (_bfd_create_empty_archive_element_shell),
3558 libbfd-in.h: Change callers.
3560 * libbfd.c (bfd_zmalloc): Renamed from zalloc.
3561 * libbfd.c (bfd_add_to_string_table),
3562 trad-core.c (trad_unix_core_file_p),
3563 targets.c (bfd_target_list),
3564 ptrace-core.c (ptrace_unix_core_file_p),
3565 opncls.c (new_bfd), libbfd-in.h,
3566 ieee.c (ieee_make_empty_symbol),
3567 elf32-hppa.c (hppa_elf_stub_branch_reloc),
3568 (hppa_elf_stub_reloc): Change callers.
3569 * libbfd.h: Regenerated.
3571 * archive.c (_bfd_look_for_bfd_in_cache): Add "_bfd_" to name.
3572 (_bfd_get_elt_at_filepos),
3573 coff-rs6000.c (rs6000coff_get_elt_at_filepos), libbfd-in.h:
3576 * format.c (bfd_check_format_matches), libbfd-in.h, targets.c,
3577 elfcode.h (elf_object_p): Rename target_vector to bfd_target_vector
3578 and default_vector to bfd_default_vector.
3579 * libbfd.h: Regenerated.
3581 * format.c (bfd_check_format_matches): New function.
3582 (bfd_check_format): Call it.
3583 (bfd_matching_formats): Function removed.
3584 * targets.c: Replace the vector added on Jan 21 with a count of
3585 entries in default_vector.
3586 * bfd-in2.h: Regenerated.
3588 Mon Jan 24 12:38:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3590 * coff-alpha.c (alpha_ecoff_object_p): New function. Set size of
3591 .pdata section based on lnnoptr field, not section header.
3592 (alpha_relocate_section): Don't bother to check if r_symndx >= 0,
3593 since it is unsigned.
3594 (ecoffalpha_little_vec): Use alpha_ecoff_object_p rather than
3596 * ecoff.c (ecoff_new_section_hook): Set alignment_power field of
3597 .pdata section to 3.
3598 (ecoff_compute_section_file_positions): Save the size of the
3599 .pdata section in the line_filepos field, and actually align the
3600 .pdata section to an alignment power of 4.
3601 (ecoff_compute_reloc_file_positions): Set output_has_begun after
3602 calling ecoff_compute_section_file_positions.
3603 (ecoff_write_object_contents): Set s_lnnoptr for the .pdata
3604 section from the line_filepos field. Set vstamp for the optional
3605 header from the vstamp of the symbolic header.
3606 (ecoff_bfd_final_link): Set vstamp of the symbolic header to the
3607 vstamp used by the first object file in the link.
3609 * ecofflink.c (ecoff_align_debug): Align RFDs to debug_align.
3611 * linker.c (generic_link_check_achive_element): Set SEC_ALLOC flag
3612 for a created common section.
3613 (_bfd_generic_link_add_one_symbol): Likewise.
3615 * elfcode.h (swap_out_syms): Use elf_section_from_bfd_section to
3616 get the index of a common section, rather than always using
3617 SHN_COMMON (MIPS has multiple common sections).
3619 * elf32-hppa.c (hppa_elf_gen_reloc_type): Typo (== for =).
3621 * bfd/aoutx.h (aout_link_input_section_std,
3622 aout_link_input_section_ext): Pass additional arguments to
3623 reloc_overflow callback.
3624 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents,
3625 alpha_relocat_section): Likewise.
3626 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
3627 * coff-h8500.c (extra_case): Likewise.
3628 * coff-mips.c (mips_relocate_section): Likewise.
3629 * coff-z8k.c (extra_case): Likewise.
3630 * elf32-hppa.c (hppa_elf_stub_finish): Likewise.
3631 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
3633 * bout.c (calljx_callback, callj_callback): Use get_value to get
3634 the symbol value and check for undefined symbols.
3635 (get_value): If the symbol is undefined, look it up in the linker
3637 (b_out_get_relocated_section_contents): For PCREL24 and PCREL13
3638 use get_value to get the symbol value and check for undefined
3640 * reloc16.c (bfd_coff_reloc16_get_value): If the symbol is
3641 undefined, look it up in the linker hash table.
3643 * aoutx.h (translate_symbol_table): The string index 0 has a
3644 special meaning for normal symbols, but not for dynamic symbols.
3646 Sat Jan 22 12:26:01 1994 Stu Grossman (grossman at cygnus.com)
3648 * sparclynx.c: Setup appropriate macros to enable core file
3651 Fri Jan 21 16:25:35 1994 David J. Mackenzie (djm@thepub.cygnus.com)
3653 * targets.c: Add a vector of matching format names.
3654 * format.c (bfd_matching_formats): New function to return it.
3655 (bfd_check_format): Set it.
3656 * bfd-in2.h: Regenerated.
3658 * bfd-in.h: Remove decls of bfd_ec type and error printing functions.
3659 Remove decl of type symclass; wasn't used.
3660 * bfd.c: Document error handling, including code fragments
3661 containing the error decls that were in bfd-in.h.
3663 * bfd-in2.h: Regenerated.
3665 Fri Jan 21 14:11:16 1994 Sean Fagan (sef@cygnus.com)
3667 * nlmcode.h, liblnm.h, nlm32-alpha.c nlm32-i386.c nlm32-sparc.c:
3668 The sparc (and possibly other?) NLM format requires a different
3669 way to write exports, so add a write_export field to the backend
3670 data (and set it to NULL for everything but the sparc).
3672 Fri Jan 21 14:11:16 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
3674 * sunos.c (MY(read_dynamic_relocs)): Compare info->dynrel with NULL,
3675 not (struct external_nlist *) NULL. info->dynrel is a PTR, not
3676 a struct external_nlist *.
3678 Fri Jan 21 09:29:01 1994 David J. Mackenzie (djm@thepub.cygnus.com)
3680 * bfd.c: Remove error strings for errors removed below.
3681 * aoutx.h (translate_to_native_sym_flags), bfd-in.h (bfd_ec),
3682 oasys.c (oasys_write_sections): Rename
3683 bfd_error_nonrepresentable_section to nonrepresentable_section.
3684 None of the other bfd error names start with "bfd_error".
3685 Remove errors symbol_not_found and no_relocation_info, which seem
3687 * bfd-in2.h: Regenerated.
3689 Fri Jan 21 01:11:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3691 * bfd.c (bfd_get_gp_size): Added support for ELF.
3693 * syms.c (BSF_DYNAMIC): New symbol flag.
3694 (bfd_print_symbol_vandf): Print it.
3695 * bfd-in2.h: Rebuilt.
3696 * libaout.h (struct aout_backend_data): New read_dynamic_symbols
3697 and read_dynamic_relocs fields.
3698 (struct aoutdata): New dynamic_info field.
3699 (obj_aout_dynamic_info): New accessor macro.
3700 * sunos.c (struct sunos_dynamic_info): New structure.
3701 (sunos_read_dynamic_info, MY(read_dynamic_symbols),
3702 MY(read_dynamic_relocs)): New functions to read dynamic symbols
3704 * aoutx.h (NAME(aout,some_aout_object_p)): If the object is
3705 dynamically linked, set SEC_RELOC for both the .text and .data
3707 (translate_from_native_sym_flags): Don't set BSF_LOCAL for an
3709 (translate_symbol_table): New function, split out of
3710 slurp_symbol_table; set the BSF_DYNAMIC flag appropriately.
3711 (NAME(aout,slurp_symbol_table)): Read dynamic symbols, if any.
3712 (NAME(aout,slurp_reloc_table)): Read dynamic relocs, if any.
3713 (NAME(aout,get_reloc_upper_bound)): Include dynamic reloc count in
3715 * aoutf1.h (NAME(aout,sunos4_write_object_contents)): Don't write
3716 out dynamic symbols or relocs against reloc symbols, since they
3717 are already in the .text section and we wouldn't know where to
3719 (sunos4_aout_backend): Initialize read_dynamic_symbols and
3720 read_dynamic_relocs fields.
3721 * aout-target.h (MY(backend_data)): Initialize
3722 read_dynamic_symbols and read_dynamic_relocs fields.
3724 Thu Jan 20 20:57:27 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
3726 * hosts/alphaosf.h (uint64e_type, uint64_type, int64_type): Delete
3727 typedefs, since HOST_64_BIT will take care of defining them in
3730 Wed Jan 19 17:28:59 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
3732 * config/alphaosf.mh (HDEFINES): Don't define HOST_64_BIT here;
3733 that's dealt with elsewhere.
3734 * hosts/alphaosf.h (sprintf_vma, fprintf_vma): New macros.
3735 (uint64_typeHIGH, uint64_typeLOW): Comment with HOST_64_BIT so
3736 they get copied to bfd.h.
3738 * reloc.c (enum bfd_reloc_code_real): Add some Alpha relocation
3739 types. Reorganized some of the existing ones.
3740 * coff-alpha.c (alpha_howto_table): Construct 64-bit negative one
3741 values in case of compilation on a 32-bit machine. Fix pcrel
3742 fields of some reloc types.
3743 (alpha_bfd_reloc_type_lookup): Handle more relocation types.
3745 * bfd-in.h (uint64_typeHIGH, uint64_typeLOW): Supply default
3746 definitions when not defined, regardless of whether uint64_type is
3747 a defined macro or not.
3748 (fprintf_vma, sprintf_vma): Define only if fprintf_vma is not
3751 Wed Jan 19 00:02:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3753 * aoutx.h (translate_to_native_sym_flags): Set the type of a
3754 BSF_WARNING symbol to N_WARNING.
3756 Tue Jan 18 16:43:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3758 * aoutx.h (aout_link_add_symbols): Increment sym_hash as well as p
3759 for an indirect or warning symbol.
3760 (aout_link_write_symbols): Update sym_hash with the target of an
3761 indirect or warning symbol. If an indirect symbol is defined,
3762 output the calculated value and don't output the target symbol.
3764 Tue Jan 18 03:54:59 1994 David J. Mackenzie (djm@thepub.cygnus.com)
3766 * aoutx.h (translate_from_native_sym_flags): Give warning symbols
3767 an (unused) nonzero section value, needed for check below.
3769 Mon Jan 17 15:12:07 1994 David J. Mackenzie (djm@thepub.cygnus.com)
3771 * aoutx.h (translate_from_native_sym_flags,
3772 aout_link_add_symbols): Treat N_SET[ABDT] | N_EXT like
3775 Fri Jan 14 16:45:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3777 * elfcode.h (elf_object_p): If there is a SHT_DYNAMIC section, set
3778 the DYNAMIC flag for the BFD.
3779 (NAME(bfd_elf,write_object_contents)): Don't try to write out a
3780 BFD with the DYNAMIC flag set, since we don't generate the program
3781 header table correctly.
3783 Fri Jan 14 01:04:36 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3785 * elfcode.h (elf_slurp_symbol_table): Free x_symp at the end
3786 of the function to avoid storage leak.
3788 Thu Jan 13 23:07:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3790 * ecoff.c (ecoff_link_write_external): An ifd can be -1.
3792 Thu Jan 13 12:33:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3794 * som.c (som_set_reloc_info): Provide a default symbol for
3795 relocations which don't actually have an associated symbol.
3797 * som.c (hppa_som_reloc): Add new "error message" argument.
3799 Wed Jan 12 13:36:43 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3801 Enable gdb to write to core files on more core file readers.
3802 * libbfd.c (bfd_generic_set_section_contents): Remove range check
3803 for section size, it is already done in bfd_set_section_contents
3804 with bfd_get_section_size_now.
3805 * aix386-core.c, hppabsd-core.c, hpux-core.c, irix-core.c,
3806 osf-core.c, ptrace-core.c, trad-core.c (*_set_section_contents):
3807 Use bfd_generic_set_section_contents instead of bfd_false.
3809 Wed Jan 12 15:31:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3811 * linker.c: Added initial documentation.
3813 * linker.c (default_indirect_link_order): Don't expect space for
3814 output relocations if there aren't any input relocations.
3816 Tue Jan 11 14:37:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3818 * aoutx.h (NAME(aout,final_link)): Set a_entry before computing
3821 * elfcode.h (swap_out_syms): A common symbol is STT_OBJECT, not
3824 Tue Jan 11 09:10:56 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
3826 * config.bfd: Use ELF, not COFF for m88*-*-dgux*.
3827 Combine m88k-*-* and m88110-*-* cases into m88*-*-*.
3829 Tue Jan 11 00:07:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3831 * ecofflink.c: Extensive changes to compress and merge debugging
3832 information, and to write some of out directly rather than saving
3833 it in memory. Several new functions and structures, and new
3834 arguments to existing functions.
3835 * ecoff.c (ecoff_compute_reloc_file_positions): Compute
3836 sym_filepos as well.
3837 (ecoff_get_extr): Use ifdmap instead of ifdbase.
3838 (ecoff_write_object_contents): Don't compute sym_filepos here.
3839 Only output symbols if outsymbols is not NULL.
3840 (ecoff_bfd_final_link): Adjust for changes in ecoff_debug_info and
3841 bfd_ecoff_debug functions. Write out debugging information here.
3842 (ecoff_final_link_debug_accumulate): Adjust for changes in
3843 bfd_ecoff_debug functions.
3844 (ecoff_link_write_external): Use ifdmap rather than ifdbase.
3845 * elf32-mips.c (mips_elf_read_ecoff_info): Read external symbols
3846 first, to put them in the first memory buffer. Clear fdr field.
3847 (mips_elf_get_extr): Use pointer to unswapped external symbol.
3848 (mips_elf_final_link): Adjust for changes in bfd_ecoff functions.
3849 Preserve .text, .data and .bss even if they are empty. Save
3850 pointer to unswapped external symbol rather than copying it.
3851 Don't free up the external symbols.
3852 * libelf.h (elf_symbol_type): Change mips_extr to PTR.
3853 * bfd-in.h (bfd_ecoff_debug_init, bfd_ecoff_debug_free): Declare.
3854 (bfd_ecoff_debug_accumulate): Update declaration.
3855 (bfd_ecoff_debug_accumulate_other): Rename declaration from
3856 bfd_ecoff_debug_link_other and update.
3857 (bfd_ecoff_write_accumulated_debug): Declare.
3858 * bfd-in2.h: Rebuilt.
3859 * Makefile.in: Rebuilt dependencies.
3861 Mon Jan 10 20:46:53 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
3863 * Makefile.in (install): Remove "@" which follows a backslash. In
3864 this position it just causes errors, not suppresses echoes.
3866 Mon Jan 10 09:06:21 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3868 * som.c (hppa_som_gen_reloc_type): Fix handling of LT and RT
3871 Sun Jan 9 04:32:25 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
3873 * config/i386-netbsd.mt (SELECT_VECS): Include i386bsd_vec.
3875 Fri Jan 7 10:27:27 1994 David J. Mackenzie (djm@rtl.cygnus.com)
3877 * aoutx.h (adjust_z_magic): Don't merge the start of bss with the
3878 end of data if they are not contiguous.
3880 * aoutf1.h (sunos4_aout_backend): Comment the fields' meanings.
3882 Fri Jan 7 15:40:16 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3884 * ecoff.c (ecoff_mkobject_hook): Don't set SEC_SHARED_LIBRARY flag
3885 for .reginfo section here.
3886 (ecoff_new_section_hook): Set it here instead.
3888 Fri Jan 7 10:29:27 1994 Stan Shebs (shebs@andros.cygnus.com)
3890 * bfd-in.h: (bfd_boolean): Add workaround for systems that also
3891 define true and false as enums.
3892 (ALMOST_STDC): Add as alternative to __STDC__.
3893 * bfd-in2.h: Rebuilt.
3894 * syms.c (bfd_print_symbol_vandf): Convert a PTR to FILE*.
3896 Thu Jan 6 14:24:44 1994 David J. Mackenzie (djm@thepub.cygnus.com)
3898 * aoutx.h (translate_to_native_sym_flags): Catch the case where
3899 there is no output section.
3901 Thu Jan 6 14:37:42 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3903 * nlmcode.h (nlm_object_p): If we can't read the fixed header,
3904 count it as a wrong format error, not a system call error, since
3905 the object file might simply be too small.
3907 * targets.c (target_vector): Added nlm32_alpha_vec inside #ifdef
3909 * Makefile.in (BFD32_BACKENDS): Remove nlm32-alpha.o.
3910 (BFD64_BACKENDS): Add nlm32-alpha.o. It depends on 64 bit
3911 support, even though it is for an Alpha in 32 bit mode.
3912 * configure.in (nlm32_alpha_vec): Set target64 to true.
3914 * nlm32-gen.c, nlm64-gen.c: Removed. All nlm targets are
3915 different, so there is no point to providing a generic one.
3916 * libnlm.h: Don't bother to check for nlm_backend(bfd) being NULL
3917 in the backend accessor macros; that should no longer be possible.
3918 * targets.c (target_vector): Removed nlm32_big_generic_vec,
3919 nlm64_big_generic_vec, nlm64_little_generic_vec.
3920 * configure.in (nlm32_big_generic_vec, nlm32_little_generic_vec,
3921 nlm64_big_generic_vec, nlm64_little_generic_vec): Removed.
3922 * Makefile.in: Rebuilt dependencies, and
3923 (BFD32_BACKENDS): Removed nlm32-gen.o.
3924 (BFD64_BACKENDS): Removed nlm64-gen.o.
3925 (CFILES): Removed nlm32-gen.c and nlm64-gen.c.
3927 * hp300hpux.c (ARCH_SIZE): Define before including aoutx.h.
3929 * linker.c (_bfd_generic_link_add_one_symbol): Add constructor and
3930 bitsize arguments. Changed all callers (aoutx.h).
3931 * libbfd-in.h (_bfd_generic_link_add_one_symbol): Add constructor
3932 and bitsize arguments to declaration.
3933 * libbfd.h: Rebuilt.
3935 * ecoff.c: First cut at new style of linker backend for
3936 ECOFF--added a bunch of functions. Also:
3937 (ecoff_sec_to_styp_flags): Set flags for .pdata and .xdata.
3938 (ecoff_slurp_symbolic_header): New function.
3939 (ecoff_slurp_symbolic_info): Call ecoff_slurp_symbolic_header.
3940 (ecoff_compute_reloc_file_positions): New function.
3941 (ecoff_set_section_contents): Get out quickly if count is zero.
3942 Check errors better.
3943 (ecoff_write_object_contents): Put .xdata section in data segment.
3944 Call ecoff_compute_reloc_file_positions. Don't output relocs or
3945 external symbols if outsymbols is NULL.
3946 (ecoff_bfd_final_link): Completely rewritten.
3947 * libecoff.h: Include bfdlink.h.
3948 (struct ecoff_backend_data): Add relocate_section field.
3949 (ecoff_data_type): Add sym_hashes and symndx_to_section fields.
3950 (struct ecoff_link_hash_entry): Define.
3951 (struct ecoff_link_hash_table): Define.
3952 (ecoff_bfd_link_add_symbols): Declare as function, not macro.
3953 (ecoff_bfd_link_hash_table_create): Likewise.
3954 * ecofflink.c (bfd_ecoff_debug_one_external): New function.
3955 (bfd_ecoff_debug_externals): Call bfd_ecoff_debug_one_external.
3956 * bfd-in.h (bfd_ecoff_debug_one_external): Declare.
3957 * bfd-in2.h: Rebuilt.
3958 * coff-alpha.c (alpha_howto_table): Mark BRADDR as
3959 partial_inplace, and set the src_mask to 0x1fffff.
3960 (alpha_ecoff_get_relocated_section_contents): Remove unused
3962 (alpha_convert_external_reloc): New static function.
3963 (alpha_relocate_section): New static function.
3964 (alpha_ecoff_backend_data): Initialize relocate_section field.
3965 * coff-mips.c (mips_relocate_refhi): New static function.
3966 (mips_relocate_section): New static function.
3967 (mips_ecoff_backend_data): Initialize relocate_section field.
3969 * reloc.c (_bfd_relocate_contents): Corrected signed overflow
3970 checking when there is an addend.
3972 * aoutx.h (NAME(aout,final_link)): Don't abort when trying to link
3973 a non a.out file, just pass it to _bfd_default_link_order.
3974 (aout_link_input_section_std): When doing a final PC relative link
3975 against a section symbol, subtract the VMA of the input section.
3976 (aout_link_input_section_ext): Likewise.
3978 * linker.c (default_indirect_link_order): Renamed from
3979 _bfd_generic_indirect_link_order and made static.
3980 (_bfd_generic_final_link): Don't switch on link_order type, just
3981 call _bfd_default_link_order.
3982 (_bfd_default_link_order): Handle bfd_indirect_link_order type.
3983 * genlink.h: Removed declaration of
3984 _bfd_generic_indirect_link_order.
3985 * elf32-mips.c (mips_elf_final_link): Don't switch on link_order
3986 type, just call _bfd_default_link_order.
3988 Tue Jan 4 21:23:37 1994 Ian Lance Taylor (ian@cygnus.com)
3990 * linker.c (generic_link_check_archive_element): Base the name of
3991 the created common section on the name of the section the symbol
3993 (_bfd_generic_link_add_one_symbol): (case BIG): A common symbol
3994 must have a section, so don't bother to create one.
3996 Mon Jan 3 15:32:16 1994 David J. Mackenzie (djm@thepub.cygnus.com)
3998 * aout-target.h (MY(vec)): Add DYNAMIC to mask of object flags.
3999 * aoutf1.h (NAME(aout,sunos4_write_object_contents)):
4000 If the DYNAMIC flag is set, set it in the exec header.
4001 * aoutx.h (NAME(aout,some_aout_object_p)): If the object is
4002 dynamically linked, set the DYNAMIC flag in the BFD.
4003 * libaout.h (N_SET_DYNAMIC): New macro.
4004 (N_DYNAMIC): Add missing 0 in mask.
4006 Mon Jan 3 11:41:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4008 * ecoff.c (ecoff_get_extr): Don't output section symbols as
4011 * bfd-in.h, hash.c: Change bfd_hash_allocate argument from size_t
4012 to unsigned int, because size_t may not be defined in bfd.h.
4013 * bfd-in2.h: Rebuilt.
4015 * bfd-in.h (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
4017 * bfd-in2.h: Rebuilt.
4018 * libbfd.c (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
4020 * targets.c (bfd_target): Change swap function pointers
4022 * archive.c (do_slurp_coff_armap): Change swap accordingly.
4023 * aix386-core.c: Change NO_GET and NO_GETS accordingly.
4024 * hppabsd-core.c, hpux-core.c, irix-core.c, osf-core.c,
4025 ptrace-core.c, trad-core.c: Change NO_GET and NO_SIGNED_GET
4028 * libbfd-in.h (struct artdata): Added tdata field.
4029 (_bfd_add_bfd_to_archive_cache): Declare.
4030 (_bfd_get_elt_at_filepos): Declare.
4031 (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
4032 * libbfd.h: Rebuilt.
4033 * archive.c: Cleaned up some more.
4034 (_bfd_generic_mkarchive, bfd_generic_archive_p): Initialize
4035 pointer elements of artdata.
4036 (_bfd_add_bfd_to_archive_cache): Renamed from add_bfd_to_cache.
4037 (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
4038 (_bfd_get_elt_at_filepos): Renamed from get_elt_at_filepos.
4039 (get_extended_arelt_filename, bfd_construct_extended_name_table,
4040 bfd_ar_hdr_from_filesystem, compute_and_write_armap): Made static.
4041 * ecoff.c: Some comment changes.
4042 (ecoff_slurp_armap): Handle rename of snarf_ar_hdr. Set
4043 ardata->tdata to raw_armap.
4044 (ecoff_archive_p): Initialize pointer elements of artdata.
4045 * coff-rs6000.c (rs6000coff_get_elt_at_filepos): Handle rename of
4048 * hash.c: Added some documentation.
4050 Mon Jan 3 11:09:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
4052 * aout-target.h, netbsd386.c: Replace NO_SWAP_MAGIC with SWAP_MAGIC,
4053 and do the swapping here rather than calling ntohl from the N_*
4054 macros. This cleans up assumptions about the size of a host long,
4055 the existence to ntohl, etc.
4057 Sat Jan 1 13:50:05 1994 Rob Savoye (rob@darkstar.cygnus.com)
4059 * config.bfd: Add support for VSTa micro-kernel. It currently uses
4062 Sat Jan 1 10:18:54 1994 David J. Mackenzie (djm@thepub.cygnus.com)
4064 * hosts/i386mach3.h (HOST_SEGMENT_SIZE): Fix value.
4065 * i386mach3.c (SEGMENT_SIZE): Fix value.
4067 Fri Dec 31 16:23:43 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4069 Minor cleanups suggested by CodeCenter.
4070 * aoutx.h, coffgen.c, ecoff.c, ecofflink.c, elf.c, libbfd.c,
4071 linker.c, reloc.c, section.c, srec.c: Added /*ARGSUSED*/ as
4073 * aoutx.h (struct external_exec): Removed unnecessary declaration.
4074 (NAME(aout,some_aout_object_p)): Set some tdata pointers to NULL.
4075 (adjust_z_magic): Removed useless variable data_vma.
4076 (stringtab_init): Initialize hash_zero.
4077 (add_to_stringtab): Removed unused fourth argument.
4078 (NAME(aout,swap_std_reloc_out)): Removed useless variable
4080 (aout_link_input_section): Added some casts.
4081 * archive.c (get_extended_arelt_filename, do_slurp_coff_armap,
4082 bfd_ar_hdr_from_filesystem, bsd_write_armap, coff_write_armap):
4083 Minor code rewriting to make it more C like.
4084 (do_slurp_bsd_armap): Added some casts.
4085 * ecoff.c (ecoff_write_object_contents): Removed useless variable
4087 (ecoff_write_armap): Added some casts. Use "" rather than "\0".
4088 * ecofflink.c (bfd_ecoff_write_debug): Added a cast.
4089 * libaout.h (struct internal_exec): Removed unnecessary
4091 * linker.c (_bfd_generic_indirect_link_order): Added a cast.
4092 * opncls.c (new_bfd): Removed a cast.
4093 * reloc.c (bfd_generic_get_relocated_section_contents): Added
4095 * srec.c (internal_srec_write_object_contents): Removed useless
4096 variable bytes_written.
4098 Fri Dec 31 11:46:13 1993 David J. Mackenzie (djm@thepub.cygnus.com)
4100 * i386mach3.c (N_TXTADDR): Don't define after all.
4101 (TEXT_START_ADDR): Don't include exec header size in value.
4103 Thu Dec 30 15:47:54 1993 David J. Mackenzie (djm@thepub.cygnus.com)
4105 * i386mach3.c (N_TXTADDR): Define.
4107 Thu Dec 30 13:37:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4109 Extensive changes to move the bulk of the linker into BFD so that
4110 more efficient backend code can be written for specific object
4111 files. Only existing efficient backend is a.out.
4112 * seclet.c, seclet.h: Removed.
4113 * hash.c, linker.c, genlink.h: New files.
4114 * bfd-in.h: Removed bfd_error_vector. Declared hash table
4115 structures and functions.
4116 (JUMP_TABLE): Removed bfd_seclet_link, added
4117 bfd_link_hash_table_create, bfd_link_add_symbols and
4119 * All backends: Changed accordingly.
4120 * bfd-in2.h: Rebuilt.
4121 * bfd.c (struct _bfd): Added link_next and archive_pass fields.
4122 Removed ld_symbols field.
4123 (bfd_nonrepresentable_section, bfd_undefined_symbol,
4124 bfd_reloc_value_truncated, bfd_reloc_is_dangerous,
4125 bfd_error_vector): Removed.
4126 (bfd_default_error_trap, bfd_error_trap,
4127 bfd_error_nonrepresentabltrap): Removed.
4128 (bfd_get_relocated_section_contents): Pass link_info. Pass
4129 link_order instead of seclet. Pass symbols.
4130 (bfd_relax_section): Pass link_info.
4131 (bfd_seclet_link): Removed.
4132 (bfd_link_hash_table_create, bfd_link_add_symbols,
4133 bfd_final_link): New macros.
4134 * libbfd-in.h: If __GNUC__ is defined and alloca is not, define
4135 alloca as __builtin_alloca. Declare internal linking functions.
4136 * libbfd.h: Rebuilt.
4137 * libbfd.c (bfd_seek): Comment out fseek assertion. It's worked
4139 * reloc.c (reloc_howto_type): Added error_message argument to
4140 special_function field. Changed all callers and all definitions.
4141 (bfd_get_reloc_size): Make argument a const pointer.
4142 (bfd_perform_relocation): Add error_message argument to hold
4143 string set if return value if bfd_reloc_dangerous. Changed all
4145 (_bfd_final_link_relocate, _bfd_relocate_contents): New functions.
4146 * section.c (asection): Renamed seclets_head and seclets_tail to
4147 link_order_head and link_order_tail.
4148 * targets.c (bfd_target): Replaced seclet argument with link_info
4149 and link_order and symbols arguments in
4150 bfd_get_relocated_section_contents. Added symbols argument to
4151 bfd_relax_section. Removed bfd_seclet_link. Added
4152 bfd_link_hash_table_create, bfd_link_add_symbols and
4154 * libaout.h (struct aoutdata): Added external_syms,
4155 external_sym_count, external_strings, sym_hashes fields.
4156 (obj_aout_external_syms, obj_aout_external_sym_count,
4157 obj_aout_external_strings, obj_aout_sym_hashes): New accessor
4159 (WRITE_HEADERS): Only output symbols if outsymbols is not NULL.
4160 * aoutx.h: Wrote new back end linker routines.
4161 (translate_to_native_sym_flags): Return boolean value. Don't use
4163 (NAME(aout,write_syms)): Return boolean value. Check return value
4164 of translate_to_native_sym_flags and bfd_write.
4165 * aout-target.h (final_link_callback): New function.
4166 (MY_bfd_final_link): New function.
4167 * aout-adobe.c (aout_adobe_write_object_contents): Check return
4168 value of aout_32_write_syms.
4169 * hp300hpux.c (MY(write_object_contents)): Likewise.
4170 * i386lynx.c (WRITE_HEADERS): Likewise.
4171 * libaout.h (WRITE_HEADERS): Likewise.
4172 * bout.c: Changed functions to use link_info->callbacks rather
4173 than bfd_error_vector, and link_orders rather than seclets.
4174 * coff-alpha.c: Likewise.
4175 * coff-h8300.c: Likewise.
4176 * coff-h8500.c: Likewise.
4177 * coff-sh.c: Likewise.
4178 * coff-z8k.c: Likewise.
4179 * elf32-hppa.c: Likewise.
4180 * reloc16.c: Likewise.
4181 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Look
4182 up _gp in the hash table rather than in outsymbols.
4183 * coff-a29k.c (a29k_reloc): Pass errors back in new error_message
4184 argument rather than printing them.
4185 * coffcode.h (bfd_coff_reloc16_extra_cases): Take link_info and
4186 link_order arguments rather than seclet. Changed all uses and
4188 (bfd_coff_reloc16_estimate): Pass link_info arguments. Changed
4189 all uses and definitions.
4190 * libcoff.h: Rebuilt.
4191 * ecoff.c (ecoff_get_extr): If symbol is defined by linker, but
4192 not by ECOFF, make it scAbs.
4193 (ecoff_bfd_final_link): Renamed from ecoff_bfd_seclet_link and
4195 * elf32-mips.c (mips_elf_final_link): Renamed from
4196 mips_elf_seclet_link and rewritten.
4197 * elf32-hppa.c (elf32_hppa_stub_description): Added link_info
4199 (new_stub, add_stub_by_name, hppa_elf_build_arg_reloc_stub,
4200 hppa_elf_build_long_branch_stub, hppa_look_for_stubs_in_section):
4201 Added link_info arguments. Changed all callers.
4202 * elfcode.h (elf_slurp_symbol_table): Don't quit if outsymbols is
4204 * oasys.c (oasys_write_sections): Return boolean value rather than
4205 using bfd_error_vector.
4206 (oasys_write_object_contents): Check return value of
4207 oasys_write_sections.
4208 * hosts/std-host.h: Don't declare qsort or strtol.
4209 * Makefile.in: Rebuild dependencies.
4210 (BFD_LIBS): Removed seclet.o. Added hash.o and linker.o.
4211 (CFILES): Removed seclet.c. Added hash.c and linker.c.
4212 (HFILES): Removed seclet.h. Added genlink.h.
4214 Thu Dec 30 07:41:36 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4216 * section.c (bfd_get_section_contents): Return zero filled buffer
4217 if section has no contents.
4219 Tue Dec 28 12:43:54 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4221 * elf.c (bfd_elf_generic_reloc): If this is not an inplace reloc,
4222 then skip bfd_perform_relocation even if the addend is non-zero.
4224 Tue Dec 21 09:22:19 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
4226 * coffcode.h (coff_write_relocs) [SWAP_OUT_RELOC_OFFSET]: Copy
4227 addend to r_offset field.
4229 * Makefile.in (CFILES): Added coff-sparc.c. Rebuild dependencies.
4231 * coff-sparc.c (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET,
4232 CALC_ADDEND): Define.
4234 * aix386-core.c (aix386_core_file_p): Use cd_regs[0] for computing
4235 the offsetof because AIX /bin/cc does not like to take the address
4236 of an array. (From Minh Tran-Le.)
4238 Thu Dec 16 13:06:32 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
4240 * Thu Dec 16 15:41:06 1993 Peter Hoogenboom (hoogen@cs.utah.edu)
4242 * elf32-hppa.c (hppa_elf_build_arg_reloc_stub): Make sure to copy
4243 the return pointer into %r2 if no jump-in-call-delay-slot
4244 optimization was done.
4246 * hosts/hp300bsd.h: Correctly identify 4.3BSD vs 4.4BSD.
4248 Wed Dec 15 08:04:16 1993 David J. Mackenzie (djm@thepub.cygnus.com)
4250 * hosts/std-host.h: (time): Don't declare; conflicts on Mach3.
4252 * hosts/i386mach3.h (HOST_PAGE_SIZE): Set to 1 to avoid padding.
4253 (HOST_SEGMENT_SIZE): Set to 0 for same reason.
4255 * i386mach3.c (PAGE_SIZE, SEGMENT_SIZE): Same changes as above.
4256 (TEXT_START_ADDR): Correct.
4257 (MY_backend_data): Define.
4259 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic):
4260 New functions; code moved from aout_<size>_adjust_sizes_and_vmas.
4262 Tue Dec 14 21:48:33 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
4264 * som.c (som_begin_writing): Fix thinkos in auxiliary header
4266 (bfd_som_attach_aux_hdr): Likewise.
4268 Mon Dec 13 23:34:48 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
4270 * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle 'T' field
4271 selectors for PIC code.
4273 * som.c (hppa_som_gen_reloc_type): Handle 'T' field selectors.
4274 (som_write_fixups): Handle R_DLT_REL, R_FSEL, R_RSEL, R_LSEL
4275 relocations needed by PIC.
4277 Tue Dec 7 15:47:51 1993 Stu Grossman (grossman at cygnus.com)
4279 * nlmcode.h: Fixes to avoid compiler warnings...
4281 Tue Dec 7 15:10:54 1993 Ian Lance Taylor (ian@cygnus.com)
4283 * libnlm.h (nlm_backend_data): Removed macro definition.
4284 (nlm_alpha_backend_data): Adjusted accordingly.
4286 Sun Dec 5 19:32:08 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
4288 * som.c (som_begin_writing): Flesh out code for handling simple
4290 (bfd_som_attach_aux_hdr): New function.
4292 * som.h (struct somdata): Add fields for attaching version and
4293 copyright headers. Add accessor macros.
4295 * som.c (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Add protected
4296 definitions for old versions of HPUX which fail to define them.
4297 (som_hppa_howto_talbe): Add R_DLT_REL, R_AUX_UNWIND, and R_SEC_STMT
4298 now that they're safe. Delete bogus R_STATEMENT relocations.
4300 * som.c (som_hppa_howto_table): Add missing R_END_TRY. Delete
4301 extra R_DATA_OVERRIDE.
4302 (hppa_som_gen_reloc_type): Generate a relocation for the rounding
4303 mode selector if needed.
4304 (som_write_fixups): Handle requests for a change in the default
4305 rounding mode. Rounding modes do not consume input bytes, but
4306 are just markers much like R_ENTRY and R_EXIT.
4308 Sat Dec 4 19:40:32 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
4310 Fri Dec 3 09:55:17 1993 Pete Hoogenboom (hoogen@cs.utah.edu)
4312 * elf32-hppa.c: (hppa_elf_reloc): Do not do code reordering when
4313 the branch instruction as originally been nullified.
4314 hppa_elf_reloc): Avoid useless call to bfd_put_32 () in the
4315 case of no code reordering due to an LDO instruction in the
4316 delay slot of the branch. Make sure to relocate the correct
4317 instruction. Do not perform instruction reordering for millicode
4319 (hppa_elf_build_arg_reloc_stub): Change the relocation type
4320 to R_HPPA_STUB_CALL_17 when special processing might be needed.
4321 (hppa_elf_build_long_branch_stub): Prevent code reordering on
4322 a call from a linker stub to another linker stub and for millicode
4323 calls. Do not trash the return register for calls from one linker
4324 stub to a second linker stub.
4326 * elf32-hppa.c: (elf_hppa_howto_table): PLABEL and DLT
4327 relocations are not pc-relative.
4329 * hppa_stubs.h: (BLE_N_XXX_0_31): New instruction used in
4331 (COPY_2_31): Likewise.
4333 Fri Dec 3 18:40:58 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4335 * config/solaris2.mh (HDEFINES): Remove -Dconst=
4336 * hosts/solaris.h: If not __GNUC__, define const as empty.
4338 Thu Dec 2 15:43:32 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4340 * ecoff.c: Added various casts for 32/64 bit cross targeting.
4341 (ecoff_mkobject_hook): Set SEC_SHARED_LIBRARY for the .reginfo
4342 section so that the linker ignores it.
4343 * ecofflink.c: Added various casts for 32/64 bit cross targeting.
4344 (ecoff_add_bytes): Changed need argument to size_t.
4345 (bfd_ecoff_debug_link_other): Check return value of
4348 * libbfd-in.h (new_bfd): Use void rather than an empty parameter
4350 * libbfd.h: Rebuilt.
4352 * libnlm.h (struct nlm_obj_tdata): New field backend_data.
4353 (nlm_backend_data, nlm_alpha_backend_data): New accessor macros.
4354 (struct nlm_backend_data): New field no_uninitialized_data.
4355 (nlm_no_uninitialized_data): New accessor macro.
4356 * nlmcode.h (nlm_compute_section_file_positions): Handle
4357 no_uninitialized_data.
4358 (nlm_external_reloc_compare): Sort relocs by address for a
4359 particular symbol, to make the sort more stable.
4360 (nlm_write_object_contents): Cast the arguments to qsort. Get the
4361 value of a debugging symbol the same way we get the value of a
4363 * nlm32-alpha.c: Various changes. Write out GP and .lita relocs.
4364 Set no_uninitialized_data to true.
4365 * nlm32-i386.c (nlm32_i386_backend), nlm32-sparc.c
4366 (nlm32_sparc_backend): Set no_uninitialized_data field false.
4367 * nlmswap.h (nlm_swap_fixed_header_out): Zero out destination
4368 before filling it in.
4370 Wed Dec 1 21:47:58 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
4372 * som.c (som_section_type, som_decode_symcalss): New functions.
4373 (som_get_symbol_info): Use them.
4374 (som_slurp_symbol_table): Set the section of common and undefined
4377 Wed Dec 1 14:15:10 1993 Ken Raeburn (raeburn@cygnus.com)
4379 * elfcode.h (write_relocs): Initialize local var LAST_SYM_IDX, to
4382 * mipsbsd.c: Changes from Ralph Campbell:
4383 (mips_howto_table_ext): MIPS_RELOC_LO16 should use
4384 complain_overflow_dont.
4385 (aout_mips_*_vec): Make name use "a.out" instead of "aout", to
4388 * bfd.c (bfd_errmsgs): Reword invalid-target message.
4390 * config.bfd: For sparc*-*-coff, use sparc-coff.
4391 * configure.in: Handle sparccoff_vec.
4392 * targets.c (sparccoff_vec): Declare.
4394 * reloc.c (bfd_get_reloc_size): New function.
4395 (struct reloc_howto_type): Update documentation of size field.
4397 Wed Dec 1 14:39:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4399 * nlm32-alpha.c: New file; preliminary Alpha NetWare support.
4400 * config.bfd (alpha-*-netware*): New target; use alpha-nlm.
4401 * config/alpha-nlm.mt: New file.
4402 * configure.in (nlm32_alpha_vec): New vector; use nlm32-alpha.o,
4404 * Makefile.in (BFD32_BACKENDS): Added nlm32-alpha.o.
4405 (CFILES): Added nlm32-alpha.c.
4406 Rebuilt dependencies.
4407 * targets.c (nlm32_alpha_vec): Declare.
4409 * libnlm.h (struct nlm_backend_data): New fields
4410 optional_prefix_size, nlm_backend_object_p, nlm_write_prefix,
4411 nlm_set_public_section, nlm_get_public_offset. Removed unused
4412 nlm_write_reloc field. Changed nlm_write_import to remove
4413 unnecessary symbol argument. Renamed nlm_write_externals to
4414 nlm_write_external, and changed cound argument from bfd_vma to
4416 (nlm_optional_prefix_size, nlm_backend_object_p_func,
4417 nlm_write_prefix_func, nlm_set_public_section_func,
4418 nlm_get_public_offset_func): New accessor macros.
4419 (nlm_write_reloc_func): Removed.
4420 (nlm_write_external_func): Adjusted for field renaming.
4421 * nlm32-i386.c (nlm_i386_write_import): Renamed from
4422 nlm_i386_write_reloc. Removed old nlm_i386_write_import which
4423 just called old nlm_i386_write_reloc.
4424 (nlm_i386_write_external): Renamed from nlm_i386_write_externals.
4425 Declared. Changed second argument from bfd_vma to bfd_size_type.
4426 (nlm32_i386_backend): Adjusted for changes to fields and names.
4427 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Removed unused,
4429 (nlm_sparc_write_import): Removed second argument.
4430 (nlm_sparc_write_external): Renamed from
4431 nlm_sparc_write_externals. Changed second argument from bfd_vma
4433 (nlm32_sparc_backend): Adjusted for changes to fields and names.
4434 * nlmcode.h: Removed some unused code.
4435 (nlm_object_p): Don't destroy tdata pointer. Call
4436 backend_object_p function if it exists.
4437 (nlm_slurp_symbol_table): Removed unused variable rcount. Call
4438 set_public_section_func if it exists instead of checking
4440 (nlm_compute_section_file_positions): Account for
4441 optional_prefix_size.
4442 (nlm_write_object_contents): Account for optional_prefix_size.
4443 Removed useless variable write_reloc_func. Changed declaration
4444 and call of write_import_func. Call write_prefix_func if it
4445 exists. Removed unused variables len and temp. Call
4446 get_public_offset_func if it exists rather than setting NLM_HIBIT.
4447 * nlmswap.h: Declare functions.
4449 * bfd-in.h (uint64_typeLOW, uint64_typeHIGH): Fully parenthesize
4451 (fprintf_vma, sprintf_vma): Use %lx, not %x.
4452 * bfd-in2.h: Rebuilt.
4453 * hosts/alphaosf.h (uint64_typeLOW, uint64_typeHIGH): Cast results
4456 * config.bfd: Don't set target64 here, as the setting is ignored.
4457 * configure.in (ecoffalpha_little_vec): Set target64.
4459 * config/alphaosf.mt (TDEFINES): Removed; setting host parameters
4460 in TDEFINES is wrong.
4462 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4463 Remove unused variable output_section.
4465 Tue Nov 30 16:45:23 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4467 * irix-core.c: New file for Irix 4 and Irix 5 core support.
4468 Functions taken out of coff-mips.c. Handle vmap type VMAPFILE.
4469 * coff-mips.c: Irix 4 core file support moved to irix-core.c.
4470 * targets.c: If IRIX_CORE defined, include irix_core_vec in
4472 * config/irix4.mh (HDEFINES): Add -DIRIX_CORE.
4473 (HDEPFILES): Define to be irix-core.o.
4474 * config/irix5.mh (HDEFINES): Define to be -DIRIX_CORE.
4475 (HDEPFILES): Define to be irix-core.o.
4476 * Makefile.in (OPTIONAL_BACKENDS): Added irix-core.o. Removed
4477 sco-core.o, which no longer exists.
4478 (CFILES): Added all *-core.c files.
4479 Rebuilt dependencies.
4481 Wed Nov 24 02:02:41 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4483 * elfcode.h (map_program_segments): Restore check of file_size !=
4484 mem_size, but only if SHT_PROGBITS.
4486 * ecofflink.c: New file to hold ECOFF debug information linking
4488 * ecoff.c (ecoff_clear_output_flags, ecoff_rel, ecoff_dump_seclet,
4489 ecoff_add_string, ecoff_get_debug): Removed. Functionality now in
4491 (ecoff_get_extr, ecoff_set_index): New functions.
4492 (ecoff_slurp_symbolic_info): Don't save raw_size.
4493 (ecoff_bfd_seclet_link): Rewrote to use ecofflink.c functions.
4494 (ecoff_compute_section_file_positions): Don't set EXEC_P just
4495 because there is a start address.
4496 (ecoff_write_object_contents): Handle external symbols here. Use
4497 ecofflink.c functions to write out debugging information.
4498 * elf32-mips.c (mips_elf_read_ecoff_info, mips_elf_get_extr,
4499 mips_elf_set_index): New functions.
4500 (mips_elf_seclet_link): Discard empty sections, the .options
4501 section and .gptab sections. Handle linking .mdebug section.
4502 * libecoff.h (ecoff_data_type): Removed raw_size and ifdbase.
4503 * libelf.h (elf_symbol_type): Added mips_extr to tc_data union.
4504 * bfd-in.h: Added prototypes for routines in ecofflink.c (some are
4505 called by gas, so they are public).
4506 * bfd-in2.h: Rebuilt.
4507 * Makefile.in (BFD_LIBS): Added ecofflink.o.
4508 (CFILES): Added ecofflink.c.
4509 (ecofflink.o): New target. Rebuilt dependencies.
4511 Mon Nov 22 22:26:42 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
4513 * som.c (hppa_object_p): Also recognize SHARED_MAGIC_CNX as
4514 a valid magic number if it's been defined.
4516 Mon Nov 22 14:17:36 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4518 * ecoff.c (ecoff_mkobject): Don't create .scommon section; linker
4519 no longer requires it.
4520 (ecoff_bfd_seclet_link, ecoff_sizeof_headers,
4521 ecoff_write_object_contents): Don't treat .scommon section
4524 Mon Nov 22 10:54:27 1993 Fred Fish (fnf@cygnus.com)
4526 Merged changes from kev@spuds.geg.mot.com (Kevin A. Buettner):
4527 * bfd/config/delta88.mh (HDEFINES): Define this to be -DPTRACE_CORE.
4528 * bfd/config/delta88.mh (HDEPFILES): Defined to be ptrace-core.o.
4529 * bfd/ptrace-core.c: New file for dealing with core files with
4530 start with the ptrace_user structure found on BCS compliant systems.
4531 * bfd/targets.c (ptrace_core_vec): New vector.
4533 Mon Nov 22 02:33:12 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
4535 * Minimal support for reading SOM fixup streams. Allows
4536 objdump -r to do something reasonable.
4537 * som.c (som_get_reloc_upper_bound): Implement.
4538 (som_canonicalize_reloc): Implement.
4539 (som_set_reloc_info, som_slurp_reloc_table): New functions.
4541 Sun Nov 21 13:46:55 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
4543 * hosts/lynx.h (FPRINTF_ALREADY_DECLARED): Define.
4544 * hosts/sparclynx.h: Include lynx.h instead of duplicating it.
4546 Fri Nov 19 14:34:04 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4548 * coff-a29k.c (a29k_reloc): For R_IREL, don't left shift
4549 signed_value before sign extending it. Don't subtract out
4550 reloc_entry->address. This makes it compatible with what gas is
4553 * elfcode.h (elf_fake_sections): Accept .sbss as the name for a
4554 SHT_NOBITS sections.
4555 (map_program_segments): Don't leave the loop after the first
4557 (assign_file_positions_except_relocs): Only force sh_offset and
4558 sh_addr to match modulo maxpagesize for a section which is not
4559 SHT_NOBITS. Changed the method used to force page alignment after
4560 a SHT_NOBITS section to only do it for the last such consecutive
4561 section, and to really force page alignment.
4563 Fri Nov 19 04:02:01 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
4565 * coffcode.h (coff_slurp_symbol_table): Print more verbose message
4566 in the case of an unknown (or unhandled) storage class.
4568 * config/i386-lynx.mt (TDEFINES): FPRINTF_ALREADY_DECLARED should
4569 not be defined here, since it is a host attribute, not a target
4571 * config/m68k-lynx.mt, config/sparc-lynx.mt: Ditto.
4573 * coffcode.h (coff_bfd_reloc_type_lookup): Don't define if already
4576 * coff-sparc.c: Define some relocations, based on ELF relocations.
4577 (enum reloc_type, bfd_coff_generic_reloc, coff_sparc_howto_table,
4578 struct coff_reloc_map, sparc_reloc_map,
4579 coff_sparc_reloc_type_lookup): Borrowed from elf32-sparc.c and
4581 (coff_bfd_reloc_type_lookup): Define to be coff_sparc_reloc_....
4582 (rtype2howto): Index into coff_sparc_howto_table using
4585 Thu Nov 18 11:45:39 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4587 * config.bfd (mips*-*-irix5*): New target; use mipsbelf.
4588 * configure.host (mips-sgi-irix5*) New host; use irix5 (no
4589 hosts/irix5.h created; just use std-host.h).
4590 * config/irix5.mh: New file; like irix4.mh, but don't use -G or
4592 * Makefile.in: Rebuilt dependencies.
4594 * ecoffswap.h: Changed type of internal pointers for swap out
4595 functions to const *.
4597 * elf32-mips.c (mips_elf_got16_reloc): New function. Handle GOT16
4598 correctly for assembler, but linker support not implemented.
4599 (elf_mips_howto_table): Use mips_elf_got16_reloc for GOT16.
4600 (mips_elf_sym_is_global): New function; at least on Irix 5, all
4601 non section symbols are considered global.
4602 (elf_backend_sym_is_global): Define.
4603 (mips_elf_final_write_processing): New function. Set the MIPS
4604 architecture level correctly.
4605 (elf_backend_final_write_processing): Define.
4606 (mips_elf_section_from_shdr): Handle SHT_MIPS_OPTIONS.
4607 (mips_elf_fake_sections): Set entsize of .mdebug or .reginfo
4608 section to 1. Handle .options section.
4609 (mips_elf_acom_section, mips_elf_acom_symbol,
4610 mips_elf_acom_symbol_ptr): New static variables, used to build a
4611 generic .acommon section to hold SHN_MIPS_ACOMMON symbols.
4612 (mips_elf_symbol_processing): Handle SHN_MIPS_ACOMMON symbols by
4613 putting them all in a global .acommon section.
4615 * elfcode.h (bfd_section_from_shdr): Don't dump core if target
4616 section has no ELF section data.
4617 (elf_make_sections): Set addralign of reloc section to 4.
4618 (elf_fake_sections): Likewise.
4619 (map_program_segments): Don't consider section 0.
4620 (assign_file_positions_except_relocs): Don't consider section 0.
4621 In the main loop, skip the symtab and strtab sections, since their
4622 positions are set elsewhere.
4623 (swap_out_syms): Set addralign of symtab section to 4. Set
4624 addralign of strtab sections to 1.
4625 (assign_file_positions_for_relocs): Don't consider section 0.
4626 (write_object_contents): Don't write out section 0.
4628 * libelf.h (struct elf_backend_data): Added fields
4629 elf_backend_sym_is_global and elf_backend_final_write_processing.
4630 * elf32-target.h (elf32_bed): Added corresponding initializers.
4631 * elf64-target.h (elf64_bed): Likewise.
4632 * elfcode.h (sym_is_global): Take abfd argument. Call
4633 elf_backend_sym_is_global if it is not NULL.
4634 (elf_map_symbols): Pass abfd to sym_is_global.
4635 (write_object_contents): Call elf_backend_final_write_processing
4638 Wed Nov 17 18:43:28 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4640 * libecoff.h: Include coff/ecoff.h.
4641 (struct ecoff_backend_data): Move external debugging information
4642 fields into a single field pointing to an ecoff_debug_swap
4644 (ecoff_data_type): Move debugging information fields into a single
4645 field pointing to an ecoff_debug_info structure.
4646 * coff-alpha.c, coff-mips.c, ecoff.c: Corresponding changes.
4648 Wed Nov 17 17:38:58 1993 Sean Eric Fagan (sef@cygnus.com)
4650 * nlmswap.h: New file to swap fixed header. Included by NLM
4652 * libnlm.h (struct reloc_and_sec): Define.
4653 (struct nlm_backend_data): Add fields fixed_header_size,
4654 nlm_read_import, nlm_write_import, nlm_swap_fhdr_in,
4656 (nlm_fixed_header_size, nlm_read_import_func,
4657 nlm_write_import_func, nlm_swap_fixed_header_in_func,
4658 nlm_swap_fixed_header_out_func, nlm_write_external_func): New
4660 * nlmcode.h: Use new functions.
4661 * nlm32-i386.c: Provide new functions.
4662 * nlm32-sparc.c: New file; SPARC NLM backend.
4664 Wed Nov 17 13:56:10 1993 Stan Shebs (shebs@rtl.cygnus.com)
4666 * i386lynx.c (swap_std_reloc_in, swap_ext_reloc_in): Ignore
4667 garbage bits appearing in the upper end of symbolnums.
4669 * config/sparc-lynx.mt (TDEFINES): Add -DFPRINTF_ALREADY_DECLARED.
4671 Tue Nov 16 17:03:41 1993 Stu Grossman (grossman at cygnus.com)
4673 * lynx-core.c (lynx_core_file_p): Change bfd_zalloc to bfd_alloc.
4674 * m68klynx.c: Define core file macros.
4675 * hosts/i386lynx.h, hosts/m68klynx.h, hosts/lynx.h: Move all
4676 non-architecture specific stuff into lynx.h.
4678 Tue Nov 16 15:45:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
4680 * i386linux.c: Define new macro ZMAGIC_DISK_BLOCK_SIZE to 1024, and
4681 change PAGE_SIZE to 4096.
4683 Mon Nov 15 11:48:08 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
4685 * Makefile.in (diststuff): New target.
4689 Sun Nov 14 23:33:01 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
4691 * som.c (som_object_setup): Do not create dummy ".text", ".data",
4692 and ".bss" sections.
4693 (setup_sections): Do not set SEC_HAS_CONTENTS if a section's size
4694 is zero. Recognize BSS type sections and turn off SEC_LOAD and
4695 SEC_DATA (so binutils/size works). Set the correct value for
4696 a section's _raw_size.
4697 (som_slurp_symbol_table): Program entry points, and millicode are
4698 also functions. Mark them as such. Also mark L$* symbols as
4701 * bfd-in2.h: Rebuilt.
4703 Sat Nov 13 15:27:15 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
4705 * som.c (som_bfd_reloc_type_lookup): Add missing prototype. Returns
4706 a pointer to constant data. Delete bogus #define which made the
4709 * som.c (som_prep_for_fixups): New function.
4710 (som_write_fixups): New function.
4711 (som_write_space_strings): New function.
4712 (som_write_symbol_strings): New function.
4713 (som_begin_writing): New function.
4715 Fri Nov 12 15:29:36 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
4717 * som.c (som_write_object_contents): Do not abort. Flesh out.
4718 (som_set_section_contents): Do not abort. Flesh out.
4720 * som.c (som_write_headers): New function.
4721 (som_prep_headers): New function.
4722 (som_build_and_write_symbol_table): New function.
4724 * som.c (som_sizeof_headers): Add missing prototype.
4725 (som_set_arch_mach): Do not abort.
4727 * som.c (som_count_spaces): New function.
4728 (som_count_subspaces): New function.
4729 (compare_syms): New function.
4730 (som_compute_checksum): New function.
4732 * som.c (hppa_som_gen_reloc_type): New function.
4733 (som_bfd_reloc_type_lookup): New function.
4735 * som.c (try_prev_fixup): New function.
4736 (som_reloc_skip): New function.
4737 (som_reloc_addend): New function.
4738 (som_reloc_call): New function.
4740 * som.c (som_initialize_reloc_queue): New function.
4741 (som_reloc_queue_insert): Likewise.
4742 (som_reloc_queue_fix): Likewise.
4743 (som_reloc_queue_find): Likewise.
4745 * som.c (som_hppa_howto_table): SOM howto relocation table.
4746 (hppa_som_reloc): New function.
4748 * som.c (struct reloc_queue): New structure to keep track of
4749 the last four multibyte relocations emitted.
4750 (enum pa_symbol_type): Type to fully describe the symbol types
4751 associated with .import/.export assembler directives.
4753 * som.c: Include libhppa.h
4755 * som.c (bfd_som_set_section_attributes): New function.
4756 (bfd_som_set_subsection_attributes): Likewise.
4757 (bfd_som_set_symboL_type): Likewise.
4758 (bfd_som_attach_unwind_info): Likewise.
4759 * som.h: Declare new exported functions.
4761 * som.h (struct som_symbol): Add new fields to hold additional
4762 information needed to build/write symbol tables and fixup streams.
4763 (struct som_section_data_struct): Add new fields to hold additional
4764 information needed to build/write space and subspace headers.
4765 (som_symbol_data): New accessor macro for SOM symbol information.
4766 (R_HPPA_*): Basic relocation types to be used by the assembler.
4768 Fri Nov 12 11:00:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
4770 * trad-core.c (trad_unix_core_file_p): If new hook
4771 TRAD_CORE_ALLOW_ANY_EXTRA_SIZE defined, then skip the check for the
4772 corefile being too big.
4773 * hosts/i386sco.h: Define it.
4775 Thu Nov 11 15:16:28 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
4777 * bfd.c (struct _bfd): Add hppabsd_core_data.
4778 * targets.c (target_vector): Add hppabsd_core_vec.
4779 * hpux-core.c (hpux_core_core_file_p): Fail if an unknown core
4780 section is encountered during core section scanning.
4781 * hppabsd-core.c: New file.
4782 * config/hppabsd.mh: Enable HPPA BSD core files.
4784 * elf32-hppa.c (hppa_elf_reloc): Remove DEFUN crud. Remove code
4785 which is either commented out or ifdef'd out. Add, update and
4786 clean comments. Fix various indention and spacing problems. Handle
4787 problems related to using "ble" to jump to a stub rather than "bl"
4788 (%r31 is trashed by "ble", but not by "bl").
4789 (NEW_INSTRUCTION): Put inside curly braces.
4790 (CURRENT_STUB_OFFSET): Fix indention problems.
4791 (hppa_elf_build_arg_reloc_stub): Fix indention and spacing problems.
4792 Add, update and clean comments. Handle "ble" %r31 lossage problems.
4793 (hppa_elf_build_long_branch_stub): Likewise.
4794 (hppa_look_for_stubs_in_section): Likewise.
4795 (hppa_elf_stub_check): Remove obsolete function.
4797 * hppa_stubs.h: Add new instructions to deal with %r31 lossage
4798 problems. Delete unused instructions.
4800 Tue Nov 9 11:40:27 1993 Stan Shebs (shebs@rtl.cygnus.com)
4802 * m68klynx.c (TARGET_IS_BIG_ENDIAN_P): Define.
4804 Tue Nov 9 11:26:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4806 * elfcode.h (elf_object_p): Rather than looking through an array
4807 of architectures, get the ELF EM_xxx code from the backend
4808 information. Let the generic ELF target match any EM_xxx code not
4809 matched by another ELF target. Call elf_backend_object_p to let
4810 the backend do more checks and set global information.
4811 * libelf.h (struct elf_backend_data): Added elf_machine_code and
4812 elf_backend_object_p fields.
4813 (struct bfd_elf_arch_map): Removed.
4814 (bfd_elf_arch_map, bfd_elf_arch_map_size): Don't declare.
4815 * elf32-target.h, elf64-target.h: Initialize elf_machine_code
4816 field with ELF_MACHINE_CODE. Initialize elf_backend_object_p
4817 field with elf_backend_object_p (if it is defined).
4818 * elf32-gen.c, elf32-hppa.c, elf32-i386.c, elf32-i860.c,
4819 elf32-m68k.c, elf32-m88k.c, elf32-mips.c, elf32-sparc.c,
4820 elf64-gen.c (ELF_MACHINE_CODE): Defined.
4821 * elf32-mips.c: Include ecoffswap.h to get ECOFF swapping
4823 (mips_elf_object_p): Set the right machine number.
4824 (mips_elf_ecoff_debug_swap): Defined.
4825 (elf_backend_object_p): Defined to be mips_elf_object_p.
4826 (elf_backend_ecoff_debug_swap): Defined to be
4827 mips_elf_ecoff_debug_swap.
4828 * elf.c (bfd_elf_arch_map, bfd_elf_arch_map_size): Removed.
4830 * libbfd-in.h (target_vector, default_vector): Declare.
4831 * libbfd.h: Rebuilt.
4832 * format.c (target_vector, default_vector): Don't declare.
4834 * elf32-mips.c (elf_mips_howto_table): Don't complain on overflow
4835 for R_MIPS_26. Correct overflow detection requires matching the
4836 upper four bits of the destination against the PC. From Ted Lemon
4837 <mellon@pepper.ncd.com>.
4839 * bout.c (b_out_reloc_type_lookup): Return type should point to
4841 * coff-i960.c (coff_i960_reloc_type_lookup): Likewise.
4842 * elf32-hppa.c (elf_hppa_reloc_type_lookup): Likewise.
4843 * mipsbsd.c (MY(reloc_howto_type_lookup)): Likewise.
4844 * coff-i386.c (coff_i386_reloc): Made howto const.
4845 * oasys.c (oasys_write_data): Made how const.
4847 * libelf.h: Added some comments.
4848 (struct elf_backend_data): Added elf_backend_ecoff_debug_swap
4849 field. Removed unused write_relocs field.
4850 * elf32-target.h: Adjusted elf_backend_data initialization
4852 * elf64-target.h: Corrected elf_backend_data initialization to
4853 fill in all fields and to set elf_64_p to 1.
4855 Mon Nov 8 18:13:14 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4857 * elfcode.h (bfd_section_from_shdr): Remove duplicate assignment
4858 to filepos in SHT_STRTAB case.
4859 (assign_file_position_for_section): Set BFD section filepos as
4860 well as ELF section sh_offset.
4862 * reloc.c: Use const instead of CONST.
4863 (bfd_perform_relocation): Make variable howto a const pointer.
4864 * bfd-in2.h, libbfd.h: Rebuilt.
4866 Mon Nov 8 12:19:15 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
4868 * Makefile.in (realclean): Don't remove generated headers. Reverts
4869 change of 2 Jul 1993.
4871 Mon Nov 8 06:08:31 1993 D. V. Henkel-Wallace (gumby@cirdan.cygnus.com)
4873 * configure.bfd: make unixware equivalent to sysv4.
4875 * config/i386-nlm.mt: bring in elf config; make it the default.
4877 Sun Nov 7 20:21:38 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
4879 * libbfd.c (bfd_put_8): Add parens around reference to "val"
4882 Fri Nov 5 21:45:09 1993 David J. Mackenzie (djm@thepub.cygnus.com)
4884 * hosts/i386mach3.h (HOST_SEGMENT_SIZE),
4885 i386mach3.c (SEGMENT_SIZE, TEXT_START_ADDR): Correct values (?).
4887 Fri Nov 5 15:17:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4889 * coffcode.h (coff_write_object_contents): Zero out internal_a.
4891 Fri Nov 5 10:41:07 1993 David J. Mackenzie (djm@thepub.cygnus.com)
4893 * aoutx.h, archive.c, archures.c, bfd.c, cache.c, coffcode.h,
4894 core.c, ctor.c, format.c, init.c, libbfd.c, opncls.c, reloc.c,
4895 section.c, syms.c, targets.c:
4896 Doc cleanup (spelling, punctuation, grammar, formatting).
4897 * bfd-in2.h, libbfd.h: Rebuild.
4899 Thu Nov 4 14:46:14 1993 John Gilmore (gnu@rtl.cygnus.com)
4901 * bfd-in.h (bfd_get_cacheable, bfd_set_cacheable): New accessors.
4902 * bfd.c, opncls.c: Improve comments on file descriptor cacheing.
4904 Thu Nov 4 08:54:30 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
4906 * From Pete Hoogenboom (hoogen@cs.utah.edu)
4907 * elf32-hppa.c (hppa_elf_get_section_contents): Fix logic error
4908 in last change. Always rebuild symbol extension section the first
4909 time though if output sections exist (fixes ld -r problems).
4911 Thu Nov 04 08:08:46 1993 Jeffrey Wheat (cassidy@cygnus.com)
4913 * Makefile.in: Add .PHONY for check and installcheck rules.
4915 Tue Nov 2 14:42:27 1993 Bill Cox (bill@tarkas.cygnus.com)
4917 * libbfd-in.h (artdata): Use long, not time_t for portability, at
4918 least to HPUX. File below is a derived file.
4920 Tue Nov 2 14:42:27 1993 Bill Cox (bill@tarkas.cygnus.com)
4922 * libbfd.h (artdata): Use long, not time_t for portability, at
4925 Tue Nov 2 09:32:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
4927 * config.bfd: Use bigmips for mips*-*-bsd*.
4929 Mon Nov 1 14:30:09 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4931 * elfcode.h (elf_slurp_reloca_table, elf_slurp_reloc_table):
4932 Handle symbol number of zero.
4934 * reloc.c (enum bfd_reloc_code_real): Added
4935 BFD_RELOC_MIPS_LITERAL, BFD_RELOC_MIPS_GOT16,
4936 BFD_RELOC_MIPS_CALL16, BFD_RELOC_MIPS_GPREL32.
4937 * bfd-in2.h: Rebuilt.
4938 * coff-mips.c (mips_bfd_reloc_type_lookup): Handle
4939 BFD_RELOC_MIPS_LITERAL.
4940 * elf32-mips.c (mips_reloc_map): Handle new relocs.
4941 (mips_elf_hi16_reloc, mips_elf_lo16_reloc): Rearrange _gp_disp
4944 * aout-target.h (MY_bfd_debug_info_start, MY_bfd_debug_info_end,
4945 MY_bfd_debug_info_accumulat [sic]): Remove unused definitions.
4946 (MY_bfd_get_relocated_section_contents, MY_bfd_relax_section,
4947 MY_bfd_seclet_link): Define.
4948 (MY_bfd_reloc_type_lookup): Rename from
4949 MY_reloc_howto_type_lookup.
4950 (MY_bfd_make_debug_symbol): Rename from MY_make_debug_symbol.
4951 (MY(vec)): Use JUMP_TABLE rather than listing functions.
4952 * hp300hpux.c (MY_get_symtab, MY_get_symtab_upper_bound,
4953 MY_canonicalize_reloc, MY_write_object_contents): Don't define in
4954 terms of MY, because that causes a recusive invocation of CAT when
4955 expanded within JUMP_TABLE, and ANSI compilers don't expand
4957 * mipsbsd.c (MY_bfd_reloc_type_lookup): Rename from
4958 MY_reloc_howto_type_lookup, and don't define in terms of MY.
4959 (MY_canonicalize_reloc): Don't define in terms of MY.
4960 (aout_mips_little_vec, aout_mips_big_vec): Use JUMP_TABLE rather
4961 than listing functions.
4963 Mon Nov 1 09:12:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
4965 * config.bfd: Use m68k-elf for m68*-*-sysv4*.
4967 See file ChangeLog.1
4974 version-control: never