* Makefile.in: Remove explicit dependencies for mn10200 and
[binutils-gdb.git] / bfd / ChangeLog
1 Fri Oct 4 11:41:39 1996 Jeffrey A Law (law@cygnus.com)
2
3 * Makefile.in: Remove explicit dependencies for mn10200 and
4 mn10300 files.
5 (ALL_MACHINE_CFILES): Add cpu-mn10200.c and cpu-mn10300.c.
6 (BFD32_BACKENDS_CFILES): Add elf32-mn10200.c and elf32-mn10300.c
7 (dependencies): Rebuilt.
8
9 Thu Oct 3 16:57:51 1996 Ian Lance Taylor <ian@cygnus.com>
10
11 * cofflink.c (coff_link_add_symbols): Set obj_coff_keep_syms
12 during this function.
13
14 * elflink.c (_bfd_elf_create_linker_section): Only use an existing
15 section if the flags are compatible.
16
17 * configure.in: Add havevecs, and put it in tdefaults.
18 * mpw-config.in: Likewise.
19 * configure: Rebuild.
20 * targmatch.sed: New file; a sed script to build targmatch.h from
21 config.bfd.
22 * config.bfd: Add #if, #endif, and comments for targmatch.h.
23 * targets.c: Include "fnmatch.h".
24 (struct targmatch): Define.
25 (bfd_target_match): Define by including targmatch.h.
26 (bfd_find_target): If the target is not found by name, search for
27 it as a configuration triplet.
28 * Makefile.in: Rebuild dependencies.
29 (BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o,
30 i386dynix.o, m68k4knetbsd.o, and riscix.o.
31 (BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c,
32 hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c.
33 (HFILES): Add targmatch.h. Also, alphabetize and reindent.
34 (CFILES): Remove i386dynix.c and hp300bsd.c.
35 (targmatch.h): New target.
36 (do_clean): Remove targmatch.h.
37
38 * configure.in: Add BFD_NEED_DECLARATION(getenv).
39 * acconfig.h: Add NEED_DECLARATION_GETENV.
40 * configure, config.in: Rebuild.
41 * sysdep.h: If NEED_DECLARATION_GETENV, declare getenv.
42 * aout-adobe.c (aout_adobe_object_p): Don't declare getenv.
43
44 Thu Oct 3 09:29:09 1996 Jeffrey A Law (law@cygnus.com)
45
46 * cpu-mn10x00.c, elf32-mn10x00: Removed.
47 * cpu-mn10200.c, cpu-mn10300.c: New files.
48 * elf32-mn10200.c, elf32-mn10300.c: New files.
49 * Makefile.in: Break mn10x00 support into two separate
50 configurations, mn10200 and mn10300.
51 * archures.c, config.bfd, configure.in, elf.c, targets.c: Likewise.
52 * bfd-in2.h, configure: Rebuilt.
53
54 Thu Oct 3 15:38:19 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
55
56 * Makefile.in (do_clean): Move config.log to do_distclean.
57
58 Wed Oct 2 21:40:55 1996 Jeffrey A Law (law@cygnus.com)
59
60 * cpu-mn10x00.c, elf32-mn10x00.c: New files.
61 * Makefile.in (ALL_MACHINES): Add cpu-mn10x00.o.
62 (BFD32_BACKENDS): Similarly for elf32-mn10x00.o.
63 (elf32-mn10x00.o): Add dependencies.
64 * archures.c (enum bfd_architecture): Add bfd_arch_mn10x00.
65 (bfd_mn10x00_arch): Declare.
66 (bfd_archures_list): Add bfd_mn10x00_arch.
67 * config.bfd: Add mn10x00-*-*.
68 * configure.in: Add bfd_elf32_mn10x00_vec.
69 * elf.c (prep_headers): Handle bfd_arch_mn10x00.
70 * targets.c (bfd_elf32_mn10x00_vec): Declare.
71 (bfd_target_vector): Add bfd_elf32_mn10x00_vec.
72 * bfd-in2.h, configure: Rebuilt.
73
74 Wed Oct 2 15:46:45 1996 Klaus Kaempf <kkaempf@progis.de>
75
76 openVMS/Alpha: Provide filename and case_hack flags via
77 symbol table from gas.
78 Add case_hack code for symbol output from vax/vms.
79 * evax-alpha.c (evax_initialize): Remove filename handling,
80 filename is provided via symbol table.
81 (evax_get_symtab): Use local symbol count when setting up table.
82 * evax-egsd.c (_bfd_evax_slurp_egsd): Print correct name when
83 debugging.
84 (_bfd_evax_write_egsd): Skip file name symbol.
85 * evax-emh.c (get_vms_time_string): Local function now.
86 (_bfd_evax_write_emh): Extract source filename and case_hack flags
87 from symbol table.
88 * evax_write_etir (_bfd_evax_write_etir): Pass all symbol names
89 through _bfd_evax_case_hack_symbol.
90 * evax-misc.c (hash_string, _bfd_evax_case_hack_symbol): New
91 functions.
92 (_bfd_evax_basename): Removed.
93 (_bfd_get_vms_time_string): Moved to evax-emh.c.
94 * evax.h (evax_private_data_struct): Remove filename.
95 (flag_hash_long_names, flag_show_after_trunc,
96 flag_no_hash_mixed_case, vms_name_mapping): New flags for
97 vms_case_hack.
98
99 Wed Oct 2 12:02:02 1996 Ian Lance Taylor <ian@cygnus.com>
100
101 * freebsd.h (N_GET_MAGIC_NET): Don't use ntohl.
102 (N_GETMID_NET, N_GETFLAG_NET): Likewise.
103 (NO_SWAP_MAGIC): Don't define.
104 (SWAP_MAGIC): Define.
105
106 * cofflink.c (_bfd_coff_link_input_bfd): Don't crash if there is
107 no hash table entry for a global symbol.
108
109 Tue Oct 1 16:14:22 1996 Joel Sherrill <joel@oarcorp.com>
110
111 * config.bfd (mips*-*-rtems*): New target, like mips*-*-elf*.
112
113 Tue Oct 1 12:31:39 1996 Ian Lance Taylor <ian@cygnus.com>
114
115 * cofflink.c (coff_link_add_symbols): Don't override a meaningful
116 symbol type with T_NULL. Warn if symbol type changes. Based on
117 patch from Philippe De Muyter <phdm@labauto1.ulb.ac.be>.
118
119 * elflink.h (elf_link_add_object_symbols): Only put a symbol from
120 a dynamic object in the dynamic symbol table if it is referenced
121 or defined by a regular object.
122
123 start-sanitize-v850
124 Fri Sep 27 18:41:07 1996 Stu Grossman (grossman@critters.cygnus.com)
125
126 * elf32-v850.c (bfd_elf32_v850_is_local_label): New function to
127 remove dwarf local labels. Shrinks binaries by a factor of 3!
128
129 end-sanitize-v850
130 Mon Sep 23 13:33:00 1996 Ian Lance Taylor <ian@cygnus.com>
131
132 * elf32-ppc.c (ppc_elf_add_symbol_hook): Create the .sbss section
133 by hand, rather than by calling bfd_make_section.
134
135 start-sanitize-m32r
136 Mon Sep 23 09:23:41 1996 Doug Evans <dje@seba.cygnus.com>
137
138 * reloc.c: Rename m32r relocs.
139 * bfd-in2.h, libbfd.h: Rebuilt.
140 * elf32-m32r.c: Update.
141
142 end-sanitize-m32r
143 Fri Sep 20 11:43:43 1996 Ian Lance Taylor <ian@cygnus.com>
144
145 * aoutx.h (aout_link_input_section_ext): When doing a relocateable
146 link, adjust the symbol index of a base relative reloc. Don't
147 change the addend of a PC relative reloc if pcrel_offset is set.
148 * sunos.c (bfd_sunos_size_dynamic_sections): Don't do anything for
149 a relocateable link.
150
151 * reloc.c (bfd_perform_relocation): Apply the relocation even if
152 it is zero, in case src_mask matters.
153 (bfd_install_relocation): Likewise.
154
155 Thu Sep 19 11:03:06 1996 Ian Lance Taylor <ian@cygnus.com>
156
157 * xcofflink.c (xcoff_link_add_symbols): Always initialize
158 keep_syms.
159 (_bfd_xcoff_bfd_final_link): Don't set target_index
160 to an uninitialized value.
161
162 Tue Sep 17 14:18:31 1996 Ian Lance Taylor <ian@cygnus.com>
163
164 * coffcode.h (coff_slurp_line_table): Warn about illegal symbol
165 indices, rather than crashing.
166 (coff_slurp_reloc_table): Likewise. Check whether the howto field
167 is NULL.
168 * coff-sh.c (sh_relocate_section): Check for an illegal symbol
169 index.
170
171 Mon Sep 16 12:39:36 1996 Ian Lance Taylor <ian@cygnus.com>
172
173 * coff-arm.c (aoutarm_std_reloc_howto): Change dst_mask for ARM26D
174 reloc to 0.
175 (coff_arm_adjust_symndx): New static function.
176 (coff_adjust_symndx): Define.
177
178 * srec.c (srec_scan): Accept multiple symbols on a single line.
179 From Pascal Martin <pmartin@alsys.com>.
180
181 * README: New file.
182
183 Fri Sep 13 14:32:42 1996 Doug Evans <dje@canuck.cygnus.com>
184
185 * aoutf1.h (MY_bfd_merge_private_bfd_data): Define.
186 (sunos_merge_private_bfd_data): New function.
187
188 Fri Sep 13 15:50:57 1996 Ian Lance Taylor <ian@cygnus.com>
189
190 * bfd.c (bfd_copy_private_bfd_data): Switch on output BFD rather
191 than input BFD.
192 (bfd_merge_private_bfd_data): Likewise.
193 * section.c (bfd_copy_private_section_data): Likewise.
194 * syms.c (bfd_copy_private_symbol_data): Likewise.
195 * bfd-in2.h: Rebuild.
196 * aout-target.h (MY_bfd_copy_private_section_data): Check that
197 both BFD's are the right flavour.
198 * ecoff.c (_bfd_ecoff_bfd_copy_private_bfd_data): Likewise.
199 * elf.c (_bfd_elf_copy_private_symbol_data): Likewise.
200 * elf32-mips.c (_bfd_mips_elf_copy_private_bfd_data): Likewise.
201 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
202 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Likewise.
203 (ppc_elf_merge_private_bfd_data): Likewise.
204 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
205 * peicode.h (pe_bfd_copy_private_section_data): Likewise.
206
207 * elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
208 R_PARISC_DIR32, so that _bfd_stab_section_find_nearest_line passes
209 its sanity check.
210
211 start-sanitize-m32r
212 Thu Sep 12 11:45:57 1996 Doug Evans <dje@seba.cygnus.com>
213
214 * reloc.c: Add m32r relocs.
215 * bfd-in2.h, libbfd.h: Rebuilt.
216 * cpu-m32r.c,elf32-m32r.c: New files.
217
218 end-sanitize-m32r
219 Thu Sep 12 11:10:05 1996 Ian Lance Taylor <ian@cygnus.com>
220
221 * ieee.c (ieee_vec): Set symbol_leading_char field to '_'.
222
223 Wed Sep 11 11:57:56 1996 Ian Lance Taylor <ian@cygnus.com>
224
225 * tekhex.c (first_phase): Change type parameter from char to int.
226 (out): Likewise.
227 (pass_over): Change func to expect int, not char.
228
229 * elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
230 rather than SEC_LOAD when aligning the file offset for the first
231 section in a segment.
232
233 Tue Sep 10 16:18:30 1996 Fred Fish <fnf@cygnus.com>
234
235 * syms.c (coff_section_type): Make arg const.
236 * irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
237 to make_bfd_asection().
238 * elf-bfd.h (bfd_section_from_phdr): Add prototype.
239 * elfcode.h (bfd_section_from_phdr): Remove prototype.
240 (_bfd_elf_stringtab_init): Remove prototype.
241
242 * netbsd-core.c (swap_abort): Add prototype.
243 * aix386-core.c (swap_abort): Ditto & make static
244 * hpux-core.c (swap_abort): Ditto & make static.
245 * irix-core.c (swap_abort): Ditto & make static.
246 * ptrace-core.c (swap_abort): Ditto & make static.
247 * trad-core.c (swap_abort): Ditto & make static.
248 * coffswap.h (coff_swap_reloc_in): Ditto.
249 (coff_swap_reloc_out): Ditto.
250 (coff_swap_filehdr_in): Ditto.
251 (coff_swap_filehdr_out): Ditto.
252 (coff_swap_sym_in): Ditto.
253 (coff_swap_sym_out): Ditto.
254 (coff_swap_aux_in): Ditto.
255 (coff_swap_aux_out): Ditto.
256 (coff_swap_lineno_in): Ditto.
257 (coff_swap_lineno_out): Ditto.
258 (coff_swap_aouthdr_in): Ditto.
259 (coff_swap_aouthdr_out): Ditto.
260 (coff_swap_scnhdr_in): Ditto.
261 (coff_swap_scnhdr_out): Ditto.
262 * ihex.c (ihex_sizeof_headers): Ditto.
263 * tekhex.c (getsym): Ditto.
264 (find_chunk): Ditto & make static.
265 (insert_byte): Ditto.
266 (first_phase): Ditto.
267 (pass_over): Ditto.
268 (tekhex_get_symtab): Ditto & make static.
269 (tekhex_get_symtab_upper_bound): Ditto & make static.
270 (tekhex_mkobject): Ditto.
271 (tekhex_object_p): Ditto.
272 (move_section_contents): Ditto.
273 (tekhex_get_section_contents): Ditto.
274 (tekhex_set_arch_mach): Ditto & make static.
275 (tekhex_set_section_contents): Ditto.
276 (writevalue): Ditto.
277 (writesym): Ditto.
278 (out): Ditto.
279 (tekhex_write_object_contents): Ditto.
280 (tekhex_sizeof_headers): Ditto.
281 (tekhex_make_empty_symbol): Ditto.
282 (tekhex_get_symbol_info): Ditto.
283 (tekhex_print_symbol): Ditto.
284 * irix-core.c (make_bfd_asection): Ditto.
285 (irix_core_core_file_p): Ditto.
286 (irix_core_core_file_failing_command): Ditto.
287 (irix_core_core_file_failing_signal): Ditto.
288 (irix_core_core_file_matches_executable_p): Ditto.
289 (irix_core_make_empty_symbol): Ditto.
290 * coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
291 * srec.c (srec_new_symbol): Ditto.
292 (srec_get_section_contents): Ditto.
293 (srec_set_arch_mach): Ditto.
294 (srec_set_section_contents): Ditto.
295 (internal_srec_write_object_contents): Ditto.
296 (srec_write_object_contents): Ditto.
297 (symbolsrec_write_object_contents): Ditto.
298 (srec_sizeof_headers): Ditto.
299 (srec_make_empty_symbol): Ditto.
300 (srec_get_symtab_upper_bound): Ditto.
301 (srec_get_symtab): Ditto.
302 (srec_print_symbol): Ditto and make static.
303 * elf.c (elf_read): Ditto
304 (assign_section_numbers): Ditto.
305 (elf_fake_sections): Ditto.
306 (sym_is_global): Ditto.
307 (elf_map_symbols): Ditto.
308 (get_program_header_size): Ditto.
309 * coffgen.c (make_a_section_from_file): Ditto.
310 (coff_real_object_p): Ditto.
311 (fixup_symbol_value): Ditto.
312 (build_debug_section): Ditto.
313 (copy_name): Ditto.
314 * syms.c (coff_section_type): Ditto.
315
316 start-sanitize-m32r
317 Mon Sep 9 22:36:01 1996 Jeffrey A Law (law@cygnus.com)
318
319 * bfd-in2.h: Rebuilt after m32r changes.
320
321 end-sanitize-m32r
322 Mon Sep 9 12:31:22 1996 Doug Evans <dje@canuck.cygnus.com>
323
324 start-sanitize-m32r
325 * config.bfd,configure.in,configure: Add m32r support.
326 * Makefile.in,archures.c,elf.c,targets.c: Likewise.
327 end-sanitize-m32r
328 * config.bfd: Keep target list alphabetically sorted.
329
330 start-sanitize-v850
331 Mon Sep 9 11:48:41 1996 Jeffrey A Law (law@cygnus.com)
332
333 * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
334 to add in the constant part found in the instruction itself.
335 (case R_V850_HI16_S): Likewise.
336
337 end-sanitize-v850
338 start-sanitize-d10v
339 Fri Sep 6 17:04:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
340
341 * elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
342 and R_D10V_18 to be 1 (word).
343
344 end-sanitize-d10v
345 Thu Sep 5 15:23:08 1996 Ian Lance Taylor <ian@cygnus.com>
346
347 * stabs.c (_bfd_link_section_stabs): If the output_section field
348 of either section is bfd_abs_section, then the linker is
349 discarding the section and we should not optimize it.
350
351 Tue Sep 3 12:16:20 1996 Doug Evans <dje@canuck.cygnus.com>
352
353 * Makefile.in (aout-sparcle.o): New target.
354 * aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
355 * config.bfd (sparclet-*-aout*): Add case.
356 * configure.in (sparcle_aout_vec): Add case.
357 * configure: Regenerated.
358 * targets.c (sparcle_aout_vec): Declare.
359 (bfd_target_vector): Add sparcle_aout_vec.
360 * aout-sparcle.c: New file.
361
362 start-sanitize-v850
363 Tue Sep 3 00:57:02 1996 Jeffrey A Law (law@cygnus.com)
364
365 * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
366 low order sign bit propogation for R_V850_HI16_S.
367
368 * elf32-v850.c (bfd_elf32_v850_reloc): New function for
369 handling V850 specific relocs.
370 (elf_v850_howto_table): Use the new function for some
371 relocations. Twiddle masks & shifts for some relocs.
372 Set partial_inplace where needed.
373
374 end-sanitize-v850
375 Mon Sep 2 12:12:34 1996 Ian Lance Taylor <ian@cygnus.com>
376
377 * cpu-mips.c: Add an explicit mips:3000 entry, and change the
378 default architecture to a machine number of 0.
379 * elf32-mips.c (_bfd_mips_elf_object_p): Set the machine number
380 for E_MIPS_ARCH_1.
381 (_bfd_mips_elf_merge_private_bfd_data): If the machine number of
382 the output BFD is the default, set it from the first input BFD.
383
384 start-sanitize-v850
385 Sun Sep 1 18:38:01 1996 Jeffrey A Law (law@cygnus.com)
386
387 * elf32-v850.c (elf_v850_howto_table): All the 16bit relocs
388 insert at bitpos zero. The HI16 relocs are shifted right
389 by 16 bits. Fix src_mask for all relocs.
390 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define. The V850 is
391 little endian!
392 (TARGET_BIG_SYM, TARGET_BIG_NAME): Remove. The V850 is little
393 endian!
394
395 end-sanitize-v850
396 Sun Sep 1 15:41:08 1996 Ian Lance Taylor <ian@cygnus.com>
397
398 * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
399 Rewrite to use BFD file read routines and to avoid using a fixed
400 length for the file name.
401
402 start-sanitize-v850
403 Sat Aug 31 10:22:25 1996 Jeffrey A Law (law@cygnus.com)
404
405 * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
406 (elf_v850_howto_table): Add support for R_V850_{32,16,8}.
407 (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
408 to R_V850_{32,16,8}.
409
410 Fri Aug 30 18:06:04 1996 J.T. Conklin <jtc@hippo.cygnus.com>
411
412 * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
413 (elf_v850_howto_table): Add info for HI16_S reloc.
414 (v850_reloc_map): Add HI_16_S reloc.
415 * reloc.c: Define BFD_RELOC_V850_* relocs.
416
417 end-sanitize-v850
418 Fri Aug 30 11:49:19 1996 Ian Lance Taylor <ian@cygnus.com>
419
420 Add SH ELF support.
421 * elf32-sh.c: New file.
422 * elf.c (prep_headers): Handle bfd_arch_sh.
423 * elfcode.h (write_relocs): Handle absolute symbol.
424 * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
425 (_bfd_elf64_link_read_relocs): Declare.
426 * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
427 elf_link_read_relocs. Make globally visible. Change all
428 callers.
429 (elf_link_input_bfd): Get external symbols from cache in
430 symtab_hdr->contents. Get contents from cache in
431 elf_section_data.
432 * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
433 already defined.
434 * reloc.c: Define BFD_RELOC_SH_* relocs.
435 * libbfd-in.h (_bfd_sh_align_load_span): Declare.
436 * coff-sh.c (sh_insns_conflict): Fix a return value.
437 (_bfd_sh_align_load_span): New globally visible function, broken
438 out of sh_align_load.
439 (sh_align_load): Call _bfd_sh_align_load_span.
440 (sh_swap_insns): Change relocs parameter to PTR.
441 * bfd-in2.h, libbfd.h: Rebuild.
442 * targets.c (bfd_elf32_sh_vec): Declare.
443 (bfd_elf32_shl_vec): Declare.
444 * config.bfd (sh-*-elf*): New target.
445 * configure.in (bfd_elf32_sh_vec): New target vector.
446 (bfd_elf32_shl_vec): New target vector.
447 * configure: Rebuild.
448 * Makefile.in: Rebuild dependencies.
449 (BFD32_BACKENDS): Add elf32-sh.o.
450 (BFD32_BACKENDS_CFILES): Add elf32-sh.c.
451
452 * elf.c (map_sections_to_segments): Check that LMA does not skip a
453 page before checking D_PAGED.
454
455 * ihex.c (ihex_scan): Removed unnecessary extbase variable.
456 (ihex_write_object_contents): Remove extbase; always use segbase
457 instead.
458
459 Thu Aug 29 16:52:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
460
461 * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
462 * configure.host (i[345]86-*-*): Ditto.
463 * config.bfd (i[345]86-*-*): Ditto.
464 * configure: Regenerate.
465
466 * config.bfd (i[3456]86-*-dgux*): Recognize as a synonym for x86
467 elf.
468
469 Tue Aug 27 09:18:18 1996 Jeffrey A Law (law@cygnus.com)
470
471 * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new argument.
472 * elf32-hppa.h (hppa_elf_gen_reloc_type): Update prototype.
473 * som.c (hppa_som_gen_reloc_type): Add new argument. If
474 we encounter an R_DATA_ONE_SYMBOL reloc against a symbol that
475 will have an ST_CODE type, change the symbol's type to ST_DATA.
476 * som.c (hppa_som_gen_reloc_type): Update prototype.
477
478 Tue Aug 27 00:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
479
480 * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
481 R_MIPS_32 and R_MIPS_REL32. Set sgot and g as soon as possible.
482 (mips_elf_size_dynamic_sections): Don't require .got to exist.
483 (mips_elf_finish_dynamic_sections): Likewise.
484
485 Thu Aug 22 10:54:38 1996 Ian Lance Taylor <ian@cygnus.com>
486
487 * configure.host (HLDENV): New variable to set. Set it for
488 *-*-sysv4*, since those linkers may not support -R but they always
489 support LD_RUN_PATH.
490
491 * libieee.h (NSECTIONS): Don't define.
492 (ieee_data_struct): Change section_table to asection **. Add
493 section_table_size.
494 * ieee.c (get_section_entry): If the table isn't big enough, make
495 it bigger.
496 (ieee_slurp_sections): Remove assertion about number of sections.
497 (ieee_object_p): Adjust initialization of ieee to match changes to
498 the structure.
499
500 * xcofflink.c (xcoff_mark): Don't copy relocs for undefined
501 symbols merely because we are generating a shared library.
502 (xcoff_build_ldsyms): Don't set up global linkage code for an
503 undefined symbol merely because we are generating a shared
504 library.
505
506 start-sanitize-v850
507 Tue Aug 20 15:06:05 1996 J.T. Conklin <jtc@hippo.cygnus.com>
508
509 * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
510 (BFD32_BACKENDS) Add elf32-v850.o.
511 * archures.c: Add bfd_v850_arch.
512 * bfd-in2.h: Add bfd_v850_arch.
513 * config.bfd (v850-*-*): New target.
514 * configure: (bfd_elf32_v850_vec) New vector.
515 * configure.in: (bfd_elf32_v850_vec) New vector.
516 * cpu-v850.c: New file.
517 * elf.c (prep_headers): Added case bfd_arch_v850.
518 * elf32-v850.c: New file.
519 * targets.c (bfd_elf32_v850_vec): New vector.
520
521 end-sanitize-v850
522 Fri Aug 16 16:25:35 1996 Ian Lance Taylor <ian@cygnus.com>
523
524 * xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
525 a function code symbol for an XMC_XO symbol.
526
527 Thu Aug 15 12:33:29 1996 Stan Shebs <shebs@andros.cygnus.com>
528
529 * mpw-config.in: Update editing of autoconf vars to reflect
530 Jul 18 configure.in change.
531 * mpw-make.sed: Update editing of include pathnames to be
532 more general, add @DASH_C_FLAG@ to explicit compile rule edit.
533
534 Thu Aug 15 10:35:13 1996 Richard Henderson <rth@tamu.edu>
535
536 * elf64-alpha.c (elf64_alpha_output_extsym): The section from
537 which to offset to get the .plt entry address is ".plt".
538
539 Thu Aug 15 16:40:30 1996 James G. Smith <jsmith@cygnus.co.uk>
540
541 * reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
542 BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
543 Added, for internal use by the ARM gas.
544 * libbfd.h: Rebuilt
545 * bfd-in2.h: Rebuilt
546
547 Wed Aug 14 17:02:09 1996 Richard Henderson <rth@tamu.edu>
548
549 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
550 in section dynidx start.
551
552 Tue Aug 13 14:35:38 1996 Ian Lance Taylor <ian@cygnus.com>
553
554 * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
555 name begins with .gnu.linkonce as SEC_LINK_ONCE. This is an
556 optimization for g++.
557
558 Tue Aug 13 17:04:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
559
560 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): If one module has
561 the -mrelocatable-lib bit set and the other doesn't, clear the
562 -mrelocatable-lib bit in the header.
563
564 Sat Aug 10 22:59:17 1996 Ian Lance Taylor <ian@cygnus.com>
565
566 * elflink.h (elf_link_add_object_symbols): Do not resolve a common
567 symbol against a STT_FUNC symbol in a shared library.
568
569 Fri Aug 9 12:44:57 1996 Ian Lance Taylor <ian@cygnus.com>
570
571 * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
572 symbol is found, automatically define the corresponding function
573 code.
574
575 * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
576 if sym.n_numaux is not zero.
577 (_bfd_coff_link_input_bfd): Permit the symbol and the hash table
578 entry to disagree about the number of aux entries if the symbol
579 has zero.
580
581 * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
582 section if it might be needed, not just if info->shared.
583 (mips_elf_adjust_dynamic_symbol): Make room for a null element at
584 the start of .rel.dyn if we are going to use it.
585 (mips_elf_finish_dynamic_sections): Only clear the first element
586 of .rel.dyn if the size is greater than zero.
587
588 Thu Aug 8 16:24:55 1996 Ian Lance Taylor <ian@cygnus.com>
589
590 * xcofflink.c (xcoff_link_input_bfd): If we already called the
591 undefined_symbol callback for a symbol, then don't issue any more
592 warnings about loader relocs.
593 (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
594 after calling the undefined_symbol callback.
595
596 * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
597 (xcoff_link_add_symbols): Permit multiple definitions of a symbol
598 as the AIX linker seems to do.
599
600 Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
601
602 * evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
603 (evax_initialize): Remove evax_reloc_table.
604 (evax_close_and_cleanup): Ditto.
605 (reloc_nil): Ditto.
606 (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
607 entries.
608 (evax_bfd_reloc_type_lookup): Ditto.
609 * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
610 cooked_size == raw_size.
611 * evax-emh.c (_bfd_evax_register_filename): Remove.
612 * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
613 * evax-misc.c (add_new_contents): Malloc section at full size.
614 (_bfd_save_evax_section): Memcpy section contents directly.
615 * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
616 (evax_reloc_table): Remove.
617
618 * hosts/alphavms.h (O_ACCMODE): Define if needed.
619
620 * makefile.vms: Add better support for DEC C compilation
621 Add evax.h dependencies
622
623 * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
624 (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
625 (BFD_RELOC_ALPHA_BASEREG): Remove.
626 * bfd-in2.h, libbfd.h: Rebuild.
627
628 Thu Aug 8 08:17:32 1996 Stu Grossman (grossman@critters.cygnus.com)
629
630 * archive.c (bsd_write_armap): Ifdef around calls to getuid and
631 getgid if _WIN32 is defined.
632 * opncls.c (bfd_fdopenr): Remove unnecessary WINGDB ifdef.
633
634 Wed Aug 7 23:19:00 1996 Stu Grossman (grossman@critters.cygnus.com)
635
636 * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
637 Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
638 include file.
639 * libbfd.c: Create dummy getpagesize() macro if HAVE_GETPAGESIZE
640 isn't defined.
641
642 Wed Aug 7 14:11:44 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
643
644 * configure.in: Call BFD_NEEDED_DECLARATION on strstr and
645 realloc.
646 * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
647 (NEED_DECLARATION_REALLOC): New macro.
648 * configure, config.in: Rebuild.
649 * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
650 (realloc): Declare if NEED_DECLARATION_REALLOC.
651
652 * aclocal.m4 (BFD_NEED_DECLARATION): Include <string.h> or
653 <strings.h> if they exist.
654
655 * ieee.c (ieee_set_section_contents): Cast bfd_alloc return.
656
657 Wed Aug 7 12:12:03 1996 Ian Lance Taylor <ian@cygnus.com>
658
659 * cpu-i386.c (i8086_arch): Architecture info for the i8086.
660
661 Based on patches from Eric Valette <valette@crf.canon.fr>:
662 * elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
663 LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
664 (elf_howto_table): Add entries for new relocs.
665 (elf_i386_reloc_type_lookup): Handle new relocs.
666 (elf_i386_info_to_howto): Just call abort.
667 (elf_i386_info_to_howto_rel): Check that the reloc type is valid.
668 (elf_i386_relocate_section): Likewise.
669
670 start-sanitize-d10v
671 Tue Aug 6 12:54:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
672
673 * elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
674
675 end-sanitize-d10v
676 Mon Aug 5 13:42:41 1996 Ian Lance Taylor <ian@cygnus.com>
677
678 * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
679 only get the LMA from the phdr if they are in the same part of the
680 file.
681
682 * elf.c (map_sections_to_segments): Rewrite tests for starting a
683 new segment to make them more comprehensible. If the relationship
684 between the LMA and the VMA changed, start a new segment. Don't
685 check dynsec when deciding whether to start a new segment for a
686 writeable section; -N will now handle this.
687
688 Thu Aug 1 22:43:08 1996 Jeffrey A Law (law@cygnus.com)
689
690 * libhppa.h: Remove "esel" changes. Not the right approach.
691 * som.c: Corresponding changes.
692 (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
693 which don't have a SOM symbol type associated with them.
694 Reverses a 1994 change.
695
696 Wed Jul 31 15:50:55 1996 Ian Lance Taylor <ian@cygnus.com>
697
698 Make ld -N more reasonable for ELF:
699 * elf.c (map_sections_to_segments): If D_PAGED is not set, set
700 phdr_in_section to false, and always use a single load segment.
701 (elf_sort_sections): Sort sections by LMA after VMA.
702 (assign_file_positions_for_segments): If D_PAGED is not set, don't
703 align to maxpagesize.
704 (assign_file_positions_except_relocs): Likewise.
705 * elfcode.h (elf_object_p): If a section is loaded but not page
706 aligned, clear D_PAGED.
707
708 Wed Jul 31 15:00:12 1996 James G. Smith <jsmith@cygnus.co.uk>
709
710 * reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
711 Added, for internal use by the ARM gas.
712 * libbfd.h: Rebuilt
713 * bfd-in2.h: Rebuilt
714
715 Tue Jul 30 14:14:57 1996 Jeffrey A Law (law@cygnus.com)
716
717 * libhppa.h (R_HPPA_ESEL): New field selector.
718 (e_esel): Similarly.
719 * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
720 then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
721 (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
722
723 Tue Jul 30 13:31:27 1996 Ian Lance Taylor <ian@cygnus.com>
724
725 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
726 archive search before looking for stripped dynamic objects.
727
728 Fri Jul 26 17:51:39 1996 Ian Lance Taylor <ian@cygnus.com>
729
730 * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
731 symbol a warning rather than an error.
732
733 Wed Jul 24 12:02:53 1996 Ian Lance Taylor <ian@cygnus.com>
734
735 * elf.c (assign_file_positions_for_segments): Track the virtual
736 memory position separately from the file position, and use it to
737 compute the alignment adjustment.
738
739 start-sanitize-d10v
740 Tue Jul 23 10:43:31 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
741
742 * elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
743 and fixed mask on R_D10V_10_PCREL_L.
744
745 end-sanitize-d10v
746 Mon Jul 22 15:30:30 1996 Ian Lance Taylor <ian@cygnus.com>
747
748 * elf64-mips.c: Include "aout/ar.h".
749 (mips_elf64_slurp_armap): New static function.
750 (mips_elf64_write_armap): New static function.
751 (bfd_elf64_archive_*): Define.
752 * elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
753 Use instead of bfd_generic_archive_p.
754 (bfd_elfNN_write_archive_contents): Define if not defined. Use
755 instead of _bfd_write_archive_contents.
756 (bfd_elfNN_mkdarchive): Define if not defined. Use instead of
757 _bfd_generic_mkarchive.
758 (TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
759 bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
760 _bfd_archive_coff.
761 (TARGET_LITTLE_SYM): Likewise.
762 * archive.c (bfd_slurp_armap): Check for and reject an archive map
763 name of /SYM64/.
764 * Makefile.in: Rebuild dependencies.
765
766 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
767 SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
768 SHT_MIPS_EVENTS sections.
769 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
770 SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
771 sections.
772 (_bfd_mips_elf_fake_sections): Likewise.
773
774 * libecoff.h (ecoff_data_type): Add rdata_in_text field.
775 * ecoff.c (ecoff_compute_section_file_positions): Copy
776 rdata_in_text from backend info to tdata. Clear it if any data
777 section comes before .rdata.
778 (_bfd_ecoff_write_object_contents): Use rdata_in_text field in
779 tdata rather than backend info.
780
781 Fri Jul 19 18:15:51 1996 Ian Lance Taylor <ian@cygnus.com>
782
783 * configure.in: Fix test for whether a compiler has a 64 bit
784 type. From Jim Wilson <wilson@cygnus.com>.
785
786 Thu Jul 18 15:39:10 1996 Ian Lance Taylor <ian@cygnus.com>
787
788 * configure.host (mips-sgi-irix6*): New host.
789
790 * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
791 (replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
792 BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT. Add bfd-in2.h:bfd-in2.h
793 to AC_OUTPUT call.
794 * configure: Rebuild.
795 * bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
796 (BFD_HOST_64_BIT): Define conditionally.
797 (BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
798 (bfd_vma): Typedef as BFD_HOST_U_64_BIT.
799 (symvalue, bfd_size_type): Likewise.
800 * bfd-in2.h: Rebuild.
801 * Makefile.in (do_clean): Remove bfd-tmp.h.
802 (do_distclean): Remove bfd-in3.h.
803 (stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
804 (bfd-in3.h): New target.
805
806 * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec. From
807 Andrew Gierth <ANDREWG@microlise.co.uk>.
808
809 * configure.host: Set INSTALL_SHLIB.
810 * configure.in: Call AC_SUBST (INSTALL_SHLIB).
811 * configure: Rebuild.
812 * Makefile.in (install): Use @INSTALL_SHLIB@.
813
814 * config.bfd (mips*-*-irix6*): New target.
815 * configure.host: Handle Irix 6 shared library like Irix 5.
816
817 * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
818 symbol for a magic name.
819 (xcoff_link_input_bfd): Don't change the reloc symbol for an
820 XMC_TD symbol.
821 (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
822 XMC_TD symbol.
823
824 Thu Jul 18 11:36:31 1996 Stan Shebs <shebs@andros.cygnus.com>
825
826 * mpw-config.in: Add ELF support to mips config, create the
827 elf32-target.h file in the object dir.
828 * mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
829
830 Wed Jul 17 18:02:32 1996 Kim Knuttila <krk@cygnus.com>
831
832 * coff-ppc.c: Redid debug scheme - numerous fprintf's gone.
833 Also removed most abort calls, in favor of using bfd reporting.
834
835 start-sanitize-d10v
836 Wed Jul 17 14:51:52 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
837
838 * Makefile.in (ALL_MACHINES): Add cpu-d10v.o.
839 (BFD32_BACKENDS) Add elf32-d10v.o.
840 * archures.c: Add bfd_d10v_arch.
841 * bfd-in2.h: Add bfd_d10v_arch.
842 * config.bfd (d10v-*-*): New target.
843 * configure: (bfd_elf32_d10v_vec) New vector.
844 * configure.in: (bfd_elf32_d10v_vec) New vector.
845 * cpu-d10v.c: New file.
846 * elf.c (prep_headers): Added case bfd_arch_d10v.
847 * elf32-d10v.c: New file.
848 * libbfd.h: Rebuild.
849 * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
850 BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
851 * targets.c (bfd_elf32_d10v_vec): New vector.
852 end-sanitize-d10v
853
854 Wed Jul 17 10:58:55 1996 Kim Knuttila <krk@cygnus.com>
855
856 * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
857
858 Tue Jul 16 23:49:02 1996 Stu Grossman (grossman@critters.cygnus.com)
859
860 * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
861 bfd_mach_i386_i8086 machine types.
862
863 Wed Jul 10 12:42:56 1996 Ian Lance Taylor <ian@cygnus.com>
864
865 * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
866 and _FINI sections.
867
868 Wed Jul 10 11:18:21 1996 Richard Henderson <rth@tamu.edu>
869
870 * coffcode.h (coff_set_section_contents): A/UX does not require
871 special handling of the _LIB section.
872
873 Tue Jul 9 15:52:20 1996 Jeffrey A Law (law@cygnus.com)
874
875 * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
876 value for R_RELBYTE.
877
878 * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
879 array if one was allocated.
880
881 Tue Jul 9 12:21:54 1996 Ian Lance Taylor <ian@cygnus.com>
882
883 From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
884 * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
885 use_rld_obj_head and rld_value.
886 (mips_elf_link_hash_table_create): Initialize new fields.
887 (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
888 dynamic.
889 (mips_elf_create_dynamic_sections): Create .rld_map section. If
890 __rld_obj_head symbol not seen, create an __rld_map symbol.
891 (mips_elf_size_dynamic_sections): Make space in .rld_map section.
892 Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
893 (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
894 __rld_obj_head symbol.
895 (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
896
897 Mon Jul 8 16:18:03 1996 Ian Lance Taylor <ian@cygnus.com>
898
899 * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
900
901 * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
902 ppc_elf_addr16_ha_reloc.
903 (ppc_elf_addr16_ha_reloc): New static function.
904
905 * coff-mips.c (struct mips_hi): Define.
906 (mips_refhi_list): New static variable.
907 (mips_refhi_addr, mips_refhi_addend): Remove.
908 (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
909 (mips_reflo_reloc): Process mips_refhi_list.
910 (mips_relhi_list): New static variable.
911 (mips_relhi_addr, mips_relhi_addend): Remove.
912 (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
913 (mips_rello_reloc): Process mips_relhi_list.
914 (mips_relocate_section): Permit an arbitrary number of REFHI or
915 RELHI relocs before the associated REFLO or RELLO reloc.
916
917 Fri Jul 5 19:27:49 1996 Ian Lance Taylor <ian@cygnus.com>
918
919 * aout-target.h (MY(callback)): Set reloc_count fields.
920
921 Thu Jul 4 12:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
922
923 * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
924 sections unless this is a SunOS link.
925
926 * VERSION: Set to 2.7.1.
927
928 * Released binutils 2.7.
929
930 Wed Jul 3 14:59:47 1996 Ian Lance Taylor <ian@cygnus.com>
931
932 * i386aout.c: Include "aout/aout64.h".
933 (i386aout_write_object_contents): New static function.
934 (MY_write_object_contents): Define.
935
936 * netbsd.h (MY(write_object_contents)): Make sure that
937 adjust_sizes_and_vmas is called before fiddling with the magic
938 number.
939
940 Tue Jul 2 23:30:39 1996 Ian Lance Taylor <ian@cygnus.com>
941
942 * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
943
944 Sun Jun 30 13:34:33 1996 Ian Lance Taylor <ian@cygnus.com>
945
946 * libbfd-in.h (itos, stoi): Don't define.
947 * libbfd.h: Rebuild.
948 * i386lynx.c (KEEPIT): Define as udata.i.
949 (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
950 (NAME(lynx,swap_ext_reloc_out)): Likewise.
951 * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
952 flags. Don't use stoi.
953
954 * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
955
956 * elf.c (map_sections_to_segments): Don't start a new segment for
957 a writable section if it's on the same page as the previous
958 segment. Reset the writable variable for a readonly section.
959
960 Sat Jun 29 16:18:51 1996 Kim Knuttila <krk@cygnus.com>
961
962 * peicode.h (coff_swap_aouthdr_in): Missing initializations of
963 first_thunk_address, thunk_size, and import_table_size.
964 * peicode.h: Improved some diagnostics regarding edata sections.
965
966 * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
967 on IMGLUE relocs.
968 (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
969 (TARGET_LITTLE_SYM): Added missing D_PAGED.
970
971 Fri Jun 28 13:48:45 1996 Ian Lance Taylor <ian@cygnus.com>
972
973 * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
974 with XCOFF_DEF_DYNAMIC set is really defined.
975 (xcoff_link_check_dynamic_ar_symbols): Likewise.
976 (xcoff_link_add_symbols): Only create special sections if using an
977 XCOFF hash table.
978
979 * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
980 aixcoff-rs6000.
981 (bfd_install_relocation): Likewise.
982
983 Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
984
985 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
986 field.
987 (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
988 (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
989 (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
990 (elf64_alpha_link_hash_newfunc): Initialize flags field.
991 (elf64_alpha_check_relocs): Record types of LITUSE entries that
992 are found for LITERAL relocs.
993 (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
994 taken, we cannot generate a .plt entry for the symbol.
995
996 Thu Jun 27 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
997
998 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
999 sysconf functions (for gprof).
1000 * configure, config.in: Rebuild.
1001
1002 Wed Jun 26 16:29:02 1996 Ian Lance Taylor <ian@cygnus.com>
1003
1004 * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
1005 an archive if it has a map. If the object file has the wrong
1006 xvec, reject it.
1007
1008 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
1009 BRADDR, SREL16, SREL32, or SREL64 reloc against an external
1010 symbol.
1011 (alpha_relocate_section): Likewise.
1012
1013 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
1014 (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
1015 (coff_swap_sym_out): Use SYMESZ, not sizeof.
1016 (coff_swap_aux_out): Use AUXESZ, not sizeof.
1017 (coff_swap_lineno_out): Use LINESZ, not sizeof.
1018 (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
1019 (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
1020 * peicode.h: Corresponding changes.
1021
1022 Tue Jun 25 15:28:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1023
1024 * elflink.h (elf_create_pointer_linker_section): Comment out code
1025 dealing with making GOT pointers negative of the GOT symbol for
1026 now.
1027
1028 Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
1029
1030 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
1031 increment the .rela.plt size until after we're done creating the
1032 .plt entry.
1033 (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
1034 .rela.plt offset directly rather than calculating it.
1035
1036 Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
1037
1038 * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
1039 Use autoconf-set values.
1040 * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
1041 includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
1042 values.
1043 (docdir): Deleted.
1044 * configure.in (AC_PREREQ): autoconf v2.5 or higher.
1045 * configure: Rebuilt.
1046
1047 Mon Jun 24 22:50:35 1996 Jeffrey A Law (law@cygnus.com)
1048
1049 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
1050 handling code > 1k away.
1051
1052 Mon Jun 24 18:41:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1053
1054 * elflink.h (elf_create_pointer_linker_section): If DEBUG is
1055 defined, output whenever the symbol is updated.
1056
1057 Mon Jun 24 17:58:12 1996 Jouke Numan <jnuman@bazis.nl>
1058
1059 * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
1060 section to 0 if user_set_vma is set.
1061 * elflink.h (elf_bfd_final_link): Likewise.
1062
1063 Sun Jun 23 20:42:51 1996 Doug Evans <dje@canuck.cygnus.com>
1064
1065 Partially undo patch of Jun 20.
1066 * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
1067 (coff_compute_section_file_positions): Likewise.
1068 (coff_write_object_contents): Likewise. Re-add deleted code, but
1069 use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
1070 * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
1071
1072 Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
1073
1074 * config.bfd: Add support for *-*-rtems* configurations.
1075
1076 Fri Jun 21 15:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
1077
1078 * elf.c (prep_headers): Add bfd_arch_alpha case.
1079
1080 Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
1081
1082 * elf64-alpha.c: New file.
1083 * config.bfd (alpha-*-linuxecoff*): New target.
1084 (alpha-*-linux*, alpha-*-elf*): New targets.
1085 * configure.in (bfd_elf64_alpha_vec): New vector.
1086 * configure: Rebuild.
1087 * targets.c (bfd_elf64_alpha_vec): Declare.
1088 (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
1089 * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
1090 * bfd-in2.h, libbfd.h: Rebuild.
1091 * Makefile.in: Rebuild dependencies.
1092 (BFD64_BACKENDS): Add elf64-alpha.o.
1093 (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
1094
1095 Thu Jun 20 18:14:25 1996 Ian Lance Taylor <ian@cygnus.com>
1096
1097 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
1098 than relying on a right shift of 32.
1099
1100 Thu Jun 20 11:00:57 1996 Doug Evans <dje@canuck.cygnus.com>
1101
1102 * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
1103 ifdef to COFF_WITH_PE.
1104 (coff_compute_section_file_positions): Likewise.
1105 (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
1106 * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
1107 * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
1108 COFF_IMAGE_WITH_PE, always include.
1109
1110 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
1111
1112 Wed Jun 19 11:37:52 1996 Ian Lance Taylor <ian@cygnus.com>
1113
1114 * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
1115 approximate the correct answer if SIZEOF_HEADERS was not used.
1116
1117 * binary.c (binary_set_section_contents): Set section file
1118 position based on LMA rather than VMA.
1119
1120 Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
1121
1122 * linker.c (_bfd_generic_link_output_symbols): Don't output any
1123 symbols if info->strip == strip_all.
1124
1125 Tue Jun 18 15:17:36 1996 Jeffrey A. Law <law@rtl.cygnus.com>
1126
1127 * coff-h8300.c: Remove #if 0 code.
1128 (compatable): Don't allow mixing/matching of different architectures.
1129
1130 * archures.c (bfd_mach_h8300s): Add.
1131 * bfd-in2.h: Rebuilt.
1132 * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
1133 (BADMAG): Likewise.
1134 (h8300_reloc16_estimate): Likewise.
1135 (h8300_reloc16_extra_cases): Likewise.
1136 (h8300_bfd_link_add_symbols): Likewise.
1137 * coffcode.h (coff_set_arch_mach_hook): Likewise.
1138 (coff_set_flags): Likewise.
1139 * cpu-h8300.c (h8300_scan): Likewise.
1140 Add H8/S to bfd_h8300_arch list.
1141
1142 Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
1143
1144 Added support for Alpha OpenVMS:
1145 * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
1146 * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
1147 * config.h-vms, makefile.vms: New files.
1148 * config.bfd (alpha-*-*vms*): New target.
1149 * configure.in (evax_alpha_vec): New target vector.
1150 * configure: Rebuild.
1151 * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
1152 (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
1153 * targets.c (bfd_target_evax_flavour): Define.
1154 (evax_alpha_vec): Declare.
1155 (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
1156 if BFD64 is defined.
1157 * bfd-in2.h, libbfd.h: Rebuild.
1158 * Makefile.in: Rebuild dependencies.
1159 (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
1160 evax-emh.o, and evax-misc.o.
1161 (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
1162 evax-etir.c, evax-emh.c, and evax-misc.c.
1163 (HFILES): Add evax.h.
1164
1165 Tue Jun 18 13:54:18 1996 Ian Lance Taylor <ian@cygnus.com>
1166
1167 * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
1168 pointer.
1169 (h8300_bfd_link_add_symbols): Likewise.
1170
1171 Mon Jun 17 10:06:50 1996 Jeffrey A. Law <law@rtl.cygnus.com>
1172
1173 * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
1174 * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
1175
1176 Mon Jun 17 12:49:11 1996 Ian Lance Taylor <ian@cygnus.com>
1177
1178 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
1179 for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
1180 created.
1181 (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
1182 R_MIPS_32 relocs if creating a shared library.
1183
1184 Thu Jun 13 20:14:51 1996 Doug Evans <dje@canuck.cygnus.com>
1185
1186 * peicode.h (add_data_entry): Use pei_section_data rather than
1187 _cooked_size. Corresponds to May 13 change in coffcode.h.
1188
1189 Thu Jun 13 10:23:40 1996 Ian Lance Taylor <ian@cygnus.com>
1190
1191 * cofflink.c (_bfd_coff_final_link): Handle long section names.
1192 * coffcode.h (coff_write_object_contents): If there are long
1193 section names, always set the f_symptr field, even if there are no
1194 symbols.
1195 * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
1196 if there are no symbols.
1197
1198 * coffgen.c (make_a_section_from_file): Check return value of
1199 _bfd_coff_read_string_table.
1200 (coff_real_object_p): Check return value of
1201 make_a_section_from_file.
1202 (_bfd_coff_read_string_table): Check that there are some symbols
1203 before trying to read the string table size.
1204
1205 Wed Jun 12 11:16:37 1996 Ian Lance Taylor <ian@cygnus.com>
1206
1207 * xcofflink.c (xcoff_link_add_symbols): When considering whether
1208 to replace a symbol in a dynamic object with a symbol from another
1209 dynamic object, do the replacement if the existing symbol is
1210 global linkage code.
1211
1212 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
1213 for _ptrgl, and treat it as global linkage code.
1214
1215 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
1216 filename or N_SO symbol past the offset, and use it to indicate
1217 that there is no line number or function when appropriate.
1218
1219 Tue Jun 11 15:24:48 1996 Ian Lance Taylor <ian@cygnus.com>
1220
1221 * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
1222 common symbol defined by the linker. Don't export function code
1223 even if export_defineds is set.
1224
1225 Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
1226
1227 * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
1228 and R_JMP_DEL.
1229 (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
1230 (h8300_symbol_address_p): New function.
1231 (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
1232 relaxing.
1233
1234 Sun Jun 9 16:30:20 1996 Jeffrey A Law (law@cygnus.com)
1235
1236 * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
1237 problems.
1238 (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
1239 correctly for the two variants. Allow relaxing if the target
1240 is 128 bytes away since after relaxation it'll be 126 bytes away.
1241 (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
1242 "dot" and "value". Allow relaxing if the target is 128 bytes
1243 away since after relaxation it'll be 126 bytes away.
1244 * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
1245 the given section until nothing changes.
1246
1247 Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
1248
1249 * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
1250 alignment hack--we can get the lnnoptr info another way without
1251 suddenly increasing the alignment requirements. Set the flags for
1252 the _PDATA section.
1253 (ecoff_compute_section_file_positions): Do so.
1254
1255 Thu Jun 6 11:24:37 1996 Ian Lance Taylor <ian@cygnus.com>
1256
1257 * ieee.c (ieee_write_object_contents): Put a timestamp in the file
1258 to keep the HP emulator database happy.
1259
1260 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
1261 From Kevin Buettner <kev@primenet.com>.
1262
1263 Wed Jun 5 15:16:04 1996 Ian Lance Taylor <ian@cygnus.com>
1264
1265 * aoutx.h (translate_to_native_sym_flags): Don't try to print the
1266 name of a NULL section.
1267
1268 Tue Jun 4 18:53:58 1996 Ian Lance Taylor <ian@cygnus.com>
1269
1270 * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
1271 set, always call the notice callback.
1272
1273 * VERSION: Increment for bfdlink.h change.
1274
1275 Mon Jun 3 11:01:53 1996 Ian Lance Taylor <ian@cygnus.com>
1276
1277 * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
1278 (sh_relax_delete_bytes): Correct handling of differently sized
1279 trailing alignment reloc.
1280
1281 * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
1282 * bfd-in2.h: Rebuild.
1283 * configure.in: Warn if there is no known 64 bit type.
1284 * configure: Rebuild.
1285
1286 * Makefile.in: Rebuild dependencies.
1287 (BFD32_BACKENDS): Add ppcboot.o.
1288 (BFD32_BACKENDS_CFILES): Add ppcboot.c.
1289
1290 * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
1291 From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
1292
1293 Sat Jun 1 21:49:58 1996 Ian Lance Taylor <ian@cygnus.com>
1294
1295 * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
1296 (bfd_mips_elf64_swap_reginfo_out): Move from here...
1297 * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
1298 (bfd_mips_elf64_swap_reginfo_out): ...to here.
1299
1300 Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
1301
1302 * elf64-mips.c: Improve reloc special_functions and handling of
1303 SHT_MIPS_OPTIONS section.
1304 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
1305 mips_elf_hi16_reloc and make globally visible.
1306 (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
1307 make globally visible.
1308 (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
1309 make globally visible.
1310 (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
1311 and make globally visible.
1312 (gprel16_with_gp): Check howto->src_mask before using value in
1313 insn.
1314 (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
1315 and make globally visible.
1316 (gprel32_with_gp): Check howto->src_mask before fetching value.
1317 (bfd_mips_elf_swap_options_in): New function.
1318 (bfd_mips_elf_swap_options_out): New function.
1319 (_bfd_mips_elf_set_private_flags): Rename from
1320 mips_elf_set_private_flags and make globally visible.
1321 (_bfd_mips_elf_copy_private_bfd_data): Rename from
1322 mips_elf_copy_private_bfd_data and make globally visible.
1323 (_bfd_mips_elf_merge_private_bfd_data): Rename from
1324 mips_elf_merge_private_bfd_data and make globally visible.
1325 (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
1326 for a SHT_MIPS_OPTIONS section.
1327 (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
1328 (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
1329 name of a SHT_MIPS_OPTIONS section.
1330 (_bfd_mips_elf_set_section_contents): New function.
1331 (mips_elf32_section_processing): Set the GP value in a
1332 SHT_MIPS_OPTIONS section.
1333 (_bfd_mips_elf_find_nearest_line): Rename from
1334 mips_elf_find_nearest_line and make globally visible.
1335 (bfd_elf32_set_section_contents): Define.
1336 * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
1337 (_bfd_mips_elf_lo16_reloc): Declare.
1338 (_bfd_mips_elf_gprel16_reloc): Declare.
1339 (_bfd_mips_elf_got16_reloc): Declare.
1340 (_bfd_mips_elf_gprel32_reloc): Declare.
1341 (_bfd_mips_elf_set_private_flags): Declare.
1342 (_bfd_mips_elf_copy_private_bfd_data): Declare.
1343 (_bfd_mips_elf_merge_private_bfd_data): Declare.
1344 (_bfd_mips_elf_find_nearest_line): Declare.
1345 (_bfd_mips_elf_set_section_contents): Declare.
1346
1347 * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
1348 elf_info_to_howto.
1349 (elf_info_to_howto): Define.
1350 * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
1351 elf_info_to_howto.
1352 (elf_info_to_howto): Define.
1353 * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
1354 elf_info_to_howto.
1355 (elf_info_to_howto): Define.
1356
1357 * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
1358 R_MOV16B[12], to match change in coff/internal.h.
1359
1360 Thu May 30 12:38:49 1996 Ian Lance Taylor <ian@cygnus.com>
1361
1362 * elf64-mips.c: Extensive additions to provide better support for
1363 writing files and for gas.
1364 * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
1365 of mips_elf_object_p.
1366 (mips_elf32_object_p): Rename from mips_elf_object_p; call
1367 _bfd_mips_elf_object_p.
1368 (_bfd_mips_elf_final_write_processing): Rename from
1369 mips_elf_final_write_processing and make globally visible.
1370 (_bfd_mips_elf_fake_sections): Rename from
1371 mips_elf_fake_sections and make globally visible.
1372 (_bfd_mips_elf_section_from_bfd_section): Rename from
1373 mips_elf_section_from_bfd_section and make globally visible.
1374 (_bfd_mips_elf_section_processing): New function, broken out of
1375 mips_elf_section_processing.
1376 (mips_elf32_section_processing): Rename from
1377 mips_elf_section_processing; call
1378 _bfd_mips_elf_section_processing.
1379 (_bfd_mips_elf_symbol_processing): Rename from
1380 mips_elf_symbol_processing and make globally visible.
1381 (_bfd_mips_elf_read_ecoff_info): Rename from
1382 mips_elf_read_ecoff_info and make globally visible.
1383 (mips_elf32_ecoff_debug_swap): Rename from
1384 mips_elf_ecoff_debug_swap.
1385 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
1386 struct symbol_cache_entry.
1387 (_bfd_elf_validate_reloc): New function, moved in from
1388 elfcode.h:validate_reloc.
1389 * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
1390 to _bfd_elf_validate_reloc. Change all callers.
1391 * elf-bfd.h (bfd_section_from_shdr): Declare.
1392 (_bfd_elf_symbol_from_bfd_symbol): Declare.
1393 (_bfd_elf_validate_reloc): Declare.
1394 (_bfd_mips_elf_object_p): Declare.
1395 (_bfd_mips_elf_fake_sections): Declare.
1396 (_bfd_mips_elf_section_from_bfd_section): Declare.
1397 (_bfd_mips_elf_section_processing): Declare.
1398 (_bfd_mips_elf_symbol_processing): Declare.
1399 (_bfd_mips_elf_read_ecoff_info): Declare.
1400 (_bfd_mips_elf_final_write_processing): Declare.
1401 * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
1402 if already defined.
1403
1404 * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
1405 (mips_elf_final_write_processing): Likewise.
1406
1407 Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
1408
1409 64-bit MIPS ELF ABI objdump support:
1410 * elf64-mips.c: New file.
1411 * Makefile.in: Rebuild dependencies.
1412 (BFD64_BACKENDS): Add elf64-mips.o.
1413 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
1414 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
1415 bfd_elf64_littlemips_vec to targ_selvecs.
1416 (mips*-*-elf*): Likewise.
1417 * confingure.in: Add bfd_elf64_bigmips_vec and
1418 bfd_elf64_littlemips_vec to vector switch.
1419 * configure: Rebuild.
1420 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
1421 broken out of mips_elf_section_from_shdr.
1422 (mips_elf32_section_from_shdr): Rename from
1423 mips_elf_section_from_shdr. Call new function.
1424 (elf_backend_section_from_shdr): Update name of renamed function.
1425 * elf-bfd.h (struct elf_size_info): Change second parameter of
1426 write_out_phdrs to be const. Likewise for second parameter of
1427 swap_symbol_out.
1428 (struct bfd_elf_section_data): Add rel_hdr2 field.
1429 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
1430 (bfd_elf32_swap_symbol_out): Likewise.
1431 (bfd_elf32_swap_reloc_in): Likewise.
1432 (bfd_elf32_swap_reloc_out): Likewise.
1433 (bfd_elf32_swap_reloca_in): Likewise.
1434 (bfd_elf32_swap_reloca_out): Likewise.
1435 (bfd_elf32_swap_phdr_in): Likewise.
1436 (bfd_elf32_swap_phdr_out): Likewise.
1437 (bfd_elf32_swap_dyn_in): Likewise.
1438 (bfd_elf32_swap_dyn_out): Likewise.
1439 (bfd_elf32_slurp_symbol_table): Declare.
1440 (bfd_elf32_write_shdrs_and_ehdr): Declare.
1441 (bfd_elf32_write_out_phdrs): Declare.
1442 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
1443 (bfd_elf64_swap_symbol_out): Likewise.
1444 (bfd_elf64_swap_reloc_in): Likewise.
1445 (bfd_elf64_swap_reloc_out): Likewise.
1446 (bfd_elf64_swap_reloca_in): Likewise.
1447 (bfd_elf64_swap_reloca_out): Likewise.
1448 (bfd_elf64_swap_phdr_in): Likewise.
1449 (bfd_elf64_swap_phdr_out): Likewise.
1450 (bfd_elf64_swap_dyn_in): Likewise.
1451 (bfd_elf64_swap_dyn_out): Likewise.
1452 (bfd_elf64_slurp_symbol_table): Declare.
1453 (bfd_elf64_write_shdrs_and_ehdr): Declare.
1454 (bfd_elf64_write_out_phdrs): Declare.
1455 (_bfd_mips_elf_section_from_shdr): Declare.
1456 * elf.c (bfd_section_from_shdr): Remove assertion requiring
1457 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
1458 section for the section, add the new one to rel_hdr2. Increment
1459 reloc_count rather than setting it.
1460 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
1461 Remove static declaration.
1462 (elf_write_shdrs_and_ehdr): Define name as macro.
1463 (elf_write_out_phdrs): Likewise.
1464 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
1465 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
1466 (elf_swap_symbol_in): Change second parameter to be const.
1467 (elf_swap_symbol_out): Likewise.
1468 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
1469 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
1470 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
1471 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
1472 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
1473 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
1474 parameter to be const. Make non-static.
1475 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
1476 Make non-static.
1477 (elf_slurp_symbol_table): Make non-static.
1478 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
1479 * elfxx-target.h (elf_info_to_howto): Define if not defined.
1480 (elf_backend_size_info): Likewise.
1481 (elfNN_bed): Use elf_backend_size_info.
1482 * targets.c (bfd_elf64_bigmips_vec): Declare.
1483 (bfd_elf64_littlemips_vec): Declare.
1484 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
1485 bfd_elf64_littlemips_vec if BFD64 is defined.
1486
1487 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
1488
1489 Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
1490
1491 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
1492 zeroes, in alignment holes.
1493
1494 * configure: Rebuild with autoconf 2.10.
1495
1496 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
1497 potential leading underscore in the allocated buffer.
1498
1499 Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1500
1501 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
1502 symbols into .sbss if this is a relocatable link.
1503
1504 Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
1505
1506 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
1507 undefined symbols when creating a shared library.
1508
1509 Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
1510
1511 * coff-sh.c: Add a bunch of new code and static const arrays to
1512 support aligning loads and stores on four byte memory boundaries.
1513 Also:
1514 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
1515 R_SH_LABEL.
1516 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
1517 call sh_align_loads.
1518 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
1519 as unused.
1520
1521 Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
1522
1523 * cache.c (bfd_open_file): Unlink the file before opening it for
1524 write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
1525
1526 * opncls.c (bfd_fdopenr): Set opened_once.
1527
1528 Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
1529
1530 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
1531 freeing it.
1532
1533 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
1534 the code unconditionally.
1535
1536 Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
1537
1538 * libcoff-in.h (struct pei_section_tdata): Define structure.
1539 (pei_section_data): Define macro.
1540 * libcoff.h: Rebuild.
1541 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
1542 store s_paddr field in pei_section_data.
1543 (coff_compute_section_file_positions): Use pei_section_data rather
1544 than _cooked_size, and don't overwrite an existing value.
1545 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
1546 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
1547 * peicode.h (coff_bfd_copy_private_section_data): Define if
1548 COFF_IMAGE_WITH_PE.
1549 (pe_bfd_copy_private_section_data): New static function if
1550 COFF_IMAGE_WITH_PE.
1551
1552 Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
1553
1554 * srec.c (srec_set_arch_mach): Write as a function rather than a
1555 macro definition.
1556
1557 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
1558 no map, just check each member in turn to see whether it is
1559 required.
1560
1561 Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1562
1563 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
1564 table. Call BFD_ASSERT to validate header size, instead of
1565 calling fatal.
1566 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
1567 name.
1568
1569 Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1570
1571 * ppcboot.c: New target for looking at PPCbug boot records.
1572
1573 * config{ure.in,.bfd}: Add support for ppcboot target.
1574 * targets.c: Ditto.
1575 * configure: Regenerate.
1576
1577 Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
1578
1579 * coff-h8300.c (howto_table): Update names to match recent
1580 changes to include/coff/internal.h. Fix minor errors in the
1581 existing relocs. Add R_MOVL1 and R_MOVL2.
1582 (rtype2howto): Similarly.
1583 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
1584 existing relaxing code and peform more relaxing.
1585 (h8300_reloc16_extra_cases): Likewise.
1586
1587 Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
1588
1589 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
1590 symbols correctly.
1591
1592 Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1593
1594 * elfcode.h (elf_object_p): Reject generic ELF target if
1595 e_machine matches an alternate machine code in a specific backend.
1596
1597 * netbsd-core.c (netbsd_core_vec): Remove initializer for
1598 obsolete align_power_min field.
1599
1600 Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
1601
1602 * coff-h8300.c (reloc_howto_type): Add howto entry for
1603 R_PCRWORD_B.
1604 (rtype2howto): Handle R_PCRWORD_B.
1605 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
1606 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
1607 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
1608 branch (R_PCWORD_B).
1609
1610 Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
1611
1612 * aoutx.h (translate_from_native_sym_flags): Set the section for
1613 BSF_CONSTRUCTOR symbols.
1614
1615 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
1616 last_bf_index.
1617
1618 Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
1619
1620 * coffcode.h (coff_write_object_contents): In comdat section lookup,
1621 stop looking when section is found.
1622
1623 Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
1624
1625 * coffcode.h (STRING_SIZE_SIZE): Define.
1626 (styp_to_sec_flags): Handle long symbol names when looking for the
1627 section symbol.
1628 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
1629 (bfd_coff_long_section_names): Define.
1630 (coff_write_object_contents): Handle long section names.
1631 (bfd_coff_std_swap_table): Initialize new field.
1632 * libcoff.h: Rebuild.
1633 * coffgen.c (make_a_section_from_file): Handle long section
1634 names.
1635 (coff_write_symbols): Handle long section names.
1636 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1637 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1638 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
1639 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
1640 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
1641 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
1642 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
1643 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
1644
1645 * bout.c (b_out_callback): Set lma of sections.
1646 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
1647 parameter to output_bfd. Used input_bfd instead of output_bfd in
1648 several places.
1649
1650 Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
1651
1652 * aoutx.h (translate_from_native_sym_flags): Don't create
1653 SEC_CONSTRUCTOR sections.
1654 * ecoff.c (ecoff_set_symbol_info): Likewise.
1655
1656 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
1657 From Don Bowman <bowman@waterloo.hp.com>.
1658
1659 Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
1660
1661 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
1662 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
1663
1664 Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
1665
1666 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
1667 mips_32_relocs field.
1668 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
1669 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
1670 relocs against a global symbol which is not defined in a regular
1671 file.
1672 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
1673 against a global symbol, increment mips_32_relocs.
1674 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
1675 the symbol is not defined in a regular file, make room in the
1676 .rel.dyn section.
1677
1678 Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
1679
1680 * ecoff.c (ecoff_compute_section_file_positions): Track the real
1681 file position and the virtual file position separately. Set
1682 filepos information bsaed on the real file position.
1683 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
1684 Jan 23 change to coffcode.h.
1685
1686 * som.c (som_slurp_symbol_table): Set the symbol count to the
1687 number of BFD symbols created.
1688
1689 Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1690
1691 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
1692 output file if linking shared objects. Loop to check all relocs,
1693 rather than returning false on first error.
1694
1695 Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1696
1697 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
1698 (ppc_elf_additional_program_headers): If .interp section, bump #
1699 of program headers by 1.
1700 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
1701 (ppc_elf_size_dynamic_sections): Add support for .plt section.
1702 (ppc_elf_check_relocs): Print out filename in debug code. Enable
1703 PLT support.
1704 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
1705 debug output.
1706 (ppc_elf_relocate_section): If the output section isn't defined,
1707 don't abort, just give an error message.
1708
1709 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
1710 being created is .sdata or .sdata2, don't make the symbol dynamic.
1711
1712 Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
1713
1714 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
1715 members of an archive for dynamic objects with no symbols, and
1716 pass them directly to check_archive_element.
1717 (xcoff_link_check_ar_symbols): Pass dynamic objects to
1718 xcoff_link_check_dynamic_ar_symbols.
1719 (xcoff_link_check_dynamic_ar_symbols): New static function.
1720
1721 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
1722 from _bfd_nodynamic to _bfd_xcoff.
1723 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
1724 Declare.
1725 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
1726 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
1727 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
1728 * libcoff.h: Rebuild.
1729 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
1730 (xcoff_get_section_contents): New static function.
1731 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
1732 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
1733 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
1734 (xcoff_dynamic_reloc): New static variable.
1735 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
1736 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
1737
1738 Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
1739
1740 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
1741 if reloc_entry->addend is not 0.
1742 (CALC_ADDEND): Just set the addend to reloc.r_offset.
1743
1744 Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
1745
1746 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
1747 R_SPARC_GLOB_JMP.
1748 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
1749 Add entries for R_SPARC_[56].
1750 (sparc_reloc_map): Add entries for R_SPARC_[56].
1751
1752 Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
1753
1754 Optimize linking of stabs in sections as used in ELF and COFF.
1755 * stabs.c: New file.
1756 * libbfd-in.h (_bfd_link_section_stabs): Declare.
1757 (_bfd_write_section_stabs): Declare.
1758 (_bfd_write_stab_strings): Declare.
1759 * libbfd.h: Rebuild.
1760 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
1761 (struct coff_link_hash_table): Add stab_info field.
1762 * libcoff.h: Rebuild.
1763 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
1764 stab_info field.
1765 (coff_link_add_symbols): Call _bfd_link_section_stabs if
1766 appropriate.
1767 (_bfd_coff_final_link): Write out stab strings hash table.
1768 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
1769 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
1770 hash table.
1771 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
1772 (struct bfd_elf_section_data): Add stab_info field.
1773 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
1774 field.
1775 * elflink.h (elf_link_add_object_symbols): If appropriate, call
1776 _bfd_link_section_stabs.
1777 (elf_bfd_final_link): Write out stab strings hash table.
1778 (elf_link_input_bfd): Handle optimized stabs sections.
1779 * reloc.c (_bfd_final_link_relocate): Check address against
1780 _raw_size rather than _cooked_size.
1781 * Makefile.in: Rebuild dependencies.
1782 (BFD_LIBS): Add stabs.o
1783 (BFD_LIBS_CFILES): Add stabs.c.
1784
1785 * VERSION: Increment for bfdlink.h change.
1786
1787 * coffgen.c (coff_renumber_symbols): Correct handling of
1788 BSF_NOT_AT_END common symbols.
1789
1790 Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
1791
1792 * coff-ppc.c (record_toc): Add cast to avoid warning.
1793 (ppc_allocate_toc_section): Likewise.
1794 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
1795 (ppc_coff_reloc_type_lookup): Remove unreached code.
1796 * coffcode.h (coff_write_object_contents): Don't take the address
1797 of an array.
1798 * peicode.h (pe_print_idata): Add casts to avoid warning.
1799 (pe_print_edata): Likewise.
1800 (pe_print_reloc): Remove ANSI C string concatenation.
1801
1802 Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
1803
1804 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
1805 and last_bf fields.
1806 * libcoff.h: Rebuild.
1807 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
1808 symbols.
1809 (coff_swap_aux_out): Likewise.
1810 * peicode.h (coff_swap_aux_in): Likewise.
1811 (coff_swap_aux_out): Likewise.
1812 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
1813 symbols.
1814 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
1815 field.
1816 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
1817 Fix up .bf endndx link fields.
1818 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
1819 field.
1820 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
1821 symbols.
1822
1823 Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1824
1825 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
1826 on Solaris PowerPC systems doesn't get confused.
1827
1828 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
1829 #ifdef PPC.
1830
1831 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
1832 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
1833 update did_reg and did_reg2.
1834
1835 Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
1836
1837 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
1838
1839 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
1840 callback routines, pass h->root.string rather than name, in case
1841 copy is true and name is transient.
1842
1843 Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
1844
1845 * elfcore.h: Add support for core files with multiple threads.
1846 (Primarily for Solaris.)
1847
1848 Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
1849
1850 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
1851 section->orelocation is NULL.
1852
1853 * coffgen.c (bfd_coff_get_syment): New function.
1854 (bfd_coff_get_auxent): New function.
1855 * bfd-in.h (bfd_coff_get_syment): Declare.
1856 (bfd_coff_get_auxent): Declare.
1857 * bfd-in2.h: Rebuild.
1858
1859 Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
1860
1861 * elf32-mips.c (struct mips_hi16): Define.
1862 (mips_hi16_addr, mips_hi16_addend): Remove.
1863 (mips_hi16_list): New static variable.
1864 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
1865 (mips_elf_lo16_reloc): Process mips_hi16_list.
1866 (mips_elf_relocate_section): Permit an arbitrary number of HI16
1867 relocs before the associated LO16 reloc.
1868
1869 Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
1870
1871 * versados.c (versados_scan): Check bfd_alloc return value.
1872 (versados_object_p): Check all bfd_read return values. Require
1873 that lang field be less than 10, to avoid confusion with Intel Hex
1874 files.
1875
1876 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
1877 aren't any symbols.
1878 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
1879 not 0, for an absolute symbol.
1880 (NAME(aout,swap_ext_reloc_out)): Likewise.
1881
1882 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
1883 (ihex_write_object_contents): For a large start address, output
1884 the full 32 bit address in record type 5.
1885
1886 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
1887 to int to avoid promotion problems in prototype.
1888
1889 Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
1890
1891 * configure.host: Use ${srcdir} when looking for picfrag.
1892
1893 * configure.host: Switch on ${libdir}, not $(libdir). From
1894 alan@spri.levels.unisa.edu.au (Alan Modra).
1895
1896 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
1897 entry point, not just for DYNAMIC objects.
1898 * sunos.c (sunos_add_dynamic_symbols): Always call
1899 sunos_create_dynamic_sections. If called with a non DYNAMIC
1900 object, don't do anything else.
1901 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
1902
1903 Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
1904
1905 * configure.in: Permit --enable-shared to specify a list of
1906 directories.
1907 * configure: Rebuild.
1908
1909 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
1910 host when configuring with --enable-shard.
1911
1912 Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
1913
1914 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
1915 <jdp@polstra.com>.
1916
1917 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
1918 to avoid crashing in bfd_hash_replace.
1919
1920 * sysdep.h: Use #ifdef, not #if.
1921
1922 Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
1923
1924 * config.in: Rebuild.
1925
1926 Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
1927
1928 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
1929 (AC_CHECK_HEADERS): Check for sys/time.h
1930 (AC_HEADER_TIME): Add macro.
1931 * configure: Rebuild.
1932 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
1933 to control what combination of <time> and <sys/time.h>
1934 get included.
1935
1936 Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
1937
1938 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
1939 (aout_32_sunos4_write_object_contents): Likewise.
1940 * aoutx.h (NAME(aout,machine_type)): Handle
1941 bfd_mach_sparc_{sparclet,sparclite}.
1942 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
1943 (bfd_mach_sparc_v9_p): Update.
1944 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
1945 * libaout.h (enum machine_type): Add M_SPARCLET.
1946 * sunos.c (MACHTYPE_OK): Define.
1947 * bfd-in2.h: Regenerated.
1948
1949 Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
1950
1951 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
1952 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
1953 * elflink.c (_bfd_elf_create_got_section): Store the
1954 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
1955 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
1956 global offset table goes over 0x1000, set the value of
1957 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
1958 (elf32_sparc_relocate_section): Subtract the offset of
1959 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
1960
1961 * elfcode.h: Don't include <string.h>.
1962
1963 Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
1964
1965 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
1966 generic_link_hash_newfunc. All references changed.
1967 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
1968 moved here from libbfd-in.h.
1969 * libbfd-in.h: Corresponding changes.
1970 * libbfd.h: Regenerated.
1971
1972 Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
1973
1974 * aoutx.h (aout_link_input_section_std): When reporting an
1975 overflow error, use the name of the symbol in the hash table if
1976 available.
1977 (aout_link_input_section_ext): Likewise.
1978
1979 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
1980 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
1981
1982 Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
1983
1984 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
1985 * coffcode.h (coff_compute_section_file_positions): Likewise.
1986 (coff_write_object_contents): Likewise.
1987
1988 Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
1989
1990 * section.c (SEC_LINK_ONCE): Define.
1991 (SEC_LINK_DUPLICATES): Define.
1992 (SEC_LINK_DUPLICATES_DISCARD): Define.
1993 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
1994 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
1995 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
1996 * bfd-in2.h: Rebuild.
1997 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
1998 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
1999 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
2000 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
2001 SEC_LINK_ONCE, and look through the symbol table for the setting
2002 for SEC_LINK_DUPLICATES.
2003 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
2004 set for a section, find the section symbol in the symbol table,
2005 and set the aux entry based on SEC_LINK_DUPLICATES.
2006 * coffgen.c (coff_print_symbol): Add a space before "checksum".
2007 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
2008 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
2009 * coff-i386.c (i386coff_vec): Likewise.
2010 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
2011
2012 * VERSION: Bump to 2.6.1.
2013 * Makefile.in (stamp-h): Depend upon VERSION.
2014
2015 Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
2016
2017 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
2018 * libbfd.h: Rebuilt.
2019 * linker.c (generic_link_hash_newfunc): No longer static.
2020 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
2021 to override.
2022 * coff-h8300.c: Add two derived hash tables and their associated
2023 funtions and #defines for use by the h8300 linker.
2024 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
2025 the function vector as needed. Place the address of the function
2026 vector entry in the location specified by the R_MEM_INDIRECT reloc.
2027 Rewrite the vectors section contents as necessary.
2028 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
2029 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
2030 (coff_bfd_link_hash_table_create): Likewise.
2031
2032 Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
2033
2034 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
2035 __attribute__ ((__unused__)) so that -Wall doesn't warn about
2036 them.
2037 (hppa_rebuild_insn): Pass pointer to correct type to
2038 low_sign_unext and dis_assemble_21.
2039
2040 Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
2041
2042 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
2043 Stick with sparc-*-{sysv4*,solaris2*}.
2044
2045 Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
2046
2047 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
2048 (coff_swap_aux_out): Swap out extra PE x_scn fields.
2049 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
2050 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
2051 fields is non-zero, print them.
2052
2053 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
2054 ifdef. Remove unused variables.
2055 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
2056 variables.
2057 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
2058 (get_symbol_value): Ifdef out.
2059 (pe_ppc_reloc): Ifdef out. Remove unused variables.
2060 (coff_ppc_relocate_section): Remove unused variables. Make
2061 fprintf strings and argument types correspond. Put before_addr in
2062 DEBUG_RELOC ifdef.
2063 (dump_toc): Make fprintf strings and argument types correspond.
2064 (ppc_process_before_allocation): Remove unused variables. Always
2065 return a value.
2066 (ppc_reflo_reloc): Ifdef out.
2067 (ppc_addr32nb_reloc): Ifdef out.
2068 (ppc_coff_rtype2howto): Make fprintf strings and argument types
2069 correspond.
2070 (coff_ppc_rtype_to_howto): Likewise.
2071 (ppc_coff_swap_sym_in_hook): Remove unused variables.
2072
2073 * peicode.h (pe_print_idata): Move otherwise unused variables into
2074 the #ifdef where they are used. Always return a value.
2075 (pe_print_edata): Make fprintf strings and argument types
2076 correspond. Always return a value.
2077 (pe_print_pdata): Removed unused variable addr_value. Always
2078 return a value.
2079 (pe_print_reloc): Remove unused variable onaline. Make fprintf
2080 strings and argument types correspond. Always return a value.
2081
2082 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
2083 (ppc_elf_finish_dynamic_symbol): Move definition of unused
2084 variable rela inside #if 0 section where it is used.
2085
2086 * ns32k.h: New file.
2087 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
2088 functions to start with _bfd_.
2089 * aout-ns32k.c: Include ns32k.h. Change references to renamed
2090 functions in cpu-ns32k.h.
2091 * Makefile.in: Rebuild dependencies.
2092 (HFILES): Add ns32k.h.
2093
2094 * section.c (struct sec): Add linker_mark field. Change
2095 user_set_vma and reloc_done to be single bit fields.
2096 (STD_SECTION): Update accordingly.
2097 * bfd-in2.h: Rebuild.
2098 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
2099 link.
2100 (aout_link_input_bfd): Don't link unmarked sections.
2101 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
2102 link.
2103 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
2104 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
2105 the link.
2106 * elflink.h (elf_bfd_final_link): Mark sections included in the
2107 link.
2108 (elf_link_input_bfd): Don't link unmarked sections.
2109 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
2110 in the link.
2111 (xcoff_link_input_bfd): Don't link unmarked sections.
2112
2113 * coffswap.h (coff_swap_scnhdr_out): Include section name in
2114 overflow error messages.
2115
2116 Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
2117
2118 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
2119 is not set, print "BFD: " before the error message.
2120
2121 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
2122 Miles Bader <miles@gnu.ai.mit.edu>.
2123 * configure: Rebuild.
2124
2125 Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
2126
2127 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
2128 symbols.
2129
2130 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
2131 m68k-aout, m68k-coff, and m68k-elf targets.
2132
2133 Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
2134
2135 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
2136 (ieee_generic_stat_arch_elt): Restructured to prevent
2137 ieee_object_p from being called repeatedly.
2138
2139 Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
2140
2141 * coffcode.h (coff_write_object_contents): Allocate
2142 buffers large enough for any FILEHDR or AOUTHDR.
2143
2144 Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
2145
2146 * ecofflink.c (lookup_line): New static function, renamed and
2147 slighly changed from old _bfd_ecoff_locate_line.
2148 (_bfd_ecoff_locate_line): Cache line number information. Use
2149 lookup_line for actual lookup.
2150
2151 Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2152
2153 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
2154 multiple of 20 bytes.
2155
2156 Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
2157
2158 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
2159 allocate ecoff_find_line, and don't initialize by hand.
2160 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
2161 mips_elf_find_line, and don't call memset.
2162
2163 * coffcode.h (coff_compute_section_file_positions): If not
2164 producing a final executable, don't consider sofar when aligning
2165 the section to the correct size.
2166
2167 Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
2168
2169 * coffcode.h (coff_add_missing_symbols): Ifdef out.
2170 (coff_write_object_contents): Don't call coff_add_missing_symbols.
2171 * coffgen.c (coff_section_symbol): Ifdef out.
2172
2173 Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
2174
2175 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
2176 output_bfd is not NULL.
2177
2178 Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
2179
2180 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
2181 of bfd_alloc (fixes fix_line not being initialized).
2182 Delete zeroing of fix_{value,tag,end,scnlen} fields.
2183
2184 Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
2185
2186 * coffcode.h: Allow specific backends to override the
2187 bfd_link_add_symbols routine.
2188
2189 * coff-h8300.c: Include genlink.h.
2190 (howto_table): Add R_MEM_INDIRECT.
2191 (rtype2howto): Support R_MEM_INDIRECT.
2192 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
2193 for now.
2194
2195 Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
2196
2197 * coff-alpha.c (alpha_relocate_section): Use
2198 info->callbacks_warning, rather than _bfd_error_handler, for
2199 "multiple gp" warning.
2200
2201 Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
2202
2203 * linker.c (bfd_wrapped_link_hash_lookup): New function.
2204 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
2205 table string. Use bfd_wrapped_link_hash_lookup.
2206 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
2207 table string.
2208 * aoutx.h (aout_link_write_symbols): Use the name from the hash
2209 table, if any, when writing out symbols.
2210 (aout_link_input_section_std): Use the name from the hash table,
2211 if any, when reporting undefined symbols.
2212 (aout_link_input_section_ext): Likewise.
2213 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
2214 * bout.c (get_value): Likewise.
2215 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2216 * ecoff.c (ecoff_reloc_link_order): Likewise.
2217 * elflink.h (elf_link_add_object_symbols): Likewise.
2218 (elf_reloc_link_order): Likewise.
2219 * linker.c (_bfd_generic_link_output_symbols): Likewise.
2220 (_bfd_generic_reloc_link_order): Likewise.
2221 (default_indirect_link_order): Likewise.
2222 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
2223 * sunos.c (sunos_add_one_symbol): Likewise.
2224 * xcofflink.c (xcoff_link_add_symbols): Likewise.
2225 (bfd_xcoff_link_count_reloc): Likewise.
2226 (xcoff_reloc_link_order): Likewise.
2227
2228 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
2229 into -1 for intern->rss.
2230
2231 * configure: Rebuild with autoconf 2.8.
2232
2233 Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
2234
2235 * stab-syms.c (__define_stab_duplicate): Define.
2236 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
2237 switch.
2238 * bfd-in.h (bfd_get_stab_name): Declare.
2239 * bfd-in2.h: Rebuild.
2240 * Makefile.in: Rebuild dependencies.
2241 (BFD_LIBS): Add stab-syms.o.
2242 (BFD_LIBS_CFILES): Add stab-syms.c.
2243 (BFD32_BACKENDS): Remove stab-syms.o.
2244 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
2245 * configure.in: Don't list stab-syms.o in bfd_backends.
2246 * configure: Rebuild.
2247 * libaout.h (aout_stab_name): Don't declare.
2248 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
2249 not aout_stab_name.
2250
2251 Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
2252
2253 * elf.c (assign_file_positions_for_segments): Adjust file offset
2254 for section alignment even if SEC_LOAD is not set.
2255
2256 Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
2257
2258 * configure.in: Don't set SHLIB or SHLINK to an empty string,
2259 since they appear as targets in Makefile.in.
2260 * configure: Rebuild.
2261
2262 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
2263 don't fiddle with a symbol which is not defined anywhere.
2264
2265 Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
2266
2267 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
2268 though they are defined in a shared library.
2269 (xcoff_build_ldsyms): Likewise.
2270
2271 * coffgen.c (coff_find_nearest_line): Don't look at the line
2272 numbers for the section if section->lineno is NULL.
2273
2274 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
2275 message rather than calling BFD_ASSERT.
2276 * elfcode.h (write_relocs): Check return value of
2277 _bfd_elf_symbol_from_bfd_symbol.
2278
2279 Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2280
2281 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
2282 for .sbss section.
2283
2284 Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
2285
2286 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
2287 and R_HPPA_NLRSEL.
2288 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
2289 hppa_reloc_field_selector_type_alt.
2290 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
2291 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
2292 selectors.
2293 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
2294
2295 Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
2296
2297 * elf.c (assign_file_positions_for_segments): Adjust the segment
2298 memory size for the alignment of a SEC_ALLOC section, not just a
2299 SEC_LOAD section.
2300
2301 Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2302
2303 * m68klinux.c: New file.
2304 * hosts/m68klinux.h: New file.
2305 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
2306 * configure.in (m68*-*-linux*): New native host.
2307 (m68klinux_vec): New vector.
2308 * configure: Rebuild.
2309 * targets.c (m68klinux_vec): Declare.
2310 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
2311 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
2312 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
2313 declaration from bfd_linux_size_dynamic_sections.
2314 (bfd_m68klinux_size_dynamic_sections): Declare.
2315 * bfd-in2.h: Rebuild.
2316 * Makefile.in: Rebuild dependencies.
2317 (BFD32_BACKENDS): Add m68klinux.o.
2318 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
2319
2320 Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
2321
2322 * libhppa.h (pa_arch): Add pa20.
2323 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
2324 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
2325 (hppa_field_adjust): Handle e_nsel.
2326 * som.c: Provide default definitions for many new relocs found only
2327 in hpux10 include files.
2328 (som_fixup_formats): Add several new relocs from hpux10.
2329 (som_hppa_howto_table): Add hpux10 relocs.
2330 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
2331
2332 Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
2333
2334 * mpw-make.sed: Edit out recent shared library support, and
2335 rules to rebuild .h files using doc/chew.
2336
2337 Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
2338
2339 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
2340 size even of sections with no contents.
2341
2342 Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
2343
2344 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
2345 starting with '$' the way we skip names starting with '.'. When
2346 updating x_endndx, don't be fooled by an index which has been
2347 merged.
2348
2349 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
2350 struct/union/enum type with no elements.
2351
2352 Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
2353
2354 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
2355
2356 * archive.c (bfd_generic_archive_p): If the first file in the
2357 archive can not be recognized as an object, don't assume that this
2358 is the wrong format.
2359
2360 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
2361 format is not bfd_object.
2362 (bfd_elf_get_dt_soname): Likewise.
2363
2364 Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
2365
2366 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
2367 reloc.
2368
2369 Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
2370
2371 * bfd.c (tdata): Add netbsd_core_data.
2372 * bfd-in2.h: Regenerated.
2373
2374 Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
2375
2376 * sunos.c (SUNOS_CONSTRUCTOR): Define.
2377 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
2378 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
2379 appropriate.
2380
2381 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
2382 to get the symbol index, matching 14 Jul 95 change.
2383
2384 Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
2385
2386 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
2387 Remove duplicate definition of gp.
2388
2389 Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
2390
2391 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
2392 assume that we can set the GP value and then get the same value,
2393 since it won't be true if the output file is neither ELF nor
2394 ECOFF.
2395 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
2396 _bfd_get_gp_value here.
2397 (mips_gprel_reloc): Don't assume we can set and get the GP value.
2398 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
2399 mips_elf_final_gp.
2400 (mips_elf_lo16_reloc): Likewise.
2401 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
2402 Don't require that the BFD be ELF.
2403 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
2404 (mips_elf_gprel32_reloc): Likewise.
2405 (mips_elf_relocate_section): Don't assume we can set and get the
2406 GP value.
2407 (mips_elf_finish_dynamic_symbol): Don't bother to use
2408 _bfd_get_gp_value here.
2409
2410 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
2411 Don't change epdr between malloc and free. Be careful not to free
2412 NULL pointers. Zero out the first RPDR.
2413
2414 * configure.host: On Linux, only pass -rpath option if $(libdir)
2415 is neither /lib nor /usr/lib. From Alan Modra
2416 <alan@mullet.Levels.UniSA.Edu.Au>.
2417
2418 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
2419 dt_name.
2420 (elf_dt_name): Rename from elf_dt_needed_name.
2421 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
2422 elf_dt_needed_name.
2423 (bfd_elf_get_dt_soname): New function.
2424 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
2425 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
2426 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
2427 * bfd-in2.h: Rebuild.
2428
2429 Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
2430
2431 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
2432 _bfd_sparc_elf_reloc_type_lookup.
2433 (bfd_elf32_bfd_reloc_type_lookup): Update.
2434 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
2435 (sparc64_elf_howto_table): Define.
2436 (sparc_reloc_map): Define.
2437 (sparc64_elf_reloc_type_lookup): New function.
2438 (sparc_elf_wdisp16_reloc): New function.
2439 (elf_info_to_howto): Use sparc64_elf_howto_table.
2440 (sparc64_elf_relocate_section): Likewise.
2441 (bfd_elf64_bfd_reloc_type_lookup): Update.
2442
2443 Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
2444
2445 * configure.host: Check for 'do not mix' from native linker before
2446 trying to use -rpath.
2447
2448 Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
2449
2450 * bfd.c (_bfd_get_gp_value): New function.
2451 (_bfd_set_gp_value): New function.
2452 * libbfd-in.h (_bfd_get_gp_value): Declare.
2453 (_bfd_set_gp_value): Declare.
2454 * libbfd.h: Rebuild.
2455 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
2456 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
2457 directly to the fields in the tdata information.
2458 (alpha_relocate_section): Likewise.
2459 * coff-mips.c (mips_adjust_reloc_in): Likewise.
2460 (mips_gprel_reloc): Likewise.
2461 (mips_relocate_section): Likewise.
2462 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
2463 (mips_elf_lo16_reloc): Likewise.
2464 (mips_elf_final_gp): Likewise.
2465 (mips_elf_gprel16_reloc): Likewise.
2466 (mips_elf_gprel32_reloc): Likewise.
2467 (mips_elf_relocate_section): Likewise.
2468 (mips_elf_finish_dynamic_symbol): Likewise.
2469
2470 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
2471
2472 Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
2473
2474 * configure.in: Call AC_PROG_CC before configure.host.
2475 * configure: Rebuild.
2476 * configure.host: Don't set information which autoconf should
2477 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
2478
2479 * configure.host: Remove go32 and win32 host information, since it
2480 should no longer be needed.
2481
2482 * elf.c (map_sections_to_segments): If we have a .dynamic section,
2483 then start a new segment rather than put a writable section in a
2484 readonly segment.
2485
2486 * configure.host: Set RPATH_ENVVAR.
2487
2488 * Makefile.in: Rebuild dependencies.
2489
2490 * elflink.c (_bfd_elf_create_linker_section): Remove unused
2491 zero_section variable.
2492
2493 Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
2494
2495 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
2496 ($(srcdir)/libbfd.h): Rename from libbfd.h.
2497 ($(srcdir)/libcoff.h): Rename from libcoff.h.
2498
2499 Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
2500
2501 * ieee.c (ieee_write_expression): Only use an R variable for a
2502 local symbol. Don't output a zero offset. Handle a zero address.
2503 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
2504 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
2505 PCREL_OFFSET.
2506 (parse_expression): Don't try to handle multiple occurrences of a
2507 P variable. Handle I variables differently from X variables. Fix
2508 the order of minus expressions.
2509 (ieee_slurp_external_symbols): Generate an I variable for an NN
2510 record. Fix handling of ATI and ATX records.
2511 (ieee_slurp_sections): Only set minimal section attributes.
2512 Adjust them later, based on the section contents.
2513 (ieee_object_p): Read in the file until just after the ME record.
2514 Call ieee_slurp_section_data to set the section flags.
2515 (do_one): Add iterations parameter. Only repeat the first load
2516 item. Set the section and file reloc flags.
2517 (ieee_slurp_section_data): Set section flags. Pass iterations to
2518 do_one.
2519 (ieee_canonicalize_reloc): Handle I variables.
2520 (do_with_relocs): Only emit relocation size when necessary.
2521 Increase MAXRUN to 127. Change ov to be assigned, and take
2522 src_mask and pcrel_offset into account.
2523 (ieee_write_data_part): Skip sections that are not loaded.
2524 (ieee_write_external_part): Don't output optional last entry of WX
2525 records.
2526 (ieee_write_me_part): Make setting of me_record neater.
2527 (ieee_generic_stat_arch_elt): Get the size of an archive element.
2528
2529 * syms.c (stt): Add entries for zerovars, vars, and code.
2530
2531 * elfcode.h (validate_reloc): New static function.
2532 (write_relocs): Call validate_reloc for non ELF relocs.
2533
2534 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
2535 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
2536 (TARGET_LITTLE_SYM): Likewise.
2537
2538 * config.bfd (m68*-*-psos*): New target.
2539
2540 Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
2541
2542 * i386msdos.c: Remove some #if 0 code.
2543 (msdos_write_object_contents): Don't include empty sections in the
2544 size computation, regardless of their address.
2545
2546 Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2547
2548 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
2549 is NULL, ie, the -r switch is used.
2550
2551 Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
2552
2553 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
2554 (BFD_RELOC_MIPS_GOT_LO16): Define.
2555 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
2556 * bfd-in2.h, libbfd.h: Rebuild.
2557 * elf32-mips.c (mips_reloc_map): Map new relocs.
2558
2559 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
2560
2561 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
2562 $(SHLINK).
2563
2564 * ieee.c (get_symbol): Set the section to bfd_abs_section.
2565 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
2566 simple number for the section address, rather than an expression.
2567 Limit the number of bytes between relocs to MAXRUN.
2568 (ieee_write_me_part): Set me_record to the file offset after the
2569 start address.
2570 (ieee_write_processor): New static function.
2571 (ieee_write_object_contents): Use ieee_write_processor.
2572
2573 Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
2574
2575 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
2576
2577 * coff-aux.c: Change include of aux.h to aux-coff.h.
2578
2579 Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2580
2581 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
2582 relocation put the addend both in the reloc entry and the data.
2583 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
2584 GOT offset value.
2585
2586 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
2587 a R_68K_PCxx reloc against a defined global symbol directly.
2588 (elf_m68k_check_relocs): Don't count such a reloc.
2589
2590 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
2591 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
2592 symbol for now, otherwise always record the symbol as dynamic.
2593 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
2594 is not referenced by a dynamic object, and we are not making a
2595 shared object, then don't make a PLT entry. If we do make a PLT
2596 entry, make sure the symbol has been recorded as dynamic.
2597
2598 Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
2599
2600 * configure.host: When making a shared library, set HLDFLAGS to
2601 pass an appropriate -rpath option. Use the make variable SONAME
2602 as the shared library soname, rather than computing it here. On
2603 SunOS, build stamp-tshlink in place of $(SHLINK).
2604 * Makefile.in (SONAME): New variable.
2605 ($(SHLINK)): Make a link to the transformed name, as well.
2606 (stamp-tshlink): New target.
2607 (install): Skip stamp-tshlink during install.
2608
2609 Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2610
2611 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
2612 linker sections have been set up yet.
2613
2614 * elf.c (make_mapping): Add an additional argument to suppress
2615 making the first section include the program headers.
2616 (map_sections_to_segments): If the user used -Ttext such that the
2617 program headers are on a different page, do not set the flags
2618 saying that this section includes the program headers.
2619
2620 Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
2621
2622 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
2623 don't define TRAD_HEADER.
2624 * configure: Rebuild.
2625
2626 * netbsd-core.c: New file, support for NetBSD core files.
2627 * hosts/*nbsd.h: Removed.
2628
2629 Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
2630
2631 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
2632 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
2633 * libbfd.h, bfd-in2.h: Regenerated.
2634 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
2635 bfd_elf32_bfd_reloc_type_lookup.
2636 (reloc_type{,_names}): Deleted.
2637 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
2638 Add sparc64 relocs.
2639 (sparc_reloc_map): Add sparc64 relocs.
2640 (sparc_elf_notsupported_reloc): New static function.
2641 (sparc_elf_wdisp16_reloc): New static function.
2642 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
2643 (elf32_sparc_relocate_section): Likewise.
2644 (bfd_elf32_bfd_reloc_type_lookup): Define.
2645 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
2646 (reloc_type{,_names}): Deleted.
2647 (elf_sparc_howto_table): Deleted.
2648 (sparc_reloc_map): Deleted.
2649 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
2650 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
2651
2652 Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
2653
2654 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
2655 *-*-hpux* host.
2656
2657 * Makefile.in (program_transform_name): New variable.
2658 (install): Transform library name before installing it.
2659
2660 Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
2661
2662 * archures.c (bfd_mach_i960_hx): Define.
2663 * bfd-in2.h: Rebuild.
2664 * cpu-i960.c (scan_960_mach): Accept machine "hx".
2665 (MATRIX): Expand entries for HX.
2666 (arch_info_struct): Add i960:hx entry.
2667 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
2668 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
2669 (coff_set_flags): Handle bfd_mach_i960_hx.
2670
2671 Support for building as a shared library, based on patches from
2672 Alan Modra <alan@spri.levels.unisa.edu.au>:
2673 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
2674 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
2675 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
2676 * configure: Rebuild.
2677 * configure.host: If --enable-shared, adjust shared library stuff
2678 based on the host. If the host is SunOS, and the linker supports
2679 -rpath, set HLDFLAGS to use it.
2680 * Makefile.in (ALLLIBS): New variable.
2681 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
2682 (COMMON_SHLIB, SHLINK): New variables.
2683 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
2684 (STAGESTUFF): Remove variable.
2685 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
2686 $(TARGETLIB).
2687 (stamp-ofiles): New target, like old ofiles target, but build
2688 using a temporary file and move-if-change, and touch stamp-ofiles
2689 when done.
2690 (ofiles): Just depend upon stamp-ofiles.
2691 (stamp-piclist, piclist): New targets.
2692 ($(SHLIB), $(SHLINK)): New targets.
2693 (targets.o, archures.o): Build twice if PICFLAG is set.
2694 (do_mostlyclean): Remove pic/*.o.
2695 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
2696 stamp-piclist.
2697 (do_distclean): Remove pic and stamp-picdir.
2698 (install): Install shared libraries.
2699 ($(OFILES)): Depend upon stamp-picdir.
2700 (stamp-picdir): New target.
2701
2702 * libcoff-in.h: Add comment reminding people that libcoff.h is a
2703 generated file.
2704 * libcoff.h: Rebuild.
2705
2706 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
2707 flavour of a section with no owner.
2708
2709 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
2710 ELF_LINK_NON_ELF flag.
2711 (mips_elf_create_got_section): Likewise.
2712
2713 * elf.c: Revert last change, since it breaks dynamic linking.
2714 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
2715 field.
2716 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
2717 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
2718 (elfNN_bed): Don't initialize want_hdr_in_seg field.
2719
2720 Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2721
2722 * elf.c (assign_file_positions_for_segments): If the backend does
2723 not want the elf header or the program headers in the address
2724 space, do not include them in the calculations.
2725
2726 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
2727 function to determine if we need additional program headers.
2728 (ppc_elf_modify_segment_map): Define as a NOP function for now.
2729 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
2730
2731 Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
2732
2733 * coffcode.h: Move today's libcoff.h change into coffcode.h.
2734
2735 Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
2736
2737 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
2738 back into one line. Some compilers (sunos 4.1.3 for example)
2739 won't accept args split across more than one line.
2740
2741 Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
2742
2743 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
2744 * configure: Regenerate.
2745
2746 Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
2747
2748 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
2749 try to do arithmetic on a void *, cast it to a unsigned char * first.
2750
2751 Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
2752
2753 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
2754 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
2755 ELF_LINK_NON_ELF.
2756 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
2757 flag for a newly defined symbol.
2758 (NAME(bfd_elf,record_link_assignment)): Likewise.
2759 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
2760 set the DEF or REF_REGULAR flags correctly.
2761
2762 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
2763 (libbfd.h, libcoff.h): Corresponding change.
2764
2765 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
2766 a PLT32 reloc as dynamic.
2767 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
2768 is not referenced by a dynamic object, and we are not making a
2769 shared object, then don't make a PLT entry. If we do make a PLT
2770 entry, make sure the symbol has been recorded as dynamic.
2771
2772 Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
2773
2774 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
2775 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
2776 (powerpcle-*-cygwin32): New.
2777 * peicode.h (add_data_entry): Get address from vma.
2778
2779 Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2780
2781 * elflink.c (_bfd_elf_create_linker_section): If the symbol
2782 attached to the section has already been created as an undefined
2783 symbol, treat it as if it hasn't been created yet.
2784
2785 Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
2786
2787 * elflink.h (elf_bfd_final_link): Don't output initial dummy
2788 symbol or section symbols if stripping all symbols and this is not
2789 a relocateable link. Don't output the symbol string table if
2790 there are no symbols.
2791 (elf_link_flush_output_syms): Don't do anything if there are no
2792 symbols to flush.
2793
2794 Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
2795
2796 * coff-aux.c: New file.
2797 * hosts/m68kaux.h: New file.
2798 * config.bfd (m68*-apple-aux*): New target.
2799 * configure.in (m68*-apple-aux*): New native host.
2800 (m68kaux_coff_vec): New vector.
2801 * configure: Rebuild.
2802 * targets.c (m68kaux_coff_vec): Declare.
2803 * coffcode.h (bfd_coff_backend_data): Add field
2804 _bfd_coff_link_add_one_symbol.
2805 (bfd_coff_link_add_one_symbol): Define.
2806 (compare_arelent_ptr): New static function if TARG_AUX.
2807 (coff_write_relocs): If TARG_AUX, sort the relocs.
2808 (coff_write_object_contents): Set A/UX aouthdr magic number.
2809 (coff_link_add_one_symbol): Define if not defined.
2810 (bfd_coff_std_swap_table): Initialize new field.
2811 * libcoff.h: Rebuild.
2812 * cofflink.c (coff_link_add_symbols): Call
2813 bfd_coff_link_add_one_symbol rather than
2814 _bfd_generic_link_add_one_symbol.
2815 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
2816 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
2817 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2818 * Makefile.in: Rebuild dependencies.
2819 (BFD32_BACKENDS): Add coff-aux.o.
2820 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
2821
2822 Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2823
2824 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
2825 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
2826
2827 Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
2828
2829 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
2830 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
2831 (maintainer-clean): Warn about deleting special files.
2832 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
2833
2834 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
2835 warning symbols correctly.
2836 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2837 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2838 * elf32-mips.c (mips_elf_relocate_section): Likewise.
2839 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2840 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2841 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2842
2843 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
2844 warnings.
2845
2846 Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
2847
2848 * libcoff-in.h: aligned newly exported names with bfd naming
2849 conventions. Removed an erroneous define of POWERPC_LE_PE.
2850 * libcoff.h: Rebuild.
2851 * cofflink.c, coff-ppc.c: the above function name changes
2852
2853 Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
2854
2855 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
2856 * ecoff.c (struct extsym_info): Define.
2857 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
2858 to ecoff_link_write_external.
2859 (ecoff_link_write_external): Accept a struct extsym_info pointer.
2860 Strip symbols when appropriate.
2861
2862 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
2863 * syms.c (BSF_OBJECT): Define.
2864 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
2865 * bfd-in2.h: Rebuild.
2866 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
2867 STT_OBJECT symbol.
2868 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
2869 is set.
2870
2871 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
2872 copying relocs into a shared object, treat a defined global symbol
2873 as a local symbol.
2874 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2875 * elf32-mips.c (mips_elf_relocate_section): Likewise.
2876 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2877
2878 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
2879 real defined symbol, not to a weak defined symbol.
2880
2881 Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
2882
2883 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
2884 and made a few static functions externs.
2885
2886 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
2887 POWERPC_LE_PE hack in cofflink.
2888
2889 * libcoff-in.h: promoted the following from cofflink.c to allow
2890 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
2891 coff_debug_merge_element, struct coff_debug_merge_type,
2892 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
2893 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
2894 coff_debug_merge_hash_lookup, coff_link_section_info,
2895 coff_final_link_info, coff_debug_merge_hash_newfunc,
2896 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
2897
2898 * libcoff.h: re-gen'd
2899
2900 Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
2901
2902 * syms.c: Include "bfdlink.h".
2903 (struct stab_find_info): Define.
2904 (_bfd_stab_section_find_nearest_line): New function.
2905 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
2906 * libbfd.h: Rebuild.
2907 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
2908 * elf.c (_bfd_elf_find_nearest_line): Try calling
2909 _bfd_stab_section_find_nearest_line before searching the ELF
2910 symbol table. Find the closest STT_FUNC symbol, not the last one.
2911 * libcoff-in.h (coff_data_type): Add line_info field.
2912 * libcoff.h: Rebuild.
2913 * coffgen.c (coff_find_nearest_line): Try calling
2914 _bfd_stab_section_find_nearest_line before searching the COFF
2915 symbol table.
2916 * Makefile.in: Rebuild dependencies.
2917
2918 Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2919
2920 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
2921 4 bytes, so we get the correct value when updating the register
2922 field in little endian mode.
2923
2924 Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
2925
2926 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
2927 entry_section fields. Add sntoc and snentry fields.
2928 * libcoff.h: Rebuild.
2929 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
2930 not toc_section and entry_section (the COFF file does not have any
2931 sections at this point).
2932 (coff_write_object_contents): Set o_snentry and o_sntoc from
2933 snentry and sntoc rather than entry_section and toc_section.
2934 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
2935 snentry, not toc_section and entry_section.
2936 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
2937 entry_section from hentry.
2938 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
2939 set snenty.
2940 (xcoff_link_input_bfd): Set sntoc, not toc_section.
2941 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
2942 than using toc_section directly.
2943
2944 * archures.c: Add missing `.' in enum bfd_architecture.
2945 * bfd-in2.h: Rebuild.
2946
2947 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
2948 Robert Lipe <robertl@arnet.com>.
2949
2950 Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2951
2952 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
2953 to sections we allocate. Use bfd_zalloc to allocate initialial
2954 sections, not bfd_alloc.
2955 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
2956 SDA{,2}I16 relocations.
2957 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
2958 whether to put something in .sbss or not.
2959 (ppc_elf_relocate_section): Add support for more relocations. Add
2960 in sec->output_offset where appropriate. Make error messages
2961 include the symbol name.
2962
2963 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
2964 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
2965 doesn't get redefined messages if -shared.
2966
2967 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
2968 section if the rel_section field has been set up.
2969
2970 Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2971
2972 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
2973 relocations.
2974
2975 Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
2976
2977 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
2978 of flags, only flags used are controlled by mach number. Bump up
2979 output file mach number to highest of input file mach numbers.
2980 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
2981 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
2982
2983 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
2984 bfd_elf64_sparc_vec support.
2985
2986 Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2987
2988 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
2989 the embedded bit is set on some objects and not on others. Just
2990 or it together.
2991 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
2992 relocations.
2993
2994 Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
2995
2996 * coffcode.h (coff_new_section_hook): Don't try to align the
2997 .stabstr section.
2998
2999 * coffcode.h (coff_set_section_contents): Fix the handling of the
3000 .lib section to work even if the entire section contents are
3001 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
3002 Robert Lipe <robertl@arnet.com>.
3003
3004 Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3005
3006 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
3007 memory here for contents.
3008
3009 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
3010 _SDA2_BASE_ by 32768.
3011 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
3012 started using. Allocate contents for .sdata and .sdata2 sections
3013 also.
3014 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
3015 rather than _name.
3016 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
3017 size _SDA{,2}_BASE_.
3018 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
3019 done.
3020
3021 Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
3022
3023 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
3024
3025 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
3026 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
3027 (bfd_mach_sparc_v9a): Define.
3028 (bfd_mach_sparc_v9_p): Define.
3029 * bfd-in2.h: Regenerated.
3030 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
3031 bfd_mach_sparc_v9.
3032 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
3033 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
3034 to bfd_elf32_sparc_vec.
3035 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
3036 Add v8plus{,a} support.
3037 Add v9a support.
3038 (sparc_compatible): New function.
3039 * elf32-sparc.h: #include "elf/sparc.h".
3040 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
3041 elf32_sparc_final_write_processing): New functions.
3042 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
3043 elf_backend_final_write_processing): Define.
3044
3045 Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3046
3047 * elf-bfd.h (struct elf_link_hash_entry): Add
3048 linker_section_pointer field.
3049 (enum elf_linker_section_enum): Enumeration for new way of
3050 creating linker dynamic sections and symbols.
3051 (elf_linker_section{,_pointers}): New structures for creating
3052 dynamic sections and symbols.
3053 (elf_obj_tdata): Add linker_section_pointers and linker_section
3054 fields.
3055 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
3056 (_bfd_elf_create_linker_section): New declarations.
3057 (_bfd_elf_find_pointer_linker_section): Ditto.
3058 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
3059 (_bfd_elf_make_linker_section_rela): Ditto.
3060
3061 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
3062
3063 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
3064 (ppc_elf_create_linker_section): New function to create the
3065 sections .got, .sdata, and .sdata2.
3066 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
3067 needed.
3068 (ppc_elf_check_relocs): Support more of the eabi relocations.
3069 (ppc_elf_relocate_section): Ditto.
3070 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
3071 if the .sdata{,2} + .sbss{,2} section size is > 32k.
3072
3073 * elflink.h (elf_create_pointer_linker_section): New function to
3074 create initialized pointers in dynamic linker sections.
3075 (elf_finish_pointer_linker_section): Actually intialize the
3076 pointers created above.
3077
3078 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
3079 macros to provide both 32 and 64 bit versions of
3080 elf_create_pointer_linker_section.
3081 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
3082 provide both 32 and 64 bit versions of
3083 elf_finish_pointer_linker_section.
3084
3085 * elflink.c (_bfd_elf_create_linker_section): New function to
3086 create a linker section.
3087 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
3088 given address in the linker pointer offsets created for a given
3089 symbol.
3090 (_bfd_elf_make_linker_section_rela): Make a RELA section
3091 corresponding to the generated linker section.
3092
3093 Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
3094
3095 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
3096
3097 Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
3098
3099 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
3100 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
3101 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
3102 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
3103 toc entry in an objdump) for now.
3104 (ppc_do_last, ppc_get_last): New function - needed to save processing
3105 the toc owner to the end.
3106 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
3107 toc owner last.
3108
3109 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
3110 toc owner from being done till last. Must define POWERPC_LE_PC
3111 to enable it.
3112
3113 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
3114
3115 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
3116 to INFO.
3117 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
3118 SizeOfImage for PowerPC. Ignore the size of the .junk section.
3119
3120 Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
3121
3122 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
3123
3124 Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
3125
3126 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
3127 back to first.
3128 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
3129
3130 Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
3131
3132 * elf.c (assign_file_positions_for_segments): Don't increment file
3133 offset for a segment which contains no loadable sections.
3134
3135 Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3136
3137 * reloc.c: Add new PowerPC relocations.
3138 * {bfd-in2,libbfd}.h: Regenerate.
3139
3140 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
3141 (ppc_elf_reloc_type_lookup): Lookup new relocations.
3142
3143 Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
3144
3145 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
3146 entries.
3147
3148 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
3149 info->shared.
3150
3151 * coffgen.c (coff_find_nearest_line): Don't try to cache
3152 information in sections that are not owned by a BFD. From Richard
3153 Henderson <richard@atheist.tamu.edu>.
3154
3155 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
3156 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
3157 * elflink.h (elf_link_output_extsym): Remove special check for
3158 _rld_new_interface.
3159
3160 * ecoffswap.h: Add prototypes for static functions.
3161
3162 Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3163
3164 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
3165 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
3166 references.
3167 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
3168 to satisfy a TOC16 relocation. Rewrite unsupported relocation
3169 support. Begin support for R_PPC_SDA{2,}REL.
3170
3171 Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3172
3173 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
3174 create the .got and .got.neg sections.
3175 (ppc_elf_size_dynamic_sections): Call it.
3176 (ppc_elf_check_relocs): Call it.
3177 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
3178 (ppc_elf_check_relocs): Add error messages for relocations we
3179 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
3180 relocation.
3181
3182 Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3183
3184 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
3185 section flags for V.4 and eabi.
3186
3187 Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
3188
3189 * elf.c (assign_file_positions_for_segments): If a segment
3190 contains no sections, don't mark it as readable.
3191
3192 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
3193 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
3194
3195 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
3196 dynamic section, if there is one.
3197 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
3198 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
3199 (bfd_elf64_swap_dyn_in): Likewise.
3200 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
3201 PTR.
3202 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
3203
3204 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
3205 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
3206 <pirker@eiunix.tuwien.ac.at>.
3207
3208 Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3209
3210 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
3211 PowerPC V.4 and eabi.
3212 * bfd-in2.h: Regenerate.
3213 * libfd.h: Regenerate.
3214
3215 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
3216
3217 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
3218 section type and SHF_EXCLUDE section flag, turning them into the
3219 appropriate bfd section flag.
3220
3221 Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
3222
3223 * xcofflink.c (xcoff_link_add_symbols): Create the special
3224 sections if we see a DYNAMIC object, in case that is the only
3225 XCOFF input object we see.
3226
3227 * elf32-mips.c: Extensive changes for a start at dynamic linking
3228 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
3229
3230 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
3231 (struct elf_backend_data): Remove
3232 elf_backend_create_program_headers field. Add
3233 elf_backend_additional_program_headers and
3234 elf_backend_modify_segment_map fields.
3235 * elfxx-target.h (elf_backend_type_change_ok): Define if not
3236 defined.
3237 (elf_backend_additional_program_headers): Likewise.
3238 (elf_backend_modify_segment_map): Likewise.
3239 (elf_backend_create_program_headers): Don't define.
3240 (elfNN_bed): Change to account for field changes.
3241 * elf.c (assign_file_positions_for_segments): Call new
3242 modify_segment_map backend function. Don't call old
3243 create_program_headers backend function.
3244 (get_program_header_size): Call additional_program_headers rather
3245 than create_program_headers.
3246 * elflink.h (elf_link_add_object_symbols): Initialize
3247 type_change_ok from new backend field.
3248 (elf_link_output_extsym): Don't warn if _rld_new_interface is
3249 defined.
3250 (elf_reloc_link_order): Treat a reloc against a defined symbol as
3251 a reloc against the appropriate section.
3252
3253 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
3254 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
3255 (elf_flags_init): Rename from elf_ppc_flags_init.
3256 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
3257 elf_ppc_flags_init.
3258 (ppc_elf_copy_private_bfd_data): Likewise.
3259 (ppc_elf_merge_private_bfd_data): Likewise.
3260
3261 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
3262 relocation entries.
3263
3264 Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
3265
3266 * coff-alpha.c (alpha_relocate_section): During final link, allow
3267 output .lita section to be bigger than 64k by adjusting gp value
3268 on a per-input section basis.
3269 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
3270 field.
3271 (struct ecoff_section_tdata): Add gp field.
3272
3273 Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
3274
3275 Handle Alpha ECOFF changes in OSF/1 3.2.
3276 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
3277 field.
3278 * coff-alpha.c: Include "aout/ar.h".
3279 (alpha_ecoff_get_relocated_section_contents): Don't require an
3280 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
3281 3.2 doesn't generate one.
3282 (alpha_relocate_section): Likewise.
3283 (alpha_ecoff_slurp_armap): Define.
3284 (alpha_ecoff_slurp_extended_name_table): Define.
3285 (alpha_ecoff_construct_extended_name_table): Define.
3286 (alpha_ecoff_truncate_arname): Define.
3287 (alpha_ecoff_write_armap): Define.
3288 (alpha_ecoff_generic_stat_arch_elt): Define.
3289 (alpha_ecoff_update_armap_timestamp): Define.
3290 (ARFZMAG): Define.
3291 (alpha_ecoff_read_ar_hdr): New static function.
3292 (alpha_ecoff_get_elt_at_filepos): New static function.
3293 (alpha_ecoff_openr_next_archived_file): New static function.
3294 (alpha_ecoff_get_elt_at_index): New static function.
3295 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
3296 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
3297 _bfd_ecoff to alpha_ecoff.
3298 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
3299 field from backend structure, rather than always calling
3300 _bfd_get_elt_at_filepos.
3301 * coff-mips.c (mips_ecoff_backend_data): Initialize
3302 get_elt_at_filepos field.
3303 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
3304 from _bfd_generic_read_ar_hdr with minor changes.
3305 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
3306 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
3307 * libbfd.h: Rebuild.
3308
3309 * bfd-in.h (BFD_IN_MEMORY): Define.
3310 * libbfd-in.h (struct bfd_in_memory): Define.
3311 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
3312 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
3313 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
3314 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
3315 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
3316 (bfd_get_size): Handle BFD_IN_MEMORY flag.
3317 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
3318 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
3319 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
3320 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
3321 iostream.
3322 (bfd_openstreamr): Likewise.
3323 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
3324 BFD_IN_MEMORY is not set.
3325 * riscix.c (riscix_some_aout_object_p): Likewise.
3326 * bfd-in2.h, libbfd.h: Rebuild.
3327
3328 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
3329 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
3330 (bfd_get_elt_at_index): Define.
3331 * archive.c (_bfd_generic_get_elt_at_index): Rename from
3332 bfd_get_elt_at_index. Change index parameter from int to
3333 symindex.
3334 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
3335 (_bfd_noarchive_get_elt_at_index): Define.
3336 (_bfd_archive_bsd_get_elt_at_index): Define.
3337 (_bfd_archive_coff_get_elt_at_index): Define.
3338 * bfd-in2.h, libbfd.h: Rebuild.
3339 * aout-target.h (MY_get_elt_at_index): Define if not defined.
3340 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
3341 * ieee.c (ieee_get_elt_at_index): Define.
3342 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
3343 * oasys.c (oasys_get_elt_at_index): Define.
3344 * som.c (som_get_elt_at_index): Define.
3345
3346 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
3347 numbers to the .text section.
3348
3349 Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
3350
3351 * ieee.c (ieee_write_debug_part): Change return type to boolean.
3352 If there is a SEC_DEBUGGING section, get the contents of the debug
3353 information part from it.
3354 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
3355 section in memory.
3356 (ieee_write_object_contents): Check ieee_write_debug_part return.
3357
3358 Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
3359
3360 * config.bfd (i[345]86-*-freebsd*): Add target.
3361 * configure.in (i386freebsd_vec): Add vec.
3362 * configure: Regenerate.
3363 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
3364 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
3365 Rebuild dependencies..
3366 * freebsd.h: New file.
3367 * i386freebsd.c: New file.
3368 * targets.c (i386freebsd_vec): Declare.
3369 (bfd_target_vector): Add i386freebsd_vec.
3370 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
3371 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
3372
3373 Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
3374
3375 * ieee.c (ieee_slurp_debug): New static function.
3376 (ieee_object_p): Call it.
3377 (ieee_slurp_section_data): Skip debugging sections.
3378 (ieee_get_reloc_upper_bound): Likewise.
3379 (ieee_get_section_contents): Likewise.
3380 (ieee_canonicalize_reloc): Likewise.
3381 (ieee_write_section_part): Likewise.
3382 (ieee_write_debug_part): Likewise.
3383 (ieee_write_data_part): Likewise.
3384 (init_for_output): Likewise.
3385
3386 Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
3387
3388 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
3389 work.
3390 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
3391 relocs, since ppc_elf_relocate_section handles the linker case.
3392 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
3393 used.
3394 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
3395 ppc_elf_relocate_section since that is now the only caller.
3396 (ppc_elf_relocate_section): Ditto.
3397
3398 Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
3399
3400 * coffcode.h (coff_write_object_contents): If we don't know the
3401 section of the entry point for an XCOFF executable, always set the
3402 entry address to -1.
3403
3404 Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3405
3406 * elf.c (bfd_section_from_shdr): Add support for note sections.
3407
3408 Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
3409
3410 * bfd-in.h (struct _symbol_info): Add stab_type field.
3411 * bfd-in2.h: Rebuild.
3412 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
3413
3414 * elf32-ppc.c: Remove trailing newline from calls to
3415 _bfd_error_handler.
3416 (ppc_elf_merge_private_bfd_data): Only warn about endianness
3417 difference if target endianness is known.
3418
3419 Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3420
3421 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
3422 old style TOC16 references without using R_PPC_GOT.
3423 (ppc_reloc_type): Ditto.
3424 (ppc_elf_reloc_type_lookup): Add support for TOC16.
3425 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
3426 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
3427 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
3428 (ppc_elf_check_relocs): New function for GOT/PLT support that is
3429 work in progress.
3430 (ppc_elf_adjust_dynamic_symbol): Ditto.
3431 (ppc_elf_adjust_dynindx): Ditto.
3432 (ppc_elf_size_dynamic_sections): Ditto.
3433 (ppc_elf_finish_dynamic_symbol): Ditto.
3434 (ppc_elf_finish_dynamic_sections): Ditto.
3435 (ELF_DYNAMIC_INTERPRETER): Define.
3436
3437 Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
3438
3439 * elf.c (copy_private_bfd_data): When attaching sections to
3440 segments ignore sections that won't be allocated. Patch from
3441 Andreas Schwab.
3442
3443 Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
3444
3445 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
3446 anything else.
3447
3448 Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
3449
3450 * coff-i960.c (CALC_ADDEND): Define.
3451 (coff_i960_relocate_section): Add the input section VMA to the
3452 addend for PC relative relocs.
3453
3454 Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
3455
3456 * peicode.h (pe_print_pdata): Must test the entire entry for zero
3457 to correctly terminate.
3458
3459 Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
3460
3461 * targets.c (enum bfd_endian): Define.
3462 (bfd_target): Rename byteorder_big_p to byteorder, and change it
3463 from boolean to enum bfd_endian. Change header_byteorder_big_p
3464 correspondingly.
3465 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
3466 (bfd_header_big_endian, bfd_header_little_endian): New macros.
3467 * bfd-in2.h: Rebuild.
3468 * All targets: Change initialization of byteorder and
3469 header_byteorder to use enum bfd_endian values rather than
3470 booleans.
3471 * All files: Change all references to byteorder_big_p and
3472 header_byteorder_big_p to use new bfd_*_endian macros.
3473
3474 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
3475 s_vaddr.
3476 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
3477 vma.
3478 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
3479
3480 Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
3481
3482 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
3483
3484 Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
3485
3486 * ieee.c: Lots of minor cleanups. Make many functions return
3487 errors rather than calling abort. Also:
3488 (ieee_write_twobyte): Remove; change callers to call existing
3489 ieee_write_2bytes function.
3490 (ieee_write_expression): Don't output the section twice when
3491 outputting a local symbol. Don't emit an extraneous zero if there
3492 is only one term.
3493 (ieee_slurp_sections): Set the lma as well as the vma.
3494 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
3495
3496 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
3497 a recognized one or bfd_arch_unknown.
3498 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
3499 to succeed.
3500 (ihex_get_symtab): Likewise.
3501
3502 Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
3503
3504 * aoutx.h: Include <ctype.h>.
3505 (struct aout_link_includes_table): Define.
3506 (struct aout_link_includes_totals): Define.
3507 (struct aout_link_includes_entry): Define.
3508 (aout_link_includes_lookup): Define macro.
3509 (struct aout_final_link_info): Add includes field.
3510 (aout_link_includes_newfunc): New static function.
3511 (NAME(aout,final_link)): Initialize includes hash table.
3512 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
3513
3514 Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
3515
3516 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
3517
3518 Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
3519
3520 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
3521
3522 Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
3523
3524 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
3525 (pe_print_private_bfd_data): call pe_print_reloc.
3526 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
3527 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
3528 up some debugging as well.
3529
3530 Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
3531
3532 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
3533 <rfg@monkeys.com>.
3534
3535 Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
3536
3537 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
3538 when setting sections to NULL.
3539
3540 Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
3541
3542 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
3543 field.
3544 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
3545 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
3546 for all symbols.
3547 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
3548 * bfd-in2.h: Rebuild.
3549
3550 Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
3551
3552 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
3553
3554 Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
3555
3556 * ihex.c (ihex_scan): Handle record types 4 and 5.
3557 (ihex_object_p): Permit types 4 and 5.
3558 (ihex_set_section_contents): Remove check for out of range
3559 addresses.
3560 (ihex_write_object_contents): Generate types 4 and 5.
3561
3562 * elflink.h (elf_link_output_extsym): Just ignore warning and
3563 indirect references to symbols which don't really exist.
3564
3565 Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
3566
3567 * peicode.h (pe_print_idata): Minor format fixes
3568 (pe_print_edata): New function. Under private printing, this formats
3569 the edata section of a PE file.
3570 (pe_print_private_bfd_data): Added call to pe_print_edata.
3571
3572 Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
3573
3574 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
3575 index, don't call stoi.
3576
3577 Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
3578
3579 * srec.c (srec_scan): Set lma as well as vma.
3580
3581 * ihex.c: New file; support for Intel Hex format.
3582 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
3583 (ihex_vec): Declare.
3584 (bfd_target_vector): Always include ihex_vec.
3585 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
3586 * Makefile.in: Rebuild dependencies.
3587 (BFD_LIBS): Add ihex.o
3588 (BFD_LIBS_CFILES): Add ihex.c.
3589 * bfd-in2.h: Rebuild.
3590
3591 * elf.c (assign_file_positions_for_segments): Sort the sections in
3592 each segment.
3593 (get_program_header_size): Return the right size if segment_map is
3594 not NULL.
3595 (copy_private_bfd_data): Don't bother to sort the sections.
3596
3597 * bfd.c (bfd_record_phdr): New function.
3598 * bfd-in.h (bfd_record_phdr): Declare.
3599 * bfd_in2.h: Rebuild.
3600
3601 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
3602 BFD_ASSERT.
3603
3604 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
3605 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
3606 bfd_size_type.
3607 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
3608 (bfd_zmalloc): Change declaration.
3609 * libbfd.h: Rebuild.
3610 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
3611 and realloc. Don't set bfd_error_no_memory if they fail.
3612
3613 Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
3614
3615 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
3616 uses as well. Added a new howto to deal with TOCREL16 relocs that
3617 are TOCDEFN as well.
3618 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
3619 to handle RVA relocs from dlltool.
3620 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
3621 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
3622 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
3623
3624 * coffcode.h (coff_set_alignment_hook): check idata$X sections
3625 to get the right section alignment.
3626
3627 Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
3628
3629 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
3630 p_paddr if p_paddr is zero.
3631 (make_mapping): Set includes_filehdr and includes_phdrs for first
3632 PT_LOAD segment.
3633 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
3634 segment.
3635 (assign_file_positions_for_segments): Handle includes_filehdr and
3636 includes_phdrs. Remove special handling of PT_PHDR and first
3637 PT_LOAD segments.
3638 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
3639 when appropriate. Remove special handling of PT_PHDR segment.
3640 Use a more complex condition for when a section is included in a
3641 segment to handle Solaris linker oddities.
3642
3643 Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
3644
3645 * coff-m88k.c (howto_table): Reformatted for easier reading;
3646 special_function now points to new function m88k_special_reloc.
3647 (howto_hvrt16): Function previously used for handling HVRT16 relocs
3648 removed.
3649 (rtype2howto): Do not add reloc's r_offset to the addend, this will
3650 be done correctly by m88k_special_reloc.
3651 (reloc_processing): New function to be used by RELOC_PROCESSING.
3652 (RELOC_PROCESSING): Define to call reloc_processing.
3653
3654 Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
3655
3656 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
3657 (pe_print_pdata): Likewise.
3658
3659 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
3660 obstack_alloc fails.
3661 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
3662 fails.
3663 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
3664 * Many files: don't set bfd_error_no_memory if one of the above
3665 routines fails.
3666
3667 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
3668 if p_paddr_valid is set.
3669 (copy_private_bfd_data): New static function.
3670 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
3671
3672 * elf.c (assign_file_positions_for_segments): Fix case where extra
3673 program headers were allocated.
3674
3675 * elf.c (_bfd_elf_print_private_bfd_data): New function.
3676 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
3677 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
3678 _bfd_elf_print_private_bfd_data.
3679
3680 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
3681 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
3682 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
3683 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
3684 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
3685 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
3686 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
3687
3688 Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
3689
3690 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
3691 * elf.c (make_mapping): New static function.
3692 (map_sections_to_segments): New static function.
3693 (elf_sort_sections): New static function.
3694 (assign_file_positions_for_segments): New static function.
3695 (map_program_segments): Remove.
3696 (get_program_header_size): Remove sorted_hdrs, count, and
3697 maxpagesize parameters. Simplify.
3698 (assign_file_positions_except_relocs): When generating an
3699 executable, use assign_file_positions_for_segments.
3700 (elf_sort_hdrs): Remove.
3701 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
3702 to get_program_header_size.
3703
3704 Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
3705
3706 * hp300hpux.c (MY(callback)): Set lma as well as vma.
3707
3708 * configure, config.in: Regenerate with autoconf 2.7.
3709
3710 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
3711 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
3712
3713 Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
3714
3715 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
3716 (ecoff_sec_to_styp_flags): Likewise.
3717 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
3718 (ecoff_set_symbol_info): Handle scRConst.
3719 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
3720 (ecoff_compute_section_file_positions): Handle .rconst section.
3721 (_bfd_ecoff_write_object_contents): Likewise.
3722 (ecoff_link_check_archive_element): Handle scRConst.
3723 (ecoff_link_add_externals): Likewise.
3724 (ecoff_link_write_external): Handle .rconst section.
3725 (ecoff_reloc_link_order): Likewise.
3726 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
3727 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
3728 section.
3729 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
3730
3731 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
3732 DEF_DYNAMIC flag is set.
3733
3734 Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
3735
3736 * host-aout.c: If TRAD_HEADER is defined, include it.
3737
3738 Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
3739
3740 * aclocal.m4 (AC_PROG_CC): Remove local definition.
3741 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
3742 (BFD_NEED_DECLARATION): New function.
3743 * configure.in: Use BFD_NEED_DECLARATION.
3744 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
3745 * configure, config.in: Rebuild with autoconf 2.6.
3746
3747 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
3748 special_sections before returning when called with a non XCOFF
3749 BFD.
3750
3751 * coffgen.c (coff_renumber_symbols): Sort common symbols with
3752 global symbols.
3753
3754 * coffcode.h (coff_compute_section_file_positions): Only pad the
3755 previous section to force file alignment when creating an
3756 executable.
3757
3758 Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
3759
3760 * coffcode.h (coff_compute_section_file_positions): If
3761 RS6000COFF_C, set up the .debug section.
3762
3763 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
3764 if it is not large enough to accomodate the entire TOC area with
3765 signed 16 bit offsets.
3766 (xcoff_write_global_symbol): Handle negative TOC offsets in global
3767 linkage code.
3768 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
3769 TOC anchor to use the TOC value used in the output file.
3770
3771 Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
3772
3773 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
3774 (_bfd_coff_read_string_table): Likewise.
3775
3776 Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
3777
3778 * pe-arm.c: Fix typos.
3779 * coff-arm.c: Likewise.
3780
3781 Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
3782
3783 * coff-ppc.c (list_ele): Added "cat"egory member.
3784 (record_toc): New category parameter (priv or pub).
3785 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
3786 (ppc_process_before_allocation): Removed embrionic data-in-toc from
3787 the mainline. It addes extra toc cells in error.
3788 (ppc_coff_swap_sym_in_hook): Added some documentation.
3789 (dump_toc): Can now diagnose "virtual toc" chicanery.
3790
3791 Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
3792
3793 * elf-bfd.h (struct elf_link_hash_table): Change type of
3794 dynsymcount and bucketcount fields from size_t to bfd_size_type.
3795
3796 Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
3797
3798 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
3799 pointerize C_LEAFSTAT or C_LEAFEXT entries.
3800
3801 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
3802 DT_INIT and DT_FINI entries if the _init or _fini symbol is
3803 defined or mentioned in a regular file.
3804
3805 Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
3806
3807 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
3808 (coff_ppc_relocate_section): Handle TOCDEFN attribute
3809 (coff_ppc_relocate_section): Correct REL24 handling
3810 (ppc_process_before_allocation): Correct TOCDEFN handling
3811
3812 * peicode.h (dir_names): Added name descriptions
3813
3814 Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
3815
3816 * VERSION: Updated to cygnus-2.6.
3817
3818 Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
3819
3820 * targets.c (m68k4knetbsd_vec): Declare.
3821
3822 Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
3823
3824 * targets.c (bfd_target): Change type of second argument to
3825 _bfd_print_private_bfd_data from void * to PTR.
3826 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
3827 using PTR rather than void *.
3828 * bfd-in2, libbfd.h: Rebuild.
3829 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
3830 to PTR.
3831 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
3832 _bfd_generic_bfd_print_private_bfd_data rather than casting
3833 bfd_true.
3834
3835 Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
3836
3837 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
3838 "DO NOT DELETE" lines or blank lines that mkdep writes on some
3839 systems.
3840 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
3841 BFD64_BACKENDS_CFILES): New variables.
3842 (CFILES): Use them.
3843
3844 Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
3845
3846 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
3847 not at the file position of the first section.
3848 * coffcode.h (coff_compute_section_file_positions): Avoid using
3849 unportable #elif.
3850 (coff_write_object_contents): When generating a PPC PE executable
3851 with no symbols, round up the file size to a COFF_PAGE_SIZE
3852 boundary.
3853 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
3854 don't write out a string table.
3855
3856 * elf.c (bfd_section_from_shdr): When using a different section
3857 header, pass the new one to _bfd_elf_make_section_from_shdr.
3858 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
3859 (elf_map_symbols): Add section VMA to symbol value when comparing
3860 against 0.
3861 (_bfd_elf_compute_section_file_positions): Only build symbol table
3862 if there are some symbols. Set file offset of symtab and strtab
3863 sections.
3864 (assign_file_positions_except_relocs): Remove dosyms parameter.
3865 Change all callers. Never set file offset of symtab and strtab
3866 sections.
3867 (_bfd_elf_copy_private_section_data): New function.
3868 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
3869 (_bfd_elf_copy_private_symbol_data): New function.
3870 (swap_out_syms): Check for special mapping of st_shndx created by
3871 copy_private_symbol_data.
3872 * elfxx-target.h: Use new copy routines.
3873 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
3874 (_bfd_elf_copy_private_section_data): Declare.
3875
3876 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
3877
3878 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
3879 C_NT_WEAK.
3880
3881 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
3882 _bfd_dummy_target, matching the recent change to archive
3883 recognition.
3884
3885 Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
3886
3887 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
3888 arithmetic on PTR types.
3889
3890 * aout-target.h (MY(callback)): Set the lma of the sections.
3891
3892 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
3893 symbol into a reloc against the section.
3894
3895 Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
3896
3897 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
3898 glue for the relocs: IMGLUE and IFGLUE.
3899 (record_toc): new function - tracks toc contents
3900 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
3901 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
3902 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
3903 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
3904 (ppc_record_toc_entry): Removed a debug define (duh)
3905
3906 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
3907 (pe_print_idata): New function - formats the idata section data
3908 (pe_print_pdata): New function - formats the pdata section data
3909 (pe_print_private_bfd_data): calls to above
3910
3911 Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
3912
3913 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
3914 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
3915 TARGET_SYM and TARGET_NAME for vector and BFD name.
3916 * coff-pmac.c (pmac_xcoff_vec): Remove.
3917 (TARGET_SYM, TARGET_NAME): Define.
3918 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
3919 machine to 0, not all PowerMacs are 601s.
3920
3921 Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
3922
3923 * elfcode.h (elf_object_p): Read in any program headers.
3924 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
3925 based on the program headers, if any.
3926 (elf_fake_sections): Set sh_addr from the vma, not the lma.
3927 (map_program_segments): Set p_paddr of program headers based on
3928 the lma.
3929
3930 Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
3931
3932 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
3933 failure.
3934
3935 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
3936 trying to do a relocateable link with a non-a.out object file.
3937
3938 * archive.c (bfd_generic_archive_p): Check the first object file
3939 in an archive even if target_defaulted is set. If the object file
3940 has the wrong xvec, reject it.
3941
3942 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
3943 be represented, report the name via _bfd_error_handler.
3944 (translate_to_native_sym_flags): Likewise.
3945 * elf32-mips.c (mips_elf_final_link): Likewise.
3946 * oasys.c (oasys_write_sections): Likewise.
3947
3948 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
3949 which checks for STYP_OVRFLO sections.
3950 (coff_compute_section_file_positions): If RS6000COFF_C, handle
3951 reloc and lineno count overflows.
3952 (coff_write_object_contents): Call coff_count_linenumbers before
3953 coff_compute_section_file_positions. If RS6000COFF_C, handle
3954 reloc and lineno count overflows.
3955 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
3956 relocs before dealing with .pad sections. Count overflow section
3957 headers when handling .pad sections.
3958
3959 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
3960 if RS6000COFF_C.
3961
3962 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
3963 (struct xcoff_link_hash_table): Add descriptor_section and
3964 special_sections fields.
3965 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
3966 (xcoff_link_add_symbols): Set linkage section alignment. Create
3967 descriptor section. Check for magic symbol names (_text, etc.),
3968 and record them in special_sections if found. Set
3969 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
3970 descriptor field to point back to the function code symbol.
3971 (xcoff_sweep): Always mark the special descriptor_section.
3972 (bfd_xcoff_export_symbol): Check whether the symbol might be a
3973 function descriptor, and mark it if it is.
3974 (bfd_xcoff_size_dynamic_sections): Add new special_sections
3975 parameter, and fill it in. Allocate space for the descriptor
3976 section.
3977 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
3978 global linkage code. If an undefined function descriptor is
3979 exported, arrange to define it. Warn about any other undefined
3980 exported symbol.
3981 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
3982 (xcoff_write_global_symbol): Create a function descriptor when
3983 necessary.
3984 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
3985 * bfd-in2.h: Rebuild.
3986
3987 Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
3988
3989 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
3990 (ppc_coff_link_hash_table): new types for hashing
3991 (ppc_coff_link_hash_newfunc): hash entry constructor
3992 (ppc_coff_link_hash_table_init): hash table initializer
3993 (ppc_coff_link_hash_table_create): hash table constructor
3994 (ppc_record_toc_entry): changed references to hash table
3995 (coff_ppc_relocate_section): changed references to hash table
3996
3997 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
3998 * libcoff.h: Rebuild
3999
4000 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
4001 (coff_link_add_symbols): removed toc_offset init
4002
4003 Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
4004
4005 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
4006 first.
4007
4008 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
4009 if it is given and mmep is available.
4010 * acconfig.h: Undef USE_MMAP.
4011 * configure, config.in: Regenerated.
4012 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
4013 table handling the old way.
4014 (aout_get_external_symbols): Don't complain if last byte of string
4015 table is nonzero.
4016 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
4017 (bfd_free_window) [! USE_MMAP]: Don't define.
4018 (bfd_get_file_window,
4019 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
4020
4021 Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
4022
4023 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
4024 0xffff0000.
4025
4026 Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
4027
4028 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
4029 compatible with AMD generated COFF files. Try to support both AMD
4030 and GNU formats simultaneously.
4031 (coff_a29k_relocate_section): Likewise.
4032
4033 * libbfd.c (bfd_get_file_window): Change writable parameter from
4034 int to boolean; update all callers. Pass MAP_SHARED if not
4035 writable--it's required on Solaris. Cast fprintf argument to
4036 avoid warning.
4037 * bfd-in.h (bfd_get_file_window): Update declaration.
4038 * bfd-in2.h: Rebuild.
4039 * aoutx.h: Update calls to bfd_get_file_window.
4040
4041 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
4042 Change all uses.
4043 (xcoff_swap_ldhdr_in): New static function.
4044 (xcoff_swap_ldsym_in): New static function.
4045 (xcoff_find_reloc): Handle the case of a single reloc correctly.
4046 (xcoff_link_add_symbols): If we just created a descriptor, pass it
4047 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
4048 Handle XTY_ER/XMC_XO symbols correctly.
4049 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
4050 rather than normal symbol table.
4051 (bfd_xcoff_import_symbol): It's not an error if the symbol is
4052 already defined with the same absolute value.
4053 (xcoff_mark): When considering called symbols, check whether the
4054 descriptor is from a dynamic object, rather than the symbol
4055 itself.
4056 (xcoff_build_ldsyms): Likewise.
4057
4058 * libbfd.c (bfd_get_file_window): Change return type to boolean.
4059 Cast realloc and malloc return values. If malloc or realloc fail,
4060 set bfd_error_no_memory.
4061 * bfd-in.h (bfd_get_file_window): Change type to boolean.
4062 * bfd-in2.h: Rebuild.
4063
4064 Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
4065
4066 * coff-ppc.c (ppc_record_toc_entry): new function.
4067 (in_reloc_p): changed return value.
4068 (coff_ppc_relocate_section): much rework.
4069 (ppc_allocate_toc_section): new function.
4070 (ppc_process_before_allocation): new function.
4071 (ppc_coff_swap_sym_in_hook): new function.
4072
4073 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
4074 (coff_link_add_symbols): initialize toc_offset.
4075
4076 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
4077 (coff_swap_aouthdr_out): Added more sections to the data
4078 dictionary for the pe file header. Also changed linker version
4079 number on the ppc side.
4080 (dir_names): small improvements to the dictionary printing.
4081 (pe_mkobject_hook): save the file level flags.
4082
4083 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
4084 (pe_tdata): added real_flags field
4085 (coff_tdata): added local_toc_sym_map and access macro
4086
4087 * libcoff.h (coff_link_hash_entry): added toc_offset field
4088 (pe_tdata): added real_flags field
4089 (coff_tdata): added local_toc_sym_map and access macro
4090
4091 * coffcode.h (coff_set_alignment_hook): added hook for PE.
4092 (coff_mkobject): init for local_toc_sym_map
4093 (coff_write_object_contents): set the internal_a.magic to
4094 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
4095 ppc compilers use.
4096
4097 Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
4098
4099 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
4100 entries until both the line number address and the function name
4101 address are too large.
4102
4103 * configure.in: Call AC_CHECK_PROG to find and cache AR.
4104 * configure: Rebuilt.
4105
4106 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
4107 is defined in the environment.
4108
4109 Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
4110
4111 * som.c (som_get_section_contents_in_window): Define to use
4112 generic version.
4113
4114 Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
4115
4116 * coff-i860.c: New file, based on coff-i386.c.
4117 * cpu-i860.c: New file, based on cpu-i386.c.
4118 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
4119 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
4120 targets, using i860coff_vec.
4121 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
4122 trad-core.o and hosts/i860mach3.h.
4123 (i860coff_vec): Use coff-i860.o and cofflink.o.
4124 * configure: Rebuild.
4125 * Makefile.in: Rebuild dependencies.
4126 (ALL_MACHINES): Add cpu-i860.o.
4127 (BFD32_BACKENDS): Add coff-i860.o.
4128 (CFILES): Add cpu-i860.c and coff-i860.c.
4129 * targets.c (i860coff_vec): Declare.
4130 (bfd_target_vector): Add &i860coff_vec.
4131 * archures.c (bfd_i860_arch): Declare.
4132 (bfd_archures_list): Add &bfd_i860_arch.
4133 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
4134 (coff_set_flags): Handle bfd_arch_i860.
4135 (coff_write_object_contents): Handle I860 a.out magic number.
4136
4137 Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
4138
4139 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
4140 the created .tc section to 2.
4141 (xcoff_mark): Don't keep a .loader reloc for a call to an
4142 undefined symbol when creating a shared library.
4143 (xcoff_build_ldsyms): When creating a shared library, generate
4144 global linkage code for a call to an undefined symbol.
4145
4146 Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
4147
4148 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
4149 BFD32_BACKENDS, BFD64_BACKENDS.
4150 (.dep1): Put mkdep output in a separate file.
4151 Rebuilt dependencies.
4152
4153 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
4154 value.
4155
4156 Permit use of mmap when available:
4157
4158 * configure.in: Check for mmap, madvise, mprotect.
4159 * config.in, configure: Regenerated.
4160
4161 * libbfd.c (struct _bfd_window_internal): Define type.
4162 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
4163 functions.
4164 (ok_to_map): New static variable for debugging.
4165 (_bfd_generic_get_section_contents_in_window): New function.
4166 * bfd-in.h (bfd_window_internal): Declare type.
4167 (bfd_window): Define type.
4168 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
4169 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
4170 Declare.
4171
4172 * libaout.h (struct aoutdata): Add two window fields.
4173 (obj_aout_sym_window, obj_aout_string_window): New macros.
4174 * aoutx.h (some_aout_object_p): Initialize windows.
4175 (aout_get_external_symbols): Get symbol data and strings in
4176 windows instead of explicitly allocated buffers.
4177 (slurp_symbol_table): Free window instead of memory.
4178 (bfd_free_cached_info): Release windows instead of freeing storage
4179 directly.
4180 (aout_link_free_symbols): Ditto.
4181
4182 * targets.c (bfd_target): Add new field for
4183 get_section_contents_in_window.
4184 (BFD_JUMP_TABLE_GENERIC): Updated.
4185 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
4186 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
4187 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
4188 macros for get_section_contents_in_window field.
4189
4190 Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
4191
4192 * core.c: Renamed to corefile.c
4193 * makefile.dos (OBJS): Change core.o to corefile.o
4194 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
4195
4196 start-sanitize-gm
4197 Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
4198
4199 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
4200 targ_selvecs to allow debugging under Irix-5 native.
4201
4202 end-sanitize-gm
4203 Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
4204
4205 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
4206 to o. Clobber and restore the list of new csects around the call
4207 to _bfd_generic_link_add_one_symbol, in case it wants to report a
4208 linker error and the linker wants to read the symbol table. Reset
4209 the line number count of a real section even if it has no relocs.
4210 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
4211
4212 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
4213 is too small.
4214
4215 Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
4216
4217 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
4218 an undefined symbol in a shared link.
4219
4220 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
4221 oldtype from bfd_link_order_type to bfd_link_hash_type. From
4222 phdm@info.ucl.ac.be (Philippe De Muyter).
4223
4224 Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
4225
4226 * coff-m88k.c (rtype2howto): New static function.
4227 (RTYPE2HOWTO): Use it rather than a macro definition.
4228
4229 * coffcode.h (coff_write_object_contents): set internal_a.magic
4230 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
4231
4232 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
4233 define TRAD_HEADER to new file hosts/delta68.h.
4234 m88*-motorola-sysv*, however, does use ptrace-core.o.
4235 * hosts/delta68.h: New file.
4236
4237 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
4238 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
4239
4240 Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
4241
4242 * i386linux.c (MY(vec)): Declare before use.
4243
4244 Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
4245
4246 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
4247 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
4248
4249 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
4250 BFD is not of the right type.
4251 (bfd_elf_get_needed_list): Likewise.
4252 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
4253 * sunos.c (bfd_sunos_get_needed_list): Likewise.
4254 * xcofflink.c (XCOFF_XVECP): Define.
4255 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
4256 of the right type.
4257 (bfd_xcoff_import_symbol): Likewise.
4258 (bfd_xcoff_export_symbol): Likewise.
4259 (bfd_xcoff_link_count_reloc): Likewise.
4260 (bfd_xcoff_record_link_assignment): Likewise.
4261 (bfd_xcoff_size_dynamic_sections): Likewise.
4262
4263 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
4264 table index against the number of symbols for a base relative
4265 reloc.
4266
4267 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
4268 static function.
4269 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
4270 full_aouthdr flag here...
4271 (_bfd_xcoff_bfd_final_link): ...not here.
4272
4273 Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
4274
4275 * libelf.h: Rename to elf-bfd.h to avoid conflict with
4276 systems that have a system <libelf.h>.
4277 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
4278 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
4279 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
4280 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
4281 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
4282 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
4283 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
4284
4285 Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
4286
4287 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
4288 set, set BSF_WEAK in symbol. Change all callers.
4289 (ecoff_get_extr): Set weakext based on BSF_WEAK.
4290 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
4291 _bfd_generic_link_add_one_symbol.
4292 (ecoff_indirect_link_order): Check that the section tdata relocs
4293 are not NULL before using them.
4294
4295 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
4296 define TRAD_HEADER as hosts/alphalinux.h.
4297 * configure: Rebuild.
4298 * hosts/alphalinux.h: New file.
4299 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
4300 not int.
4301
4302 Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
4303
4304 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
4305 C_ECOMM storage classes.
4306
4307 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
4308 of xcoff_mark.
4309 (xcoff_mark): Call xcoff_mark_symbol.
4310 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
4311 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
4312 doing it by hand.
4313 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
4314
4315 Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
4316
4317 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
4318 field.
4319 (xcoff_find_reloc): New static function.
4320 (xcoff_link_add_symbols): Use it.
4321 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
4322 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
4323 relocate the value of C_DECL.
4324
4325 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
4326
4327 Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
4328
4329 * cofflink.c (_bfd_coff_generic_relocate_section): Make
4330 callback decide what goes in .relocs.
4331 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
4332 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
4333 there is one.
4334
4335 Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
4336
4337 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
4338 absolute section.
4339
4340 Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
4341
4342 * xcofflink.c: More improvements, mostly to fix handling of
4343 constructors and a few other special cases.
4344 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
4345 zero, reverting yesterday's change.
4346 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
4347 (bfd_xcoff_link_count_reloc): Declare.
4348 (bfd_xcoff_record_link_assignment): Declare.
4349 * bfd-in2.h: Rebuild.
4350
4351 Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
4352
4353 * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
4354 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
4355 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
4356 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
4357 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
4358 Change PAGE_SIZE to TARGET_PAGE_SIZE.
4359
4360 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
4361 format.
4362
4363 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
4364 segments includes the a.out header. See to that the magic number
4365 *always* is big-endian.
4366
4367 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
4368 m68k4k NetBSD configurations.
4369
4370 * configure.in, configure: Separate i386 & mips NetBSD
4371 configurations from other BSD ones. Don't assume DEC is the only
4372 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
4373 configurations. Add support for m68k4k NetBSD object format.
4374
4375 * libaout.h: Added M_68K4K_NETBSD magic.
4376
4377 * m68k4knetbsd.c: New file.
4378
4379 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
4380
4381 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
4382 <machine/endian.h>.
4383
4384 * hosts/mipsnbsd.h: New file.
4385
4386 start-sanitize-gm
4387 Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
4388
4389 * config.bfd: Add config stuff for mips*-*-magic* to set
4390 targ_defvec to ecoff_big_vec.
4391
4392 end-sanitize-gm
4393 Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
4394
4395 * xcofflink.c: Numerous changes to get closer to a working XCOFF
4396 linker.
4397 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
4398 toc_section, and entry_section fields.
4399 (struct xcoff_section_tdata): Remove ldrel_count field.
4400 * libcoff.h: Rebuild.
4401 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
4402 fields.
4403 (coff_compute_section_file_positions): If RS6000COFF_C, generate
4404 full a.out header if full_aouthdr is set in xcoff_data.
4405 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
4406 based on sections stored in xcoff_data.
4407 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
4408 fields.
4409 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
4410 (rs6000coff_vec): Set symbol_leading_char to '.'.
4411 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
4412 value stored in ret rather than returning a pointer value.
4413
4414 Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4415
4416 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
4417 format for now.
4418
4419 Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
4420
4421 * som.c (som_slurp_string_table): Allocate the strings with malloc
4422 since they're free'd by free_cached_info.
4423 (som_slurp_symbol_table): Similarly for the symbol table.
4424
4425 Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
4426
4427 * Makefile.in (diststuff): Don't make headers.
4428
4429 Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
4430
4431 * Makefile.in: Rebuild dependencies.
4432
4433 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
4434 output_bfd is not SunOS.
4435 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
4436 non-SunOS input files.
4437
4438 * xcofflink.c: Extensive changes to support linking shared objects
4439 and generating a .loader section.
4440 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
4441 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
4442 last_symndx, and ldrel_count fields.
4443 * libcoff.h: Rebuild.
4444 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
4445 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
4446 is set.
4447 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
4448 (bfd_xcoff_export_symbol): Declare.
4449 (bfd_xcoff_size_dynamic_sections): Declare.
4450 * bfd-in2.h: Rebuild.
4451
4452 Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
4453
4454 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
4455 * configure: Rebuild.
4456 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
4457 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
4458 contents.
4459 (pmac_xcoff_vec): Update to use new xcoff support.
4460 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
4461 (xcoff_write_armap): Declare buf as unsigned char.
4462 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
4463
4464 * mpw-make.sed: Generalize subdir_do edit.
4465
4466 Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
4467
4468 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
4469 correctly. Don't initialize asect->vma.
4470
4471 Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
4472
4473 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
4474 something a little less than the page size.
4475
4476 Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
4477
4478 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
4479
4480 Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
4481
4482 * coff-i386.c (coff_i386_reloc_type_lookup): New.
4483 * coffcode.h (coff_write_object_contents): If .bss is before
4484 .data us that as data_start.
4485 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
4486 calc correct.
4487 * peicode.h (add_data_entry): Use _cooked_size of data directory.
4488 (coff_swap_outhdr_out): Hardwire in version number.
4489
4490 Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
4491
4492 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
4493 major and minor to *_vno, since the former are also macros in
4494 SunOS header files. Cast result of bfd_alloc to appropriate
4495 type.
4496
4497 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
4498 before assigning to sec_data.
4499
4500 Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
4501
4502 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
4503 now relative to the section, not absolute.
4504 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
4505 get the file name when there is a N_SO directory name. When
4506 handling stabs, remember that section->vma was added to the
4507 offset.
4508
4509 Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
4510
4511 * sunos.c (struct sunos_link_hash_table): Add needed field.
4512 (sunos_link_hash_table_create): Call bfd_release, not free.
4513 (sunos_link_hash_table_create): Initialize needed field.
4514 (sunos_add_dynamic_symbols): Record needed objects.
4515 (bfd_sunos_get_needed_list): New function.
4516 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
4517 * bfd-in2.h: Rebuild.
4518
4519 Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
4520
4521 * libcoff-in.h (pe_data_type.in_reloc_p): New.
4522
4523 Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
4524
4525 * bfd-in.h (struct bfd_link_needed_list): Rename from
4526 bfd_elf_link_needed_list.
4527 * bfd-in2.h: Rebuild.
4528 * elf.c, elflink.h, libelf.h: Corresponding changes.
4529
4530 Add start at AIX linker support; no shared libraries yet.
4531 * xcofflink.c: New file.
4532 * configure.in (rs600coff_vec): Use xcofflink.o.
4533 * configure: Rebuild.
4534 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
4535 fields.
4536 (struct xcoff_section_tdata): Define.
4537 (xcoff_section_data): Define macro.
4538 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
4539 (_bfd_xcoff_bfd_link_add_symbols): Declare.
4540 (_bfd_xcoff_bfd_final_link): Declare.
4541 (_bfd_ppc_xcoff_relocate_section): Declare.
4542 * libcoff.h: Rebuild.
4543 * coff-rs6000.c: Clean up a bit.
4544 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
4545 cputype, csects, and debug_indices.
4546 (xcoff_copy_private_bfd_data): Copy cputype.
4547 (xcoff_howto_table): Rename from rs6000coff_howto_table.
4548 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
4549 (xcoff_reloc_type_lookup): Rename from
4550 rs6000coff_reloc_type_lookup.
4551 (coff_relocate_section): Define.
4552 (_bfd_xcoff_sizeof_headers): Define.
4553 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
4554 (_bfd_xcoff_bfd_relax_section): Define.
4555 (_bfd_xcoff_bfd_link_split_section): Define.
4556 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
4557 coff.
4558 * coffcode.h (coff_compute_section_file_positions): If AIX,
4559 increment sofar by SMALL_AOUTSZ if not executable.
4560 (coff_write_object_contents): If AIX, always output an a.out
4561 header; if not executable, header size of SMALL_AOUTSZ.
4562 * hash.c (struct bfd_strtab_hash): Add xcoff field.
4563 (_bfd_stringtab_init): Initialize xcoff field.
4564 (_bfd_xcoff_stringtab_init): New function.
4565 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
4566 (_bfd_stringtab_emit): In XCOFF mode, write out length.
4567 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
4568 * libbfd.h: Rebuild.
4569 * Makefile.in: Rebuild dependencies.
4570 (BFD32_BACKENDS): Add xcofflink.o.
4571 (CFILES): Add xcofflink.c.
4572
4573 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
4574 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
4575 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
4576
4577 Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4578
4579 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
4580
4581 Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
4582
4583 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
4584 * config.in: Regenerated.
4585
4586 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
4587 (_bfd_chunksize): New variable.
4588 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
4589 for obstack chunk size.
4590 * configure.in: Check for getpagesize.
4591 * configure: Regenerated.
4592
4593 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4594
4595 * trad-core.c (rawptr): Make it a local variable of
4596 ptrace_unix_core_file_p.
4597
4598 Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
4599
4600 * coff-arm.c (in_reloc_p): New.
4601 * coff-i386.c (in_reloc_p): New.
4602 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
4603 (coff_write_object_contents): Only set has_reloc_section
4604 if PE_IMAGE.
4605 * cofflink.c (_bfd_coff_generic_relocate_section): Call
4606 in_reloc_p to decide if reloc should be emitted.
4607 * libcoff.h (pe_data_type.in_reloc_p): New.
4608 * peicode.h (pe_mkobject): Initialize in_reloc_p.
4609
4610 Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
4611
4612 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
4613 (_bfd_coff_read_internal_relocs): Likewise.
4614 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
4615 (_bfd_coff_read_internal_relocs): Likewise.
4616
4617 * elflink.h (elf_link_add_object_symbols): Correct conditions
4618 under which type and size change warnings are issued.
4619
4620 Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
4621
4622 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
4623 a symbol which is not in a real section.
4624 (coff_write_native_symbol): Corresponding change.
4625
4626 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
4627 coff_link_hash_newfunc and make non-static.
4628 (_bfd_coff_link_hash_table_init): New function, broken out of
4629 _bfd_coff_link_hash_table_create.
4630 (_bfd_coff_link_hash_table_create): Use it.
4631 (process_embedded_commands): Make static.
4632 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
4633 (_bfd_coff_link_hash_table_init): Declare.
4634 * libcoff.h: Rebuild.
4635
4636 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
4637 field in XCOFF tdata.
4638 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
4639 U802ROMAGIC, for clarity. Try to set arch and machine correctly
4640 based on cputype stored in a.out header, or in n_type of initial
4641 .file symbol.
4642 (coff_write_object_contents): Set cputype correctly in a.out
4643 header.
4644 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
4645 warnings.
4646 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
4647 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
4648 old resv1 field.
4649 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
4650 * libcoff.h: Rebuild.
4651
4652 * cpu-rs6000.c (rs6000_compatible): New static function.
4653 (bfd_rs6000_arch): Use it.
4654 * cpu-powerpc.c (powerpc_compatible): New static function.
4655 (arch_info_struct): Define various flavours of PowerPC.
4656 (bfd_powerpc_arch): Use powerpc_compatible. Point at
4657 arch_info_struct.
4658
4659 Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
4660
4661 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
4662
4663 Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
4664
4665 * elflink.h (elf_link_add_object_symbols): Don't warn about
4666 changing the size or type if the old definition was weak.
4667
4668 Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
4669
4670 * coffcode.h (combined_entry_type): Add fix_line field.
4671 (coff_slurp_line_table): Warn if we try to set the lineno field of
4672 a symbol twice.
4673 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
4674 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
4675 * coffgen.c (coff_mangle_symbols): Handle fix_line.
4676 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
4677 absolute section.
4678 (coff_print_symbol): Print fix_value symbols in a useful fashion.
4679 * libcoff.h: Rebuild.
4680
4681 * libcoff-in.h (struct xcoff_tdata): Define.
4682 (xcoff_data): Define.
4683 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
4684 * bfd-in2.h, libcoff.h: Rebuild.
4685 * coff-rs6000.c (xcoff_mkobject): New static function.
4686 (coff_mkobject): Define.
4687 (xcoff_copy_private_bfd_data): New static function.
4688 (coff_bfd_copy_private_bfd_data): Define.
4689 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
4690 signed to bitfield.
4691 (rs6000coff_vec): Add DYNAMIC to object_flags.
4692 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
4693 .loader sections specially.
4694 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
4695 section alignment from the XCOFF tdata information.
4696 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
4697 F_SHROBJ, and copy the extra a.out header information into the
4698 XCOFF tdata structure.
4699 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
4700 F_DYNLOAD and the extra a.out header information.
4701 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
4702 C_HIDEXT symbol with attached csect information.
4703 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
4704 in the o_maxdata field.
4705 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
4706 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
4707 end if BSF_NOT_AT_END is set.
4708
4709 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
4710 _bfd_read_ar_hdr_fn.
4711 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
4712 * bfd-in2.h, libbfd.h: Rebuild.
4713 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
4714 return value.
4715 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
4716 (bfd_slurp_bsd_armap_f2): Likewise.
4717 (_bfd_slurp_extended_name_table): Likewise.
4718
4719 Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
4720
4721 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4722
4723 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
4724 when the symbol table is empty.
4725
4726 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
4727 space for section symbols, since we don't output them either.
4728 (elf_m68k_adjust_dynindx): Removed.
4729
4730 * ptrace-core.c (rawptr): Make it a local variable of
4731 ptrace_unix_core_file_p.
4732
4733 Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4734
4735 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
4736 NULL.
4737
4738 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
4739 Mac object file formats.
4740
4741 Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
4742
4743 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
4744 auxent if there isn't one.
4745 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
4746 rather than FILNMLEN as the maximum name length.
4747
4748 * coffcode.h (bfd_coff_backend_data): Add new field
4749 _bfd_coff_print_aux.
4750 (bfd_coff_print_aux): New static function.
4751 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
4752 scnlen field of an XTY_LD csect aux entry.
4753 (coff_print_aux): New static function.
4754 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
4755 in coff_pointerize_aux_hook.
4756 (bfd_coff_std_swap_table): Initialize new field.
4757 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
4758 * libcoff.h: Rebuild.
4759 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
4760 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4761
4762 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
4763 if there are symbols, for native AIX ld compatibility.
4764
4765 * coffcode.h (bfd_coff_backend_data): Add new field
4766 _bfd_coff_pointerize_aux_hook.
4767 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
4768 or I960, and as 0 otherwise.
4769 (bfd_coff_std_swap_table): Initialize new field.
4770 * libcoff.h: Rebuild.
4771 * coffgen.c (coff_pointerize_aux): Change parameters to take
4772 symbol pointer instead of type and class, and to take aux index.
4773 Call _bfd_coff_pointerize_aux_hook if it is defined.
4774 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
4775 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
4776 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4777
4778 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
4779 read-only/host-only support.
4780
4781 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
4782 BSF_LOCAL.
4783 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
4784 RS6000COFF_C.
4785
4786 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
4787 BFD_JUMP_TABLE_ARCHIVE accordingly.
4788 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
4789 (_bfd_compute_and_write_armap): Declare.
4790 (_bfd_generic_read_ar_hdr): Declare.
4791 (_bfd_read_ar_hdr): Define.
4792 (_bfd_noarchive_read_ar_hdr): Define.
4793 (_bfd_archive_bsd_read_ar_hdr): Define.
4794 (_bfd_archive_coff_read_ar_hdr): Define.
4795 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
4796 _bfd_read_ar_hdr instead.
4797 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
4798 (_bfd_compute_and_write_armap): Rename from
4799 compute_and_write_armap. Make non-static. Change all callers.
4800 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
4801 than _bfd_snarf_ar_hdr.
4802 * aout-target.h (MY_read_ar_hdr): Define if not defined.
4803 * ieee.c (ieee_read_ar_hdr): Define.
4804 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
4805 * oasys.c (oasys_read_ar_hdr): Define.
4806 * som.c (som_read_ar_hdr): Define.
4807 * bfd-in2.h, libbfd.h: Rebuild.
4808
4809 Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
4810
4811 * peicode.c (coff_swap_filehdr_in): If symptr is
4812 zero, there aren't any symbols, even if nsyms is set.
4813
4814 Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
4815
4816 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
4817 field.
4818 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
4819 sections, and set styp correctly for them: .got, .hash, .dynamic,
4820 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
4821 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
4822 types.
4823 (ecoff_sort_hdrs): New static function.
4824 (ecoff_compute_section_file_positions): Return boolean, not void.
4825 Sort the sections by VMA before looking through them. Put the
4826 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
4827 section on an appropriate boundary within the page.
4828 (ecoff_compute_reloc_file_positions): Check return value of
4829 ecoff_compute_section_file_positions.
4830 (_bfd_ecoff_set_section_contents): Likewise.
4831 (_bfd_ecoff_write_object_contents): Check for various Alpha
4832 section types when incrementing text_size and data_size. Call
4833 adjust_headers backend function if it exists.
4834 * coff-alpha.c (alpha_adjust_headers): New static function.
4835 (alpha_ecoff_backend_data): Initialize adjust_headers field.
4836 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4837
4838 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
4839
4840 Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
4841
4842 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
4843 of ALTERNATE_AIX_CORE_FORMAT.
4844 * configure.in (aix4): No longer need CORE_FLAGS.
4845 * configure: Updated.
4846
4847 Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
4848
4849 NS32k changes from Ian Dall:
4850 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
4851 macros.
4852 (aout_link_input_section_std, aout_link_input_section_ext,
4853 aout_link_reloc_link_order): Call them instead of _bfd_*
4854 versions.
4855 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
4856 to zero.
4857 (backend_data): Use it instead of hardcoded zero.
4858
4859 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
4860 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
4861
4862 * ns32knetbsd.c: Include bfd.h.
4863 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
4864 (MY_bfd_reloc_type_lookup): Declare function too.
4865 * pc532-mach.c (set_sizes): Don't declare.
4866 (MY_text_includes_header, MY_exec_header_not_counted): Define.
4867 (backend_data, MY_backend_data): Don't define.
4868
4869 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
4870 ns32k-*-lites* like ns32k-*-netbsd*.
4871
4872 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
4873 compile on lites.
4874
4875 Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
4876
4877 * coffcode.h (coff_write_object_contents): Restore setting
4878 f_timdat to 0, deleted on August 22.
4879
4880 Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
4881
4882 * coffcode.h (coff_bfd_copy_private_symbol_data,
4883 coff_bfd_copy_private_section_data,
4884 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
4885 * peicode.h (coff_bfd_copy_private_bfd_data): New
4886 (pe_bfd_copy_private_bfd_data): New.
4887 (coff_swap_scnhdr_in): Swap bss size into the right place.
4888 (pe_print_private_bfd_data): Add some newlines.
4889
4890 Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
4891
4892 * som.c (setup_sections): Don't die if a space has no subspaces.
4893
4894 Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
4895
4896 * elflink.h (elf_link_add_object_symbols): Don't let a weak
4897 dynamic symbol override a common symbol. Don't change the size or
4898 type if they have been set and the new symbol is not a definition.
4899 Warn if the size or type changes.
4900
4901 Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
4902
4903 * som.c (som_begin_writing): Don't write the symbol table or
4904 symbol strings.
4905 (som_finish_writing): Write them here. Place them after the
4906 subspace data, but before the relocs.
4907
4908 Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
4909
4910 * sunos.c (sunos_add_one_symbol): Just pass false, not
4911 info->shared_library, to sunos_create_dynamic_sections.
4912 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
4913 section.
4914 (sunos_check_dynamic_reloc): Remove .text section assertion.
4915
4916 Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
4917
4918 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
4919 * configure, configure.in: Add pmac_xcoff_vec case.
4920 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
4921 * coff-pmac.c: New file, PowerMac XCOFF support.
4922 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
4923 * targets.c (pmac_xcoff_vec): Declare.
4924
4925 * mpw-config.in: Various changes to be compatible with the
4926 autoconf-based configury.
4927 * mpw-make.sed: New file, sed commands to translate Unix
4928 makefile into MPW syntax.
4929 * mpw-make.in: Remove.
4930 * hosts/mpw.h: Remove.
4931 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
4932 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
4933
4934 Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
4935
4936 * binary.c (binary_get_symtab): Return an empty string on error.
4937 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
4938
4939 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
4940
4941 * coff-ppc.c: Reformatted according to gnu conventions
4942 Removed irrelevant "if 0" code
4943
4944 Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
4945
4946 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
4947 symbols rather than as indirect symbols.
4948 (MY(slurp_symbol_table)): Don't do anything special about
4949 secondary symbols.
4950
4951 * coffcode.h (coff_new_section_hook): Make sure that the alignment
4952 of .ctors and .dtors sections is no larger than 2.
4953
4954 * sunos.c (sunos_add_one_symbol): Don't change
4955 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
4956 undef list.
4957 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
4958 dynamic symbols when creating a shared library.
4959 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
4960 shared library.
4961 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
4962 written even if it is not defined in a regular object.
4963 (sunos_write_dynamic_symbol): Use plt_offset for the address of
4964 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
4965 rather than the constant 22.
4966 (sunos_check_dynamic_reloc): Handle creating a shared library.
4967 (sunos_finish_dynamic_link): Set the first entry in the GOT to
4968 zero when creating a shared library.
4969 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
4970 write it out at the start of the symbol table.
4971
4972 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
4973
4974 Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
4975
4976 * config.bfd: Add arm-*-coff.
4977 * configure.in, configure: Add armcoff_{little,big}_vec.
4978 * targets.c (armcoff_{little,big}_vec): Declare.
4979 (bfd_target_vector): Add armcoff_{little,big}_vec.
4980 * coff-arm.c (armcoff_{little,big}_vec): Always define.
4981
4982 Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
4983
4984 * targets.c (bfd_find_target): Remove debugging code.
4985
4986 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
4987
4988 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
4989 support on powerpc.
4990 * Makefile.in: added *-ppc files
4991 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
4992 allow pe based .o's to be shared with other tools on ppc/NT
4993 * config.bfd: added powerpc[le]-[pe|winnt] config support
4994 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
4995 * peicode.h: Added more section flags for PE on ppc
4996 Added coff_swap_filehdr_out to allow peicode.h to be
4997 used for non-image PE files on ppc.
4998 Check for image, or not, before copying pe_opthdr
4999 * targets.c: Added new bfd's
5000 * targets.c: Removed two inactive bfds that shouldn't have made it this
5001 far.
5002
5003 Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
5004
5005 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
5006 explicit values to initialize all relocs. Change all users.
5007 (ppc_elf_brtaken_inner): New function to handle branch predicition
5008 relocs.
5009 (ppc_elf_brtaken_reloc): Ditto.
5010 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
5011 relocs use ppc_elf_unsupported_reloc.
5012 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
5013 needs to be reported.
5014 (ppc_elf_relocate_section): Support branch prediction relocs.
5015
5016 Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
5017
5018 * bfd.c (bfd_assert): Remove \n from string passed to
5019 _bfd_error_handler.
5020
5021 * coff-i386.c: (TWO_DATA_SECS): Don't define.
5022 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
5023 (bfd_coff_make_section_hook): Don't define.
5024 (coff_make_section_hook): Remove.
5025 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
5026 (styp_to_sec_flags): Likewise.
5027 (coff_write_object_contents): Likewise.
5028 (bfd_coff_std_swap_table): Don't initialize make_section_hook
5029 field.
5030 * libcoff.h: Rebuild.
5031 * coffgen.c (make_a_section_from_file): Just call
5032 bfd_make_section_anyway, not bfd_make_section or
5033 bfd_coff_make_section_hook.
5034 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
5035 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
5036 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
5037 make_section_hook field.
5038 * coff-mips.c (mips_ecoff_backend_data): Likewise.
5039
5040 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
5041 pointers into value field for warning and indirect symbols; just
5042 leave the value field alone.
5043 * linker.c (generic_link_add_symbol_list): Use next symbol for
5044 warning and indirect symbols, rather than looking in symbol value.
5045 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
5046 parameter. Change all callers. Remove support for indirect
5047 symbols; it didn't work anyhow.
5048 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
5049 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
5050 * bfd-in2.h: Rebuild.
5051
5052 Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
5053
5054 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
5055 go back to telling the tools this reloc operates on 32 bits.
5056
5057 Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
5058
5059 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
5060 rather than a direct fprintf.
5061 * archive.c (_bfd_write_archive_contents): Likewise.
5062 * coffcode.h (coff_slurp_symbol_table): Likewise.
5063 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
5064 (ppc_elf_unsupported_reloc): Likewise.
5065 (ppc_elf_relocate_section): Likewise.
5066 * i386linux.c (linux_tally_symbols): Likewise.
5067 (linux_finish_dynamic_link): Likewise.
5068 * osf-core.c (osf_core_core_file_p): Likewise.
5069 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
5070 * som.c (som_sizeof_headers): Likewise.
5071 * srec.c (srec_bad_byte): Likewise.
5072 * bfd.c (bfd_assert): Likewise. Also change file to be const.
5073 * libbfd-in.h (bfd_assert): Declare first parameter const.
5074 * libbfd.h: Rebuild.
5075 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
5076 bfd_reloc_overflow is enough.
5077 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
5078 * coff-h8500.c (rtype2howto): Likewise.
5079 * coff-z8k.c (rtype2howto): Likewise.
5080 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
5081 * elf.c (_bfd_elf_get_lineno): Likewise.
5082 (_bfd_elf_no_info_to_howto): Likewise.
5083 (_bfd_elf_no_info_to_howto_rel): Likewise.
5084 * hp300hpux.c (convert_sym_type): Likewise.
5085 (MY(swap_std_reloc_in)): Likewise.
5086 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
5087
5088 * libaout.h (struct aoutdata): Add line_buf field.
5089 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
5090 and filename_buffer. Instead, use a malloc buffer stored in the
5091 new line_buf field. Remove length restrictions.
5092
5093 * coffgen.c (string_size): Remove static variable.
5094 (debug_string_size, debug_string_section): Likewise.
5095 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
5096 and debug_string_size_p parameters. Use them instead of the
5097 global variables. Change all callers.
5098 (coff_write_symbol): Likewise.
5099 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
5100 (coff_write_symbols): Add local variables to replace removed
5101 global variables.
5102
5103 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
5104 function, and line_base fields.
5105 * libcoff.h: Rebuild.
5106 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
5107 information, rather than using static variables.
5108
5109 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
5110 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
5111
5112 * init.c (initialized): Remove static variable.
5113 (bfd_init): Don't bother setting initialized.
5114 (bfd_check_init): Remove.
5115 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
5116 * libbfd.h: Rebuild.
5117
5118 Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
5119
5120 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
5121 size for full core dumps. Copy core file header to private data.
5122 (rs6000coff_core_file_failing_command,
5123 rs6000coff_core_file_failing_signal): New functions to extract
5124 the file name and terminating signal from the core file.
5125 * coff-rs6000.c: Use them.
5126
5127 Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
5128
5129 Change arch info to be const, initialized at compile time.
5130 * archures.c: Reindent many functions. Change CONST to const.
5131 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
5132 nothing set it anyhow. Make next const.
5133 (bfd_arch_info_list): Remove.
5134 (bfd_archures_list): Rename from archures_init_table. Change from
5135 a table of function pointers to a table of bfd_arch_info_type
5136 structure addresses.
5137 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
5138 (bfd_lookup_arch): Likewise.
5139 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
5140 const pointer.
5141 (bfd_default_arch_struct): Make const.
5142 (bfd_arch_init, bfd_arch_linkin): Remove.
5143 (bfd_get_arch_info): Return a const pointer.
5144 * init.c (bfd_init): Don't call bfd_arch_init.
5145 * bfd.c (struct _bfd): Make arch_info const.
5146 * bfd-in2.h: Rebuild.
5147 * libbfd.h: Rebuild.
5148 * configure.in: Put & before everything in $selarchs.
5149 * configure: Rebuild.
5150 * cpu-*.c: Change bfd_*_arch from a function which calls
5151 bfd_arch_linkin to a const structure.
5152 * ieee.c (ieee_object_p): Make arch const.
5153
5154 Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
5155
5156 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
5157 PowerPC V.4.
5158 * bfd-in2.h: Regenerate.
5159 * libbfd.h: Regenerate.
5160
5161 * elf32-ppc.c (reloc_type): Update names to match current draft.
5162 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
5163 relative. Update names to current V.4 draft.
5164 (ppc_elf_reloc_type_lookup): Add support for more relocations.
5165 (ppc_elf_relocate_section): Rename relocations to match draft.
5166
5167 Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
5168
5169 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
5170 compiled with -mrelocatable-lib to be linked with either normal
5171 modules or -mrelocatable modules.
5172
5173 Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
5174
5175 * coffcode.h (coff_write_object_contents): Clear the vstamp field
5176 in the a.out header.
5177
5178 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
5179 a reloc against a local symbol, even if it's not a section.
5180
5181 Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
5182
5183 * targets.c (bfd_target): Remove unused align_power_min field.
5184 * bfd-in2.h: Rebuild.
5185 * All backends: Remove initialization of align_power_min.
5186
5187 Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
5188
5189 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
5190
5191 Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
5192
5193 * config.bfd (mips-dec-netbsd*): New target.
5194 * configure.host (mips-dec-netbsd*): New host.
5195 * configure.in (mips-dec-netbsd*): New native.
5196 * configure: Rebuild.
5197
5198 Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
5199
5200 Make the COFF backend linker merge common types:
5201 * cofflink.c (struct coff_debug_merge_element): Define.
5202 (struct coff_debug_merge_type): Define.
5203 (struct coff_debug_merge_hash_entry): Define.
5204 (struct coff_debug_merge_hash_table): Define.
5205 (coff_debug_merge_hash_table_init): Define.
5206 (coff_debug_merge_hash_table_free): Define.
5207 (coff_debug_merge_hash_lookup): Define.
5208 (struct coff_final_link_info): Add debug_merge field.
5209 (coff_debug_merge_hash_newfunc): New static function.
5210 (_bfd_coff_final_link): Allocate and free debug_merge table.
5211 (coff_link_input_bfd): Merge identical enum, struct and union
5212 types.
5213
5214 Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
5215
5216 Convert i960 COFF to use COFF backend linker.
5217 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
5218 structure to store the symbol being used.
5219 (coff_i960_start_final_link): New static function.
5220 (coff_i960_relocate_section): New static function.
5221 (coff_i960_adjust_symndx): New static function.
5222 (coff_start_final_link): Define.
5223 (coff_relocate_section): Define.
5224 (coff_adjust_symndx): Define.
5225 * coffcode.h (bfd_coff_backend_data): Add new callback function
5226 _bfd_coff_start_final_link.
5227 (bfd_coff_start_final_link): Define.
5228 (coff_start_final_link): Define if not defined.
5229 (bfd_coff_std_swap_table): Add coff_start_final_link.
5230 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
5231 visible.
5232 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
5233 function callback is not NULL.
5234 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
5235 (_bfd_coff_internal_syment_name): Declare.
5236 * libcoff.h: Rebuild.
5237 * configure.in (icoff_big_vec): Add cofflink.o.
5238 (icoff_little_vec): Likewise.
5239 * configure: Rebuild.
5240
5241 Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
5242
5243 * Makefile.in (clean-info): Remove extraneous tab from line
5244 following action.
5245
5246 Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
5247
5248 * cofflink.c (coff_link_input_bfd): Fail if a section with no
5249 contents has relocs.
5250
5251 Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
5252
5253 * coffcode.h (coff_compute_section_file_positions): Keep the
5254 raw size safe.
5255 (coff_write_object_contents): Remember if it's a relocatable
5256 file.
5257 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
5258 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
5259 if relocatable file. Swap out saved raw size.
5260
5261 Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
5262
5263 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
5264 (maintainer-clean): Rename from realclean, passing
5265 maintainer-clean down to subdirectories, but leave realclean as a
5266 synonym.
5267
5268 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
5269 warning callback.
5270
5271 * dep-in.sed: Remove config.h from generated dependencies.
5272
5273 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
5274 broken out of sunos_canonicalize_dynamic_symtab.
5275 (sunos_canonicalize_dynamic_symtab): Call new function
5276 sunos_slurp_dynamic_symtab.
5277 (sunos_add_dynamic_symbols): Add three new parameters. Return the
5278 dynamic symbol table to the caller.
5279 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
5280 callback to override the symbols being read.
5281 * libaout.h (struct aout_backend_data): Add three new parameters
5282 to add_dynamic_symbols callback.
5283
5284 Extensive minor changes to avoid various gcc warnings. Also:
5285 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
5286 * archures.c (bfd_arch_info_type): Change mach field from long to
5287 unsigned long.
5288 (bfd_lookup_arch): Change machine parameter from long to unsigned
5289 long.
5290
5291 Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
5292
5293 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
5294 a symbol with a non-zero plt_offset.
5295
5296 Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
5297
5298 * elfcode.h (align_file_position): Remove; not used.
5299
5300 * configure.in: Only check for <sys/procfs.h> on a native system,
5301 and make sure it defines prstatus_t.
5302 * configure: Rebuild.
5303
5304 Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
5305
5306 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
5307
5308 * config.in: Rename from config.h.in.
5309 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
5310 Check for config.h:config.in when creating stamp-h.
5311 * configure: Rebuild.
5312 * Makefile.in (stamp-h): Depend upon config.in rather than
5313 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
5314 calling config.status.
5315
5316 * Makefile.in (do_distclean): Remove config.h and stamp-h.
5317 (Makefile): Just rebuild Makefile.
5318 (config.h, stamp-h): New targets.
5319 * configure.in: Create stamp-h when rebuilding config.h.
5320 * configure: Rebuild.
5321
5322 Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
5323
5324 * configure.in: Call AC_CONFIG_HEADER. Substitute
5325 HOST_64BIT_LONG. Check that various header files exist. Check
5326 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
5327 and/or free need to be declared. Don't make a link to sysdep.h.
5328 Define TRAD_HEADER for various hosts.
5329 * configure: Rebuild.
5330 * configure.host: Don't set my_host. Add definitions taken from
5331 host header files for various entries. Remove entries which now
5332 do nothing.
5333 * acconfig.h: New file.
5334 * config.h.in: New file, built by autoheader.
5335 * sysdep.h: New file.
5336 * Makefile.in (do_distclean): Don't remove sysdep.h.
5337 (RECONFIG): Remove.
5338 (LOCAL_H_DEPS): New variable.
5339 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
5340 $(RECONFIG).
5341 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
5342 ($(OPTIONAL_BACKENDS)): Likewise.
5343 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
5344 looking through sysdep.h.
5345 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
5346 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
5347 (fprintf_vma, sprintf_vma): Likewise.
5348 (int64_type, uint64_type): Don't define.
5349 * bfd-in2.h: Rebuild.
5350 * archures.c, bfd.c, srec.c: Include <ctype.h>.
5351 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
5352 * lynx-core.c: Include stuff from old hosts/lynx.h.
5353 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
5354 rather than NO_FCNTL.
5355 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
5356 rather than NATIVE_HPPAHPUX_COMPILER.
5357 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
5358 is defined.
5359 * hosts/*.h: Remove all header files which merely include,
5360 declare, and define things. Leave header files which define
5361 information needed by trad-core.c.
5362
5363 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
5364 (BFD_CC_FOR_BUILD): Define.
5365 * configure.in: Use BFD_CC_FOR_BUILD.
5366 * configure: Rebuild.
5367
5368 Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
5369
5370 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
5371 * configure: Rebuild.
5372
5373 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
5374 a global symbol.
5375
5376 Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
5377
5378 * config.bfd: i386pe_ve -> i386pe_vec.
5379
5380 Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
5381
5382 * configure.host: Incorporate host Makefile fragments by setting
5383 shell variables.
5384 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
5385 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
5386 value based on whether the code is being compiled by a cross
5387 compiler. Don't substitute host_makefile_frag or frags.
5388 * aclocal.m4: New file to define local AC_PROG_CC.
5389 * configure: Rebuild.
5390 * Makefile.in (INSTALL): Set to @INSTALL@.
5391 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
5392 (INSTALL_DATA): Set to @INSTALL_DATA@.
5393 (AR): Set to @AR@.
5394 (CC): Define as @CC@.
5395 (CFLAGS): Set to @CFLAGS@.
5396 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
5397 (@host_makefile_frag@): Remove.
5398 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
5399 after other options.
5400 (config.status): Remove dependency upon @frags@.
5401 * config/*.mh, config/README: Remove.
5402
5403 * config.bfd: Rewrite to incorporate the contents of the Makefile
5404 fragments by setting shell variables, rather than merely returning
5405 the name of a Makefile fragment.
5406 * configure.in: Use shell variables set by config.bfd rather than
5407 looking at the target Makefile fragment files. Don't substitute
5408 target_makefile_frag. Do substitute TDEFINES.
5409 * configure: Rebuild.
5410 * Makefile.in (@target_makefile_frag@): Remove.
5411 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
5412 * config/*.mt: Remove.
5413
5414 Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
5415
5416 * configure.in: Put changequote lines around "i[345]86" patterns
5417 section of core file support.
5418
5419 Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
5420
5421 * som.c (som_bfd_print_private_bfd_data): Define to use the
5422 generic version.
5423
5424 Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
5425
5426 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
5427 entry, text_start and data_start.
5428
5429 Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
5430
5431 * Makefile.in (OFILES): Remove $(TDEPFILES).
5432 * config/apollo.mt (TDEPFILES): Remove.
5433 * config/README: Update.
5434
5435 * configure.in: For a native configuration, set COREFILE and
5436 COREFLAG based on the canonical host name.
5437 * configure: Rebuild.
5438 * Makefile.in: Rebuild dependencies.
5439 (ALL_CFLAGS): Add @COREFLAG@.
5440 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
5441 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
5442 support routines. Check LYNX_CORE rather than HOST_LYNX.
5443 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
5444 * i386lynx.c: Likewise.
5445 * m68klynx.c: Likewise.
5446 * sparclynx.c: Likewise.
5447 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
5448 * *-core.c: Comment changes.
5449 * config/decstation.mh (HDEPFILES): Remove.
5450 (HDEFINES): Remove -DTRAD_CORE.
5451 * config/irix3.mh (RANLIB): Remove.
5452 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
5453 (HDEFINES): Remove -DIRIX_CORE.
5454 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
5455 (HDEFINES): Remove -DTRAD_CORE.
5456 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
5457 * config/ultra3.mh (RANLIB): Remove.
5458 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
5459 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
5460 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
5461 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
5462 * config/hppahpux.mh, config/hppaosf.mh: Remove.
5463 * config/i386aix.mh, config/i386bsd.mh: Remove.
5464 * config/i386linux.mh, config/i386mach3.mh: Remove.
5465 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
5466 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
5467 * config/mipsmach3.mh, config/news-mips.mh: Remove.
5468 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
5469 * config/rs600.mh, config/rs6000lynx.mh: Remove.
5470 * config/solaris2.mh, config/stratus.mh: Remove.
5471 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
5472 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
5473
5474 Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
5475
5476 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
5477 DT_FINI entry if the appropriate symbol is not in the hash table.
5478
5479 * libelf.h (struct elf_backend_data): Add create_program_headers
5480 and want_hdr_in_seg fields.
5481 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
5482 defined.
5483 (elf_backend_create_program_headers): Likewise.
5484 (elfNN_bed): Initialize create_program_headers and
5485 want_hdr_in_seg.
5486 * elf.c (get_program_header_size): Call create_program_headers
5487 backend routine.
5488 (map_program_segments): Check want_hdr_in_seg backend field. Call
5489 create_program_headers backend routine.
5490
5491 * elf.c (assign_file_positions_except_relocs): Align non allocated
5492 sections when creating an executable.
5493
5494 * elfcode.h (elf_swap_phdr_in): Make non static.
5495 (elf_swap_phdr_out): Make non static.
5496 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
5497 (bfd_elf32_swap_phdr_out): Declare.
5498 (bfd_elf64_swap_phdr_in): Declare.
5499 (bfd_elf64_swap_phdr_out): Declare.
5500
5501 * ecofflink.c (ecoff_collect_shuffle): New static function.
5502 (_bfd_ecoff_get_accumulated_pdr): New function.
5503 (_bfd_ecoff_get_accumulated_sym): New function.
5504 (_bfd_ecoff_get_accumulated_ss): New function.
5505 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
5506 (_bfd_ecoff_get_accumulated_sym): Declare.
5507 (_bfd_ecoff_get_accumulated_ss): Declare.
5508 * libbfd.h: Rebuild.
5509
5510 Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
5511
5512 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
5513
5514 * elflink.h (elf_link_add_object_symbols): Handle indirect and
5515 warning symbols. If any section is named .gnu.warning.XXX, treat
5516 the contents as a warning to be issued if the symbol XXX is
5517 referenced.
5518 (elf_link_output_extsym): For an indirect or warning symbol, just
5519 output the symbol it points to.
5520
5521 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
5522 if bfd_hash_allocate fails, since it will already be set.
5523 (generic_link_hash_newfunc): Likewise.
5524 (archive_hash_newfunc): Likewise.
5525 (hash_entry_bfd): New static function.
5526 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
5527 callback. Allocate a new warning using the hash table newfunc.
5528 Use bfd_hash_replace to update the entry in the hash table, rather
5529 than assuming we can copy the fields with structure assignment.
5530
5531 * hash.c (bfd_hash_replace): New function.
5532 * bfd-in.h (bfd_hash_replace): Declare.
5533 * bfd-in2.h: Rebuild.
5534
5535 Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
5536
5537 * config.bfd: Add mips*vr4300-*-elf* target.
5538 * config/mipsbvr4300.mt: Added.
5539
5540 See file ChangeLog.2
5541
5542 \f
5543 Local Variables:
5544 mode: indented-text
5545 left-margin: 8
5546 fill-column: 74
5547 version-control: never
5548 End: