ebe5074601bc52efa360009c9e00563d5a7e85aa
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 Tue Apr 21 23:11:51 1998 Richard Henderson <rth@cygnus.com>
2
3 * archive.c (_bfd_generic_read_ar_hdr_mag): Fix lossage in last
4 change wrt length == max_namelen.
5
6 Tue Apr 21 21:19:36 1998 Tom Tromey <tromey@scribbles.cygnus.com>
7
8 * Many files: Added gettext invocations around user-visible
9 strings.
10 * libbfd-in.h: Added gettext includes and defines.
11 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
12 HAVE_LC_MESSAGES): Define.
13 * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and
14 po/Makefile.
15 * Makefile.am (SUBDIRS): Added po.
16 (POTFILES): New macro.
17 (po/POTFILES.in): New target.
18 (SOURCE_HFILES): New macro.
19 (HFILES): Use it.
20 * po/Make-in, po/POTFILES.in, po/bfd.pot: New files.
21
22 Tue Apr 21 13:38:18 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
23
24 * elfcore.h (bfd_prstatus): Copy core_prstatus from the first
25 NT_PRSTATUS note section encountered, it contains the status of
26 the currently executing thread when the core file was written.
27
28 Tue Apr 21 10:00:12 1998 Nick Clifton <nickc@cygnus.com>
29
30 * libcoff.h: Add extra parameter to
31 bfd_coff_link_output_has_begun overrideable function.
32 * cofflink.c: Pass extra parameter to
33 bfd_coff_link_output_has_begun function.
34 * bfd-in.h: Add prototypes for exported ARM interworking
35 functions.
36 * peicode.h: ARM specific code reorganised to conform to BFD
37 coding conventions.
38 * coffcode.h: ARM specific code reorganised to conform to BFD
39 coding conventions.
40 * coff-arm.c: Code reorganised to conform to the BFD coding
41 conventions. Global variables have been moved into an ARM
42 specific hash table structure and a new function:
43 bfd_arm_get_bfd_for_interworking() has been created which is
44 called from the linker scripts.
45
46 Tue Apr 21 00:11:51 1998 Richard Henderson <rth@cygnus.com>
47
48 * archive.c (_bfd_generic_read_ar_hdr_mag): Simplify end-of-name test.
49
50 * elf64-alpha.c (elf64_alpha_find_reloc_at_ofs): Renamed from
51 elf64_alpha_relax_find_reloc_ofs. Changed all callers.
52 (elf64_alpha_add_symbol_hook): Put small commons in .scommon not .sbss.
53 (elf64_alpha_size_got_sections): Don't merge .got sections twice.
54
55 Sat Apr 18 01:21:04 1998 Stan Cox <scox@cygnus.com>
56
57 * config.bfd: Added sparc86x support.
58
59 Fri Apr 17 22:29:04 1998 Ian Lance Taylor <ian@cygnus.com>
60
61 * elf32-mips.c (mips_elf_relocate_section): Do not complain about
62 an out of range pc-relative jump/call to an undefined weak symbol.
63
64 Thu Apr 16 13:49:00 1998 Richard Henderson <rth@cygnus.com>
65
66 * elf64-alpha.c (elf64_alpha_do_reloc_gpdisp): Do all gpdisp
67 comparisons signed.
68
69 Thu Apr 16 11:43:33 1998 Ian Lance Taylor <ian@cygnus.com>
70
71 * archive.c (bfd_generic_archive_p): If a slurp subroutine returns
72 an error other than bfd_error_system_call, set the error to
73 bfd_error_wrong_format.
74
75 * targets.c (bfd_target_vector) [SELECT_VECS not defined]: Add
76 bfd_elf32_powerpcle_vec.
77
78 * elf.c (copy_private_bfd_data): If all the p_paddr fields in the
79 program segments are zero, don't set p_paddr_valid.
80
81 Wed Apr 15 22:15:16 1998 Richard Henderson <rth@cygnus.com>
82
83 * elf64-alpha.c: Initial implementation of relaxation --
84 (struct alpha_elf_link_hash_entry): Add use_count member.
85 (elf64_alpha_check_relocs): Initialize and increment it.
86 (elf64_alpha_can_merge_gots): Check it when considering merging.
87 (elf64_alpha_merge_gots): Drop entries with zero use.
88 (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
89 (elf64_alpha_always_size_sections): Split out got sizing ...
90 (elf64_alpha_size_got_sections): ... here. New function.
91 (elf64_alpha_relax_find_reloc_ofs): New function.
92 (elf64_alpha_relax_with_lituse): Likewise.
93 (elf64_alpha_relax_without_lituse): Likewise.
94 (elf64_alpha_relax_opt_call): Likewise.
95 (elf64_alpha_relax_section): Likewise.
96 (elf64_alpha_add_symbol_hook): Likewise.
97 (elf64_alpha_howto_table): Implement GPRELHIGH/LOW & IMMED_GP_16.
98 (elf64_alpha_relocate_section): Likewise.
99 (bfd_elf64_bfd_relax_section): Define.
100 (elf_backend_add_symbol_hook): Likewise.
101
102 Wed Apr 15 16:08:46 1998 Richard Henderson <rth@cygnus.com>
103
104 * elf.c (prep_headers): Use new EM_SPARCV9 symbol.
105 * elf64-sparc.c (ELF_MACHINE_CODE): Likewise.
106 (ELF_MACHINE_ALT1): New. Set to EM_OLD_SPARC64.
107
108 Wed Apr 15 11:34:33 1998 Ian Lance Taylor <ian@cygnus.com>
109
110 * configure.in: Add -lkernel32 to WIN32LIBADD on cygwin32.
111 * configure: Rebuild.
112
113 Mon Apr 13 16:46:27 1998 Ian Lance Taylor <ian@cygnus.com>
114
115 * Makefile.am (libbfd_la_LIBADD): Add @WIN32LIBADD@.
116 (libbfd_la_LDFLAGS): Add @WIN32LDFLAGS@.
117 * configure.in: Define and substitute WIN32LDFLAGS and
118 WIN32LIBADD.
119 * aclocal.m4: Rebuild with new libtool.
120 * configure, Makefile.in: Rebuild.
121
122 Fri Apr 10 13:44:27 1998 Ian Lance Taylor <ian@cygnus.com>
123
124 * coffcode.h (coff_write_object_contents): Move a PE COMDAT symbol
125 before any other symbols in the same section.
126
127 Wed Apr 8 14:50:23 1998 Michael Meissner <meissner@cygnus.com>
128
129 * config.bfd (powerpc*-*-*): Remove PowerPC NT support from ELF
130 systems.
131
132 Tue Apr 7 16:25:31 1998 Gavin Romig-Koch <gavin@cygnus.com>
133
134 * dwarf2.c (comp_unit): Move it earlier in the source. Add
135 addr_size.
136 (read_address): Replace 'bdf*' argument with 'comp_unit*' argument.
137 Use addr_size for address size, rather than sizeof(bfd_vma).
138 (read_attribute): Replace bdf* argument with 'comp_unit*' argument.
139 Fix call to read_address.
140 (decode_line_info): Replace bdf* argument with 'comp_unit*' argument.
141 Scrap other unneeded arguments. Fix call to read_address.
142 (scan_unit_for_functions): Fix call to read_attribute.
143 (parse_comp_unit): We now handle more values for addr_size.
144 Set addr_size in unit. Fix call to read_attribute and
145 decode_line_info.
146
147 Tue Apr 7 15:44:47 1998 Gavin Romig-Koch <gavin@cygnus.com>
148
149 * dwarf2.c (parse_comp_unit): Drop use of unit->name when it is null.
150
151 Tue Apr 7 12:35:18 1998 Ian Lance Taylor <ian@cygnus.com>
152
153 * archures.c (bfd_default_scan): Add m68k cases back to default
154 switch, reverting patch of March 25, since IEEE support depends
155 upon them.
156
157 Mon Apr 6 14:06:40 1998 Ian Lance Taylor <ian@cygnus.com>
158
159 * Makefile.am (diststuff): New target.
160 * Makefile.in: Rebuild.
161
162 Sun Apr 5 16:21:44 1998 Jeffrey A Law (law@cygnus.com)
163
164 * som.c (som_bfd_ar_write_symbol_stuff): Fix computation of
165 som_offset when we have an extended name table.
166
167 Sun Apr 5 16:04:39 1998 H.J. Lu <hjl@gnu.org>
168
169 * Makefile.am (stamp-lib): Check that .libs/libbfd.a exists before
170 trying to copy it.
171 * Makefile.in: Rebuild.
172
173 Fri Apr 3 11:09:42 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
174
175 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Generate section
176 symbols when creating a shared library.
177 (elf_m68k_adjust_dynindx): New function, used by above code.
178 (elf_m68k_finish_dynamic_sections): Initialize the section
179 symbols.
180 (elf_m68k_relocate_section): Change abort to BFD_ASSERT.
181
182 Wed Apr 1 16:04:02 1998 Nick Clifton <nickc@cygnus.com>
183
184 * coff-arm.c (in_reloc_p): Use ARM_RVA32 in place of constant
185 value 11.
186
187 Wed Apr 1 13:36:58 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
188
189 * elf32-m68k.c (elf_m68k_relocate_section, case R_68K_PLT*O): Fix
190 assertion.
191
192 Tue Mar 31 00:12:12 1998 Jeffrey A Law (law@cygnus.com)
193
194 * elf-m10300.c (mn10300_elf_relax_section): Correctly handle
195 absolute symbols.
196
197 Mon Mar 30 12:46:15 1998 Ian Lance Taylor <ian@cygnus.com>
198
199 * configure.in: Set version to 2.9.1.
200 * configure: Rebuild.
201
202 * Branched binutils 2.9.
203
204 Mon Mar 30 12:20:50 1998 Brent Baccala <baccala@freesoft.org>
205
206 * syms.c (ENABLE_CACHING): Define.
207 (struct indexentry): Define.
208 (struct stab_cache): Remove.
209 (cmpindexentry): New static function.
210 (struct stab_find_info): Add new fields: indextable,
211 indextablesize, cached_indexentry, cached_offset, cached_stab, and
212 cached_file_name. Remove fields: file_cache, function_cache, and
213 line_cache.
214 (_bfd_stab_section_find_nearest_line): Rewrite to build a sorted
215 index table and search it.
216
217 Mon Mar 30 10:39:34 1998 Ian Lance Taylor <ian@cygnus.com>
218
219 * elf.c (_bfd_elf_copy_private_section_data): Call
220 copy_private_bfd_data once we've seen the last SEC_ALLOC section.
221
222 * cpu-mips.c: Remove trailing comma at end of enumeration list.
223
224 Sat Mar 28 16:33:02 1998 Ian Lance Taylor <ian@cygnus.com>
225
226 * coff-arm.c: Define all globally visible variables and functions
227 only when COFF_WITH_PE is not defined.
228 * configure.in (armpe_little_vec, armpe_big_vec): Add
229 coff-arm.lo.
230 * configure: Rebuild.
231
232 Fri Mar 27 16:06:02 1998 Ian Lance Taylor <ian@cygnus.com>
233
234 Fix some gcc -Wall warnings:
235 * aout-arm.c (MY(fix_pcrel_26)): Add casts to avoid warnings.
236 * archive.c (_bfd_generic_read_ar_hdr_mag): Likewise.
237 * archures.c (bfd_default_scan): Likewise.
238 * bfd.c (bfd_scan_vma): Likewise.
239 * binary.c (mangle_name): Likewise
240 * coff-arm.c (aoutarm_fix_pcrel_26): Likewise.
241 * coff-sh.c (sh_relocate_section): Likewise.
242 * coff-stgo32.c (create_go32_stub): Likewise.
243 * coffcode.h (coff_slurp_line_table): Likewise.
244 * ecoff.c (_bfd_ecoff_write_armap): Likewise.
245 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
246 (assign_file_positions_for_segments): Likewise.
247 * elf32-mips.c (mips_elf_relocate_section): Likewise.
248 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
249 * oasys.c (oasys_write_sections): Likewise.
250 * ppcboot.c (ppcboot_object_p): Likewise.
251 (mangle_name): Likewise.
252 * riscix.c (riscix_fix_pcrel_26): Likewise.
253 * srec.c (srec_scan): Likewise.
254 * stabs.c (_bfd_write_section_stabs): Likewise.
255 * sunos.c (sunos_add_dynamic_symbols): Likewise.
256 * aout-ns32k.c (_bfd_ns32k_relocate_contents): Add default case to
257 switch. Declare parameters for function pointers.
258 * archures.c (bfd_default_scan): Add braces to avoid ambiguous if
259 warning.
260 * elf.c (elf_sort_sections): Likewise.
261 * coff-arm.c (coff_thumb_pcrel_common): Initialize relocation.
262 Add default cases to switches.
263 (coff_arm_relocate_section): Remove unused local variables.
264 Always set rstat.
265 (coff_arm_bfd_set_private_flags): Change flag variable to type
266 flagword.
267 * coff-mips.c (mips_relocate_section): Initialize use_lo.
268 * coff-ppc.c (ppc_record_toc_entry): Change i to unsigned int.
269 (dump_toc): Change cat to const, and initialize it.
270 * coff-sh.c (sh_relax_delete_bytes): Initialize start and voff.
271 * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
272 (sh_elf_relocate_section): Initialize r_symndx.
273 * coffcode.h (coff_compute_section_file_positions): Only declare
274 old_sofar if ALIGN_SECTIONS_IN_FILE.
275 (coff_write_object_contents): Initialize csym.
276 * coffgen.c (coff_pointerize_aux): Make type and class unsigned.
277 * cpu-ns32k.c (_bfd_ns32k_get_displacement): Add default case to
278 switch.
279 * dwarf2.c: Include libiberty.h.
280 (read_2_signed_bytes, read_4_signed_bytes): Comment out.
281 (decode_line_info): Remove unused local variables.
282 * elf32-m32r.c (m32r_elf_sda16_reloc): Likewise.
283 (m32r_elf_relocate_section): Likewise.
284 * elf32-v850.c (v850_elf_store_addend_in_insn): Likewise.
285 (v850_elf_reloc): Likewise.
286 * elf-bfd.h (elf_linker_section_t): Make alignment unsigned.
287 (struct elf_obj_tdata): Make cverdefs and cverrefs unsigned.
288 * elf.c (assign_file_positions_for_segments): Always set adjust.
289 * elf32-d30v.c (bfd_elf_d30v_reloc): Initialize tmp_addr. Fully
290 parenthesize expression.
291 * elf32-m32r.c (m32r_elf_relocate_section): Always initialize h.
292 (m32r_elf_object_p): Return a value.
293 (m32r_elf_print_private_bfd_data): Change fprintf format string.
294 * elf32-mips.c (mips_elf_final_link): Initialize last.
295 (mips_elf_finish_dynamic_sections): Initialize last and dindx.
296 * elf32-v850.c (v850_elf_object_p): Return a value.
297 (v850_elf_print_private_bfd_data): Change fprintf format string.
298 * elfcode.h (elf_slurp_symbol_table): Change symcount and i to
299 unsigned long.
300 * elflink.h (elf_link_add_object_symbols): Change vernum to
301 unsigned int, and initialize it. Change fprintf format string.
302 (NAME(bfd_elf,size_dynamic_sections)): Cast -1 to bfd_size_type
303 when setting or comparing to soname_indx.
304 (elf_create_pointer_linker_section): Change num_symbols to
305 unsigned int.
306 * libcoff-in.h (coff_data_type): Change flags to flagword.
307 * peicode.h (pe_print_idata): Initialize idx. Change j to
308 bfd_size_type. Initialize hint_member. Remove useless test to
309 time_stamp.
310 (pe_print_edata): Change num_functions and num_names in struct
311 EDT_type to unsigned long. Remove cast. Change fprintf format
312 string.
313 * ppcboot.c (ppcboot_object_p): Change i to size_t.
314 * reloc.c (bfd_get_reloc_size): Change return type to unsigned
315 int.
316 * reloc16.c (bfd_coff_reloc16_relax_section): Change shrinks to
317 int *. Update uses. Change j to long.
318 * bfd-in2.h, libcoff.h: Rebuild.
319
320 Fri Mar 27 10:10:46 1998 Catherine Moore <clm@cygnus.com>
321
322 * elf32-v850.c Remove definition of USE_REL.
323 (v850_elf_info_to_howto_rela): New function.
324 (v850_elf_perform_relocation): Renamed from
325 v850_elf_store_addend_in_insn. Removed replace argument.
326 (v850_elf_reloc): store the relocation in the addend field instead
327 of the insn.
328 (v850_elf_final_link_relocate): Now calls
329 v850_elf_perform_relocation.
330 (v850_elf_relocate_section): Remove code to generate REL
331 relocations.
332
333 Thu Mar 26 13:32:17 1998 Ian Lance Taylor <ian@cygnus.com>
334
335 * coffcode.h (coff_new_section_hook): Set the type and storage
336 class in the native symbol information allocated for a new section
337 symbol.
338
339 Thu Mar 26 10:13:41 1998 Nick Clifton <nickc@cygnus.com>
340
341 * peicode.h: Chain together calls to
342 coff_bfd_copy_private_bfd_data and
343 coff_bfd_print_private_bfd_data.
344
345 * coff-arm.c: Add prototypes for
346 coff_arm_bfd_print_private_bfd_data and
347 coff_arm_bfd_copy_private_bfd_data.
348
349 Wed Mar 25 15:45:55 1998 Nick Clifton <nickc@cygnus.com>
350
351 * coffcode.h (coff_mkobject_hook): Set private falgs even for a PE
352 build.
353
354 * peicode.h: Call arm-coff private data functions after handling
355 pe private data.
356
357 * coff-arm.c: Turn statics into globals so that they can be shared
358 both pe and pei backends.
359
360 Wed Mar 25 15:19:38 1998 Ian Lance Taylor <ian@cygnus.com>
361
362 * aoutf1.h (sunos_set_arch_mach): Use bfd_mach_m68* rather than
363 plain numbers.
364 (sunos_write_object_contents): Likewise.
365 * aoutx.h (NAME(aout,machine_type)): Likewise.
366 * coffcode.h (coff_set_arch_mach_hook): Likewise.
367
368 Wed Mar 25 13:59:24 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
369
370 * archures.c (bfd_mach_m68*): Add definitions for various m68k
371 variants.
372 (bfd_default_scan): Remove m68k special cases.
373 * bfd-in2.h: Rebuild.
374 * mipsbsd.c (MY(write_object_contents)): Use bfd_mach_m68* rather
375 than plain numbers.
376 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
377 * cpu-m68k.c (arch_info_struct): Likewise. Add entry for
378 m68k:68000.
379 (bfd_m68k_arch): Set mach field to zero to signal no explicit
380 selection, change printable_name to just "m68k" and make that the
381 default instead of m68k:68020.
382
383 * aout-tic30.c (NAME): Define this to avoid multiple definitions
384 from aoutx.h.
385 (MY_get_section_contents): Define as aout_32_get_section_contents
386 rather than NAME(aout,get_section_contents).
387
388 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Fix cast.
389
390 * evax-alpha.c (evax_set_arch_mach): Only accept bfd_arch_alpha
391 and call bfd_default_set_arch_mach to do the real work.
392
393 Wed Mar 25 10:41:35 1998 Richard Henderson <rth@cygnus.com>
394
395 * bout.c (BALX): Include return register g14 as part of the insn.
396 (BALX_MASK): New.
397 (calljx_callback): Use it.
398
399 Wed Mar 25 11:19:28 1998 Ian Lance Taylor <ian@cygnus.com>
400
401 * libbfd-in.h (BFD_ALIGN): Cast this parameter to bfd_vma.
402 * libbfd.h: Rebuild.
403
404 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Change
405 byte_count to unsigned int.
406 (mn10300_elf_relax_section): Initialize internal_relocs. Remove
407 unused local variables.
408
409 * evax-alpha.c (evax_close_and_cleanup): Remove unused local
410 variables er and er1.
411
412 * cpu-v850.c: Include <ctype.h>.
413 (scan): Case isdigit argument to unsigned char.
414
415 From Yan Meroth <YAN.MEROTH@st.com>:
416 * ihex.c (ihex_scan): Add extbase variable so that getting an
417 extended linear address record does not ignore any previous
418 extended address.
419 (ihex_write_object_contents): When writing out an extended linear
420 address record, zero out any previous extended address.
421
422 Tue Mar 24 16:09:43 1998 Manfred Hollstein <manfred@s-direktnet.de>
423
424 * ieee.c (do_one): Check section before dereferencing it.
425 (ieee_canonicalize_reloc): Likewise with src->relent.sym_ptr_ptr.
426 (ieee_generic_stat_arch_elt): Likewise with abfd->my_archive.
427
428 Mon Mar 23 18:51:47 1998 Joel Sherrill <joel@OARcorp.com>
429
430 * config.bfd: (sh*-*-rtems*): Switched from ELF to COFF.
431
432 Mon Mar 23 14:23:36 1998 Nick Clifton <nickc@cygnus.com>
433
434 * coff-arm.c: Add interworking functions to pe backends.
435
436 start-sanitize-r5900
437 Sun Mar 22 13:05:08 1998 Jeffrey A Law (law@cygnus.com)
438
439 * elf32-mips.c (R_MIPS15_S3): New relocation type.
440 (elf_mips_howto_table): Add R_MIPS15_S3.
441 (mips_reloc_map): Map BFD_RELOC_MIPS15_S3 to R_MIPS15_S3.
442 * reloc.c (BFD_RELOC_MIPS15_S3): New relocation type.
443 * bfd-in2.h, libbfd.h: Rebuilt.
444
445 end-sanitize-r5900
446 Fri Mar 20 18:47:20 1998 Ian Lance Taylor <ian@cygnus.com>
447
448 * configure.in: Use AM_DISABLE_SHARED.
449 * aclocal.m4, configure: Rebuild with libtool 1.2.
450
451 Fri Mar 20 11:25:41 1998 Nick Clifton <nickc@cygnus.com>
452
453 * coff-arm.c (coff_arm_relocate_section): Better error messages
454 when interowrking conflucts occur. Courtesy of Jonathan Walton
455 and Tony Thompson. PR 15357.
456 (aoutarm_std_reloc_howto): Fixed bitsize fields of rightshifted
457 relocations. Patch courtesy of Jonathan Walton and Tony
458 Thompson. PR 15373.
459
460 Fri Mar 20 02:26:43 1998 Richard Henderson <rth@cygnus.com>
461
462 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Revert
463 part of Feb 22 change controling when to override the existing
464 symbol with the .plt entry.
465
466 Wed Mar 18 09:26:25 1998 Nick Clifton <nickc@cygnus.com>
467
468 * config.bfd (targ_cpu): Add thumb-pe target.
469
470 * coffcode.h (OTHER_GLOBAL_CLASS): Support thumb external
471 functions in PE build.
472
473 Sun Mar 8 23:37:26 1998 Stan Cox <scox@equinox.cygnus.com>
474
475 * config.bfd (sparclite-*-elf*): Added.
476
477 start-sanitize-vr4320
478 Tue Mar 3 11:24:05 1998 Gavin Koch <gavin@cygnus.com>
479
480 * mips-cpu.c: Reorganize sanitization.
481
482 * archures.c, bfd-in2.h, mips-cpu.c : Added bfd_mach_mips4320.
483
484 end-sanitize-vr4320
485 Mon Feb 23 19:31:19 1998 Ian Lance Taylor <ian@cygnus.com>
486
487 * configure.in: Add elf.lo to elf shell variable.
488 * Makefile.am (BFD_LIBS): Remove elf.lo.
489 (BFD_LIBS_CFILES): Remove elf.c.
490 (BFD32_BACKENDS): Add elf.lo.
491 (BFD32_BACKENDS_CFILES): Add elf.c.
492 * configure, Makefile.in: Rebuild.
493
494 1998-02-23 15:53 Richard Henderson <rth@cygnus.com>
495
496 * elf32-i386.c (elf_i386_relocate_section): A pc-relative
497 relocation against a now-local symbol should not have a dynamic
498 relocation.
499
500 Mon Feb 23 16:17:08 1998 Ian Lance Taylor <ian@cygnus.com>
501
502 * peicode.h (coff_swap_filehdr_in): Don't set BFD flag HAS_SYMS in
503 COFF filehdr flags.
504 (pe_print_private_bfd_data): Print PE flags. From Mikey
505 <jeffdb@netzone.com>.
506
507 Sun Feb 22 20:39:00 1998 Richard Henderson <rth@cygnus.com>
508
509 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Don't create
510 a plt entry when we can determine that we authoritatively define
511 the symbol.
512
513 Sun Feb 22 20:33:05 1998 Richard Henderson <rth@cygnus.com>
514
515 * configure.in (COREFILE selection): Remove sparc-*-linux*. They
516 don't actually use trad-core, but a SunOS-style core file handled
517 by gdb directly.
518 * hosts/sparclinux.h: Remove.
519
520 start-sanitize-sky
521 Thu Feb 19 02:38:52 1998 Doug Evans <devans@charmed.cygnus.com>
522
523 * reloc.c (BFD_RELOC_MIPS_DVP_27_S4): New reloc type.
524 * elf32-mips.c (enum reloc_type): Add R_MIPS_DVP_27_S4.
525 (elf_mips_dvp_27_s4_howto): Describe it.
526 (bfd_elf32_bfd_reloc_type_lookup): Handle it.
527 (mips_info_to_how_rel): Handle it.
528 (mips_elf_relocate_section): Handle it.
529 * bfd-in2.h,libbfd.h: Regenerate.
530
531 end-sanitize-sky
532 Wed Feb 18 15:31:06 1998 Ian Lance Taylor <ian@cygnus.com>
533
534 * peicode.h (pe_print_idata): If there is no .idata section, look
535 for the import tables in some other section. Make the initial
536 label line up better with the data. Print the import address
537 table even if there is no import name table. If the import
538 address table holds actual addresses, print them.
539
540 start-sanitize-sky
541 Tue Feb 17 20:00:26 1998 Doug Evans <devans@canuck.cygnus.com>
542
543 * config.bfd (targ_archs): If mips64r5900-sky-elf, add bfd_dvp_arch.
544
545 end-sanitize-sky
546 Tue Feb 17 12:58:34 1998 Ian Lance Taylor <ian@cygnus.com>
547
548 * libbfd.c (bfd_seek): If fseek fails, save errno around call to
549 bfd_tell. If errno is EINVAL, set bfd_error_file_truncated, not
550 bfd_error_system_call.
551
552 Fri Feb 13 13:11:33 1998 Ian Lance Taylor <ian@cygnus.com>
553
554 * Makefile.am (AUTOMAKE_OPTIONS): Define.
555 * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
556
557 From H.J. Lu <hjl@gnu.org>:
558 * Makefile.am (libbfd_la_LDFLAGS): Define.
559 * Makefile.in: Rebuild.
560
561 Thu Feb 12 17:31:11 1998 Ian Lance Taylor <ian@cygnus.com>
562
563 NetBSD patches from Gordon W. Ross <gwr@mc.com>:
564 * netbsd.h (MACHTYPE_OK): Define.
565 (MY(write_object_contents)): Use DEFAULT_ARCH and DEFAULT_MID when
566 calling N_SET_MACHTYPE, rather than having a switch.
567 * libaout.h (enum machine_type): Add M_PMAX_NETBSD, M_VAX_NETBSD,
568 and M_ALPHA_NETBSD.
569 * i386netbsd.c (MACHTYPE_OK): Don't define.
570 (DEFAULT_MID): Define.
571 * m68k4knetbsd.c (SEGMENT_SIZE): Don't define.
572 (MACHTYPE_OK): Don't define.
573 (DEFAULT_MID): Define.
574 * m68knetbsd.c: (MACHTYPE_OK): Don't define.
575 (DEFAULT_MID): Define.
576 * ns32knetbsd.c (MACHTYPE_OK): Don't define.
577 (DEFAULT_MID): Define.
578 * sparcnetbsd.c (MACHTYPE_OK): Don't define.
579 (DEFAULT_MID): Define.
580
581 NetBSD patches from Gordon W. Ross <gwr@mc.com>:
582 * vaxnetbsd.c: New file.
583 * netbsd-core.c: Clean up. Remove unused macros. Use netbsd
584 rather than netbsd_core.
585 * targets.c (vaxnetbsd_vec): Declare.
586 (bfd_target_vector): Add vaxnetbsd_vec. If NETBSD_CORE is
587 defined, add netbsd_core_vec.
588 * configure.in: Set COREFILE for alpha*-*-netbsd* and
589 powerpc-*-netbsd* to netbsd-core.lo. If COREFILE is
590 netbsd-core.lo, set COREFLAG to -DNETBSD_CORE.
591 * config.bfd (alpha*-*-netbsd*): New target.
592 * Makefile.am: Rebuild dependencies.
593 (BFD32_BACKENDS): Add vaxnetbsd.lo.
594 (BFD32_BACKENDS_CFILES): Add vaxnetbsd.c.
595 * configure, Makefile.in: Rebuild.
596
597 * configure.host: Remove the old shared library build stuff. We
598 now use libtool instead.
599
600 Wed Feb 11 17:13:09 1998 Richard Henderson <rth@cygnus.com>
601
602 * tekhex.c (tekhex_write_object_contents): Call tekhex_init.
603
604 Tue Feb 10 19:23:28 1998 H.J. Lu <hjl@gnu.org>
605
606 * configure.in: Take stab-syms.lo out of sparclinux_vec list.
607 * configure: Rebuild.
608
609 Tue Feb 10 15:16:38 1998 Nick Clifton <nickc@cygnus.com>
610 start-sanitize-m32rx
611 * elf32-m32r.c (m32r_elf_merge_private_bfd_data): Do not complain
612 when merging m32r BFDs into m32rx BFDs.
613 end-sanitize-m32rx
614 * elf32-v850.c (remember_hi16s_reloc): New function.
615 (find_remembered_hi16s_reloc): New function.
616 (v850_elf_store_addend_in_insn): Use the above new functions to
617 match up HI6S relocs with LO16 relocs.
618
619 start-sanitize-sky
620 Tue Feb 10 13:25:14 1998 Doug Evans <devans@canuck.cygnus.com>
621
622 * archures.c (bfd_mach_dvp_{vif,gif}): Renamed from ..._{pke,gpuif}.
623 (bfd_txvu_arch): Delete.
624 * cpu-mips.c (arch_info_struct): dvp:{vif,gif} renamed from
625 dvp:{pke,gpuif}.
626 * bfd-in2.h: Regenerate.
627
628 end-sanitize-sky
629 Tue Feb 10 15:01:39 1998 Ian Lance Taylor <ian@cygnus.com>
630
631 * configure.in: Change -linux* to -linux-gnu*.
632 * config.bfd, configure.host: Likewise.
633 * configure: Rebuild.
634
635 Mon Feb 9 19:40:59 1998 Nick Clifton <nickc@cygnus.com>
636
637 * elf32-v850.c (v850_elf_store_addend_in_insn): Fix another
638 LO16/HI16S bug and improve comments about what is going on.
639
640 Sat Feb 7 15:27:03 1998 Ian Lance Taylor <ian@cygnus.com>
641
642 * configure, aclocal.m4: Rebuild with new libtool.
643
644 start-sanitize-v850e
645 Fri Feb 6 14:48:20 1998 Nick Clifton <nickc@cygnus.com>
646
647 * elf32-v850.c (v850_elf_merge_private_bfd_data): Do not complain
648 when merging v850 code into v850e/v850ea code. Do not initialise
649 output flags if the input is the default architecture. PR14732.
650 end-sanitize-v850e
651 Fri Feb 6 11:50:22 1998 Jeffrey A Law (law@cygnus.com)
652
653 start-sanitize-r5900
654 * cpu-mips.c (arch_info_struct): Make r5900 pointer size 32bits.
655 end-sanitize-r5900
656 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): For BFD_RELOC_CTOR
657 get the size from bfd_arch_bits_per_address instead of directly
658 from the isa.
659
660 Thu Feb 5 14:21:34 1998 Michael Meissner <meissner@cygnus.com>
661
662 * libbfd-in.h (BFD_ALIGN): If rounding up would cause the address
663 to wrap, just return all 1's bits instead.
664 * libbfd.h: Regenerate.
665
666 Thu Feb 5 11:51:05 1998 Ian Lance Taylor <ian@cygnus.com>
667
668 * coff-i386.c (coff_pe_i386_relocate_section): New static function
669 if COFF_WITH_PE.
670 (coff_relocate_section): If COFF_WITH_PE, define as
671 coff_pe_i386_relocate_section.
672 * coffcode.h (coff_write_object_contents): If COFF_IMAGE_WITH_PE,
673 skip empty sections, to match coff_write_object_contents.
674
675 * elf64-mips.c (mips_elf64_swap_reloca_out): Swap out r_addend,
676 rather than swapping out r_offset twice. From Luke Deller
677 <luked@cse.unsw.edu.au>.
678
679 Wed Feb 4 19:11:28 1998 Ian Lance Taylor <ian@cygnus.com>
680
681 * configure.in: Set libtool_enable_shared rather than
682 libtool_shared. Remove diversion hack.
683 * configure, Makefile.in, doc/Makefile.in, aclocal.m4: Rebuild
684 with new libtool.
685
686 Wed Feb 4 16:10:21 1998 Brent Baccala <baccala@freesoft.org>
687
688 * syms.c (struct stab_cache): Define.
689 (struct stab_find_info): Remove cached_offset, cached_stab,
690 cached_str, and cached_stroff fields. Add file_cache,
691 function_cache, and line_cache fields.
692 (_bfd_stab_section_find_nearest_line): Use extensive caching to
693 speed up searches.
694
695 Wed Feb 4 13:34:22 1998 Ian Lance Taylor <ian@cygnus.com>
696
697 * peicode.h (pe_print_idata): Check for import of ordinal rather
698 than name.
699 (pe_print_edata): If there is no .edata section, look for the
700 export data in some other section.
701
702 Mon Feb 2 20:05:42 1998 Jason Molenda (crash@bugshack.cygnus.com)
703
704 * configure.in: Change version to 2.8.4.
705 * configure: Regenerated.
706
707 Mon Feb 2 17:39:39 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
708
709 Add tms320c30 support:
710 * cpu-tic30.c: New file.
711 * aout-tic30.c: New file.
712 * coff-tic30.c: New file.
713 * archures.c (bfd_arch_tic30): Define.
714 (bfd_tic30_arch): Declare.
715 (bfd_archures_list): Add bfd_tic30_arch.
716 * targets.c (bfd_target_vector): Add tic30_aout_vec and
717 tic30_coff_vec.
718 * reloc.c (BFD_RELOC_TIC30_LDP): Define.
719 * coffcode.h (coff_set_arch_mach_hook): Add tic30 case.
720 (coff_set_flags): Likewise.
721 * config.bfd (tic30-*-*aout*, tic30-*-*coff*): New targets.
722 * configure.in (tic30_aout_vec, tic30_coff_vec): New vectors.
723 * Makefile.am: Rebuild dependencies.
724 (ALL_MACHINES): Add cpu-tic30.lo.
725 (ALL_MACHINES_CFILES): Add cpu-tic30.c.
726 (BFD32_BACKENDS): Add aout-tic30.lo and coff-tic30.lo.
727 (BFD32_BACKENDS_CFILES): Add aout-tic30.c and coff-tic30.c.
728 * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
729
730 Mon Feb 2 12:25:12 1998 Nick Clifton <nickc@cygnus.com>
731
732 * elf32-v850.c (v850_elf_store_addend_in_insn): Allow HI16_S reloc
733 to lag behind LO16 reloc by a couple of instructions.
734
735 Mon Feb 2 14:09:46 1998 Ian Lance Taylor <ian@cygnus.com>
736
737 * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force
738 make to reexamine the file timestamp.
739 ($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise.
740
741 * elf64-alpha.c (ELF_MAXPAGESIZE): Change to 0x10000 from
742 0x100000.
743
744 start-sanitize-sky
745 Fri Jan 30 17:48:17 1998 Doug Evans <devans@canuck.cygnus.com>
746
747 * elf32-mips.c (elf_mips_dvp_11_pcrel_howto): Set pcrel_offset=true
748 and partial_inplace=false.
749 (mips_elf_relocate_section): Recognize R_MIPS_DVP_11_PCREL.
750
751 end-sanitize-sky
752 Fri Jan 30 19:07:07 1998 Geoff Keating <geoffk@ozemail.com.au>
753
754 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New procedure
755 to create .dynsbss and .rela.sbss sections.
756 (ppc_elf_adjust_dynamic_symbol): Put space for small data to be
757 copied from dynamic objects into .sbss.
758 (ppc_elf_size_dynamic_sections): Strip .rela.sbss if we don't
759 use it. Correct typo of .rela.sdata2.
760 (ppc_elf_finish_dynamic_symbol): Generate reloc to where we
761 put the data, which may now be in .sbss.
762 (ppc_elf_relocate_section): A SDAREL16 reloc can be in dynsbss.
763 (elf_backend_create_dynamic_sections): Define as
764 ppc_elf_create_dynamic_sections.
765
766 * elf32-ppc.c (ppc_elf_check_relocs): Don't emit R_PPC_REL* relocs
767 against _GLOBAL_OFFSET_TABLE_.
768 (ppc_elf_relocate_section): Don't emit R_PPC_REL32 relocs in
769 shared libraries which refer to local symbols. Make sure that the
770 test for allocating space for a reloc in a shared object is the
771 same as the test for emitting a reloc.
772
773 start-sanitize-sky
774 Thu Jan 29 17:44:53 1998 Doug Evans <devans@canuck.cygnus.com>
775
776 * elf32-mips.c: Add dvp support.
777
778 end-sanitize-sky
779 Thu Jan 29 15:55:35 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
780
781 * config.bfd (i[3456]-*-mingw32*): New target.
782 * acinclude.m4 (BFD_BINARY_OPEN): Check for mingw32.
783 * aclocal.m4, configure: Rebuild.
784
785 start-sanitize-sky
786 Wed Jan 28 15:14:28 1997 Doug Evans <devans@canuck.cygnus.com>
787
788 * config.bfd, configure.in: Add dvp support.
789 * configure: Regenerate.
790 * aclocal.m4: Regenerate.
791 * archures.c, reloc.c, cpu-mips.c: Add dvp support.
792 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate.
793
794 end-sanitize-sky
795 Wed Jan 28 13:41:26 1998 Ian Lance Taylor <ian@cygnus.com>
796
797 * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we
798 have a bfd_object.
799
800 Tue Jan 27 21:43:55 1998 Richard Henderson <rth@cygnus.com>
801
802 Sparc v9 ABI compliant PLT:
803 * elf64-sparc.c (PLT_HEADER_SIZE): V9 ABI uses 4 entries.
804 (plt_templates, sparc64_elf_build_plt_entry): Delete.
805 (LARGE_PLT_THRESHOLD): New define.
806 (GOT_RESERVED_ENTRIES): V9 ABI only uses 1.
807 (sparc64_elf_build_plt): New function.
808 (sparc64_elf_plt_entry_offset): Likewise.
809 (sparc64_elf_plt_ptr_offset): Likewise.
810 (sparc64_elf_adjust_dynamic_symbol): Change h->plt_offset to
811 contain the index for convenience. Skip the initial entries
812 in .rela.plt.
813 (sparc64_elf_size_dynamic_sections): Zero the allocated contents
814 memory for the benefit of .rela.plt.
815 (sparc64_elf_relocate_section): Call sparc64_elf_plt_entry_offset.
816 (sparc64_elf_finish_dynamic_symbol): Kill template stuff. Use
817 sparc64_elf_plt_entry_offset & sparc64_elf_plt_ptr_offset for reloc.
818 (sparc64_elf_finish_dynamic_sections): DT_PLTGOT points to .plt.
819 Call sparc64_elf_build_plt.
820 (elf_backend_want_got_plt): No.
821 (elf_backend_plt_readonly): No.
822 (elf_backend_plt_alignment): 8.
823
824 * elf.c (_bfd_elf_close_and_cleanup): New function; free the shstrtab.
825 * elf-bfd.h (_bfd_elf_close_and_cleanup): Declare it.
826 * elfxx-target.h (bfd_elfNN_close_and_cleanup): Arrange for it
827 to be called.
828
829 Tue Jan 27 21:45:15 1998 Jeffrey A Law (law@cygnus.com)
830
831 * archures.c (bfd_mach_mips*): Add definitions for various MIPS
832 processors.
833 * cpu-mips.c (arch_info_struct): Add mips variants.
834 * bfd-in2.h: Rebuilt.
835
836 Tue Jan 27 15:06:04 1998 Nick Clifton <nickc@cygnus.com>
837
838 * coff-arm.c (coff_arm_relocate_section): Fix for PR14752 by
839 preserving the contents of t2a3_b_insn.
840
841 Tue Jan 27 12:47:27 1998 Robert Lipe <robertl@dgii.com>
842
843 * config.bfd (i[3456]86-sco3.2v5*): ELF now the default.
844 (i[3456]86sco3.2v5*coff): New target.
845
846 Mon Jan 26 15:41:30 1998 Ian Lance Taylor <ian@cygnus.com>
847
848 * bfd-in2.h: Rebuild with changes to chew--tab expansion.
849
850 Thu Jan 22 21:26:48 1998 Richard Henderson <rth@cygnus.com>
851
852 * bfd.c (bfd_get_error_handler): Add orthogonal function.
853 * bfd-in2.h: Regenerate.
854
855 Thu Jan 22 21:13:39 1998 Richard Henderson <rth@cygnus.com>
856
857 * tekhex.c (tekhex_write_object_contents): Check for no symbols.
858
859 Wed Jan 21 21:19:03 1998 Ian Lance Taylor <ian@cygnus.com>
860
861 * coff-i386.c (coff_i386_rtype_to_howto): If COFF_WITH_PE, don't
862 adjust addend for an output common symbol (from Jimmy Blair
863 <jimmyb@wrs.com>). If COFF_WITH_PE, adjust addend for PC relative
864 defined symbol to counteract adjustment made in generic relocation
865 code.
866
867 * dwarf2.c: Include sysdep.h, not stdio.h and stdlib.h.
868
869 Wed Jan 21 21:16:06 1998 Manfred Hollstein <manfred@s-direktnet.de>
870
871 * coff-m88k.c (GET_SCNDHR_NRELOC): Fix typo in macro name.
872 (GET_SCNDHR_NLNNO): Likewise.
873
874 Mon Jan 19 12:49:52 1998 Ian Lance Taylor <ian@cygnus.com>
875
876 * cpu-sh.c (arch_info_struct): Correct next field of sh3e.
877
878 Wed Jan 14 17:23:27 1998 Nick Clifton <nickc@cygnus.com>
879
880 * elf32-m32r.c: Add macros to handle NOP insertion.
881
882 Wed Jan 14 16:15:22 1998 Richard Henderson <rth@cygnus.com>
883
884 * xcofflink.c (xcoff_mark_symbol): Don't mark the absolute section.
885 (xcoff_mark): Likewise.
886 (xcoff_build_ldsyms): Mark absolute symbols.
887
888 Wed Jan 14 16:03:11 1998 Richard Henderson <rth@cygnus.com>
889
890 * bout.c (b_out_write_object_contents): Sort symbols before output
891 to keep {CALL,BAL}NAME symbols adjacent.
892 (b_out_symbol_cmp): New function.
893
894 Tue Dec 30 12:45:18 1997 Ian Lance Taylor <ian@cygnus.com>
895
896 * elf32-sparc.c (elf32_sparc_check_relocs): If -Bsymbolic, don't
897 allocate space for a PC relative reloc against a symbol which is
898 defined in a regular file.
899 (elf32_sparc_relocate_section): If -Bsymbolic, don't copy a PC
900 relative reloc against a symbol which is defined in a regular
901 file.
902
903 Mon Dec 29 18:02:28 1997 Ian Lance Taylor <ian@cygnus.com>
904
905 From Jonathan Stone <jonathan@DSG.Stanford.EDU>:
906 * config.bfd (mips-dec-netbsd*): Add ECOFF vectors to
907 targ_selvecs.
908 (mips*el-*-netbsd*): Like mips-dec-netbsd*.
909 (mips*-*-netbsd*): New target.
910
911 Mon Dec 29 17:13:28 1997 H.J. Lu (hjl@gnu.org)
912
913 * elflink.h (elf_link_assign_sym_version): Change error message
914 from "undefined version name" to "undefined versioned symbol
915 name".
916
917 Mon Dec 29 11:41:16 1997 Nick Clifton <nickc@cygnus.com>
918
919 * coff-arm.c (coff_arm_relocate_section): Fix typo from previous
920 delta.
921
922 Tue Dec 23 17:01:10 1997 Ian Lance Taylor <ian@cygnus.com>
923
924 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Declare.
925 * libbfd.h: Rebuild.
926
927 * peicode.h (coff_swap_scnhdr_out): Set .reloc section to be
928 shared. Set stab* sections to be shared and read. Set .rsrc
929 section to be read and shared.
930
931 Mon Dec 22 13:20:57 1997 Ian Lance Taylor <ian@cygnus.com>
932
933 * Makefile.am: Rebuild dependencies.
934 (ALL_MACHINES_CFILES): Add dwarf2.lo.
935 (ALL_MACHINES_CFILES): Add dwarf2.c.
936 * Makefile.in: Rebuild.
937
938 * coff-arm.c: Don't include obstack.h.
939
940 Mon Dec 22 13:04:33 1997 Joel Sherrill <joel@oarcorp.com>
941
942 * config.bfd (i[3456]86*-go32-rtems*): Fix to be the same as
943 i[3456]86-go32.
944
945 Thu Dec 18 16:01:25 1997 Doug Evans <devans@canuck.cygnus.com>
946
947 * configure: Regenerate to get @SHELL@ substituted.
948
949 Wed Dec 17 09:45:09 1997 Nick Clifton <nickc@cygnus.com>
950
951 * coff-arm.c (coff_arm_relocate_section): Only look at section
952 owner if there is one.
953
954 * elf.c (assign_file_positions_for_segments): Fail if there is not
955 enough room for the program headers. (PR14186)
956
957 Tue Dec 16 08:09:56 1997 Gavin Koch <gavin@cygnus.com>
958
959 * elf.c (_bfd_elf_find_nearest_line): Call
960 _bfd_dwarf2_find_nearest_line first.
961 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Same.
962 * dwarf2.c: New file; implement _bfd_dwarf2_find_nearest_line.
963
964 Mon Dec 15 16:08:52 1997 Nick Clifton <nickc@cygnus.com>
965
966 start-sanitize-m32rx
967 * elf32-m32r.c (m32r_elf_merge_private_bfd_data): Allow M32R
968 object files to be merged into a M32RX executable.
969
970 * archures.c: Add bfd_mach_m32rx.
971 end-sanitize-m32rx
972 * archures.c: Add bfd_mach_m32r.
973
974 Mon Dec 15 16:11:22 1997 Fred Fish <fnf@cygnus.com>
975
976 * coffcode.h (ALIGN_SECTIONS_IN_FILE): Define if I960 not defined.
977 (coff_compute_section_file_positions): Use ALIGN_SECTIONS_IN_FILE
978 to decide when to align the file sections for paging.
979 start-sanitize-tic80
980 * coffcode.h (ALIGN_SECTIONS_IN_FILE): Undefine for TIC80COFF.
981 end-sanitize-tic80
982
983 Mon Dec 15 15:01:15 1997 Nick Clifton <nickc@cygnus.com>
984
985 * elf32-m32r.c (m32r_elf_object_p): New Function.
986 (m32r_elf_final_write_processing): New Function.
987 (m32r_elf_set_private_flags): New Function.
988 (m32r_elf_copy_private_bfd_data): New Function.
989 (m32r_elf_merge_private_bfd_data): New Function.
990 (m32r_elf_print_private_bfd_data): New Function.
991 (elf_backend_object_p): Point to m32r_object_p.
992 (elf_backend_final_write_processing): Point to
993 m32r_elf_final_write_processing.
994 (bfd_elf32_bfd_copy_private_bfd_data): Point to
995 m32r_elf_copy_private_bfd_data.
996 (bfd_elf32_bfd_merge_private_bfd_data): Point to
997 m32r_elf_merge_private_bfd_data.
998 (bfd_elf32_bfd_set_private_flags): Point to
999 m32r_elf_set_private_bfd_data.
1000 (bfd_elf32_bfd_print_private_bfd_data): Point to
1001 m32r_elf_print_private_bfd_data.
1002
1003 start-sanitize-m32rx
1004 * cpu-m32r.c: Add m32rx cpu architecture.
1005 * bfd-in2.h (bfd_mach_m32rx): Add identifier for M32RX
1006 architecture machines.
1007 end-sanitize-m32rx
1008
1009 * bfd-in2.h (bfd_mach_m32r): Add identifier for M32R architecture
1010 machines.
1011
1012 Fri Dec 12 11:30:28 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
1013
1014 * configure: Only build libbfd shared if --enable-shared's value
1015 was `yes', or was set to `*bfd*'.
1016 * aclocal.m4: Likewise.
1017 * NOTE: this really needs to be fixed in libtool/libtool.m4, the
1018 original source of this bit of code. It's not clear what the best fix
1019 would be, though.
1020
1021 Thu Dec 11 17:48:11 1997 Richard Henderson <rth@cygnus.com>
1022
1023 * linker.c (generic_link_add_symbol_list): Always init udata.p so
1024 that the generic relaxation code can function when input and output
1025 file formats are mismatched.
1026
1027 Thu Dec 11 01:02:18 1997 Ian Lance Taylor <ian@cygnus.com>
1028
1029 * coff-sh.c (bfd_coff_small_swap_table): Initialize new fields.
1030
1031 * elf.c (assign_file_positions_for_segments): For a loadable
1032 section, make sure that the load address is correct relative to
1033 the load address of the segment plus the size of the segment so
1034 far.
1035
1036 * coffcode.h (_coff_link_output_has_begun): Make static.
1037 (_coff_final_link_postscript): Likewise.
1038
1039 Wed Dec 10 23:37:11 1997 Ian Lance Taylor <ian@cygnus.com>
1040
1041 * elflink.h (elf_link_input_bfd): Handle a relocateable link in
1042 which a relocation refers to an indirect or warning symbol.
1043
1044 Wed Dec 10 11:15:55 1997 Nick Clifton <nickc@cygnus.com>
1045
1046 * coff-arm.c (bfd_arm_coff_final_link): Function deleted.
1047 (coff_arm_final_link_postscript): New function.
1048 (coff_arm_link_output_has_begun): New function.
1049
1050 * libcoff.h (struct bfd_coff_backend_data): Add new fields:
1051 _bfd_coff_link_output_has_begun and
1052 _bfd_coff_final_link_postscript. Add new macros:
1053 bfd_coff_link_output_has_begun() and
1054 bfd_coff_final_link_postscript().
1055
1056 * cofflink.c (_bfd_coff_final_link): Insert calls to
1057 bfd_coff_link_output_has_begun() and
1058 bfd_coff_final_link_postscript().
1059
1060 * coffcode.h: Add two new fields to bfd_coff_backend_data
1061 structure: _bfd_coff_link_output_has_begun and
1062 _bfd_coff_final_link_postscript. Add default initialisers for
1063 these fields. Add overridable aliases for the coff swap functions
1064 in the backend data structure.
1065
1066 * elf32-v850.c: Update with patches from the branch to fix
1067 HI16_S/LO16 reloc pairs.
1068
1069 start-sanitize-d30v
1070 Wed Dec 10 14:06:48 1997 Michael Meissner <meissner@cygnus.com>
1071
1072 * elf32-d30v.c (d30v_info_to_howto_rela): New function to support
1073 RELA relocations.
1074 (USE_REL): Don't define any more, switch to using RELA
1075 relocations.
1076 (elf_info_to_howto): Define as d30v_info_to_howto_rela.
1077
1078 end-sanitize-d30v
1079 Tue Dec 9 11:37:53 1997 Andrew Cagney <cagney@b1.cygnus.com>
1080
1081 * archures.c (bfd_mach_mips*): Define.
1082 (start-sanitize-vr5400):
1083 (vr5400, bfd_mach_vr5000): Define.
1084 (end-sanitize-vr5400):
1085 (bfd_default_scan): For 3000 and 4000 replace magic constant with
1086 macro.
1087
1088 * cpu-mips.c (N): Define.
1089 (bfd_mips_arch, arch_info_struct): Re-write using macro N, replace
1090 numbers with bfd_mach_mips* macros.
1091
1092 Fri Dec 5 11:13:46 1997 Nick Clifton <nickc@cygnus.com>
1093
1094 * elf32-v850.c (v850_elf_reloc, v850_elf_store_addend_in_insn,
1095 v850_elf_relocate_section): Fix PR2 14180 and 14181
1096 (v850_elf_section_from_bfd_section, v850_elf_symbol_processing,
1097 v850_elf_add_symbol_hook, v850_elf_link_output_symbol_hook,
1098 v850_elf_section_from_shdr, v850_elf_fake_sections): New functions
1099 (for PR14180) to create and handle special common sections.
1100 (v850_elf_final_link_relocate): Fix HI16 and HI16_S relocations
1101 which have data stored in the instructions. PR14258.
1102
1103 Tue Dec 2 10:26:16 1997 Nick Clifton <nickc@cygnus.com>
1104
1105 * coff-arm.c (TARGET_UNDERSCORE): Revert back to '_'
1106 (USER_LABEL_PREFIX): Revert back to '_'
1107
1108 * config.bfd (targ_cpu): Add support for Thumb target.
1109
1110 Mon Dec 1 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
1111
1112 * coff-sh.c (sh_coff_howtos): Add R_SH_SWITCH8 entry.
1113 (get_symbol_value): Handle R_SH_SWITCH8.
1114 (sh_relax_delete_bytes): Likewise.
1115
1116 Wed Nov 26 14:13:34 1997 Nick Clifton <nickc@cygnus.com>
1117
1118 * coff-arm.c (TARGET_UNDERSCORE): Changed to match definition in
1119 gcc/config/arm/semi.h
1120
1121 * coffcode.h (coff_slurp_symbol_table): Add ARM and Thumb symbol
1122 classes.
1123
1124 Sun Nov 23 16:02:58 1997 Andrew Cagney <cagney@b1.cygnus.com>
1125
1126 * freebsd.h (SWAP_MAGIC): Read magic number little and not big
1127 endian.
1128
1129 Wed Nov 26 09:30:37 1997 Nick Clifton <nickc@cygnus.com>
1130
1131 * coffcode.h (coff_mkobject_hook): Only set private flags for non
1132 PE ARM ports.
1133
1134 Tue Nov 25 15:33:23 1997 Richard Henderson <rth@cygnus.com>
1135
1136 * binary.c (binary_set_section_contents): Also ignore NEVER_LOAD
1137 sections.
1138
1139 Tue Nov 25 10:55:36 1997 Nick Clifton <nickc@cygnus.com>
1140
1141 * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): Do not
1142 complain if inout and output formats differ.
1143
1144 Tue Nov 25 11:26:27 1997 Ian Lance Taylor <ian@cygnus.com>
1145
1146 * Makefile.am (BFD32_BACKENDS): Remove tekhex.lo.
1147 (BFD32_BACKENDS_CFILES): Remove tekhex.c.
1148 * Makefile.in: Rebuild.
1149 * aclocal.m4, configure, src/Makefile.in: Rebuild with current
1150 automake and autoconf.
1151
1152 * coff-arm.c (arm_allocate_interworking_sections): Fix typo
1153 (COFF_WITH_PR to COFF_WITH_PE).
1154
1155 Mon Nov 24 15:47:49 1997 Nick Clifton <nickc@cygnus.com>
1156
1157 * coff-arm.c: Make variables and some functions static, so that
1158 this file can be included in multiple object files.
1159 (coff_arm_bfd_final_link): Fix minor bug.
1160
1161 Sat Nov 22 15:16:00 1997 Nick Clifton <nickc@cygnus.com>
1162
1163 * coff-arm.c: Add support for PIC and APCS-FLOAT type binaries.
1164
1165 * coffcode.h: Add support for PIC and APCS-FLOAT type binaries.
1166
1167 Sat Nov 22 16:06:56 1997 Klaus Kaempf <kkaempf@progis.de>
1168
1169 * evax-emh.c (_bfd_evax_write_emh): Use alloca instead of strdup.
1170
1171 Sat Nov 22 12:29:30 1997 Ian Lance Taylor <ian@cygnus.com>
1172
1173 * sunos.c (sunos_add_one_symbol): When overriding a defined
1174 symbol, set it to undefined, not new.
1175
1176 * elf32-sh.c (sh_elf_relax_delete_bytes): Don't kill LABEL
1177 relocs.
1178
1179 Fri Nov 21 14:14:22 1997 Richard Henderson <rth@cygnus.com>
1180
1181 * coff-sh.c (sh_relax_section): Force sign extention of USES r_offset.
1182 (sh_relax_delete_bytes): Don't kill LABEL relocs.
1183
1184 Mon Nov 17 15:08:38 1997 Jeffrey A Law (law@cygnus.com)
1185
1186 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Fix typo.
1187 (mn10300_elf_relax_section): Likewise.
1188
1189 Sat Nov 15 15:36:07 1997 Fred Fish <fnf@cygnus.com>
1190
1191 * peicode.h (coff_swap_aouthdr_in): Cast second arg of
1192 bfd_h_get_* calls to "bfd_byte *".
1193
1194 Tue Nov 11 10:37:23 1997 Jeffrey A Law (law@cygnus.com)
1195
1196 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field
1197 "movm_stack_size".
1198 (mn10300_elf_relax_section): Include stack space for register saves
1199 in the imm8 field of a "call" instruction.
1200 (compute_function_info): Determine how much stack is allocated by
1201 the movm instruction. Fix typo.
1202 (elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size.
1203
1204 Mon Nov 10 14:32:40 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1205
1206 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't crash if
1207 a version dependency could not be found.
1208
1209 Tue Nov 4 12:05:56 1997 Klaus K"ampf <kkaempf@progis.de>
1210
1211 * configure.com: Get version info from configure.in
1212
1213 Fri Oct 24 11:15:58 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz>
1214
1215 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data):
1216 New function. Avoid mixing US1 and HAL R1 code.
1217 Set resulting memory ordering to the strongest one used.
1218 (sparc64_elf_object_p): Set bfd_mach correctly.
1219
1220 Thu Oct 23 14:09:33 1997 Richard Henderson <rth@cygnus.com>
1221
1222 * elf64-sparc.c (sparc64_elf_howto_table): Add UA64 & UA16.
1223 (sparc64_elf_check_relocs): Handle them.
1224 (sparc64_elf_relocate_section): Likewise. Before emitting a dyn reloc,
1225 check alignment and transmute R_SPARC_x<->R_SPARC_UAx.
1226
1227 Thu Oct 23 00:53:14 1997 Richard Henderson <rth@dot.cygnus.com>
1228
1229 * configure.in (sparc*-*-linux*): Use trad-core and ...
1230 * hosts/sparclinux.h: New file.
1231
1232 Thu Oct 23 00:25:29 1997 Richard Henderson <rth@dot.cygnus.com>
1233
1234 * config.bfd (sparc64-*-linux*): New target.
1235
1236 * elf-bfd.h (struct elf_backend_data): Add plt_alignment member.
1237 * elflink.c (_bfd_elf_create_got_section): Set .got alignment based
1238 on arch_size.
1239 (_bfd_elf_create_dynamic_sections): Likewise for .rel* sections.
1240 Set .plt alignment from new plt_alignment.
1241 * elflink.h (elf_link_create_dynamic_sections): Set version section
1242 alignment to LOG_FILE_ALIGN.
1243 * elfxx-target.h (elf_backend_plt_alignment): Provide default.
1244 (elfXX_bed): Init plt_alignment.
1245
1246 * elf64-sparc.c (sparc64_elf_check_relocs,
1247 sparc64_elf_adjust_dynamic_symbol, sparc64_elf_size_dynamic_sections,
1248 sparc64_elf_adjust_dynindx, sparc64_elf_finish_dynamic_symbol,
1249 sparc64_elf_finish_dynamic_sections): New functions.
1250 (sparc64_elf_howto_table): Fix a few name strings.
1251 (ELF_DYNAMIC_INTERPRETER): New definition.
1252 (sparc64_elf_relocate_section): Handle shared libraries.
1253
1254 * elf64-sparc.c (struct plt_template, plt_*_header, plt_*_entry,
1255 sparc64_elf_build_plt_entry, sparc64_elf_finish_dynamic_symbol):
1256 PLT definitions sparc64-linux originally choose. These will go
1257 away soon in favour of the official abi definitions.
1258
1259 Wed Oct 22 16:08:45 1997 Ian Lance Taylor <ian@cygnus.com>
1260
1261 * coff-sh.c (coff_small_object_p): New static function.
1262 (coff_small_new_section_hook): New static function.
1263 (bfd_coff_small_swap_table): New static const structure.
1264 (coff_small_close_and_cleanup): Define.
1265 (coff_small_bfd_free_cached_info): Define.
1266 (coff_small_get_section_contents): Define.
1267 (coff_small_get_section_contents_in_window): Define.
1268 (shcoff_small_vec): New static structure.
1269 (shlcoff_small_vec): New static structure.
1270 * targets.c (bfd_target_vector): Add shcoff_small_vec and
1271 shlcoff_small_vec.
1272 * config.bfd (sh-*-elf*): Add shcoff_small_vec and
1273 shlcoff_small_vec to targ_selvecs.
1274 (sh-*-*): Likewise.
1275 * configure.in: Add shcoff_small_vec and shlcoff_small_vec cases.
1276 * configure: Rebuild.
1277
1278 Mon Oct 20 15:01:27 1997 Klaus K"ampf <kkaempf@progis.de>
1279
1280 * evax-egsd.c: Weak symbols are global.
1281
1282 * evax-emh.c: Use proper casts.
1283
1284 * evax-egsd.c (_bfd_evax_write_egsd): Remove unneeded uname.
1285
1286 * evax-egsd.c: Section names and symbols have different
1287 length restrictions. Add length parameter to
1288 _bfd_evax_length_hash_symbol.
1289 * evax-etir.c: Likewise.
1290 * evax-misc.c (_bfd_evax_length_hash_symbol): Add length
1291 parameter.
1292 * evax.h (EOBJ_S_C_SECSIZ): Define.
1293
1294 * evax-alpha.c: Remove duplicate test.
1295
1296 * evax-emh.c: SYS$ functions are upper-case.
1297
1298 * evax-egsd.c: Create separate sections for common symbols.
1299 * evax-etir.c: Don't output common section.
1300 * evax.h: Bump up section count.
1301
1302 * configure.com: Use 64bit integers with DEC C.
1303
1304 * evax-egsd.c: Make section flags dec c compatible.
1305
1306 Mon Oct 20 09:38:31 1997 Jeffrey A Law (law@cygnus.com)
1307
1308 * som.c (normalize): Delete function.
1309 (som_bfd_ar_write_symbol_stuff): New parameter elength. All callers
1310 changed. Use passed in elength to determine size of the extended
1311 name table instead of computing it again.
1312
1313 Sun Oct 19 23:36:21 1997 Jim Wilson <wilson@cygnus.com>
1314
1315 * peicode.h (coff_swap_scnhdr_out): Use |= not = to set
1316 IMAGE_SCN_MEM_READ for an unrecognized section.
1317
1318 Sun Oct 19 21:04:56 1997 Jeffrey A Law (law@cygnus.com)
1319
1320 * som.c (som_bfd_ar_write_symbol_stuff): Account for trailing
1321 '/' in the extended name table.
1322
1323 Fri Oct 17 00:04:13 1997 Richard Henderson <rth@cygnus.com>
1324
1325 * elflink.h (elf_link_assign_sym_version): For explicitly versioned
1326 symbols, check globals list before matching on locals.
1327
1328 Thu Oct 16 08:17:06 1997 Michael Meissner <meissner@cygnus.com>
1329
1330 * peicode.h (coff_swap_scnhdr_out,pe_print_idata): Fix mangled
1331 patch.
1332
1333 Wed Oct 15 13:45:10 1997 Ian Lance Taylor <ian@cygnus.com>
1334
1335 * peicode.h (pe_mkobject_hook): Set DLL flag.
1336 (pe_bfd_copy_private_bfd_data): Copy DLL flag.
1337
1338 * peicode.h (coff_swap_scnhdr_out): Set IMAGE_SCN_MEM_DISCARDABLE
1339 for .stab* sections. Replace strlen of constant strings with
1340 number.
1341
1342 Tue Oct 14 15:42:45 1997 Richard Henderson <rth@cygnus.com>
1343
1344 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): New function to
1345 merge got and reloc entries from ind syms to their target.
1346 (elf64_alpha_always_size_sections): Call it.
1347 (elf64_alpha_check_relocs): Operate on the target of indirect symbols.
1348 (elf64_alpha_can_merge_gots): Likewise.
1349 (elf64_alpha_merge_gots): Likewise.
1350
1351 * elf64-alpha.c (elf64_alpha_relocate_section): Back out HJ's change,
1352 as it is insufficient to handle the relocation changes as well.
1353
1354 Mon Oct 13 23:10:08 1997 Richard Henderson <rth@cygnus.com>
1355
1356 * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Allow for RELATIVE
1357 relocs for symbols in shlibs that have been forced local.
1358 (elf64_alpha_relocate_section): Output RELATIVEs in .got for same.
1359
1360 Mon Oct 13 21:24:04 1997 Richard Henderson <rth@cygnus.com>
1361
1362 * elf64-alpha.c (elf64_alpha_relocate_section): Use the
1363 got_enties of the default symbol for the default versioned
1364 symbol. Patch from hjl@gnu.ai.mit.edu, modified not to use
1365 alloca in the loop.
1366
1367 Mon Oct 13 17:37:37 1997 Nick Clifton <nickc@cygnus.com>
1368
1369 * elf32-v850.c (v850_elf_final_link_relocate): Only use the bottom
1370 24 bits of the PC when computing a PC relative relocation.
1371
1372 Fri Oct 10 16:01:30 1997 Nick Clifton <nickc@cygnus.com>
1373
1374 * elf32-v850.c (v850_elf_reloc, v850_elf_final_link_relocate):
1375 Correct value for maximum positive 22 bit PC relative relocation.
1376 (v850_elf_final_link_relocate): Prevent overflow from HI16_S and
1377 HI_16 relocations. Correct bit adjustment in TDA offsets.
1378
1379 Thu Oct 9 16:43:39 1997 Doug Evans <dje@canuck.cygnus.com>
1380
1381 * elf64-sparc.c (sparc_elf_{hix22,lox10}_reloc): New functions.
1382 (sparc64_elf_howto_table): Use them for HIX22,LOX10 relocs.
1383
1384 Wed Oct 8 11:38:45 1997 Richard Henderson <rth@cygnus.com>
1385
1386 * elfcore.h (bfd_prstatus): Pedanticly, alignment_power should
1387 be LOG_FILE_ALIGN.
1388
1389 Wed Oct 8 11:36:00 1997 Richard Henderson <rth@cygnus.com>
1390
1391 * config.bfd: Missed one alpha* change.
1392
1393 Tue Oct 7 13:00:17 1997 Doug Evans <dje@canuck.cygnus.com>
1394
1395 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove BFD64 support.
1396 * elf64-sparc.c (SPARC64_OLD_RELOCS): Undef.
1397 (MINUS_ONE): New macro.
1398 (sparc_elf_notsup_reloc): New function.
1399 (sparc64_elf_howto_table): Add entries for DISP64,PLT64,HIX22,LOX10,
1400 H44,M44,L44,REGISTER.
1401 (sparc_reloc_map): Likewise. Map BFD_RELOC_CTOR to R_SPARC_64.
1402 (init_insn_reloc): New function.
1403 (sparc_elf_wdisp16_reloc): Use it.
1404 (sparc64_elf_relocate_section): Add entries for OLO10,HIX22,LOX10.
1405
1406 Tue Oct 7 11:40:37 1997 Ian Lance Taylor <ian@cygnus.com>
1407
1408 * som.c (som_construct_extended_name_table): Remove static
1409 function, and define as macro instead.
1410
1411 Fri Oct 3 14:02:17 1997 Richard Henderson <rth@cygnus.com>
1412
1413 * config.bfd: Change alpha-*-* to alpha*-*-*; config.guess now
1414 recognizes alphaev5 etc.
1415 * configure.host: Likewise.
1416
1417 Fri Oct 3 11:23:47 1997 Ian Lance Taylor <ian@cygnus.com>
1418
1419 Make ld -s work on AIX:
1420 * xcofflink.c (xcoff_link_add_symbols): Don't create the .debug
1421 section if we are stripping.
1422 (bfd_xcoff_size_dynamic_sections): Don't set the .debug section
1423 size if we are stripping.
1424 (_bfd_xcoff_bfd_final_link): Don't set SEC_RELOC or rel_filepos,
1425 and don't write out relocs, if we are stripping.
1426 (xcoff_link_input_bfd): Don't set up reloc if we are stripping.
1427 (xcoff_write_global_symbol): Don't write out symbol or reloc if we
1428 are stripping.
1429
1430 * configure.in: Don't include elf.lo again for ELF targets; it's
1431 always in the library anyhow.
1432 * configure: Rebuild.
1433
1434 * bfd-in2.h: Rebuild.
1435
1436 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Cast to bfd_byte *, not
1437 char *, when calling bfd_get_32 and bfd_put_32.
1438 * sunos.c (sunos_scan_dynamic_symbol): Cast contents to char *
1439 when calling strcpy.
1440
1441 Thu Oct 2 16:15:50 1997 Doug Evans <dje@canuck.cygnus.com>
1442
1443 * reloc.c (bfd_check_overflow): New function.
1444 (bfd_perform_relocation, bfd_install_relocation): Use it.
1445 (BFD_RELOC_SPARC_{DISP64,PLT64}): New relocs.
1446 (BFD_RELOC_SPARC_{HIX22,LOX10,H44,M44,L44,REGISTER}): New relocs.
1447 * bfd-in2.h: Regenerate.
1448 * libbfd.h: Regenerate.
1449
1450 Thu Oct 2 13:17:18 1997 Ian Lance Taylor <ian@cygnus.com>
1451
1452 * peicode.h (coff_swap_scnhdr_out): Set IMAGE_SCN_MEM_READ for an
1453 unrecognized section. From Jon Thackray <jont@harlequin.co.uk>.
1454
1455 Wed Oct 1 14:03:44 1997 Ian Lance Taylor <ian@cygnus.com>
1456
1457 * Makefile.am ($(BFD_H)): Change stmp-bfd.h to stmp-bfd-h.
1458 (stmp-bfd-h): Rename from stmp-bfd.h.
1459 (BFD_H_FILES, LIBBFD_H_FILES, LIBCOFF_H_FILES): New variables.
1460 ($(srcdir)/bfd-in2.h): Just depend upon stmp-bin2-h.
1461 (stmp-bin2-h): New target.
1462 ($(srcdir)/libbfd.h): Just depend upon stmp-lbfd-h.
1463 (stmp-lbfd-h): New target.
1464 ($(srcdir)/libcoff.h): Just depend upon stmp-lcoff-h.
1465 (stmp-lcoff-h): New target.
1466 (CLEANFILES): Change stmp-bfd.h to stmp-bfd-h. Add stmp-bin2.h,
1467 stmp-lbfd-h, and stmp-lcoff-h.
1468 * Makefile.in: Rebuild.
1469
1470 * configure.in: Use a diversion to set enable_shared before the
1471 arguments are parsed.
1472 * configure: Rebuild.
1473
1474 Tue Sep 30 14:18:32 1997 Doug Evans <dje@canuck.cygnus.com>
1475
1476 * elf32-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
1477 renamed to R_SPARC_UNUSED_42.
1478 (sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
1479 * elf64-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
1480 renamed to R_SPARC_UNUSED_42.
1481 (sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
1482 * reloc.c (BFD_RELOC_SPARC_GLOB_JMP): Delete.
1483 * bfd-in2.h: Regenerated.
1484 * libbfd.h: Regenerated.
1485
1486 Thu Sep 25 12:15:02 1997 Ian Lance Taylor <ian@cygnus.com>
1487
1488 * elflink.h (elf_merge_symbol): Don't check the hash creator until
1489 after we have set *sym_hash.
1490
1491 Wed Sep 24 16:52:28 1997 Joel Sherrill <joel@oarcorp.com>
1492
1493 * config.bfd (sh*-*-rtems*): New target, like sh-*-*elf*.
1494
1495 Wed Sep 24 11:27:23 1997 Ian Lance Taylor <ian@cygnus.com>
1496
1497 * Makefile.am (libbfd_a_SOURCES): Define.
1498 * Makefile.in: Rebuild.
1499
1500 * configure.in: Call AC_CHECK_TOOL before AM_PROG_LIBTOOL.
1501 * aclocal.m4: Rebuild with new libtool.
1502 * configure: Rebuild.
1503
1504 Tue Sep 23 19:03:13 1997 Ian Lance Taylor <ian@cygnus.com>
1505
1506 * elf.c (map_sections_to_segments): Even if we are not demand
1507 paged, don't put a loadable section after a nonloadable section.
1508 (assign_file_positions_for_segments): Increment the file offset
1509 for a section with contents, even if it is not loadable.
1510
1511 start-sanitize-v850e
1512 Sun Sep 21 11:03:24 1997 Nick Clifton <nickc@cygnus.com>
1513
1514 * elf32-v850.c (v850_elf_final_link_relocate): Add return code
1515 indicating that __ctbp could not be found.
1516
1517 end-sanitize-v850e
1518 Thu Sep 18 15:04:57 1997 Nick Clifton <nickc@cygnus.com>
1519
1520 * elf32-v850.c (v850_elf_check_relocs): Improve error message.
1521
1522 Wed Sep 17 09:54:51 1997 Nick Clifton <nickc@cygnus.com>
1523 start-sanitize-v850e
1524
1525 * elf32-v850.c (v850_elf_final_link_relocate, v850_elf_reloc,
1526 v850_elf_check_relocs, v850_elf_reloc_map, v850_elf_howto_table):
1527 Add support for the CALLT relocs.
1528
1529 * reloc.c (COMMENT): Add BFD_RELOC_V850_CALLT_6_7_OFFSET and
1530 BFD_RELOC_V850_CALLT_16_16_OFFSET.
1531 end-sanitize-v850e
1532
1533 * elf32-v850.c (v850_elf_final_link_relocate): Add checks to catch
1534 relocations against non-existant symbols.
1535
1536 Tue Sep 16 14:20:27 1997 Nick Clifton <nickc@cygnus.com>
1537
1538 * reloc.c: Add BFR_RELOC_V850_TDA_16_16_OFFSET.
1539
1540 * elf32-v850.c (v850_elf_reloc, v850_elf_final_link_relocate,
1541 v850_elf_howto_table, v850_elf_reloc_map): Add support for a 16
1542 bit reloc in the tiny data area.
1543
1544 start-sanitize-d30v
1545 Mon Sep 15 11:27:36 1997 Ken Raeburn <raeburn@cygnus.com>
1546
1547 Merged changes from Martin Hunt:
1548
1549 * elf32-d30v.c (bfd_elf_d30v_reloc): Change pc-relative relocs
1550 over 2^32 bytes to be absolute. Needed because D30V PC doesn't
1551 necessarily wrap.
1552
1553 * reloc.c, elf32-d30v.c (BFD_RELOC_D30V_9_PCREL,
1554 BFD_RELOC_D30V_9_PCREL_R): New relocs.
1555
1556 * elf32-d30v.c (bfd_elf_d30v_reloc_21): New function.
1557 Do 15 and 21 bit pc-relative relocations.
1558 * reloc.c (BFD_RELOC_D30V_15_PCREL_R, BFD_RELOC_D30V_21_PCREL_R):
1559 New relocations.
1560
1561 * elf32-d30v.c (bfd_elf_d30v_reloc): Addend needs to be
1562 added to the relocation, not or'd.
1563
1564 end-sanitize-d30v
1565 Wed Sep 10 15:17:25 1997 Nick Clifton <nickc@cygnus.com>
1566
1567 * elf32-v850.c (v850_elf_reloc): Remove spurious error message.
1568
1569 Wed Sep 10 11:17:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
1570
1571 * archures.c (bfd_default_scan): Use strcasecmp.
1572 (bfd_default_scan): Test for match with arch_name + ":" +
1573 printable_name.
1574 (bfd_default_scan): Test for match with printable_name - ":".
1575 (bfd_default_scan): Delete w65, h8300, h8500, z8k, i960 special
1576 cases. Each implements their own scan function.
1577 (bfd_default_scan): Delete 386, 2900, 860, mips 2000, mips 4400
1578 special cases. Since info->mach == 0. The test mach == number
1579 fails.
1580 (bfd_arch_list): New function, return name of all the supported
1581 architectures.
1582
1583 Tue Sep 9 10:21:56 1997 Nick Clifton <nickc@cygnus.com>
1584
1585 * elf32-v850.c (v850_elf_print_private_bfd_data): Break after
1586 decoding architecture.
1587 (v850_elf_reloc): Do not complain if a R_V850_LO16 reloc has bit
1588 15 set.
1589
1590 Sun Sep 7 12:25:22 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
1591
1592 * bfd/elf64-alpha.c (reloc_howto_type): Fix the howto table.
1593
1594 Thu Sep 4 09:44:10 1997 Ian Lance Taylor <ian@cygnus.com>
1595
1596 * Makefile.am: Rebuild dependencies.
1597 (ALL_MACHINES_CFILES): Add cpu-v850.c.
1598 (ALL_MACHINES_CFILES): Add elf32-v850.c.
1599 * Makefile.in: Rebuild.
1600
1601 * reloc.c: Remove extraneous commas from relocation entries.
1602 Remove BFD_RELOC_V850_16_PCREL.
1603 * bfd-in2.h: Rebuild.
1604
1605 * xcofflink.c (xcoff_link_add_symbols): Put XTY_CM/XMC_TD symbols
1606 in sections named .tocbss rather than .bss.
1607
1608 Wed Sep 3 11:23:23 1997 Nick Clifton <nickc@cygnus.com>
1609
1610 * libbfd.h, bfd-in2.h, elf32-v850.c: Removed
1611 BFD_RELOC_V850_16_PCREL.
1612
1613 Tue Sep 2 20:44:10 1997 Fred Fish <fnf@cygnus.com>
1614
1615 * cofflink.c (coff_link_check_ar_symbols): Handle C_SYSTEM syms
1616 the same as C_EXT syms.
1617 (coff_link_add_symbols): Ditto.
1618 (_bfd_coff_link_input_bfd): Ditto.
1619 (_bfd_coff_write_task_globals): Add save_global_to_static. Use
1620 it to preserve and restore state of global_to_static flag.
1621
1622 Tue Sep 2 17:45:22 1997 Nick Clifton <nickc@cygnus.com>
1623
1624 * elf32-v850.c (v850_elf_object_p): Set machine number based on
1625 bits in e_flags field rather than magic numbers.
1626 (v850_elf_final_write_processing, v850_elf_set_private_flags,
1627 v850_elf_copy_private_bfd_data, v850_elf_merge_private_bfd_data,
1628 v850_elf_print_private_bfd_data): New functions.
1629
1630 start-sanitize-v850e
1631 Tue Sep 2 17:43:49 1997 Nick Clifton <nickc@cygnus.com>
1632
1633 * elf.c (prep_headers): Remove V850E magic number.
1634 * elf.c (prep_headers): Remove V850EA magic number.
1635 end-sanitize-v850e
1636
1637 Tue Sep 2 17:35:05 1997 Doug Evans <dje@canuck.cygnus.com>
1638
1639 * cpu-arc.c (arc_get_mach): Properly scan defined mach entries.
1640
1641 Tue Sep 2 18:29:37 1997 Jeffrey A Law (law@cygnus.com)
1642
1643 * elf-m10200.c (mn10200_elf_final_link_relocate): PC relative
1644 instructions are relative to the next instruction, not the
1645 current instruction.
1646 (mn10200_elf_relax_section): Similarly.
1647
1648 Tue Sep 2 15:45:45 1997 Nick Clifton <nickc@cygnus.com>
1649
1650 * cpu-v850.c: Use a macro to construct bfd_arch_info_type
1651 entries.
1652
1653 * reloc.c, libbfd.h, bfd-in2.h, elf32-v850.c: Replace
1654 BFD_RELOC_V850_{SDA/TDA/ZDA}_OFFSET relocs with new bit pattern
1655 specific versions: BFD_RELOC_V850_{area}_{bits}_OFFSET.
1656
1657 Thu Aug 28 17:01:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
1658
1659 * cpu-v850.c: Remove "plain" from v850 printable name.
1660 (scan): Use strcasecmp.
1661
1662 * archures.c (bfd_mach_v850): Define.
1663
1664 * cpu-sh.c (scan_mach): Compare with table instead of hardwired to
1665 just sh/SH, use strcasecmp.
1666 (arch_info_struct): Add entries for sh3 et.al.
1667
1668 * archures.c (bfd_mach_sh, ...): Define.
1669
1670 Wed Aug 27 17:33:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
1671
1672 * archures.c (bfd_archures_list): Always NULL terminate the list.
1673
1674 Tue Aug 26 17:26:51 1997 Ian Lance Taylor <ian@cygnus.com>
1675
1676 * Makefile.am: Rebuild dependencies.
1677 (ALL_MACHINES_CFILES): Add cpu-arc.c.
1678 (ALL_MACHINES_CFILES): Add elf32-arc.c.
1679 (elf32-arc.lo): Remove explicit dependency.
1680 * Makefile.in: Rebuild.
1681
1682 * acinclude.m4 (BFD_CC_FOR_BUILD): Set EXEEXT_FOR_BUILD.
1683 * doc/Makefile.am (MKDOC): Use EXEEXT_FOR_BUILD, not EXEEXT.
1684 * aclocal.m4, configure, Makefile.in, doc/Makefile.in: Rebuild.
1685
1686 Mon Aug 25 16:14:34 1997 Christopher Provenzano <proven@cygnus.com>
1687
1688 * configure: Rebuild with latest devo autoconf for NT support
1689
1690 Mon Aug 25 16:11:04 1997 Nick Clifton <nickc@cygnus.com>
1691
1692 * cpu-arm.c (compatible): If B is a default type, return A.
1693
1694 Mon Aug 25 15:35:46 1997 Nick Clifton <nickc@cygnus.com>
1695
1696 * cpu-v850.c (scan): New function.
1697 (arch_info_struct): New structure.
1698 (bfd_v850_arch): Add link into arch_info_structure.
1699
1700 * config.bfd (targ_cpu): All v850 variants use the bfd_arch_v850
1701 architecture.
1702
1703 * elf32-v850.c (v850_elf_object_p): New function.
1704
1705 start-sanitize-v850e
1706 * archures.c (bfd_mach_v850e): Machine value for v850e.
1707
1708 * bfd-in2.h (bfd_mach_v850e): Machine value for v850e.
1709
1710 * elf32-v850.c (ELF_MACHINE_CODE): Default to v850e machine
1711 number.
1712
1713 * elf.c (prep_headers): Add support for v850e machine number.
1714
1715 * archures.c (bfd_mach_v850ea): Machine value for v850ea.
1716
1717 * bfd-in2.h (bfd_mach_v850ea): Machine value for v850ea.
1718
1719 * elf32-v850.c (ELF_MACHINE_CODE): Default to v850ea machine
1720 number.
1721
1722 * elf.c (prep_headers): Add support for v850ea machine number.
1723 end-sanitize-v850e
1724
1725 Mon Aug 25 14:07:33 1997 Ian Lance Taylor <ian@cygnus.com>
1726
1727 * syms.c (_bfd_stab_section_find_nearest_line): Clear the
1728 cached_stab field if the offset prevents us from using the cache.
1729
1730 Mon Aug 25 12:08:13 1997 Ian Lance Taylor <ian@cygnus.com>
1731
1732 * aout-target.h (MY(vec)): Add SEC_CODE and SEC_DATA to section
1733 flags.
1734 * aout-arm.c (aout_arm_little_vec): Likewise.
1735 (aout_arm_big_vec): Likewise.
1736 * bout.c (b_out_vec_big_host): Likewise.
1737 (b_out_vec_little_host): Likewise.
1738 * mipsbsd.c (aout_mips_little_vec): Likewise.
1739 (aout_mips_big_vec): Likewise.
1740
1741 start-sanitize-tic80
1742 Tue Aug 19 10:09:10 1997 Fred Fish <fnf@cygnus.com>
1743
1744 * coff-tic80.c (COFF_ALIGN_IN_SFLAGS): Define to 1.
1745 * coffcode.h (styp_to_sec_flags): Ignore incoming STYP_INFO
1746 bit in s_flags if COFF_ALIGN_IN_S_FLAGS is defined.
1747
1748 end-sanitize-tic80
1749 Tue Aug 19 08:47:17 1997 Fred Fish <fnf@cygnus.com>
1750
1751 * coff-i960.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
1752 (GET_SCNHDR_ALIGN, PUT_SCNHDR_ALIGN): Define.
1753 * coff-m88k.c (GET_SCNHDR_NRELOC, GET_SCNHDR_NLNNO): Define.
1754 * coffcode.h (coff_set_alignment_hook): Conditionally compile in if
1755 COFF_ALIGN_IN_SECTION_HEADER is defined. Convert alignment to power
1756 of two for I960 only.
1757 * coffswap.h (GET_SCNHDR_NRELOC, PUT_SCNHDR_NRELOC, GET_SCNDHR_NLNNO,
1758 PUT_SCNHDR_NLNNO, GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Provide
1759 default definitions.
1760 (coff_swap_scnhdr_in): Use GET_SCNHDR_FLAGS, GET_SCNHDR_NRELOC,
1761 GET_SCNHDR_NLNNO, and GET_SCNHDR_ALIGN.
1762 (coff_swap_scnhdr_out): Use PUT_SCNHDR_FLAGS, PUT_SCNHDR_ALIGN.
1763 start-sanitize-tic80
1764 * Makefile.in (coff-tic80.o): Depends upon coffswap.h.
1765 * coff-tic80.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
1766 (GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Define
1767 *coffcode.h (coff_write_object_contents): Set alignment field in
1768 section header for TIC80COFF files.
1769 end-sanitize-tic80
1770
1771 Mon Aug 18 11:36:19 1997 Nick Clifton <nickc@cygnus.com>
1772
1773 * elf32-v850.c (v850_elf_howto_table, v850_elf_reloc_map,
1774 v850_elf_check_relocs, v850_elf_reloc,
1775 v850_elf_final_link_relocate): Add support for
1776 BFD_RELOC_V850_16_PCREL relocation.
1777
1778 * reloc.c (COMMENT): Add suuport for BFD_RELOC_V850_16_PCREL
1779 relocation.
1780
1781 * libbfd.h: Add support for BFD_RELOC_V850_16_PCREL relocation.
1782
1783 * bfd-in2.h: Add support for BFD_RELOC_V850_16_PCREL relocation.
1784
1785 start-sanitize-v850e
1786 Mon Aug 18 11:33:56 1997 Nick Clifton <nickc@cygnus.com>
1787
1788 * cpu-v850e: New file.
1789
1790 * elf.c (prep_headers): Add support for v850e target.
1791
1792 * bfd-in2.h (bfd_architecture): Add support for v850e target.
1793
1794 * config.bfd: Add support for v850e target.
1795
1796 * archures.c: Add support for v850e target.
1797
1798 Mon Aug 18 11:33:56 1997 Nick Clifton <nickc@cygnus.com>
1799
1800 * cpu-v850ea: New file.
1801
1802 * elf.c (prep_headers): Add support for v850ea target.
1803
1804 * bfd-in2.h (bfd_architecture): Add support for v850ea target.
1805
1806 * config.bfd: Add support for v850ea target.
1807
1808 * archures.c: Add support for v850ea target.
1809 end-sanitize-v850e
1810
1811 Fri Aug 15 12:01:28 1997 Ian Lance Taylor <ian@cygnus.com>
1812
1813 * coffgen.c (coff_find_nearest_line): Correctly handle the offset
1814 argument as section relative, rather than an absolute address.
1815 From Jan Hoogenraad <hoogenrd@natlab.research.philips.com>.
1816
1817 Fri Aug 15 04:58:02 1997 Doug Evans <dje@canuck.cygnus.com>
1818
1819 * config.bfd (arc-*-elf*): Add.
1820 * configure.in (bfd_elf32_{little,big}arc_vec): Add.
1821 * configure: Rebuild.
1822 * Makefile.am (ALL_MACHINES): Add cpu-arc.lo.
1823 (BFD32_BACKENDS): Add elf32-arc.lo.
1824 (cpu-arc.lo,elf32-arc.lo): Add rules for.
1825 * Makefile.in: Rebuild.
1826 * archures.c (architecture list): Add bfd_arch_arc.
1827 (bfd_archures_list): Add bfd_arc_arch.
1828 (bfd_mach_arc_base): Define.
1829 * reloc.c (BFD_RELOC_ARC_B22_PCREL,BFD_RELOC_ARC_B26): Add.
1830 * targets.c (bfd_elf32_{little,big}arc_vec): Declare.
1831 (bfd_target_vect): Add them.
1832 * bfd-in2.h, libbfd.h: Rebuild.
1833 * cpu-arc.c, elf32-arc.c: New files.
1834 * elf.c (pre_headers): Recognize bfd_arch_arc.
1835
1836 Tue Aug 12 11:45:18 1997 Ian Lance Taylor <ian@cygnus.com>
1837
1838 * aoutx.h (NAME(aout,final_link)): If no symbols, make sure the
1839 data section is correctly rounded to a page in the file.
1840
1841 Mon Aug 11 12:45:43 1997 Ian Lance Taylor <ian@cygnus.com>
1842
1843 * aoutx.h (NAME(aout,final_link)): Don't emit the string table if
1844 there are no symbols.
1845
1846 Sun Aug 10 14:45:56 1997 Ian Lance Taylor <ian@cygnus.com>
1847
1848 * coff-stgo32.c: Rename from coff-stubgo32.c to avoid old System V
1849 file system 14 character limit.
1850 * Makefile.am, configure.in: Corresponding changes.
1851 * Makefile.in, configure: Rebuild.
1852
1853 Fri Aug 8 18:34:36 1997 Ian Lance Taylor <ian@cygnus.com>
1854
1855 * Makefile.am: (ALL_MACHINES_CFILES): Add elf32-d10v.c.
1856 Rebuild dependencies.
1857 * Makefile.in: Rebuild.
1858
1859 Wed Aug 6 18:56:51 1997 Ian Lance Taylor <ian@cygnus.com>
1860
1861 * Makefile.am (docdir): Define.
1862 * Makefile.in: Rebuild.
1863
1864 Tue Aug 5 23:05:03 1997 Ian Lance Taylor <ian@cygnus.com>
1865
1866 * configure: Rebuild with autoconf 2.12.1.
1867
1868 Mon Aug 4 12:00:35 1997 Ian Lance Taylor <ian@cygnus.com>
1869
1870 * aclocal.m4, configure: Rebuild with new automake patches.
1871
1872 Sun Aug 3 08:15:12 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1873
1874 * rs6000-core.c (make_bfd_asection): New function to add a section
1875 to the core file bfd.
1876 (rs6000coff_core_p): Use make_bfd_asection to add the core file
1877 sections.
1878 Use BFD routines to seek, read and stat the core file.
1879 Handle .data sections from loaded objects and anonymously mmapped
1880 regions, these are available in AIX 4 core files.
1881
1882 Fri Aug 1 12:58:32 1997 Ian Lance Taylor <ian@cygnus.com>
1883
1884 * configure.in: Set enable_shared before AM_PROG_LIBTOOL.
1885 * acinclude.m4: Move acmacros.m4 in here. Remove AM_PROG_LIBTOOL
1886 copy; use a patches libtool instead.
1887 * acmacros.m4: Remove.
1888 * Makefile.in, aclocal.m4, configure: Rebuild.
1889
1890 Thu Jul 31 19:55:36 1997 Ian Lance Taylor <ian@cygnus.com>
1891
1892 * Makefile.am: New file, based on old Makefile.in.
1893 * acmacros.m4: New file, copied from old aclocal.m4.
1894 * acinclude.m4: New file.
1895 * configure.in: Call AM_PROG_LIBTOOL. Remove shared library
1896 handling; now handled by libtool. Replace AC_CONFIG_HEADER with
1897 AM_CONFIG_HEADER. Replace AC_PROG_INSTALL with AM_PROG_INSTALL.
1898 Call AM_MAINTAINER_MODE, AM_CYGWIN32, and AM_EXEEXT. Change all
1899 .o files to .lo. Remove stamp-h handling in AC_OUTPUT.
1900 * acconfig.h: Mention PACKAGE and VERSION.
1901 * stamp-h.in: New file.
1902 * dep-in.sed: Change .o to .lo.
1903 * Makefile.in: Now built with automake.
1904 * aclocal.m4: Now built with aclocal.
1905 * config.in, configure: Rebuild.
1906 * VERSION: Remove.
1907
1908 Thu Jul 31 12:09:20 1997 Geoff Keating <geoffk@ozemail.com.au>
1909
1910 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Don't set TEXTREL
1911 if there is only a relocation to a read-only but not allocatable
1912 section (like .stab).
1913 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
1914 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
1915 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1916 * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
1917 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1918
1919 * elf32-ppc.c (ppc_elf_howto_raw): Correct various comments.
1920 (ppc_elf_create_linker_section): These sections are not
1921 created by the linker (that is, they are created by the user
1922 putting data in them). In particular, they can be the source
1923 and target of relocations.
1924 (ppc_elf_adjust_dynamic_symbol): Check postcondition of
1925 bfd_elf32_link_record_dynamic_symbol. Align 16-byte common
1926 objects (for instance, 'long double') to 16-byte boundaries.
1927 (ppc_elf_size_dynamic_sections): Make the code that generates
1928 section symbols exactly the same as for sparc, reducing the
1929 number of section symbols output.
1930 (ppc_elf_check_relocs): Check postcondition of
1931 bfd_elf32_link_record_dynamic_symbol. Make default case the
1932 same as corresponding code for sparc, fixing bug involving
1933 .rela.stabs.
1934 (ppc_elf_finish_dynamic_symbol): Fix case involving GOT symbols
1935 forced to be local because of versioning (by replicating
1936 corresponding change in sparc). Treat R_PPC_RELATIVE RELA relocs
1937 as usual in ELF, not as pseudo-REL relocs (as the sparc linker
1938 does).
1939 (ppc_elf_relocate_section): Add handy debugging code for when
1940 assertion fails. Add some more 'symbol made local because of
1941 versioning' cases.
1942
1943 * elf32-ppc.c (ppc_elf_relocate_section): Cope with addend when
1944 processing a GOT relocation as required by ABI.
1945
1946 Wed Jul 30 21:30:35 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1947
1948 * elflink.h (NAME(bfd_elf,record_link_assignment)): Remove any
1949 version info if this symbol came from a dynamic object.
1950 (elf_link_add_object_symbols): Set the version info of a symbol
1951 only if the object actually contains version definitions and
1952 defines this symbol.
1953
1954 Mon Jul 28 18:07:43 1997 Rob Savoye <rob@chinadoll.cygnus.com>
1955
1956 * aclocal.m4: Add CYGWIN and EXEEXT autoconf macros.
1957 * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
1958 win32 dependencies.
1959 * configure: Regenerated with autoconf 2.12.
1960 * doc/Makefile.in: Add $(EXEEXT) to chew executable.
1961
1962 Mon Jul 28 02:50:29 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1963
1964 * rs6000-core.c (rs6000coff_core_p): If CORE_TRUNC is set, print
1965 a warning rather than returning an error.
1966
1967 Sun Jul 27 19:54:14 1997 Felix Lee <flee@cygnus.com>
1968
1969 * coffswap.h (coff_swap_aux_in): add semicolon to make MSVC happy.
1970
1971 Fri Jul 25 14:50:08 1997 Felix Lee <flee@cygnus.com>
1972
1973 * cisco-core.c: define signals for wingdb.
1974
1975 Fri Jul 25 16:27:07 1997 Ian Lance Taylor <ian@cygnus.com>
1976
1977 * ecofflink.c (bfd_ecoff_debug_accumulate): Only merge files with
1978 the same number of aux entries.
1979
1980 Fri Jul 25 08:22:15 1997 Jeffrey A Law (law@cygnus.com)
1981
1982 * som.c (hppa_som_gen_reloc_type): Use R_DATA_EXPR for the
1983 difference of two symbols if the relocation size is 32 bits.
1984 (som_write_fixups): Handle R_DATA_EXPR.
1985
1986 Wed Jul 23 16:08:02 1997 Ian Lance Taylor <ian@cygnus.com>
1987
1988 * coff-i386.c (coff_i386_reloc): Don't offset a common symbol by
1989 its value if COFF_WITH_PE is defined.
1990
1991 Tue Jul 22 17:19:45 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
1992
1993 * coff-stubgo32.c: New file.
1994 * go32stub.h: New file.
1995 * coff-i386.c: If COFF_GO32_EXE, include coff/go32exe.h.
1996 * coffswap.h (coff_swap_filehdr_in): Invoke
1997 COFF_ADJUST_FILEHDR_IN_PRE and COFF_ADJUST_FILEHDR_IN_POST if they
1998 are defined.
1999 (coff_swap_filehdr_out): Invoke COFF_ADJUST_FILEHDR_OUT_PRE and
2000 COFF_ADJUST_FILEHDR_OUT_POST if they are defined.
2001 (coff_swap_aux_in): Invoke COFF_ADJUST_AUX_IN_PRE and
2002 COFF_ADJUST_AUX_IN_POST if they are defined.
2003 (coff_swap_aux_out): Invoke COFF_ADJUST_AUX_OUT_PRE and
2004 COFF_ADJUST_AUX_OUT_POST if they are defined.
2005 (coff_swap_scnhdr_in): Invoke COFF_ADJUST_SCNHDR_IN_PRE and
2006 COFF_ADJUST_SCNHDR_IN_POST if they are defined.
2007 (coff_swap_scnhdr_out): Invoke COFF_ADJUST_SCNHDR_OUT_PRE and
2008 COFF_ADJUST_SCNHDR_OUT_POST if they are defined.
2009 * targets.c (go32stubbedcoff_vec): Declare.
2010 (bfd_target_vector): Add go32stubbedcoff_vec.
2011 * configure.in (go32coff_vec): New target vector.
2012 (go32stubbedcoff_vec): Likewise.
2013 * config.bfd (i[3456]86-*-msdosdjgpp*): New target.
2014 (i[3456]86-*-go32*): Change to be like new msdosdjgpp*.
2015 * Makefile.in: Rebuild dependencies.
2016 (BFD32_BACKENDS): Add coff-stubgo32.o.
2017 (BFD32_BACKENDS_CFILES): Add coff-stubgo32.c.
2018 (HFILES): Add go32stub.h.
2019
2020 Tue Jul 22 15:09:12 1997 Ian Lance Taylor <ian@cygnus.com>
2021
2022 * configure.in: Check for fdopen.
2023 * configure, config.in: Rebuild.
2024 * opncls.c (bfd_fdopenr): Check HAVE_FDOPEN rather than VMS or
2025 __GO32__. Reindent a bit.
2026
2027 Sun Jul 20 20:05:20 1997 Ian Lance Taylor <ian@cygnus.com>
2028
2029 * sunos.c (sunos_create_dynamic_sections): Set SEC_LINKER_CREATED
2030 flag for newly created sections.
2031 (sunos_add_dynamic_symbols): Don't discard newly created sections
2032 if shared library is dynobj.
2033
2034 Mon Jul 14 15:33:55 1997 Ian Lance Taylor <ian@cygnus.com>
2035
2036 * elf.c (map_sections_to_segments): When checking whether
2037 including a section in a segment would force us to skip a page,
2038 align the address of the next segment to avoid wraparound
2039 problems.
2040
2041 start-sanitize-tic80
2042 Tue Jul 8 12:11:29 1997 Fred Fish <fnf@cygnus.com>
2043
2044 * coffcode.h (coff_write_object_contents): Initialize
2045 target id field to TIC80_TARGET_ID.
2046 * coffswap.h (coff_swap_filehdr_out): Swap out target id field
2047 if used.
2048 (coff_swap_filehdr_in): Swap in target id field if used.
2049
2050 end-sanitize-tic80
2051 Mon Jul 7 16:41:20 1997 Ian Lance Taylor <ian@cygnus.com>
2052
2053 * coff-i386.c (coff_i386_is_local_label_name): New static function
2054 if TARGET_UNDERSCORE.
2055 (coff_bfd_is_local_label_name): Define if TARGET_UNDERSCORE.
2056 (i386coff_vec): Add SEC_CODE and SEC_DATA to section_flags.
2057
2058 Mon Jun 30 14:29:26 1997 Ian Lance Taylor <ian@cygnus.com>
2059
2060 * elf32-m68k.c (howto_table): Use complain_overflow_bitfield, not
2061 complain_overflow_signed, for 32 bit PC relative relocations.
2062
2063 Thu Jun 26 01:26:31 1997 Ian Lance Taylor <ian@cygnus.com>
2064
2065 * elflink.h (elf_link_add_object_symbols): When a version
2066 indirection symbol is overridden, make the original symbol point
2067 at the real overriding symbol.
2068
2069 * elf.c (bfd_elf_string_from_elf_section): Check for an invalid
2070 string index.
2071
2072 * elflink.h (elf_link_output_extsym): Use the right section for a
2073 common symbol.
2074 * elf32-mips.c (mips_elf_link_output_symbol_hook): If a common
2075 symbol was in .scommon, mark it as SHN_MIPS_SCOMMON.
2076
2077 Wed Jun 25 12:43:10 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
2078
2079 * elflink.h (elf_merge_symbols): Resolve indirect and warning
2080 symbols before checking for new symbols.
2081
2082 * elfcore.h (elf_corefile_note): Move out of HAVE_SYS_PROCFS_H.
2083
2084 Tue Jun 24 11:20:43 1997 Ian Lance Taylor <ian@cygnus.com>
2085
2086 * coffgen.c (coff_object_p): Read the f_opthdr bytes from the
2087 file, not aoutsz bytes (they are different in XCOFF .o files).
2088
2089 * xcofflink.c (xcoff_link_add_symbols): Permit symbols to be
2090 redefined by objects included from archives.
2091
2092 Mon Jun 23 18:03:27 1997 Ian Lance Taylor <ian@cygnus.com>
2093
2094 * elflink.h (elf_merge_symbol): In the case of a new defined
2095 symbol overriding an old defined symbol, return the hash table
2096 entry which we modify, even if it is the target of an
2097 indirection.
2098 (elf_link_add_object_symbols): If the real name of the symbol gets
2099 overridden, convert the versioned symbol into an indirect symbol
2100 to the real symbol.
2101
2102 * elflink.h (elf_merge_symbol): New static function, broken out of
2103 elf_link_add_object_symbols.
2104 (elf_link_add_object_symbols): Call it.
2105
2106 Sun Jun 22 19:40:57 1997 Ian Lance Taylor <ian@cygnus.com>
2107
2108 * coff-i386.c (i3coff_object_p): If COFF_IMAGE_WITH_PE, hack to
2109 handle case where COFF filehdr does not immediately follow PE
2110 header.
2111 * coffgen.c (coff_object_p): Remove useless seek to current
2112 location.
2113
2114 Wed Jun 18 19:03:38 1997 Ian Lance Taylor <ian@cygnus.com>
2115
2116 * linker.c (link_action): Change COMMON_ROW/indr to from CREF to
2117 REFC.
2118
2119 Tue Jun 17 11:55:02 1997 Ian Lance Taylor <ian@cygnus.com>
2120
2121 * cofflink.c (_bfd_coff_link_input_bfd): If stripping debugging
2122 symbols, skip N_ABS symbols with debugging storage classes.
2123
2124 Mon Jun 16 18:56:27 1997 Geoff Keating <geoffk@ozemail.com.au>
2125
2126 * elf32-ppc.c (ppc_elf_relocate_section): Don't emit R_PPC_REL*
2127 relocs in shared libraries which refer to local symbols. Cope
2128 with addend when processing a GOT relocation.
2129
2130 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Only create symbols
2131 for sections that the linker didn't create.
2132 (ppc_elf_finish_dynamic_sections): Only try to write out a section
2133 symbol if it was created in ppc_elf_size_dynamic_sections.
2134 (ppc_elf_relocate_section): Complain if we have to generate a reloc
2135 relative to a section for which we didn't output a symbol.
2136
2137 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Clean up. PLT
2138 relocs are 'rela' relocs, like everything else. .rela.plt is not
2139 a read-only section, so we don't have to special-case it.
2140
2141 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Entries in the
2142 .rela.bss section are (of course) 'rela' relocs not 'rel' relocs.
2143
2144 * elf32-ppc.c (ppc_elf_check_relocs): Initialise srelgot.
2145 (ppc_elf_relocate_section): @got offsets are 4 from start of the
2146 actual .got section.
2147 * elflink.c (_bfd_elf_create_got_section): The three reserved
2148 words start from the symbol '_GLOBAL_OFFSET_TABLE_'.
2149
2150 * elf32-ppc.c (ppc_elf_size_dynamic_sections): '.rela' is 5
2151 characters, not 4.
2152
2153 * elf32-ppc.c (ppc_elf_check_relocs): Use
2154 _bfd_elf_create_got_section to create the GOT rather than
2155 ppc_elf_create_linker_section. Create the '.rela.got' section
2156 ourselves.
2157 (ppc_elf_finish_dynamic_symbol): Set up GOT relocations when a
2158 symbol has a GOT entry.
2159 (ppc_elf_relocate_section): Record when a symbol is used through
2160 the GOT, and allocate space in the GOT for each such symbol.
2161 (ppc_elf_adjust_dynamic_symbol): Delete unused .got.plt stuff.
2162 (ppc_elf_create_linker_section): Delete unused LINKER_SECTION_GOT
2163 stuff.
2164
2165 * elf32-ppc.c (ppc_elf_howto_raw): GOT16_HA relocs should be
2166 treated in a similar way to ADDR16_HA relocs.
2167 (ppc_elf_relocate_section): PLTREL24 relocs do not get copied into
2168 shared objects; the linker must deal with them.
2169 (ppc_elf_create_linker_section): Stop setting
2170 _GLOBAL_OFFSET_TABLE_ to the wrong value; delete unused
2171 LINKER_SECTION_PLT stuff.
2172 (ppc_elf_check_relocs): Delete unused LINKER_SECTION_PLT stuff.
2173 (ppc_elf_finish_dynamic_sections): Use BFD calls to get GOT
2174 section, not ELF-specific calls.
2175 (elf_backend_plt_not_loaded): Set to 1.
2176 (elf_backend_got_symbol_offset): Set to 4.
2177 * elf-bfd.h (elf_backend_data): Add 'plt_not_loaded' member
2178 for when ld.so fills in the PLT; and 'got_symbol_offset' member.
2179 * elflink.c (_bfd_elf_create_dynamic_sections): Apply
2180 plt_not_loaded member.
2181 (_bfd_elf_create_got_section): Apply got_symbol_offset.
2182 * elfxx-target.h (elf_backend_plt_not_loaded): Set default to
2183 'loaded'.
2184 (elf_backend_G_O_T_offset): Set default to 0.
2185 (elfNN_bed): Set added fields.
2186
2187 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Was setting
2188 DT_RELENT in shared objects; should be DT_RELAENT.
2189
2190 * elf32-ppc.c (ppc_elf_relocate_section): Propagate
2191 R_PPC_ADDR16_HA relocs to shared objects. Cope with case where
2192 such a reloc (in a non-shared object) refers to a symbol that's
2193 not defined.
2194
2195 Mon Jun 16 14:42:14 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
2196
2197 * elfcode.h (put_signed_word): Define.
2198 (get_signed_word): Define.
2199 (elf_swap_reloca_in): Use get_signed_word for the r_addend field.
2200 (elf_swap_reloca_out): Use put_signed_word for the r_addend
2201 field.
2202 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Use
2203 bfd_get_signed_32 to set the r_addend field.
2204 * elf64-mips.c (mips_elf64_swap_reloca_in): Use
2205 bfd_h_get_signed_64 to set the r_addend field.
2206
2207 Mon Jun 16 12:31:29 1997 Ian Lance Taylor <ian@cygnus.com>
2208
2209 * elf32-i386.c (elf_i386_relocate_section): When generating a
2210 shared library, do the relocation if the input section is not
2211 allocated in memory.
2212
2213 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Call
2214 elf_link_assign_sym_version before elf_adjust_dynamic_symbol.
2215 (elf_fix_symbol_flags): New static function, broken out of
2216 elf_adjust_dynamic_symbol.
2217 (elf_adjust_dynamic_symbol): Call elf_fix_symbol_flags.
2218 (elf_link_assign_sym_version): Likewise. Permit a symbol to be
2219 forced local even if NEEDS_PLT is set. When forcing a symbol to
2220 be local, clear NEEDS_PLT.
2221 (elf_link_output_extsym): Remove unused local bed.
2222
2223 Wed Jun 11 22:44:20 1997 Jeffrey A Law (law@cygnus.com)
2224
2225 * elf32-mn10300.c (elf32_mn10300_link_hash_entry): New structure
2226 for derived elf linker hash table entries. References to
2227 elf_link_hash_entry changed appropriately.
2228 (elf32_mn10300_link_hash_table): New structure for derived elf
2229 linker hash table.
2230 (elf32_mn10300_hash_table): Define.
2231 (elf32_mn10300_link_hash_traverse): Likewise.
2232 (elf32_mn10300_link_hash_newfunc): New function.
2233 (elf32_mn10300_link_hash_table_create): Likewise.
2234 (elf32_mn10300_finish_hash_table_entry): Likewise.
2235 (mn10300_elf_relax_section): Handle "call" -> "calls", removal
2236 of prologue code, and call:32->call:16 relaxing.
2237 (compute_function_info: New function.
2238 (bfd_elf32_bfd_ilink_hash_table_create): Define.
2239
2240 Wed Jun 11 00:00:07 1997 Ian Lance Taylor <ian@cygnus.com>
2241
2242 * elflink.h (elf_link_output_extsym): Call finish_dynamic_symbol
2243 for a symbol which is being forced to be local.
2244 * elf32-i386.c (elf_i386_relocate_section): Write out the
2245 relocation value for a GOT reloc for a symbol which is turning
2246 into a local symbol.
2247 (elf_i386_finish_dynamic_symbol): If a symbol is turning into a
2248 local symbol, write out a RELATIVE reloc rather than a GLOB_DAT
2249 reloc.
2250 * elf32-m68k.c, elf32-sparc.c: Corresponding changes.
2251
2252 * elf32-i386.c (elf_i386_relocate_section): Get the relocation
2253 value if the symbol is turning into a local symbol.
2254 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2255 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2256
2257 1997-06-10 22:58 Ulrich Drepper <drepper@cygnus.com>
2258
2259 * elflink.h (elf_link_add_object_symbols): Also read verneed
2260 information by calling `_bfd_elf_slurp_version_tables'.
2261 (elf_link_add_object_symbols): For undefined symbols look for
2262 version information in the verneed records.
2263 (elf_link_add_object_symbols): Use soname of shared object
2264 for verneed record if it is available.
2265
2266 Tue Jun 10 11:13:03 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
2267
2268 * cpu-arm.c: Add prototypes for compatible and scan.
2269 * cofflink.c: Add prototype for mark_relocs.
2270
2271 * archive.c (bfd_special_undocumented_glue): Change filename to
2272 const pointer. Add prototype.
2273
2274 Mon Jun 9 12:34:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2275
2276 * elflink.h (elf_link_add_object_symbols): Ignore relocations of
2277 sections that will be discarded.
2278
2279 1997-06-06 22:58 Ulrich Drepper <drepper@cygnus.com>
2280
2281 * elflink.h (elf_link_find_version_dependencies): When searching
2282 for known version symbol skip non-matching verdef records, not
2283 matching records.
2284
2285 Thu Jun 5 15:52:45 1997 Ian Lance Taylor <ian@cygnus.com>
2286
2287 * cofflink.c (_bfd_coff_generic_relocate_section): Write a long,
2288 not a bfd_vma, to the base file, to match how dlltool reads it.
2289
2290 Tue Jun 3 16:57:45 1997 Nick Clifton <nickc@cygnus.com>
2291
2292 * reloc.c: Add thumb relocations.
2293
2294 * bfd-in2.h: Add Thumb relocations.
2295
2296 * libbfd.h: Add Thumb relocations.
2297
2298 Mon Jun 2 10:41:52 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2299
2300 * cpu-m68k.c (arch_info_struct): Fix 68060 cpu name.
2301
2302 Fri May 30 12:46:27 1997 Ian Lance Taylor <ian@cygnus.com>
2303
2304 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Set dynindx
2305 for a section even if it is not loaded.
2306
2307 * cofflink.c (coff_link_add_symbols): If PE file, don't subtract
2308 section VMA.
2309 (_bfd_coff_link_input_bfd): Separate section VMA handling for
2310 input and output files.
2311 (_bfd_coff_generic_relocate_section): Check whether input file,
2312 not output file, is a PE file.
2313
2314 Wed May 28 15:48:43 1997 Nick Clifton <nickc@cygnus.com>
2315
2316 * coff-arm.c: (coff_arm_bfd_set_private_flags): Make static.
2317
2318 Wed May 28 16:16:04 1997 Ian Lance Taylor <ian@cygnus.com>
2319
2320 * coff-i386.c (coff_i386_reloc): Don't just exit if we see an
2321 R_IMAGEBASE reloc.
2322
2323 Wed May 28 09:48:43 1997 Nick Clifton <nickc@cygnus.com>
2324
2325 * cpu-arm.c (compatible): Add test for supersets of ARM
2326 architectures.
2327
2328 Tue May 27 19:42:03 1997 Bob Manson <manson@charmed.cygnus.com>
2329
2330 * cofflink.c (_bfd_coff_final_link): Initialize global_to_static
2331 member.
2332
2333 Tue May 27 14:34:08 1997 Nick Clifton <nickc@cygnus.com>
2334
2335 * coff-arm.c (coff_arm_bfd_set_private_flags): Make global. It is
2336 called directly by gas/config/tc-arm.c.
2337
2338 Tue May 27 15:58:53 1997 Richard Henderson <rth@tamu.edu>
2339
2340 * elf64-alpha.c (PLT_ENTRY_*): Use a new thread-safe format.
2341 (elf64_alpha_finish_dynamic_symbol): Fill it in properly.
2342
2343 Mon May 26 14:05:13 1997 Ian Lance Taylor <ian@cygnus.com>
2344
2345 * coff-ppc.c (coff_ppc_relocate_section): If PE file, don't add
2346 section VMA.
2347
2348 Mon May 26 10:57:48 1997 Fred Fish <fnf@cygnus.com>
2349
2350 * peicode.h (coff_bfd_print_private_bfd_data): #undef before #define.
2351 (coff_bfd_copy_private_bfd_data): Ditto.
2352 * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): Make static.
2353 (coff_arm_bfd_print_private_bfd_data): Ditto.
2354 (coff_arm_bfd_set_private_flags): Ditto.
2355 (coff_arm_bfd_copy_private_bfd_data): Ditto.
2356
2357 Fri May 23 15:14:58 1997 Fred Fish <fnf@cygnus.com>
2358
2359 * libcoff-in.h (struct coff_final_link_info): Add boolean
2360 global_to_static member for support of task linking.
2361 (_bfd_coff_write_task_globals): Add prototype.
2362 * libcoff.h: Regenerate.
2363 * coffcode.h (coff_write_object_contents): Use #ifdef to
2364 check RS6000COFF_C, to be consistent with all other uses
2365 in this file.
2366 * cofflink.c (_bfd_coff_final_link): If doing task linking,
2367 call _bfd_coff_write_task_globals.
2368 (_bfd_coff_link_input_bfd): If doing task linking, convert
2369 global functions to static.
2370 (_bfd_coff_write_global_sym): If doing task linking, convert
2371 global variables to static.
2372 (_bfd_coff_write_task_globals): New function.
2373 start-sanitize-tic80
2374 * coff-tic80.c (TIC80COFF): Define this instead of just TIC80.
2375 (C_AUTOARG): #undef since it clashes with C_UEXT.
2376 (C_LASTENT): #undef since it clashes with C_STATLAB.
2377 * coffcode.h (coff_write_object_contents): Use TIC80COFF
2378 rather than TIC80.
2379 (coff_slurp_symbol_table): Use C_SYSTEM. Hide C_AUTOARG use
2380 when TIC80COFF defined (clashes with C_UEXT). Explicitly
2381 recognize C_UEXT, C_STATLAB, and C_EXTLAB as unsupported.
2382 end-sanitize-tic80
2383
2384 start-sanitize-tic80
2385 Fri May 23 12:38:24 1997 Ian Lance Taylor <ian@cygnus.com>
2386
2387 * coff-tic80.c (tic80_howto_table): Change overflow check for most
2388 PP relocations to complain_overflow_dont.
2389
2390 Thu May 22 20:22:14 1997 Ian Lance Taylor <ian@cygnus.com>
2391
2392 * coff-tic80.c (tic80_howto_table): Add PP relocations. Change
2393 name of R_RELLONG to "RELLONG". Set rightshift and complain for
2394 M_PPCR.
2395 (ppbase_reloc, glob15_reloc): New static functions.
2396 (glob16_reloc, local16_reloc): New static functions.
2397 (rtype2howto): Handle all relocation types.
2398 (coff_tic80_relocate_section): New static function.
2399 (coff_relocate_section): Define to coff_tic80_relocate_section.
2400 * Makefile.in (coff-tic80.o): Depends upon include/coff/tic80.h.
2401
2402 end-sanitize-tic80
2403 Wed May 21 17:15:50 1997 Ian Lance Taylor <ian@cygnus.com>
2404
2405 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE or
2406 COFF_IMAGE_WITH_PE, don't subtract the section VMA from the symbol
2407 value.
2408 * coffgen.c (fixup_symbol_value): Add abfd parameter. Change all
2409 callers. If PE file, don't add section VMA.
2410 (coff_write_alien_symbol): If PE file, don't add section VMA.
2411 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2412 (_bfd_coff_write_global_sym): Likewise.
2413 (_bfd_coff_generic_relocate_section): Likewise.
2414
2415 * peicode.h: Add & 0xffffffff when using ImageBase in case bfd_vma
2416 is 64 bits.
2417
2418 Wed May 21 09:58:10 1997 Nick Clifton <nickc@cygnus.com>
2419
2420 * cofflink.c (mark_relocs): Add new function to mark symbols which
2421 are used by relocations.
2422 (_bfd_coff_link_input_bfd): Add call to mark_relocs() and code to
2423 suppress the skipping of symbols that have thus been marked.
2424
2425 Tue May 20 18:45:26 1997 Ian Lance Taylor <ian@cygnus.com>
2426
2427 * coff-sh.c (sh_merge_private_data): New static function.
2428 (coff_bfd_merge_private_bfd_data): Define.
2429
2430 start-sanitize-tic80
2431 Mon May 19 14:46:00 1997 Mark Alexander <marka@cygnus.com>
2432
2433 * coff-tic80.c: Remove unnecessary #ifdefs.
2434 * config.bfd: Set targ_underscore to yes for tic80.
2435
2436 Mon May 19 14:26:36 1997 Mark Alexander <marka@cygnus.com>
2437
2438 * coff-tic80.c (NAMES_HAVE_UNDERSCORE): Define (fixes problem
2439 with unresolved external symbols in GDB).
2440
2441 end-sanitize-tic80
2442 Fri May 16 10:23:03 1997 Jeffrey A Law (law@cygnus.com)
2443
2444 * elf-m10300.c (elf32_mn10300_relax_section): Read in all
2445 the symbols associated with each BFD.
2446 (mn10300_elf_relax_delete_bytes): Don't adjust the same symbol
2447 more than once.
2448 * elf-m10200.c: Likewise.
2449 * elf32-m32r.c: Likewise.
2450 * elf32-sh.c: Likewise.
2451
2452 Fri May 16 12:10:52 1997 Ian Lance Taylor <ian@cygnus.com>
2453
2454 * elflink.h (elf_link_add_object_symbols): Don't decrease the
2455 alignment of a common symbol. If two symbols that look like
2456 common symbols are found in two shared libraries, and the size is
2457 different, use the larger size, and warn if --warn-common. If a
2458 common symbol overrides a definition in a shared library, set the
2459 size to the larger size, and warn if --warn-common.
2460
2461 Thu May 15 14:31:28 1997 Nick Clifton <nickc@cygnus.com>
2462
2463 * cpu-arm.c (compatible): Allow default machine to be polymorphed
2464 into any other machine type.
2465
2466 * coffcode.h (coff_set_flags): Initialise flags variable to 0.
2467
2468 * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): When merging
2469 data into an unitialised destination set its machine type as well.
2470
2471 Thu May 15 16:40:20 1997 Ian Lance Taylor <ian@cygnus.com>
2472
2473 * elflink.h (elf_link_add_object_symbols): Force ELF symbol size
2474 to common symbol size. Consistently treat uninitialized symbols
2475 in shared objects as common symbols.
2476
2477 Fri May 9 10:15:27 1997 Nick Clifton <nickc@cygnus.com>
2478
2479 * archures.c (constants): Added new constants to identify the
2480 type of the ARM architecture: bfd_mach_arm_2, bfd_mach_arm_2a,
2481 bfd_mach_arm_3, bfd_mach_arm_3M, bfd_mach_arm_4 and bfd_mach_arm_4T.
2482
2483 * bfd-in2.h (constants): Added new constants to identify
2484 the type of the ARM architecture: bfd_mach_arm_2, bfd_mach_arm_2a,
2485 bfd_mach_arm_3, bfd_mach_arm_3M, bfd_mach_arm_4 and
2486 bfd_mach_arm_4T. This file is auto-magically generated from the
2487 archures.c file. This update is just to save work.
2488
2489 * coff-arm.c (coff_arm_bfd_merge_private_bfd_data,
2490 coff_arm_bfd_print_private_bfd_data,
2491 coff_arm_bfd_set_private_flags,
2492 coff_arm_bfd_copy_private_bfd_data): Added these new functions.
2493 (global): Macro redefinitions set up to use these new functions.
2494
2495 * coffcode.h (coff_mkobject_hook): Added call to
2496 coff_arm_bfd_set_private_flags().
2497 (coff_set_arch_mach_hook): Added code to set machine type based on
2498 bits stored in internal flags.
2499 (coff_set_flags): Added code to set the new bits in the flags
2500 field based on the machine number.
2501 (function definition macros): Made all function definition macros
2502 conditional so that they can be overridden by target specific
2503 files.
2504
2505 * cpu-arm.c (compatible): Added this function. (arch_info_struct):
2506 Structure extended to include new types, one each for ARMv2,
2507 ARMv2a, ARMv3, ARMv3M, ARMv4 and ARMv4T.
2508
2509 * libcoff-in.h (struct coff_tdata): Added flags field.
2510
2511 Fri May 9 17:40:02 1997 Ian Lance Taylor <ian@cygnus.com>
2512
2513 * config.bfd (i[3456]86-*-gnu*): Don't include Mach support.
2514
2515 * config.bfd: Change #if 0 around uses of host_aout_vec to #if
2516 HAVE_host_aout_vec.
2517
2518 Mon May 5 13:57:32 1997 Mike Meissner <meissner@cygnus.com>
2519
2520 * coffgen.c (coff_find_nearest_line): If there are no syments,
2521 just return false.
2522
2523 Mon May 5 18:18:45 1997 Philip Blundell <pjb27@cam.ac.uk>
2524
2525 * config.bfd: cope with '*-*-linux-gnuaout' targets.
2526
2527 Thu May 1 11:31:12 1997 Ian Lance Taylor <ian@cygnus.com>
2528
2529 * targmatch.sed: Add explicit \n characters to work around bug in
2530 HP/UX 10.20 sed program.
2531
2532 Wed Apr 30 12:27:03 1997 Ian Lance Taylor <ian@cygnus.com>
2533
2534 * elf.c (copy_private_bfd_data): Cast csecs to avoid sign
2535 extension problems.
2536
2537 Tue Apr 22 12:06:08 1997 Ian Lance Taylor <ian@cygnus.com>
2538
2539 * Makefile.in (do_maintainer_clean): Don't remove bfd-in2.h.
2540
2541 Mon Apr 21 11:21:31 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2542
2543 * elf32-m68k.c: Follow the last changes in elf32-i386.c:
2544 (struct elf_m68k_pcrel_relocs_copied, struct
2545 elf_m68k_link_hash_entry, struct elf_m68k_link_hash_table,
2546 elf_m68k_link_hash_traverse, elf_m68k_hash_table,
2547 elf_m68k_link_hash_newfunc, elf_m68k_link_hash_table_create,
2548 elf_m68k_discard_copies, bfd_elf32_bfd_link_hash_table_create):
2549 New definitions.
2550 (elf_m68k_check_relocs): If linking with -Bsymbolic, don't copy
2551 PC relative relocs for a global symbol defined in a regular
2552 object, and count the number of PC relative relocs copied for any
2553 global symbol.
2554 (elf_m68k_size_dynamic_sections): If linking with -Bsymbolic,
2555 traverse with elf_m68k_discard_copies.
2556
2557 Sat Apr 19 22:50:14 1997 Ian Lance Taylor <ian@cygnus.com>
2558
2559 * elf32-i386.c (elf_i386_check_relocs): Only count PC relative
2560 relocs. From Jamie Lokier <jamie@rebellion.co.uk>.
2561
2562 * coffcode.h (coff_compute_section_file_positions): Force the
2563 potential last byte in the file to be written out when
2564 COFF_IMAGE_WITH_PE.
2565
2566 Thu Apr 17 13:46:56 1997 Per Fogelstrom <pefo@openbsd.org>
2567
2568 * configure.host (mips*-*-openbsd*): New host.
2569
2570 Thu Apr 17 11:10:54 1997 Ian Lance Taylor <ian@cygnus.com>
2571
2572 * elflink.h (elf_link_add_object_symbols): Only subtract the
2573 section VMA from the symbol value if this is a fully linked file.
2574
2575 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Define.
2576 (struct elf_i386_link_hash_entry): Define.
2577 (struct elf_i386_link_hash_table): Define.
2578 (elf_i386_link_hash_traverse): Define.
2579 (elf_i386_hash_table): Define.
2580 (elf_i386_link_hash_newfunc): New static function.
2581 (elf_i386_link_hash_table_create): New static function.
2582 (elf_i386_check_relocs): If linking with -Bsymbolic, don't copy
2583 PC relative relocs for a global symbol defined in a regular
2584 object, and count the number of PC relative relocs copied for any
2585 global symbol.
2586 (elf_i386_size_dynamic_sections): If linking with -Bsymbolic,
2587 traverse with elf_i386_discard_copies.
2588 (elf_i386_discard_copies): New static function.
2589 (bfd_elf32_bfd_link_hash_table_create): Define.
2590
2591 From Gordon W. Ross <gwr@mc.com>:
2592 * aoutf1.h (MY_entry_is_text_address): Define if not defined.
2593 (sunos4_aout_backend): Use MY_entry_is_text_address.
2594
2595 start-sanitize-d30v
2596 Wed Apr 16 12:43:32 1997 Martin Hunt <hunt@cygnus.com>
2597
2598 * elf32-d30v.c (elf_d30v_howto_table): Changed size of
2599 R_D30V_32_NORMAL to 2 (4 bytes).
2600
2601 end-sanitize-d30v
2602 Wed Apr 16 14:02:29 1997 Ian Lance Taylor <ian@cygnus.com>
2603
2604 From Gordon W. Ross <gwr@mc.com>:
2605 * netbsd.h (N_SHARED_LIB): Define.
2606 (SEGMENT_SIZE): Don't define.
2607 * m68knetbsd.c (SEGMENT_SIZE): Don't define (revert change of
2608 April 11).
2609 * sparcnetbsd.c (TARGET_PAGE_SIZE): Define as 0x2000.
2610 (SEGMENT_SIZE): Don't define.
2611
2612 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set .rela.bss size
2613 to sizeof Rela structure, not sizeof Rel structure. From Gary
2614 Thomas <g.thomas@opengroup.org>.
2615
2616 Tue Apr 15 11:50:37 1997 Ian Lance Taylor <ian@cygnus.com>
2617
2618 * aout-target.h (MY(callback)): If entry_is_text_address, adjust
2619 whenever entry is larger than text address, but only by whole
2620 pages. From Gordon W. Ross <gwr@mc.com>.
2621
2622 * Makefile.in (install): Depend upon installdirs. Use
2623 mkinstalldirs to build $(oldincludedir).
2624 (installdirs): New target.
2625
2626 * elflink.h (elf_link_add_object_symbols): Don't call check_relocs
2627 if this is a debugging section which we are stripping.
2628
2629 Mon Apr 14 12:39:30 1997 Richard Henderson <rth@tamu.edu>
2630
2631 * elf64-alpha.c (elf64_alpha_object_p): Allocate the
2632 alpha-specific target data struct.
2633
2634 Mon Apr 14 11:45:46 1997 Ian Lance Taylor <ian@cygnus.com>
2635
2636 From Thomas Graichen <graichen@rzpd.de>:
2637 * Makefile.in: Always use $(SHELL) when running move-if-change.
2638 * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
2639 * configure: Rebuild.
2640
2641 Fri Apr 11 15:43:24 1997 Ian Lance Taylor <ian@cygnus.com>
2642
2643 * elfcode.h (elf_slurp_symbol_table): Only subtract the section
2644 VMA if this is an executable file or a shared object.
2645
2646 * targets.c (netbsd_core_vec): Declare. From Gordon W. Ross
2647 <gwr@mc.com>.
2648
2649 * libaout.h (struct aout_backend_data): Add entry_is_text_address
2650 field.
2651 * aout-target.h (SEGMENT_SIZE): Define to TARGET_PAGE_SIZE at the
2652 start of the file. Remove uses later on which switch using
2653 ifdef.
2654 (MY(callback)): Handle entry_is_text_address.
2655 (MY_entry_is_text_address): Define if not defined.
2656 (MY(backend_data)): Initialize new field.
2657 * aoutf1.h (sunos4_aout_backend): Likewise.
2658 * i386aout.c (MY(backend_data)): Likewise.
2659 * i386mach3.c (MY(backend_data)): Likewise.
2660 * mipsbsd.c (MY(backend_data)): Likewise.
2661 * sparclynx.c (sparclynx_aout_backend): Likewise.
2662 * netbsd.h (SEGMENT_SIZE): Define if not defined.
2663 (MY_entry_is_text_address): Define.
2664 * m68knetbsd.c (SEGMENT_SIZE): Define as 0x20000.
2665
2666 * xcofflink.c (bfd_xcoff_import_symbol): Handle importing a symbol
2667 whose name starts with `.'.
2668
2669 Fri Apr 11 11:57:15 1997 Niklas Hallqvist <niklas@appli.se>
2670
2671 * config.bfd: (i[3456]86-*-openbsd*, m68*-*-openbsd*,
2672 mips*el*-*-openbsd*, mips*-*-openbsd*, ns32k-*-openbsd*,
2673 powerpc-*-*bsd*, sparc-*-openbsd*): New targets.
2674 * configure.in (i[3456]86-*-openbsd*, mips*-*-openbsd*,
2675 m68*-*-openbsd*, ns32k-*-openbsd*, powerpc-*-*bsd*,
2676 sparc-*-openbsd*): New targets.
2677 * configure: Rebuild.
2678
2679 Tue Apr 8 18:09:29 1997 Jamie Lokier <jamie@rebellion.co.uk>
2680
2681 * stabs.c (struct stab_section_info): New field
2682 `cumulative_skips'.
2683 (_bfd_link_section_stabs): Fill the above array.
2684 (_bfd_stab_section_offset): Use `cumulative_skips' to
2685 speed up offset calculation.
2686
2687 Tue Apr 8 00:01:31 1997 Jeffrey A Law (law@cygnus.com)
2688
2689 * elf-mn10300.c (mn10300_elf_relax_section): Don't forget the
2690 addend for non pc-relative relocations.
2691
2692 * elf-m10300.c (bfd_elf32_mn10300_reloc): Remove prototype
2693 for non-existent function.
2694
2695 * elf-m10300.c (mn10300_elf_relax_section): New function.
2696 (mn10300_elf_relax_delete_bytes): Likewise.
2697 (mn10300_elf_symbol_address_p): Likewise.
2698 (mn10300_elf_get_relocated_section_contents): Likewise.
2699 (bfd_elf32_bfd_relax_section): Define.
2700 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2701
2702 Mon Apr 7 16:47:09 1997 Ian Lance Taylor <ian@cygnus.com>
2703
2704 * configure.host: Set SHLIB_LIBS.
2705 * configure.in: Substitute SHLIB_LIBS.
2706 * configure: Rebuild.
2707 * Makefile.in (SHLIB_LIBS): New variable.
2708 ($(SHLIB)): Use $(SHLIB_LIBS).
2709
2710 Mon Apr 7 10:53:52 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
2711
2712 * bfd-in.h bfd-in2.h: add bfd_section_lma macro to correspond
2713 with bfd_section_vma.
2714
2715 Fri Apr 4 11:37:15 1997 Ian Lance Taylor <ian@cygnus.com>
2716
2717 * configure.in: Update file names for bfd_elf32_mn10[23]00_vec.
2718 Correct CPU file names for mn10[23]00.
2719 * configure: Rebuild.
2720
2721 * bfd.c (bfd_record_phdr): Cast count to size_t before
2722 subtraction.
2723
2724 * coff-ppc.c (dump_toc): Add cast to avoid warning from SunOS cc.
2725 * coff-rs6000.c (xcoff_read_ar_hdr): Likewise.
2726 (xcoff_write_archive_contents): LIkewise.
2727 * elf32-mips.c (_bfd_mips_elf_set_section_contents): Likewise.
2728 (mips_elf_create_procedure_table): Likewise.
2729 * peicode.h (pe_print_idata): Likewise.
2730 (pe_print_edata, pe_print_pdata, pe_print_reloc): Likewise.
2731 * xcofflink.c (xcoff_get_section_contents): Likewise.
2732 (_bfd_xcoff_canonicalize_dynamic_symtab): Likewise.
2733 (xcoff_link_add_symbols): Likewise.
2734 (xcoff_link_add_symbols): Likewise.
2735
2736 * ppcboot.c (ppcboot_set_arch_mach): Make static.
2737 (ppcboot_bfd_print_private_bfd_data): Likewise.
2738
2739 * elf32-mips.c (elf_mips_ctor64_howto): Set complain_on_overflow
2740 to complain_overflow_signed.
2741
2742 Thu Apr 3 11:51:54 1997 Ian Lance Taylor <ian@cygnus.com>
2743
2744 * VERSION: Set to 2.8.1.
2745
2746 * Branched binutils 2.8.
2747
2748 * elf32-ppc.c (ppc_elf_check_relocs): Don't check SEC_ALLOC when
2749 deciding whether to copy a reloc into a shared object.
2750 (ppc_elf_relocate_section): Likewise. Relocate R_PPC_RELATIVE
2751 relocs in unallocated sections.
2752 * elf32-sparc.c (elf32_sparc_relocate_section): Relocate
2753 R_SPARC_RELATIVE relocs in unallocated sections.
2754
2755 Wed Apr 2 16:19:41 1997 Mike Meissner <meissner@cygnus.com>
2756
2757 * elf32-ppc.c (ppc_elf_check_relocs): Undo March 26 change and
2758 always create got section so that the _GLOBAL_OFFSET_TABLE_ label
2759 is always created.
2760
2761 Wed Apr 2 10:49:07 1997 Ian Lance Taylor <ian@cygnus.com>
2762
2763 * elflink.h (elf_link_add_object_symbols): Let a common symbol
2764 override an uninitialized symbol from a shared library with a
2765 smaller size.
2766
2767 * elf-m10200.c: Rename from elf32-mn10200.c.
2768 * elf-m10300.c: Rename from elf32-mn10300.c.
2769 * cpu-m10200.c: Rename from cpu-mn10200.c
2770 * cpu-m10300.c: Rename from cpu-mn10300.c
2771 * Makefile.in: Update accordingly.
2772
2773 * elf32-mips.c (elf_mips_ctor64_howto): New static variable.
2774 (elf_mips_isa): Move to earlier in file.
2775 (mips_reloc_map): Remove BFD_RELOC_CTOR entry.
2776 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR
2777 specially.
2778
2779 * elf32-mips.c (mips16_jump_reloc): Print a warning rather than
2780 calling abort.
2781
2782 Tue Apr 1 16:18:05 1997 Klaus Kaempf <kkaempf@progis.de>
2783
2784 * configure.com: New file.
2785 * config.h-vms: Remove file.
2786 * makefile.vms: Update for new configure scheme.
2787
2788 Mon Mar 31 23:28:39 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
2789
2790 * libcoff-in.h (ppc_allocate_toc_section): Declare.
2791 (ppc_process_before_allocation): Declare.
2792 * libcoff.h: Rebuild.
2793
2794 * coffcode.h (coff_mkobject_hook): Declare if not a macro.
2795
2796 Mon Mar 31 16:29:50 1997 Joel Sherrill <joel@oarcorp.com>
2797
2798 * config.bfd (hppa*-*-rtems*): New target, like hppa-*-*elf*.
2799
2800 Mon Mar 31 16:11:35 1997 Ian Lance Taylor <ian@cygnus.com>
2801
2802 * coff-a29k.c (coff_a29k_relocate_section): Don't use symndx as a
2803 symbol index for a R_IHCONST reloc.
2804
2805 Mon Mar 31 15:40:59 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
2806
2807 * targmatch.sed: Do not use \(\) recursively.
2808
2809 Fri Mar 28 14:44:08 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
2810
2811 * m68klinux.c (MACHTYPE_OK): Define.
2812 * i386linux.c (MACHTYPE_OK): Define.
2813
2814 Fri Mar 28 11:56:15 1997 Ian Lance Taylor <ian@cygnus.com>
2815
2816 From David S. Miller <davem@caip.rutgers.edu> and H.J. Lu
2817 <hjl@gnu.ai.mit.edu>:
2818 * sparclinux.c: New file.
2819 * bfd-in.h (bfd_sparclinux_size_dynamic_sections): Declare.
2820 * bfd-in2.h: Rebuild.
2821 * config.bfd (sparc-*-linuxaout*, sparc-*-linux*): New targets.
2822 * configure.in (sparclinux_vec): Add to list of vectors.
2823 * configure: Rebuild.
2824 * targets.c (sparclinux_vec): Declare.
2825 (bfd_target_vector): Add sparclinux_vec.
2826 * Makefile.in: Rebuild dependencies.
2827 (BFD32_BACKENDS): Add sparclinux.o.
2828 (BFD32_BACKENDS_CFILES): Add sparclinux.c.
2829
2830 * coff-mips.c (mips_ecoff_backend_data): Initialize new
2831 bfd_coff_backend_data field.
2832 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2833
2834 * config.bfd: Add bfd_elf64_{big,little}mips_vec to targ_selvecs
2835 for mips*el*-*-linux* and mips*-*-linux*. From H.J. Lu
2836 <hjl@lucon.org> and Ralf Baechle <ralf@gnu.ai.mit.edu>.
2837
2838 * bfd.c: Include "libiberty.h".
2839 (strerror): Don't declare.
2840 (bfd_errmsg): Call xstrerror rather than strerror.
2841
2842 Thu Mar 27 12:55:42 1997 Ian Lance Taylor <ian@cygnus.com>
2843
2844 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Generate a COPY
2845 reloc even if the symbol is in the .bss section.
2846 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
2847 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
2848 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
2849
2850 * coffcode.h (bfd_coff_backend_data): Add new field
2851 _bfd_coff_default_section_alignment_power.
2852 (bfd_coff_default_section_alignment_power): Define.
2853 (bfd_coff_std_swap_table): Initialize new field.
2854 * libcoff.h: Rebuild.
2855 * cofflink.c (coff_link_add_symbols): Limit alignment of a common
2856 symbol to the default section alignment.
2857
2858 * COPYING: Update FSF address.
2859
2860 start-sanitize-d30v
2861 Thu Mar 27 00:45:57 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
2862
2863 * elf32-d30v.c (elf_d30v_howto_table): Fix a typo in the
2864 21-bit absolute that made it act as a relative.
2865
2866 end-sanitize-d30v
2867 Wed Mar 26 14:50:20 1997 Ian Lance Taylor <ian@cygnus.com>
2868
2869 * elflink.c (_bfd_elf_create_linker_section): Don't set
2870 bss_section and rel_section from existing sections.
2871
2872 * elf32-ppc.c (ppc_elf_check_relocs): Only create the got section
2873 if it is needed.
2874
2875 Tue Mar 25 22:26:56 1997 Stu Grossman (grossman@critters.cygnus.com)
2876
2877 * aoutx.h (some_aout_object_p): Change executable test to fix
2878 problems with embedded a.out systems.
2879
2880 Tue Mar 25 14:35:37 1997 Ian Lance Taylor <ian@cygnus.com>
2881
2882 * stabs.c (_bfd_stab_section_offset): New function.
2883 * libbfd-in.h (_bfd_stab_section_offset): Declare.
2884 * libbfd.h: Rebuild.
2885 * elf32-i386.c (elf_i386_relocate_section): Adjust the offset of a
2886 stab reloc.
2887 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2888 * elf32-mips.c (mips_elf_relocate_section): Likewise.
2889 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2890 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2891 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2892
2893 * stabs.c (_bfd_link_section_stabs): Copy over the first header
2894 symbol. Check for memory allocation failure of *psinfo.
2895 (_bfd_write_section_stabs): Add psinfo parameter. Change all
2896 callers. Set the value of the header symbol.
2897 * libbfd-in.h (_bfd_write_section_stabs): Update declaration.
2898 * libbfd.h: Rebuild.
2899
2900 start-sanitize-tic80
2901 Mon Mar 24 20:07:29 1997 Fred Fish <fnf@cygnus.com>
2902
2903 * coff-tic80.c (tic80_howto_table): Add R_ABS entry.
2904 (rtype2howto): Handle R_ABS reloc type. Also abort on unhandled
2905 reloc types, rather than silently failing to generate an output file.
2906
2907 end-sanitize-tic80
2908 Mon Mar 24 13:41:00 1997 Ian Lance Taylor <ian@cygnus.com>
2909
2910 * targmatch.sed: Use the hold space to put the #ifdef around the
2911 the string constant.
2912 * targets.c (UNSUPPORTED_TARGET): Don't define.
2913 (find_target): Don't check for UNSUPPORTED_TARGET.
2914 (bfd_set_default_target): Don't try to optimize by checking for
2915 default.
2916
2917 * Makefile.in: Rebuild dependencies.
2918 (ALL_MACHINES_CFILES): Add cpu-m32r.c.
2919 (BFD32_BACKENDS_CFILES): Add elf32-m32r.c.
2920 (elf32-m32r.o): Remove explicit target.
2921
2922 * config.bfd: Don't set targ_underscore for i[3456]86-*-gnu* or
2923 i[3456]86-*-linux*.
2924
2925 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Don't
2926 count section symbols for sections that were created by the
2927 linker, or are not allocatable or not loadable.
2928 (elf32_sparc_finish_dynamic_sections): Output output section
2929 symbols for section for which we made space for them.
2930
2931 Fri Mar 21 13:08:26 1997 Ian Lance Taylor <ian@cygnus.com>
2932
2933 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): If there is
2934 no .rela.plt section, don't output a DT_PLTGOT dynamic entry.
2935
2936 Fri Mar 21 12:36:46 1997 Doug Evans <dje@canuck.cygnus.com>
2937
2938 * elf32-m32r.c (m32r_elf_howto_table): Use special function for LO16.
2939 (m32r_hi16_list): New static local.
2940 (m32r_elf_hi16_reloc): Don't perform reloc, just queue it up.
2941 (m32r_elf_do_hi16_reloc): Delete.
2942 (m32r_elf_relocate_hi16): New function.
2943 (m32r_elf_lo16_reloc): New function.
2944 (m32r_elf_relocate_section): For HI16 relocs, scan for corresponding
2945 LO16 reloc.
2946
2947 Mon Mar 10 16:03:31 1997 Doug Evans <dje@seba.cygnus.com>
2948
2949 * elf32-m32r.c (m32r_elf_create_linker_section): Delete.
2950 (m32r_elf_add_symbol_hook): Rewrite _SDA_BASE_ support.
2951 (m32r_elf_final_sda_base): New function.
2952 (m32r_elf_relocate_section): Rewrite sdata support.
2953 (m32r_elf_finish_dynamic_sections): Delete.
2954
2955 Thu Mar 20 12:39:02 1997 Ian Lance Taylor <ian@cygnus.com>
2956
2957 Based on patches from Philippe De Muyter <phdm@info.ucl.ac.be>.
2958 * coff-svm68k.c: New file. Just defines some macros and includes
2959 coff-m68k.c.
2960 * coff-m68k.c: Add functions to handle common addends, moved in
2961 from cf-m68klynx.c. Control them using COFF_COMMON_ADDEND macro.
2962 Control whether relocs are visible using STATIC_RELOCS.
2963 * cf-m68klynx.c: Simplify greatly: just define macros to control
2964 coff-m68k.c.
2965 * coff-aux.c: Likewise. Just leave add_one_symbol routine.
2966 * targets. (m68ksysvcoff_vec): Declare.
2967 (bfd_target_vector): Add m68ksysvcoff_vec.
2968 * config.bfd (m68*-motorola-sysv*): New target.
2969 * configure.in (m68ksysvcoff_vec): New vector.
2970 * configure: Rebuild.
2971 * Makefile.in: Rebuild dependencies.
2972 (BFD32_BACKENDS): Add coff-svm68k.o.
2973 (BFD32_BACKENDS_CFILES): Add coff-svm68k.c.
2974
2975 * binary.c (binary_set_section_contents): Don't get misled if the
2976 first section is not loadable. From Matthew L. Martin
2977 <mlm@xedia.com>.
2978
2979 * elflink.h (elf_bfd_final_link): Set the value of a section
2980 symbol to the section address unless doing a relocateable link.
2981
2982 Tue Mar 18 23:03:17 1997 Richard Henderson <rth@tamu.edu>
2983
2984 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't create
2985 .plt entry if we've taken the function's address.
2986 (elf64_alpha_merge_gots): Merge collected flags info as well.
2987
2988 Tue Mar 18 22:40:09 1997 H.J. Lu <hjl@lucon.org>
2989
2990 * Many files: Add function prototypes.
2991 * cpu-m68k.c (bfd_default_scan_num_mach): Don't declare.
2992 * ecofflink.c: Include "libcoff.h" and "libecoff.h".
2993 * elf32-ppc.c (ppc_elf_fake_sections): Make static.
2994 * opncls.c (bfd_openstreamr): Change stream parameter to PTR.
2995 * peicode.h: Change several void * parameters to PTR.
2996 * srec.c (srec_get_symbol_info): Make static.
2997 * syms.c (bfd_symbol_is_absolute): Remove.
2998 * Makefile.in: Rebuild dependencies.
2999
3000 Tue Mar 18 12:58:08 1997 Ian Lance Taylor <ian@cygnus.com>
3001
3002 * elf32-m32r.c (m32r_elf_is_local_label_name): Remove.
3003 (bfd_elf32_bfd_is_local_label): Don't define.
3004
3005 * xcofflink.c (_bfd_xcoff_bfd_final_link): Call bfd_malloc rather
3006 than malloc.
3007
3008 Mon Mar 17 11:32:53 1997 Ian Lance Taylor <ian@cygnus.com>
3009
3010 * bfd-in.h: Don't include obstack.h.
3011 (struct bfd_hash_table): Change memory field to PTR.
3012 * bfd.c (struct _bfd): Change memory field to PTR.
3013 * bfd-in2.h: Rebuild.
3014 * libbfd-in.h (bfd_release): Declare as function, don't define as
3015 macro.
3016 * libbfd.h: Rebuild.
3017 * opncls.c: Include "objalloc.h" rather than "obstack.h". Use
3018 objalloc routines rather than obstack routines.
3019 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
3020 (getpagesize): Don't define.
3021 (_bfd_new_bfd): Don't set _bfd_chunksize.
3022 (bfd_openr): Free new bfd and objalloc on failure.
3023 (bfd_fdopenr, bfd_openstreamr, bfd_openw): Likewise.
3024 (bfd_alloc_size): Remove.
3025 (bfd_release): New function.
3026 * hash.c: Include "objalloc.h" rather than "obstack.h". Use
3027 objalloc routines rather than obstack routines.
3028 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
3029 * ecofflink.c: Include "objalloc.h" rather than "obstack.h". Use
3030 objalloc routines rather than obstack routines.
3031 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
3032 (struct accumulate): Change memory to struct objalloc *.
3033 * liboasys.h (oasys_data_type): Remove oasys_obstack field.
3034 * dep-in.sed: Don't remove obstack.h from dependency list.
3035 * Makefile.in: Rebuild dependencies.
3036 (BFD_H_DEPS): Remove obstack.h.
3037 (install): Don't install obstack.h.
3038 * Many files: Don't include "obstack.h".
3039 * VERSION: Bump.
3040
3041 * opncls.c (bfd_alloc_grow, bfd_alloc_finish): Remove.
3042 * libbfd-in.h (bfd_alloc_grow, bfd_alloc_finish): Don't declare.
3043 * libbfd.h: Rebuild.
3044 * ieee.c (ieee_archive_p): Rewrite to not use bfd_alloc_grow.
3045 * sunos.c (sunos_add_dynamic_symbols): Likewise.
3046 * srec.c (srec_scan): Rewrite to not use obstack_1grow.
3047
3048 * opncls.c (bfd_alloc): Rename from bfd_alloc_by_size_t. Remove
3049 old version of bfd_alloc.
3050 * libbfd-in.h (bfd_alloc_by_size_t): Don't declare.
3051 * libbfd.h: Rebuild.
3052 * Several files: Call bfd_alloc rather than bfd_alloc_by_size_t.
3053
3054 Sat Mar 15 15:24:18 1997 Ian Lance Taylor <ian@cygnus.com>
3055
3056 * elf32-mips.c (mips_elf_is_local_label_name): Accept the generic
3057 ELF local label syntax as well.
3058
3059 Sat Mar 15 10:16:42 1997 Fred Fish <fnf@cygnus.com>
3060
3061 * config.bfd (powerpc-*-beos*): New target.
3062 * configure.in (powerpc-*-beos*): Add case that explicitly
3063 does not set COREFILE for now. A future BeOS version is
3064 expected to support core files.
3065 * configure: Regenerate with autoconf.
3066
3067 Fri Mar 14 16:43:22 1997 Ian Lance Taylor <ian@cygnus.com>
3068
3069 * elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is
3070 seen with a local symbol, rather than crashing.
3071
3072 * elfcode.h (elf_slurp_symbol_table): Don't try to read the
3073 version symbols if there aren't any.
3074
3075 start-sanitize-tic80
3076 Thu Mar 13 16:38:30 1997 Fred Fish <fnf@cygnus.com>
3077
3078 * coff-tic80.c (coff_rtype_to_howto): Define
3079 (coff_tic80_rtype_to_howto): Clone generic coff version and
3080 add code to handle the funky TI "internal relocations".
3081
3082 end-sanitize-tic80
3083 Thu Mar 13 14:08:53 1997 Ian Lance Taylor <ian@cygnus.com>
3084
3085 * elflink.h (elf_link_add_object_symbols): Don't warn about type
3086 or size changes because of a weak symbol.
3087
3088 * cisco-core.c (SIGEMT): Define if not defined.
3089
3090 Wed Mar 12 21:36:05 1997 Ian Lance Taylor <ian@cygnus.com>
3091
3092 * elflink.h (elf_link_add_object_symbols): Use extsymoff when
3093 setting ever. Sanity check the version number. Sort out copying
3094 flags and other information when adding an indirect symbol.
3095 (NAME(bfd_elf,size_dynamic_sections)): Preserve any dynamic
3096 symbols added by the backend. Clear the entire contents of the
3097 versym section.
3098 (elf_export_symbol): Ignore indirect symbols.
3099 (elf_link_output_extsym): Accept a section without an owner in an
3100 assert.
3101 * elfcode.h (elf_slurp_symbol_table): Add a sanity check on the
3102 version count. Correct the allocation of x_versymp.
3103
3104 * elf32-mips.c (mips_elf_add_symbol_hook): Don't set the owner of
3105 the magic sections used for SHN_MIPS_TEXT and SHN_MIPS_DATA.
3106 Don't return bfd_und_section_ptr when info->shared.
3107 (mips_elf_final_link): Set the alignment of .rtproc to 4, not 12.
3108 (mips_elf_create_dynamic_sections): Correct type: ^= for &=.
3109 (mips_elf_check_relocs): Resolve an indirect symbol in
3110 sym_hashes.
3111 (mips_elf_finish_dynamic_symbol): Don't change SHN_ABS into
3112 SHN_MIPS_TEXT or SHN_MIPS_DATA.
3113
3114 * elf.c (bfd_elf_print_symbol): Tweak version output slightly.
3115
3116 Tue Mar 11 01:38:36 1997 Ian Lance Taylor <ian@cygnus.com>
3117
3118 From Eric Youngdale <eric@andante.jic.com>:
3119 * elf-bfd.h (ELF_LINK_FORCED_LOCAL): Define.
3120 * elf.c (bfd_elf_print_symbol): Correct errors in last change.
3121 * elflink.h (elf_link_add_object_symbols): Handle cases in which a
3122 versioned symbol appears in both a regular and a shared object.
3123 (elf_link_assign_sym_version): Set ELF_LINK_FORCED_LOCAL when
3124 appropriate. Improve error message.
3125 (struct elf_outext_info): Rename from elf_finfo_failed. Change
3126 all uses. Add localsyms field.
3127 (elf_bfd_final_link): When generating a shared library, call
3128 elf_link_output_extsym to output all local symbols.
3129 (elf_link_output_extsym): Handle symbols which were forced to
3130 become local.
3131
3132 Sun Mar 9 23:08:49 1997 Ian Lance Taylor <ian@cygnus.com>
3133
3134 From Eric Youngdale <eric@andante.jic.com>:
3135 * elf-bfd.h (elf_symbol_type): Add version field.
3136 * elfcode.h (elf_slurp_symbol_table): Set version field.
3137 * elflink.h (elf_link_add_object_symbols): When creating an
3138 indirect symbol for a default version symbol, set DEF_DYNAMIC if
3139 appropriate. Set up an indirection from the nondefault version of
3140 the symbol as well.
3141 (NAME(bfd_elf,size_dynamic_sections)): Call
3142 elf_link_assign_sym_version before checking whether there are any
3143 versions. Always record the version name as a dynamic symbol.
3144 Initialize counters.
3145 (elf_link_assign_sym_version): After finding a version, see if a
3146 symbol should be forced to local scope. Create a new version
3147 definition if appropriate.
3148 (elf_link_output_extsym): Correct indirect symbol handling.
3149 * elf.c (bfd_elf_print_symbol): Print version information.
3150 (bfd_section_from_shdr): Turn version sections into BFD sections.
3151 (elf_fake_sections): Only copy cverdefs and cverrefs into sh_info
3152 if sh_info is not already set.
3153 (_bfd_elf_copy_private_section_data): Copy sh_info for version
3154 sections.
3155 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Tell
3156 _bfd_stringtab_add to copy the name into permanent memory if
3157 appropriate.
3158
3159 Fri Mar 7 11:55:31 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
3160
3161 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Fully parenthesize.
3162
3163 Fri Mar 7 10:37:30 1997 Ian Lance Taylor <ian@cygnus.com>
3164
3165 * coffcode.h (bfd_coff_backend_data): Change
3166 _bfd_coff_compute_section_file_positions to return a boolean
3167 value. Change all callers.
3168 (coff_compute_section_file_positions): Change return type to
3169 boolean. If the size of the last section changed, then output a
3170 zero byte at the end of the file.
3171 * libcoff.h: Rebuild.
3172
3173 * xcofflink.c (_bfd_xcoff_bfd_final_link): Always allocate space
3174 for at least 6 output symbols.
3175 (xcoff_write_global_symbol): When emitting TOC entry relocs, also
3176 emit a TC csect to represent the space they take up. For an XO
3177 symbol, just emit a reference, not a csect.
3178
3179 * Makefile.in ($(SHLINK)): Just use ln -s, not ln -sf, since
3180 Solaris doesn't like the combined options, and the -f is
3181 unnecessary.
3182 (stamp-tshlink, install): Likewise.
3183
3184 * elf32-mips.c (mips_elf_relocate_section): Correct R_MIPS16_26
3185 handling when little endian.
3186
3187 Thu Mar 6 13:51:51 1997 Jeffrey A Law (law@cygnus.com)
3188
3189 * elf32-mn10300.c (mn10300_elf_final_link_relocate): New function.
3190 (mn10300_elf_relocate_section): Likewise.
3191 (elf_backend_relocate_section): Define.
3192
3193 * elf32-mn10300.c (reloc_type): Remove PCREL{8,16,32}_{1,2}BYTE
3194 relocs. Replace them with generic PCREL_{8,16,32} relocs.
3195 (elf32_mn10300_howto_table): Likewise.
3196 (elf32_mn10300_reloc_map): Likewise.
3197 (bfd_elf32_mn10300_reloc): Delete unused function.
3198
3199 Thu Mar 6 12:19:59 1997 Fred Fish <fnf@cygnus.com>
3200
3201 start-sanitize-tic80
3202 * coff-tic80.c (rtype2howto): If passed a relocation type we don't
3203 understand, just set the howto field to NULL, and the caller will
3204 print an appropriate error message.
3205 end-sanitize-tic80
3206 * coffcode.h (coff_slurp_reloc_table): Pull duplicate declarations and
3207 code fragment out of both legs of #ifdef RELOC_PROCESSING ... #endif
3208 block. Use NULL for initializations of "ptr" rather than bare 0.
3209 * coff-h8300.c: Fix typo in comment.
3210 * coff-h8500.c: Ditto.
3211 * coff-w65.c: Ditto
3212 * coff-z8k.c: Ditto.
3213
3214 Wed Mar 5 13:59:09 1997 Doug Evans <dje@seba.cygnus.com>
3215
3216 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc): Fix overflow calc.
3217 (m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
3218 m32r_elf_get_relocated_section_contents): First pass at relax support.
3219
3220 Mon Mar 3 13:27:09 1997 Ulrich Drepper <drepper@rtl.cygnus.com>
3221
3222 * elflink.h (elf_link_add_object_symbols): Use correct sh_size
3223 entry for reading verdef records.
3224 Use correct braces for computing increments of extverdaux and
3225 exteverdef record pointers.
3226
3227 start-sanitize-tic80
3228 Sun Mar 2 22:47:54 1997 Fred Fish <fnf@cygnus.com>
3229
3230 * coff-tic80.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set this to 2
3231 instead of 4.
3232
3233 end-sanitize-tic80
3234 Sun Mar 2 16:25:35 1997 Ian Lance Taylor <ian@cygnus.com>
3235
3236 * elflink.h (elf_link_find_version_dependencies): Check that
3237 DEF_REGULAR is not set as well as checking that DEF_DYNAMIC is
3238 set.
3239
3240 start-sanitize-tic80
3241 Fri Feb 28 16:52:40 1997 Fred Fish <fnf@cygnus.com>
3242
3243 * coffcode.h (coff_set_flags): Add case for TIC80_ARCH_MAGIC.
3244
3245 end-sanitize-tic80
3246 Fri Feb 28 15:06:45 1997 Ian Lance Taylor <ian@cygnus.com>
3247
3248 * targets.c (bfd_default_vector): Make non-const.
3249 (find_target): New static function, broken out of
3250 bfd_find_target.
3251 (bfd_set_default_target): New function.
3252 (bfd_find_target): Call find_target. When defaulting, use
3253 bfd_default_vector[0] if it is not NULL.
3254 * libbfd-in.h (bfd_default_vector): Adjust declaration.
3255 * bfd-in2.h, libbfd.h: Rebuild.
3256
3257 * syms.c (bfd_is_local_label): Return false if the symbol has no
3258 name.
3259 * coff-i960.c (coff_i960_is_local_label_name): New function.
3260 (coff_bfd_is_local_label_name): Define.
3261 * coff-m68k.c (m68k_coff_is_local_label_name): New function.
3262 (coff_bfd_is_local_label_name): Define.
3263 * coff-rs6000.c (xcoff_is_local_label_name): New function.
3264 (coff_bfd_is_local_label_name): Define.
3265 * elf.c (_bfd_elf_is_local_label_name): Treat symbols beginning
3266 with .. or _.L_ as local.
3267 * elf32-i386.c (elf_i386_is_local_label_name): New function.
3268 (bfd_elf32_bfd_is_local_label_name): Define.
3269 * evax-alpha.c (evax_bfd_is_local_label_name): Treat symbols
3270 beginning with $ as local.
3271
3272 Thu Feb 27 18:36:23 1997 Ian Lance Taylor <ian@cygnus.com>
3273
3274 * aoutx.h (aout_link_write_symbols): Use bfd_is_local_label_name
3275 rather than comparing against info->lprefix.
3276 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
3277 * elflink.h (elf_link_input_bfd): Likewise.
3278 * linker.c (_bfd_generic_link_output_symbols): Likewise.
3279 * xcofflink.c (xcoff_link_input_bfd): Likewise.
3280
3281 * elfxx-target.h (bfd_elfNN_bfd_is_local_label_name): Define as
3282 _bfd_elf_is_local_label_name if not already defined.
3283 * elf.c (_bfd_elf_is_local_label_name): New function.
3284 * elf-bfd.h (_bfd_elf_is_local_label_name): Declare.
3285
3286 * coff-m88k.c (coff_bfd_is_local_label_name): Define.
3287 (m88k_is_local_label_name): New static function.
3288
3289 * coffcode.h (coff_bfd_is_local_label_name): Define as
3290 _bfd_coff_is_local_label_name if not already defined.
3291 * coffgen.c (_bfd_coff_is_local_label_name): New function.
3292 * libcoff-in.h (_bfd_coff_is_local_label_name): Declare.
3293 * libcoff.h: Rebuild.
3294
3295 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Change _bfd_is_local_label
3296 to _bfd_is_local_label_name.
3297 (bfd_target): Likewise.
3298 * syms.c (bfd_is_local_label): Define as function, not macro.
3299 (bfd_is_local_name): Define.
3300 * libbfd.c (bfd_generic_is_local_label_name): Rename from
3301 bfd_generic_is_local_label, and take a string rather than a
3302 symbol.
3303 * libbfd-in.h (_bfd_nosymbols_bfd_is_local_label): Don't define.
3304 (_bfd_nosymbols_bfd_is_local_label_name): Define.
3305 (bfd_generic_is_local_label): Don't declare.
3306 (bfd_generic_is_local_label_name): Declare.
3307 * bfd-in2.h, libbfd.h: Rebuild.
3308 * All backends: Change local_label to local_label_name.
3309
3310 * elf32-mips.c (struct mips_got_info): Add assigned_gotno field.
3311 (mips_elf_relocate_got_local): Change return type to boolean.
3312 Don't assume that the first zero entry is unassigned; instead, use
3313 assigned_gotno.
3314 (mips_elf_relocate_section): Check return value of
3315 mips_elf_relocate_got_local.
3316 (mips_elf_create_got_section): Initialize assigned_gotno field.
3317
3318 start-sanitize-d30v
3319 Wed Feb 26 15:19:51 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
3320
3321 * elf32-d30v.c (bfd_elf_d30v_reloc): Add code to do 32-bit
3322 relocations.
3323
3324 end-sanitize-d30v
3325 Wed Feb 26 13:33:03 1997 Ian Lance Taylor <ian@cygnus.com>
3326
3327 * elflink.h (elf_link_input_bfd): Don't skip symbols from sections
3328 that have no contents merely because linker_mark is not set.
3329
3330 Tue Feb 25 18:51:35 1997 Stan Shebs <shebs@andros.cygnus.com>
3331
3332 * config.bfd (mips*-*-lnews*): New target.
3333 * coff-mips.c (mips_relocate_section): Make assert compare
3334 content byteorder instead of header byteorder.
3335 (ecoff_biglittle_vec): New BFD, big-endian headers, little-endian
3336 data.
3337 * targets.c (bfd_target_vector): Add ecoff_biglittle_vec.
3338 * configure.in (ecoff_biglittle_vec): Add case.
3339 * configure: Update.
3340
3341 Tue Feb 25 00:32:49 1997 Ian Lance Taylor <ian@cygnus.com>
3342
3343 * elf.c (elf_fake_sections): Use SHT_NOTE for any section whose
3344 name begins with ".note".
3345 (map_sections_to_segments): Add a PT_NOTE segment for any loadable
3346 section whose name begins with ".note".
3347 (get_program_header_size): Corresponding change.
3348
3349 * elf32-mips.c (mips_elf_relocate_section): Check for misaligned
3350 jal and for jal overflow.
3351
3352 Mon Feb 24 17:53:14 1997 Ian Lance Taylor <ian@cygnus.com>
3353
3354 From Eric Youngdale <eric@andante.jic.com>:
3355 * elflink.h (elf_link_add_archive_symbols): If a default symbol is
3356 not found, try looking it up again without the version name.
3357 (elf_link_add_object_symbols): Always link against the dynamic
3358 symbol table of a dynamic object. When linking against a dynamic
3359 object, include version strings in symbol names, and set up
3360 version information. Add indirect symbols for default versions.
3361 (elf_link_create_dynamic_sections): Add special version sections.
3362 (struct elf_assign_sym_version_info): Define.
3363 (struct elf_find_verdep_info): Define.
3364 (NAME(bfd_elf,size_dynamic_sections)): Add verdefs parameter. Set
3365 up version sections.
3366 (elf_adjust_dynamic_symbol): Ignore indirect symbols.
3367 (elf_link_find_version_dependencies): New static function.
3368 (elf_link_assign_sym_version): New static function.
3369 (elf_link_renumber_dynsyms): New static function.
3370 (struct elf_final_link_info): Add symver_sec field.
3371 (elf_bfd_final_link): Initialize finfo.symver_sec. Don't count
3372 local symbols of a dynamic object. Handle DT_VER* constants.
3373 (elf_link_output_extsym): Simplify BFD_ASSERT checking for a
3374 dynamic object. Skip indirect symbols from ELF objects. Remove
3375 the version name before choosing a hash bucket. Write out the
3376 version information if appropriate.
3377 (elf_link_input_bfd): Check for DYNAMIC, not ET_DYN.
3378 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
3379 (bfd_elf64_size_dynamic_sections): Likewise.
3380 * bfd-in2.h: Rebuild.
3381 * elf-bfd.h (struct elf_link_hash_entry): Add verinfo field.
3382 Change elf_link_hash_flags to unsigned short.
3383 (ELF_LINK_HIDDEN): Define.
3384 (struct elf_obj_tdata): Add fields dynversym_hdr, dynverref_hdr,
3385 dynverdef_hdr, dynversym_section, dynverdef_section,
3386 dynverref_section, cverdefs, cverrefs, verdef, verref.
3387 (elf_dynversym, elf_dynverdef, elf_dynverref): Define.
3388 (_bfd_elf_swap_verdef_in, _bfd_elf_swap_verdef_out): Declare.
3389 (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Declare.
3390 (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Declare.
3391 (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Declare.
3392 (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Declare.
3393 (_bfd_elf_slurp_version_tables): Declare.
3394 * elf.c (_bfd_elf_swap_verdef_in): New function.
3395 (_bfd_elf_swap_verdef_out): Likewise.
3396 (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Likewise.
3397 (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Likewise.
3398 (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Likewise.
3399 (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Likewise.
3400 (_bfd_elf_print_private_bfd_data): Add DT_VER* constants. Print
3401 version information if there is any.
3402 (_bfd_elf_link_hash_newfunc): Initialize verinfo field.
3403 (bfd_section_from_shdr): Handle SHT_GNU_ver* section types.
3404 (elf_fake_sections): Handle .gnu.version* section names.
3405 (assign_section_numbers): Handle SHT_GNU_ver* section types.
3406 (_bfd_elf_slurp_version_tables): New function.
3407 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't include
3408 version name in string entered in dynamic hash table.
3409 * elfcode.h: Include fnmatch.h.
3410 * elf32-i386.c (elf_i386_relocate_section): Handle a dynamic
3411 symbol which was forced to become local.
3412 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3413 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3414 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3415 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
3416
3417 Fri Feb 21 16:15:18 1997 Jeffrey A Law (law@cygnus.com)
3418
3419 * elf32-mn10200.c (mn10200_elf_final_link_relocate): Simplify
3420 somewhat.
3421 (mn10200_elf_relax_section): Correctly compute a symbol's value
3422 when the symbol is local, but not in the same section as we are
3423 relaxing. Implement abs24 -> abs16, imm24 -> imm16 and d24 -> d16
3424 relaxing.
3425
3426 Fri Feb 21 13:55:14 1997 Doug Evans <dje@seba.cygnus.com>
3427
3428 * elf32-m32r.c: Rewrite to use ELF backend linker.
3429 Store lower 16 bits of addend in R_M32R_HI16_[SU]LO insns.
3430 Add small data area support (R_M32R_SDA16).
3431 * reloc.c: Document BFD_RELOC_M32R_SDA16.
3432 * bfd-in2.h,libbfd.h: Regenerated.
3433
3434 Thu Feb 20 23:50:31 1997 Jeffrey A Law (law@cygnus.com)
3435
3436 * elf32-mn10200.c (mn10200_elf_relax_section): New function.
3437 (mn10200_elf_relax_delete_bytes): Likewise.
3438 (mn10200_elf_symbol_address_p): Likewise.
3439 (mn10200_elf_get_relocated_section_contents): Likewise.
3440 (bfd_elf32_bfd_relax_section): Define.
3441 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
3442
3443 * elf32-mn10200.c (mn10200_elf_final_link_relocate): New function.
3444 (mn10200_elf_relocate_section): Likewise.
3445 (elf_backend_relocate_section): Define.
3446
3447 start-sanitize-d30v
3448 Tue Feb 18 17:22:59 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
3449
3450 * Makefile.in, archures.c, config.bfd, configure.in, elf.c,
3451 reloc.c, targets.c: New target, elf-*-D30V.
3452
3453 * bfd-in2.h, configure, libbfd.h: Rebuilt.
3454
3455 * cpu-d30v.c, elf32-d30v.c: New files.
3456
3457 end-sanitize-d30v
3458 Tue Feb 18 15:31:48 1997 Fred Fish <fnf@cygnus.com>
3459
3460 * reloc.c (struct reloc_howto_struct): Fix typo in comment.
3461 * bfd-in2.h: Regenerated.
3462 start-sanitize-tic80
3463 * coff-tic80.c (RTYPE2HOWTO): Replace abort with real function.
3464 (rtype2howto): Add function.
3465 (tic80_howto_table): Add.
3466 end-sanitize-tic80
3467
3468 Tue Feb 18 11:41:00 1996 Dawn Perchik <dawn@cygnus.com>
3469
3470 * sysdep.h: Don't define errno in MSVC if error.h is included.
3471
3472 Tue Feb 18 10:04:13 1997 Jeffrey A Law (law@cygnus.com)
3473
3474 * elf32-v850.c (v850_elf_relocate_section): Make sure r_symndx
3475 is initialized before it is used.
3476
3477 Mon Feb 17 11:28:40 1997 Ian Lance Taylor <ian@cygnus.com>
3478
3479 * hp300hpux.c (convert_sym_type): Don't convert a secondary common
3480 symbol into a weak undefined symbol; leave it as a common symbol.
3481
3482 Fri Feb 14 19:08:03 1997 Ian Lance Taylor <ian@cygnus.com>
3483
3484 * elflink.h (elf_link_add_object_symbols): Don't issue a warning
3485 about a symbol defined in a dynamic object if it has already been
3486 defined in a regular object.
3487
3488 Thu Feb 13 20:53:22 1997 Klaus Kaempf (kkaempf@progis.de)
3489
3490 * makefile.vms: Add gcc flags to allow compiling with current gcc
3491 snapshot
3492 (targmatch.h): New dependency.
3493
3494 * reloc.c (BFD_RELOC_ALPHA_CODEADDR): New relocation for
3495 openVMS/Alpha.
3496 * evax.h (ALPHA_R_CODEADDR): New relocation.
3497 * evax-alpha.c (ALPHA_R_CODEADDR): 64 bit procedure relocation for
3498 openVMS/Alpha.
3499 * evax-etir.c (ALPHA_R_CODEADDR): Output object code for this
3500 relocation.
3501 * bfd-in2.h, libbfd.h: Rebuild.
3502
3503 Restrict symbol length to 64 bytes, case preserving:
3504 * evax-emh.c (_bfd_evax_write_emh): Remove case hacking.
3505 * evax-misc.c (_bfd_evax_case_hack_symbol): Remove.
3506 (_bfd_evax_length_hash_symbol): Added.
3507 * evax-etir.c (_bfd_evax_write_etir): Call
3508 _bfd_evax_length_hash_symbol before output of symbol.
3509 * evax-egsd.c (_bfd_evax_write_egsd): Likewise.
3510 * evax.h (flag_hash_long_names, flag_show_after_trunc): Remove.
3511
3512 * evax-emh.c: Output filename to object file without path.
3513
3514 * evax-egsd.c: New sections for local and global commons.
3515
3516 * evax-alpha.c, evax-emh.c, evax-egsd.c, evax-etir.c,
3517 evax-misc.c, evax.h: Remove 8 bit characters from copyright
3518 notices. Replace AXP with Alpha.
3519
3520 Wed Feb 12 18:10:30 1997 Ian Lance Taylor <ian@cygnus.com>
3521
3522 * sunos.c (sunos_create_dynamic_sections): We need the dynamic
3523 sections if we are creating a shared library.
3524
3525 Tue Feb 11 15:45:43 1997 Doug Evans <dje@canuck.cygnus.com>
3526
3527 * configure.host (i386-windows): Don't set host64=true.
3528
3529 Tue Feb 11 15:27:32 1997 Ian Lance Taylor <ian@cygnus.com>
3530
3531 * elf32-mips.c (reloc_type): Add R_MIPS16_GPREL.
3532 (elf_mips16_gprel_howto): New static variable.
3533 (mips16_gprel_reloc): New static function.
3534 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_GPREL.
3535 (mips_info_to_howto_rel): Handle R_MIPS16_GPREL.
3536 (mips_elf_relocate_section): Handle R_MIPS16_GPREL.
3537 * reloc.c (BFD_RELOC_MIPS16_GPREL): Define.
3538 * bfd-in2.h, libbfd.h: Rebuild.
3539
3540 Mon Feb 10 23:25:00 1997 Doug Evans <dje@seba.cygnus.com>
3541
3542 * elf32-m32r.c (elf_m32r_howto_table): Change partial_inplace to true
3543 for R_M32R_{16,32,24,HI16_ULO,HI16_SLO,LO16}.
3544
3545 start-sanitize-r5900
3546 Fri Feb 7 16:20:17 1997 Gavin Koch <gavin@cygnus.com>
3547
3548 * config.bfd: add r5900
3549
3550 end-sanitize-r5900
3551 Fri Feb 7 12:39:11 1997 Ian Lance Taylor <ian@cygnus.com>
3552
3553 * elflink.h (elf_link_input_bfd): If we've discarded a section,
3554 the output section will be the absolute section; don't print an
3555 assertion message for that case when doing a relocateable link.
3556
3557 Thu Feb 6 16:55:43 1997 Ian Lance Taylor <ian@cygnus.com>
3558
3559 * elf32-mips.c (FN_STUB, CALL_STUB, CALL_FP_STUB): Define.
3560 (struct mips_elf_link_hash_entry): Add new fields fn_stub,
3561 need_fn_sub, call_stub, and call_fp_stub.
3562 (struct mips_elf_link_hash_table): Add field mips16_stubs_seen.
3563 (mips_elf_link_hash_newfunc): Initialize new fields.
3564 (mips_elf_link_hash_table_create): Likewise.
3565 (mips_elf_relocate_section): Redirect relocations to use mips16
3566 stubs when appropriate.
3567 (mips_elf_check_relocs): Attach stub sections to the appropriate
3568 symbol. Set need_fn_stub when appropriate.
3569 (mips_elf_always_size_sections): New static function.
3570 (mips_elf_check_mips16_stubs): New static function.
3571 (elf_backend_always_size_sections): Define.
3572 * elf-bfd.h (struct elf_obj_tdata): Add local_stubs field.
3573
3574 * elflink.h (elf_link_input_bfd): Discard local symbols that are
3575 attached to sections which are not being included in the link.
3576
3577 Wed Feb 5 13:20:17 1997 Ian Lance Taylor <ian@cygnus.com>
3578
3579 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore the
3580 symbol value when computing the addend for a pc_relative
3581 pcrel_offset reloc.
3582
3583 Mon Feb 3 11:54:06 1997 Ian Lance Taylor <ian@cygnus.com>
3584
3585 * cofflink.c (_bfd_coff_generic_relocate_section): If doing a
3586 relocateable link, just skip pc_relative pcrel_offset relocs.
3587 * coff-arm.c (coff_arm_rtype_to_howto): Return a different howto
3588 structure for an ARM26 reloc which can be resolved.
3589 (coff_arm_adjust_symndx): Only convert ARM26 to ARM26D if the
3590 reloc can be resolved.
3591
3592 * coff-h8300.c (h8300_reloc16_extra_cases): Correct off by one
3593 error in overflow check for R_RELBYTE.
3594
3595 Fri Jan 31 14:07:27 1997 Ian Lance Taylor <ian@cygnus.com>
3596
3597 * ieee.c (ieee_slurp_section_data): Pick up the start address.
3598 From Mark Rasin <mark.rasin@telrad.co.il>.
3599
3600 * aoutx.h (aout_link_write_symbols): Don't apply discard_l to
3601 debugging symbols.
3602
3603 Wed Jan 29 00:00:49 1997 Jeffrey A Law (law@cygnus.com)
3604
3605 * elf32-mn10200.c (reloc_type): Add 16bit pc-relative reloc.
3606 (elf_mn10200_howto_table): Likewise.
3607 (mn10200_reloc_map): Likewise.
3608
3609 Mon Jan 27 12:07:35 1997 Doug Evans <dje@seba.cygnus.com>
3610
3611 * reloc.c: Add relocs BFD_RELOC_M32R_{HI16_[US]LO,LO16}.
3612 * bfd-in2.h, libbfd.h: Regenerated.
3613 * elf32-m32r.c: Add support for them.
3614
3615 Mon Jan 27 12:25:02 1997 Ian Lance Taylor <ian@cygnus.com>
3616
3617 * aout-arm.c (MY_swap_std_reloc_in): Remove unused r_length.
3618 * elf32-ppc.c (ppc_elf_check_relocs): Remove unused plt.
3619 * elf32-v850.c (v850_elf_final_link_relocate): Remove used
3620 r_format and r_pcrel. Always return a value.
3621 * riscix.c (MY_final_link_callback): Define to dummy value.
3622
3623 * elf32-i386.c (elf_i386_size_dynamic_sections): When checking for
3624 relocations against the text segment, look up the output name of
3625 the reloc section.
3626 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
3627 * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
3628 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
3629 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
3630 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
3631
3632 start-sanitize-tic80
3633 Wed Jan 22 15:40:28 1997 Fred Fish <fnf@cygnus.com>
3634
3635 * coff-tic80.c (tic80coff_vec): Use correct data put/get
3636 routines for little endian data.
3637 * coffcode.h (coff_write_object_contents): Set magic to
3638 TIC80_ARCH_MAGIC for TIc80.
3639
3640 Tue Jan 21 12:32:43 1997 Fred Fish <fnf@cygnus.com>
3641
3642 * coff-tic80.c (tic80coff_vec): Change to little endian data
3643 as the default.
3644
3645 end-sanitize-tic80
3646 Thu Jan 16 17:45:57 1997 Ian Lance Taylor <ian@cygnus.com>
3647
3648 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Change type of
3649 auxiliary_filters parameter to be const char * const *. Accept a
3650 NULL terminated array.
3651 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
3652 (bfd_elf32_size_dynamic_sections): Update declaration.
3653 * bfd-in2.h: Rebuild.
3654
3655 Wed Jan 15 11:21:32 1997 Ian Lance Taylor <ian@cygnus.com>
3656
3657 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Treat a
3658 NOTYPE symbol in a text section as a FUNC symbol.
3659
3660 * coffcode.h (coff_compute_section_file_positions): Force
3661 relocbase to be aligned to COFF_DEFAULT_SECTION_ALIGNMENT_POWER.
3662
3663 Tue Jan 14 08:46:33 1997 Doug Evans <dje@canuck.cygnus.com>
3664
3665 * libaout.h (machine_type): Reserve several values for sparclet.
3666
3667 start-sanitize-tic80
3668 Mon Jan 13 22:39:08 1997 Michael Meissner <meissner@tiktok.cygnus.com>
3669
3670 * config.bfd (tic80-*-*): Don't require 'coff'.
3671
3672 end-sanitize-tic80
3673 Mon Jan 13 19:36:25 1997 Michael Meissner <meissner@tiktok.cygnus.com>
3674
3675 * elf32-v850.c (v850_elf_howto_table): Set the special_function
3676 table to v850_elf_reloc for all non-standard relocations.
3677 (v850_elf_check_relocs): Add check for h being non-null.
3678 (v850_elf_reloc): Add R_V850_ZDA_OFFSET support. Use switch
3679 statement instead of multiple ifs.
3680 (v850_elf_relocate_section): Fix up error message, don't just call
3681 abort.
3682
3683 Mon Jan 6 13:28:35 1997 Jeffrey A Law (law@cygnus.com)
3684
3685 * elf32-mn10200.c (elf_mn10200_howto): Don't ever set partial-inplace.
3686 Use bfd_elf_generic_reloc as special function for all relocs.
3687 (bfd_elf32_mn10200_reloc): Remove unnecessary function.
3688
3689 * elf32-mn10200.c (elf_mn10200_howto): Set pcrel_offset for
3690 24bit pc-relative reloc.
3691
3692 start-sanitize-tic80
3693 Fri Jan 3 16:33:00 1997 Fred Fish <fnf@cygnus.com>
3694
3695 * Makefile.in (coff-tic80.o): Add coffcode.h to dependency list.
3696 * coff-tic80.c (tic80coff_vec): Data byte order is big endian and
3697 header byte order is little endian. Use correct bfd_get and
3698 bfd_put routines for little endian headers.
3699 * coffcode.h (coff_set_arch_mach_hook): Set arch to
3700 bfd_arch_tic80 for TIC80_ARCH_MAGIC number.
3701
3702 end-sanitize-tic80
3703 Fri Jan 3 16:54:08 1997 Jeffrey A Law (law@cygnus.com)
3704
3705 * reloc.c: Add BFD_RELOC_24.
3706 * elf32-mn10200.c (enum reloc_type): Add 24bit and pcrel relocs.
3707 (elf_mn10200_howto, mn10200_reloc_map): Corresponding changes.
3708 * bfd-in2.h, libbfd.h: Rebuilt.
3709
3710 Fri Jan 3 16:58:31 1997 Richard Henderson <rth@tamu.edu>
3711
3712 elf64-alpha multiple .got rewrite:
3713
3714 * elf-bfd.h (struct elf_backend_data): Add always_size_sections entry.
3715 (bfd_elf*_mkobject): Don't define here ...
3716 * elfxx-target.h: ... but rather here. Default always_size_sections
3717 hook to NULL.
3718 * elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was
3719 what the #defines in elf-bfd.h transmuted it to anyway.
3720
3721 * section.c: Add SEC_LINKER_CREATED flag.
3722 * bfd-in2.h: Rebuild.
3723 * elf32-i386.c (elf_i386_check_relocs): Add SEC_LINKER_CREATED to
3724 relocation section flags.
3725 (elf_i386_size_dynamic_sections): Use SEC_LINKER_CREATED instead of
3726 SEC_IN_MEMORY to recognize generated bits.
3727 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_size_dynamic_sections):
3728 Likewise.
3729 * elf32-mips.c (mips_elf_final_link, mips_elf_create_dynamic_sections,
3730 mips_elf_create_compact_rel_section, mips_elf_create_got_section,
3731 mips_elf_check_relocs, mips_elf_size_dynamic_sections): Likewise.
3732 * elf32-ppc.c (ppc_elf_create_linker_section,
3733 ppc_elf_size_dynamic_sections): Likewise.
3734 * elf32-sparc.c (elf32_sparc_check_relocs,
3735 elf32_sparc_size_dynamic_sections): Likewise.
3736 * elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to
3737 section flags.
3738 (_bfd_elf_create_dynamic_sections): Likewise.
3739 (_bfd_elf_make_linker_section_rela): Likewise.
3740 * elflink.h (elf_link_create_dynamic_sections): Likewise.
3741 (bfd_elf,size_dynamic_sections): Call the always_size_sections hook.
3742 (elf_bfd_final_link): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY
3743 to identify generated bits.
3744 (elf_link_input_bfd): Likewise.
3745
3746 * elf64-alpha.c: Rewrite everything touching relocations.
3747
3748 Fri Jan 3 11:42:53 1997 Michael Meissner <meissner@tiktok.cygnus.com>
3749
3750 * elf32-v850.c (all functions and static variables): Go through
3751 and regularize names to be of the form v850_elf_<xxx>.
3752 (toplevel): Include <elf/v850.h>.
3753 (enum reloc_type): Move to include/elf/v850.h.
3754 (v850_elf_check_relocs): For common variables, if the variable is
3755 referenced by a R_V850_{SDA,ZDA,TDA} relocation, put the variable
3756 into the appropriate section.
3757 (elf_backend_check_relocs): Define.
3758
3759 Tue Dec 31 15:15:28 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3760
3761 * elf32-v850.c (elf_v850_howto_table): Fix some spacing.
3762
3763 Tue Dec 31 14:44:50 1996 Ian Lance Taylor <ian@cygnus.com>
3764
3765 * config.bfd (mips*el-*-linux*): New target.
3766 (mips*-*-linux*): New target.
3767
3768 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Clean up.
3769 Return a useful value.
3770
3771 * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
3772
3773 * configure.in: Check ac_cv_func_mmap_fixed_mapped, not
3774 ac_cv_func_mmap.
3775 * configure: Rebuild.
3776 * configure.host: Use ac_cv_func_mmap_fixed_mapped instead of
3777 ac_cv_func_mmap in bfd/configure.host.
3778
3779 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Add
3780 filter_shlib and auxiliary_filter_shlib parameters.
3781 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_AUXILIARY and
3782 DT_FILTER.
3783 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
3784 (bfd_elf64_size_dynamic_sections): Likewise.
3785 * bfd-in2.h: Rebuild.
3786
3787 Mon Dec 30 18:48:52 1996 Ian Lance Taylor <ian@cygnus.com>
3788
3789 * xcofflink.c (xcoff_build_ldsyms): When exporting all defined
3790 symbols, don't export a symbol which is defined by an object in an
3791 archive which contains shared objects.
3792
3793 start-sanitize-tic80
3794 Mon Dec 30 16:12:58 1996 Fred Fish <fnf@cygnus.com>
3795
3796 * archures.c (enum bfd_architecture): Add bfd_arch_tic80
3797 for TI TMS320c80 (MVP).
3798 (bfd_archures_list): Add bfd_tic80_arch.
3799 * bfd-in2.h: Regenerate by running "make headers".
3800
3801 Sun Dec 29 16:18:52 1996 Fred Fish <fnf@cygnus.com>
3802
3803 * cpu-tic80.c (bfd_tic80_arch): Add struct.
3804 * configure.in (case $vec): Correct typo, "tb" not "tp".
3805 Also add cofflink.o for tic80coff_vec.
3806 * configure: Regenerate with autoconf.
3807
3808 end-sanitize-tic80
3809 Mon Dec 30 11:54:56 1996 Ian Lance Taylor <ian@cygnus.com>
3810
3811 * libbfd.c: Patch up the mmap code so that it is only built if BFD
3812 is configured with --with-mmap.
3813
3814 start-sanitize-tic80
3815 Sun Dec 29 10:48:57 1996 Fred Fish <fnf@cygnus.com>
3816
3817 * Makefile.in (BFD32_BACKENDS): Add coff-tic80.o
3818 (ALL_MACHINES): Add cpu-tic80.o
3819 (cpu-tic80.o, coff-tic80.o): Add dependencies.
3820 * coff-tic80.c: Add skeleton, cloned from another coff config.
3821 * coffcode.h (coff_write_object_contents): Set magic to TIC80MAGIC
3822 for TIc80.
3823
3824 end-sanitize-tic80
3825 Fri Dec 27 20:56:41 1996 Fred Fish <fnf@cygnus.com>
3826
3827 * TODO: Correct a misspelling.
3828 start-sanitize-tic80
3829 * coff-tic80.c: New file for TI TMS320C80 (MVP).
3830 * cpu-tic80.c: New file for TI TMS320C80 (MVP).
3831 * configure.in (case $vec): Add tic80coff_vec entry.
3832 * configure: Regenerate with autoconf.
3833 * archures.c (bfd_tic80_arch): Declare.
3834 * bfd-in2.h (enum bfd_architecture): Add bfd_arch_tic80.
3835 * config.bfd (case ${targ}): Add tic80*-*-coff* target.
3836 * targets.c (tic80coff_vec): Add decl as extern bfd_target.
3837 (bfd_target_vector): Add tic80coff_vec entry.
3838 end-sanitize-tic80
3839
3840 Fri Dec 27 11:48:12 1996 H.J. Lu <hjl@lucon.org>
3841
3842 * elflink.h (elf_buckets): Add some more values for larger
3843 binaries.
3844
3845 Thu Dec 26 18:36:54 1996 Ian Lance Taylor <ian@cygnus.com>
3846
3847 * Makefile.in (install): Move subdir_do out of conditional. From
3848 Fred Fish <fnf@cygnus.com>.
3849
3850 Wed Dec 18 10:04:30 1996 Jeffrey A Law (law@cygnus.com)
3851
3852 * elf32-mn10200.c (enum reloc_type): Enable basic 8, 16, and
3853 32 bit relocs.
3854 (elf_mn10200_howto_table): Likewise.
3855 (mn10200_reloc_map): Likewise.
3856
3857 Tue Dec 17 11:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
3858
3859 * elf32-mips.c (mips_elf_add_symbol_hook): Add 1 to the value of a
3860 mips16 symbol during the link.
3861 (mips_elf_finish_dynamic_symbol): Subtract 1 from the value of a
3862 mips16 symbol.
3863 (mips_elf_link_output_symbol_hook): New static function.
3864 (elf_backend_link_output_symbol_hook): Define.
3865
3866 * elf.c (bfd_elf_print_symbol): Print the st_other field if it is
3867 not zero.
3868
3869 Mon Dec 16 14:38:39 1996 Ian Lance Taylor <ian@cygnus.com>
3870
3871 * elf.c (bfd_section_from_shdr): Don't check for reloc sections
3872 against SEC_DEBUGGING sections here (revert patch of December 5).
3873 * elfcode.h (elf_object_p): Check for them here, instead.
3874
3875 Sun Dec 15 14:46:06 1996 Ian Lance Taylor <ian@cygnus.com>
3876
3877 * elfcode.h (elf_slurp_reloc_table): Add dynamic parameter.
3878 * elf.c (_bfd_elf_canonicalize_reloc): Pass new argument to
3879 slurp_reloc_table.
3880 (_bfd_elf_get_dynamic_reloc_upper_bound): New function.
3881 (_bfd_elf_canonicalize_dynamic_reloc): New function.
3882 * elf-bfd.h (struct elf_size_info): Update declaration of
3883 slurp_reloc_table.
3884 (_bfd_elf_get_dynamic_reloc_upper_bound): Declare.
3885 (_bfd_elf_canonicalize_dynamic_reloc): Declare.
3886 * elfxx-target.h: Use new dynamic reloc routines by default.
3887 * elf64-mips.c (mips_elf64_slurp_reloc_table): Add dynamic
3888 parameter.
3889
3890 Fri Dec 13 13:18:49 1996 Dan Wilder <dan@gasboy.com>
3891
3892 * coffcode.h (coff_set_flags): Use MC68KBCSMAGIC for bfd_arch_m68k
3893 if NAMES_HAVE_UNDERSCORE is defined.
3894
3895 Fri Dec 13 11:13:23 1996 Doug Evans <dje@canuck.cygnus.com>
3896
3897 * libaout.h (enum machine_type): Change M_SPARCLET from 142 to 131.
3898
3899 Thu Dec 12 15:07:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3900
3901 * elf32-ppc.c (ppc_elf_check_relocs): Move R_PPC_PLTREL24 into the
3902 supported relocs.
3903
3904 Thu Dec 12 14:55:41 1996 Ian Lance Taylor <ian@cygnus.com>
3905
3906 * elflink.h (elf_link_add_object_symbols): Only add a weak
3907 symbol if the real definition is in the dynamic symbol table.
3908 After finding the real definition, then, if it is dynamic, add the
3909 weak symbol to the dynamic symbol table.
3910
3911 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Make static.
3912
3913 * ppcboot.c (ppcboot_set_arch_mach): Don't define; it's a
3914 function.
3915 (ppcboot_bfd_print_private_bfd_data): Don't take the address of an
3916 array.
3917
3918 Tue Dec 10 23:23:52 1996 Jeffrey A Law (law@cygnus.com)
3919
3920 * elf32-mn10300.c (reloc_type): Remove big endian mn10300 reloc
3921 variants.
3922 (elf32_mn10300_howto_table, mn10300_reloc_map): Likewise.
3923 (bfd_elf32_mn10300_reloc): Write data in little endian format.
3924 * reloc.c: Remove mn10300 big endian relocs.
3925 * bfd-in2.h, libbfd.h: Rebuilt.
3926
3927 * elf32-mn10200.c: Update from elf32-mn10300.c.
3928
3929 Fri Dec 6 15:18:05 1996 Jeffrey A Law (law@cygnus.com)
3930
3931 * elf32-mn10300.c (elf_symbol_leading_char): Define.
3932
3933 * elf32-mn10300.c: Add some comments.
3934
3935 Fri Dec 6 17:16:43 1996 Ian Lance Taylor <ian@cygnus.com>
3936
3937 * ihex.c (ihex_scan): Always initialize buf before jumping to
3938 error_return.
3939 (ihex_read_section): Likewise.
3940
3941 Thu Dec 5 22:29:18 1996 Jeffrey A Law (law@cygnus.com)
3942
3943 * elf32-mn10300.c (elf_mn10300_howto_table): Don't set partial-
3944 inplace for most relocs.
3945
3946 Thu Dec 5 13:24:46 1996 Ian Lance Taylor <ian@cygnus.com>
3947
3948 * elflink.h (elf_link_add_object_symbols): Calling check_relocs
3949 even if SEC_ALLOC is not set.
3950 * elf32-i386.c (elf_i386_check_relocs): Don't check SEC_ALLOC
3951 when deciding whether to copy a reloc into a shared object.
3952 (elf_i386_relocate_section): Likewise.
3953 * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
3954 (elf32_sparc_relocate_section): Likewise.
3955 * elf32-i386.c (elf_i386_check_relocs): Don't set SEC_ALLOC in a
3956 reloc section if it is not set in the source section.
3957 * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
3958 * elf.c (bfd_section_from_shdr): Mark a reloc section associated
3959 with a SEC_DEBUGGING section as SEC_DEBUGGING.
3960
3961 Wed Dec 4 14:18:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3962
3963 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): #if 0 code that
3964 expects a .got.plt until we actually create it.
3965
3966 Mon Dec 2 12:13:51 1996 Ian Lance Taylor <ian@cygnus.com>
3967
3968 * cofflink.c (_bfd_coff_generic_relocate_section): Print an error
3969 message for bfd_reloc_outofrange, rather than aborting. From
3970 Philippe De Muyter <phdm@info.ucl.ac.be>.
3971
3972 * cofflink.c (_bfd_coff_final_link): If there aren't any relocs in
3973 a relocateable link, don't try to process them. From Heinz Wrobel
3974 <wrobel@lpr.e-technik.tu-muenchen.de>.
3975
3976 Mon Dec 2 00:39:24 1996 Jeffrey A Law (law@cygnus.com)
3977
3978 * elf32-mn10300.c (mn10300_info_howto): Renamed from
3979 mn10300_info_howto_rel. Tweak reloc argument to be an
3980 Elf32_Internal_Rela.
3981 (USE_RELA): Define instead of USE_REL.
3982 (elf_info_to_howto, elf_info_howto_rel): Corresponding changes.
3983
3984 Sun Dec 1 00:18:59 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3985
3986 * configure.in, configure: Handle mips*-sgi-irix6*.
3987 * irix-core.c (irix_core_core_file_p): Accept CORE_MAGICN32
3988 core files.
3989
3990 Wed Nov 27 12:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
3991
3992 * elf32-i386.c (elf_i386_relocate_section): Warn about a
3993 relocation against a symbol defined in a section with no output
3994 section.
3995
3996 Tue Nov 26 11:07:31 1996 Ian Lance Taylor <ian@cygnus.com>
3997
3998 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't require AC_C_CROSS.
3999 * configure, config.in: Rebuild with autoconf 2.12.
4000
4001 * elf-bfd.h (struct elf_link_hash_entry): Add other field.
4002 * elf.c (_bfd_elf_link_hash_newfunc): Initialize other field.
4003 (swap_out_syms): Set st_other from existing st_other field.
4004 * elflink.h (elf_link_add_object_symbols): Store st_other in hash
4005 table other field.
4006 (elf_link_output_extsym): Set the other field from the global hash
4007 table entry.
4008 * elf32-mips.c (enum reloc_type): Add R_MIPS16_26.
4009 (elf_mips16_jump_howto): New static variable.
4010 (mips16_jump_reloc): New static function.
4011 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_JMP.
4012 (mips_info_to_howto_rel): Handle R_MIPS16_26.
4013 (mips_elf_relocate_section): Handle R_MIPS16_26. Handle R_MIPS_26
4014 to a mips16 symbol.
4015 * reloc.c (BFD_RELOC_MIPS16_JMP): Add to list of relocs.
4016 * bfd-in2.h, libbfd.h: Rebuild.
4017 * cpu-mips.c (arch_info_struct): Add mips:16 entry.
4018
4019 Mon Nov 25 11:23:32 1996 Ian Lance Taylor <ian@cygnus.com>
4020
4021 * configure.host: Use long long for mips-sgi-irix6*.
4022
4023 * coffswap.h (coff_swap_scnhdr_out): Make line number overflow
4024 only a warning. From Philippe De Muyter <phdemuyt@ulb.ac.be>.
4025
4026 Mon Nov 25 08:52:29 1996 Jeffrey A Law (law@cygnus.com)
4027
4028 * elf32-mn10300.c (bfd_elf32_mn10300_reloc): New function.
4029 (enum reloc_type): Add more reloc types.
4030 (elf32_mn10300_howto_table): Update for new reloc types.
4031 (elf32_mn10300_reloc_map): Update for new reloc types.
4032 * reloc.c: Add some new relocs for the mn10300 series.
4033 * bfd-in2.h, libbfd.h: Rebuilt.
4034
4035 Sat Nov 23 13:26:18 1996 Jeffrey A Law (law@cygnus.com)
4036
4037 * som.c (setup_sections): Don't lose for a space which has
4038 no data, but some symbols.
4039
4040 Fri Nov 22 11:32:13 1996 Ian Lance Taylor <ian@cygnus.com>
4041
4042 * sunos.c (struct sunos_link_hash_table): Add got_needed field.
4043 (sunos_link_hash_table_create): Initialize got_needed.
4044 (sunos_create_dynamic_sections): Only set .got section size if it
4045 is not already set. Set got_needed.
4046 (bfd_sunos_size_dynamic_sections): Check got_needed. Only set
4047 sdynptr, and only handle dynamic sections, if dynamic sections are
4048 needed.
4049 (sunos_scan_std_relocs): Pass false to create_dynamic_sections.
4050 Initialize .got section.
4051 (sunos_scan_ext_relocs): Likewise.
4052 (sunos_write_dynamic_symbol): Set up PLT entry even if this is not
4053 a dynamic symbol.
4054 (sunos_finish_dynamic_link): Check got_needed. Only set up
4055 dynamic linking information if needed.
4056
4057 Thu Nov 21 10:31:31 1996 Rob Savoye (rob@cygnus.com)
4058
4059 * config.bfd: Added VersaDOS format to the Ericsson configuration.
4060
4061 Wed Nov 20 16:31:31 1996 Jeffrey A Law (law@cygnus.com)
4062
4063 * elf32-mn10300.c: Rough cut at relocs for the mn10300.
4064
4065 Wed Nov 13 08:12:38 1996 Jeffrey A Law (law@cygnus.com)
4066
4067 * Makefile.in (elf32-d10v.o): Don't depend on elf/d10v.h
4068 anymore.
4069
4070 Tue Nov 12 13:30:00 1996 Dawn Perchik <dawn@cygnus.com>
4071
4072 * filemode.c: Include sysdep.h.
4073 * ihex.c: Add casts to eliminate compiler warnings.
4074 * sunos.c: Add casts to eliminate compiler warnings.
4075
4076 Mon Nov 11 10:37:02 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4077
4078 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Create .got.plt
4079 section.
4080 (ppc_elf_check_relocs): Add support for R_PPC_LOCAL24PC. Make
4081 appropriate relocations in the .so file if shared.
4082 (ppc_elf_relocate_section): Ditto.
4083
4084 Tue Oct 29 15:03:02 1996 Doug Evans <dje@canuck.cygnus.com>
4085
4086 * elf32-m32r.c (elf_m32r_howto_table, R_M32R_24): Use
4087 complain_overflow_unsigned.
4088
4089 Tue Oct 29 12:53:46 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
4090
4091 * elf32-d10v.c (elf_d10v_howto_table): Don't complain on
4092 overflows for R_D10V_16 and R_D10V_18.
4093
4094 Tue Oct 29 13:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
4095
4096 * ieee.c (ieee_write_section_part): Use LMA rather than VMA.
4097 (do_with_relocs): Likewise.
4098 (do_as_repeat): Likewise.
4099 (copy_expression): Likewise.
4100
4101 Fri Oct 25 16:56:40 1996 Ian Lance Taylor <ian@cygnus.com>
4102
4103 * ieee.c (ieee_write_external_part): Correctly record whether
4104 there is an external part.
4105
4106 Thu Oct 24 14:32:52 1996 Jeffrey A Law (law@cygnus.com)
4107
4108 * elf32-v850.c (elf32_v850_bfd_final_link_relocate): Correctly
4109 handle tda offsets for sld.w and sst.w instructions.
4110 Fix alignment check in sld.w and sst.w tda reloc handling.
4111
4112 Thu Oct 24 09:08:47 1996 Stu Grossman (grossman@critters.cygnus.com)
4113
4114 * aclocal.m4, configure: Set USE_BINARY_FOPEN for *-*-windows.
4115
4116 Wed Oct 23 00:53:16 1996 Jeffrey A Law (law@cygnus.com)
4117
4118 * elf32-v850.c: Add comments about assumptions about
4119 char, short & long sizes.
4120 (elf32_v850_bfd_final_link_relocate): Fix sign extension
4121 problems for several relocs.
4122
4123 * elf32-v850.c (elf32_v850_howto_table): Fix typo in
4124 R_V850_SDA_OFFSET entry.
4125
4126 Wed Oct 23 00:20:34 1996 Ian Lance Taylor <ian@cygnus.com>
4127
4128 * xcofflink.c (bfd_xcoff_import_symbol): Don't allocate ldsym.
4129 Store import file index in ldindx.
4130 (xcoff_build_ldsyms): Assume that ldsym was not previously
4131 allocated. For an imported symbol, copy ldindx into l_ifile.
4132
4133 Tue Oct 22 19:20:38 1996 Jeffrey A Law (law@cygnus.com)
4134
4135 * elf32-v850.c (elf_v850_howto_table): Fix ordering of
4136 R_V850_ZDA_OFFSET and R_V850_TDA_OFFSET. Fix various
4137 fields in R_V850_TDA_OFFSET.
4138 (elf32_v850_bfd_final_link_relocate): Tweak pc-relative
4139 relocs to work more like other relocs. Handle R_V850_TDA_OFFSET
4140 relocations.
4141
4142 * elf32-v850.c: Include bfdlink.h.
4143 (bfd_elf32_v850_reloc): Return an error if we get a reloc
4144 we can't handle.
4145 (elf32_v850_bfd_final_link_relocate): New function.
4146 (v850_elf_relocation_section): Likewise.
4147 (elf_backend_relocate_section): Define.
4148
4149 Tue Oct 22 17:22:43 1996 Ian Lance Taylor <ian@cygnus.com>
4150
4151 * binary.c (binary_set_section_contents): Ignore sections which
4152 don't have SEC_LOAD and SEC_ALLOC set.
4153
4154 Mon Oct 21 12:13:05 1996 Jeffrey A Law (law@cygnus.com)
4155
4156 * linker.c (_bfd_generic_final_link): Avoid losing static
4157 symbols in the .bss section.
4158
4159 Mon Oct 21 10:54:58 1996 Ian Lance Taylor <ian@cygnus.com>
4160
4161 * elf32-mips.c (elf_mips_howto_table): Describe R_MIPS_64.
4162 (mips32_64bit_reloc): New static function.
4163 (mips_reloc_map): Add entry for BFD_RELOC_64.
4164 (mips_elf_relocate_section): Handle R_MIPS_64.
4165
4166 * linker.c (default_indirect_link_order): Print an error message
4167 when attempting to do a relocateable link with different object
4168 file formats, rather than calling abort.
4169
4170 Thu Oct 17 10:43:29 1996 Doug Evans <dje@canuck.cygnus.com>
4171
4172 * reloc.c (m32r relocs): Rename them.
4173 * bfd-in2.h, libbfd.h: Regenerated.
4174 * elf32-m32r.c: Update.
4175 (m32r_elf_10_pcrel_reloc): New function.
4176 (elf_m32r_howto_table, R_M32R_10_PCREL entry): Use it.
4177 (elf_m32r_howto_table, R_M32R_24 entry): Fix {src,dst}_masks.
4178
4179 Wed Oct 16 11:24:35 1996 Jeffrey A Law (law@cygnus.com)
4180
4181 * linker.c (_bfd_generic_final_link): Set "linker_mark" for
4182 all sections that will be included in the output file.
4183 (_bfd_generic_link_output_symbols): Discard symbols in sections
4184 which are being discarded.
4185 * elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,
4186 R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET.
4187 (elf_v850_howto_table): Corresponding changes.
4188 (elf_v850_reloc_map): Corresponding changes.
4189 * reloc.c: Add additional V850 relocations.
4190 * bfd-in2.h, libbfd.h: Rebuilt.
4191
4192 * elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
4193 no longer want in pc-relative relocs.
4194
4195 Tue Oct 15 22:17:37 1996 Jeffrey A Law (law@cygnus.com)
4196
4197 * elf32-v850.c (bfd_elf32_v850_reloc): Don't silently
4198 accept a reloc against an undefined sybmol!
4199
4200 Tue Oct 15 16:17:28 1996 Stu Grossman (grossman@critters.cygnus.com)
4201
4202 * elf32-v850.c: Define elf_symbol_leading_char to be '_'.
4203
4204 Tue Oct 15 12:40:41 1996 Ian Lance Taylor <ian@cygnus.com>
4205
4206 * VERSION: Bump for new relocation.
4207
4208 * hosts/i386bsd.h: If NBPG is not defined, define it as
4209 PAGE_SIZE, for recent versions of FreeBSD.
4210
4211 Mon Oct 14 12:37:26 1996 Ian Lance Taylor <ian@cygnus.com>
4212
4213 * configure.host: Use `long long' as the 64 bit type on a Solaris
4214 host, since both gcc and the SunPRO compilers support it.
4215
4216 Mon Oct 14 11:17:24 1996 Richard Henderson <rth@tamu.edu>
4217
4218 * reloc.c: Create a new BFD_RELOC_ALPHA_ELF_LITERAL. It was a
4219 mistake to have reused the ECOFF LITERAL for ELF since they have
4220 different semantics.
4221 * elf64-alpha.c (elf_reloc_map): Map from ELF_LITERAL.
4222 * bfd-in2.h, libbfd.h: Rebuild.
4223
4224 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Trap .got
4225 section overflow.
4226
4227 * elf64-alpha.c (elf64_alpha_relocate_section): Do not emit a
4228 dynamic relocation for an undefweak symbol when we are building
4229 a static executable.
4230
4231 Thu Oct 10 11:15:06 1996 Stan Shebs <shebs@andros.cygnus.com>
4232
4233 * mpw-make.sed (config.bfd, targmatch.sed): Edit references to
4234 point explicitly to srcdir.
4235 (targmatch.h): Edit references to point explicitly to objdir.
4236
4237 Thu Oct 10 14:14:23 1996 Ian Lance Taylor <ian@cygnus.com>
4238
4239 * config.bfd: When setting targ_cpu, don't get confused by
4240 linux-gnu.
4241
4242 Tue Oct 8 08:51:19 1996 Stu Grossman (grossman@critters.cygnus.com)
4243
4244 * configure.host: Add support for windows host (a build done
4245 under the Microsoft build environment).
4246
4247 Tue Oct 8 11:40:16 1996 Ian Lance Taylor <ian@cygnus.com>
4248
4249 * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
4250 definition in a dynamic object, add it to the dynamic symbol table
4251 if any dynamic object mentions it. Reverts part of last patch.
4252
4253 * sunos.c (struct sunos_link_hash_table): Add got_base field.
4254 (sunos_link_hash_table_create): Initialize got_base.
4255 (bfd_sunos_size_dynamic_sections): If the .got section is more
4256 than 0x1000 bytes, set __GLOBAL_OFFSET_TABLE_ and got_base to
4257 0x1000.
4258 (sunos_check_dynamic_reloc): Subtract got_base from a base
4259 relative relocation.
4260
4261 * elf32-mips.c (elf_mips_isa): New static function.
4262 (_bfd_mips_elf_merge_private_bfd_data): Don't warn about linking
4263 -mips1 and -mips2 code together, or -mips3 and -mips4 code.
4264
4265 Mon Oct 7 11:44:17 1996 Ian Lance Taylor <ian@cygnus.com>
4266
4267 * archive.c (do_slurp_coff_armap): Only treat archive as little
4268 endian for i960 COFF.
4269
4270 Fri Oct 4 13:49:01 1996 Ian Lance Taylor <ian@cygnus.com>
4271
4272 * coffcode.h (coff_compute_section_file_positions): Adjust sofar
4273 by the change in size of the section when EXEC_P is not set.
4274
4275 * coff-m68k.c (coff_rtype_to_howto): Define if not defined.
4276 (m68kcoff_rtype_to_howto): New static function.
4277 * cf-m68klynx.c (coff_m68k_lynx_rtype_to_howto): Add the section
4278 VMA to the addend for a PC relative reloc.
4279
4280 * dep-in.sed: Rework backslash loop a bit to avoid bug in sed on
4281 HP/UX 10.20.
4282 * Makefile.in: Rebuild dependencies.
4283
4284 * dep-in.sed: Remove ../bfd/sysdep.h, since it will appear when
4285 som.h is included.
4286
4287 Fri Oct 4 11:41:39 1996 Jeffrey A Law (law@cygnus.com)
4288
4289 * Makefile.in: Remove explicit dependencies for mn10200 and
4290 mn10300 files.
4291 (ALL_MACHINE_CFILES): Add cpu-mn10200.c and cpu-mn10300.c.
4292 (BFD32_BACKENDS_CFILES): Add elf32-mn10200.c and elf32-mn10300.c
4293 (dependencies): Rebuilt.
4294
4295 Thu Oct 3 16:57:51 1996 Ian Lance Taylor <ian@cygnus.com>
4296
4297 * cofflink.c (coff_link_add_symbols): Set obj_coff_keep_syms
4298 during this function.
4299
4300 * elflink.c (_bfd_elf_create_linker_section): Only use an existing
4301 section if the flags are compatible.
4302
4303 * configure.in: Add havevecs, and put it in tdefaults.
4304 * mpw-config.in: Likewise.
4305 * configure: Rebuild.
4306 * targmatch.sed: New file; a sed script to build targmatch.h from
4307 config.bfd.
4308 * config.bfd: Add #if, #endif, and comments for targmatch.h.
4309 * targets.c: Include "fnmatch.h".
4310 (struct targmatch): Define.
4311 (bfd_target_match): Define by including targmatch.h.
4312 (bfd_find_target): If the target is not found by name, search for
4313 it as a configuration triplet.
4314 * Makefile.in: Rebuild dependencies.
4315 (BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o,
4316 i386dynix.o, m68k4knetbsd.o, and riscix.o.
4317 (BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c,
4318 hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c.
4319 (HFILES): Add targmatch.h. Also, alphabetize and reindent.
4320 (CFILES): Remove i386dynix.c and hp300bsd.c.
4321 (targmatch.h): New target.
4322 (do_clean): Remove targmatch.h.
4323
4324 * configure.in: Add BFD_NEED_DECLARATION(getenv).
4325 * acconfig.h: Add NEED_DECLARATION_GETENV.
4326 * configure, config.in: Rebuild.
4327 * sysdep.h: If NEED_DECLARATION_GETENV, declare getenv.
4328 * aout-adobe.c (aout_adobe_object_p): Don't declare getenv.
4329
4330 Thu Oct 3 09:29:09 1996 Jeffrey A Law (law@cygnus.com)
4331
4332 * cpu-mn10x00.c, elf32-mn10x00: Removed.
4333 * cpu-mn10200.c, cpu-mn10300.c: New files.
4334 * elf32-mn10200.c, elf32-mn10300.c: New files.
4335 * Makefile.in: Break mn10x00 support into two separate
4336 configurations, mn10200 and mn10300.
4337 * archures.c, config.bfd, configure.in, elf.c, targets.c: Likewise.
4338 * bfd-in2.h, configure: Rebuilt.
4339
4340 Thu Oct 3 15:38:19 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
4341
4342 * Makefile.in (do_clean): Move config.log to do_distclean.
4343
4344 Wed Oct 2 21:40:55 1996 Jeffrey A Law (law@cygnus.com)
4345
4346 * cpu-mn10x00.c, elf32-mn10x00.c: New files.
4347 * Makefile.in (ALL_MACHINES): Add cpu-mn10x00.o.
4348 (BFD32_BACKENDS): Similarly for elf32-mn10x00.o.
4349 (elf32-mn10x00.o): Add dependencies.
4350 * archures.c (enum bfd_architecture): Add bfd_arch_mn10x00.
4351 (bfd_mn10x00_arch): Declare.
4352 (bfd_archures_list): Add bfd_mn10x00_arch.
4353 * config.bfd: Add mn10x00-*-*.
4354 * configure.in: Add bfd_elf32_mn10x00_vec.
4355 * elf.c (prep_headers): Handle bfd_arch_mn10x00.
4356 * targets.c (bfd_elf32_mn10x00_vec): Declare.
4357 (bfd_target_vector): Add bfd_elf32_mn10x00_vec.
4358 * bfd-in2.h, configure: Rebuilt.
4359
4360 Wed Oct 2 15:46:45 1996 Klaus Kaempf <kkaempf@progis.de>
4361
4362 openVMS/Alpha: Provide filename and case_hack flags via
4363 symbol table from gas.
4364 Add case_hack code for symbol output from vax/vms.
4365 * evax-alpha.c (evax_initialize): Remove filename handling,
4366 filename is provided via symbol table.
4367 (evax_get_symtab): Use local symbol count when setting up table.
4368 * evax-egsd.c (_bfd_evax_slurp_egsd): Print correct name when
4369 debugging.
4370 (_bfd_evax_write_egsd): Skip file name symbol.
4371 * evax-emh.c (get_vms_time_string): Local function now.
4372 (_bfd_evax_write_emh): Extract source filename and case_hack flags
4373 from symbol table.
4374 * evax_write_etir (_bfd_evax_write_etir): Pass all symbol names
4375 through _bfd_evax_case_hack_symbol.
4376 * evax-misc.c (hash_string, _bfd_evax_case_hack_symbol): New
4377 functions.
4378 (_bfd_evax_basename): Removed.
4379 (_bfd_get_vms_time_string): Moved to evax-emh.c.
4380 * evax.h (evax_private_data_struct): Remove filename.
4381 (flag_hash_long_names, flag_show_after_trunc,
4382 flag_no_hash_mixed_case, vms_name_mapping): New flags for
4383 vms_case_hack.
4384
4385 Wed Oct 2 12:02:02 1996 Ian Lance Taylor <ian@cygnus.com>
4386
4387 * freebsd.h (N_GET_MAGIC_NET): Don't use ntohl.
4388 (N_GETMID_NET, N_GETFLAG_NET): Likewise.
4389 (NO_SWAP_MAGIC): Don't define.
4390 (SWAP_MAGIC): Define.
4391
4392 * cofflink.c (_bfd_coff_link_input_bfd): Don't crash if there is
4393 no hash table entry for a global symbol.
4394
4395 Tue Oct 1 16:14:22 1996 Joel Sherrill <joel@oarcorp.com>
4396
4397 * config.bfd (mips*-*-rtems*): New target, like mips*-*-elf*.
4398
4399 Tue Oct 1 12:31:39 1996 Ian Lance Taylor <ian@cygnus.com>
4400
4401 * cofflink.c (coff_link_add_symbols): Don't override a meaningful
4402 symbol type with T_NULL. Warn if symbol type changes. Based on
4403 patch from Philippe De Muyter <phdm@info.ucl.ac.be>.
4404
4405 * elflink.h (elf_link_add_object_symbols): Only put a symbol from
4406 a dynamic object in the dynamic symbol table if it is referenced
4407 or defined by a regular object.
4408
4409 Fri Sep 27 18:41:07 1996 Stu Grossman (grossman@critters.cygnus.com)
4410
4411 * elf32-v850.c (bfd_elf32_v850_is_local_label): New function to
4412 remove dwarf local labels. Shrinks binaries by a factor of 3!
4413
4414 Mon Sep 23 13:33:00 1996 Ian Lance Taylor <ian@cygnus.com>
4415
4416 * elf32-ppc.c (ppc_elf_add_symbol_hook): Create the .sbss section
4417 by hand, rather than by calling bfd_make_section.
4418
4419 Mon Sep 23 09:23:41 1996 Doug Evans <dje@seba.cygnus.com>
4420
4421 * reloc.c: Rename m32r relocs.
4422 * bfd-in2.h, libbfd.h: Rebuilt.
4423 * elf32-m32r.c: Update.
4424
4425 Fri Sep 20 11:43:43 1996 Ian Lance Taylor <ian@cygnus.com>
4426
4427 * aoutx.h (aout_link_input_section_ext): When doing a relocateable
4428 link, adjust the symbol index of a base relative reloc. Don't
4429 change the addend of a PC relative reloc if pcrel_offset is set.
4430 * sunos.c (bfd_sunos_size_dynamic_sections): Don't do anything for
4431 a relocateable link.
4432
4433 * reloc.c (bfd_perform_relocation): Apply the relocation even if
4434 it is zero, in case src_mask matters.
4435 (bfd_install_relocation): Likewise.
4436
4437 Thu Sep 19 11:03:06 1996 Ian Lance Taylor <ian@cygnus.com>
4438
4439 * xcofflink.c (xcoff_link_add_symbols): Always initialize
4440 keep_syms.
4441 (_bfd_xcoff_bfd_final_link): Don't set target_index
4442 to an uninitialized value.
4443
4444 Tue Sep 17 14:18:31 1996 Ian Lance Taylor <ian@cygnus.com>
4445
4446 * coffcode.h (coff_slurp_line_table): Warn about illegal symbol
4447 indices, rather than crashing.
4448 (coff_slurp_reloc_table): Likewise. Check whether the howto field
4449 is NULL.
4450 * coff-sh.c (sh_relocate_section): Check for an illegal symbol
4451 index.
4452
4453 Mon Sep 16 12:39:36 1996 Ian Lance Taylor <ian@cygnus.com>
4454
4455 * coff-arm.c (aoutarm_std_reloc_howto): Change dst_mask for ARM26D
4456 reloc to 0.
4457 (coff_arm_adjust_symndx): New static function.
4458 (coff_adjust_symndx): Define.
4459
4460 * srec.c (srec_scan): Accept multiple symbols on a single line.
4461 From Pascal Martin <pmartin@alsys.com>.
4462
4463 * README: New file.
4464
4465 Fri Sep 13 14:32:42 1996 Doug Evans <dje@canuck.cygnus.com>
4466
4467 * aoutf1.h (MY_bfd_merge_private_bfd_data): Define.
4468 (sunos_merge_private_bfd_data): New function.
4469
4470 Fri Sep 13 15:50:57 1996 Ian Lance Taylor <ian@cygnus.com>
4471
4472 * bfd.c (bfd_copy_private_bfd_data): Switch on output BFD rather
4473 than input BFD.
4474 (bfd_merge_private_bfd_data): Likewise.
4475 * section.c (bfd_copy_private_section_data): Likewise.
4476 * syms.c (bfd_copy_private_symbol_data): Likewise.
4477 * bfd-in2.h: Rebuild.
4478 * aout-target.h (MY_bfd_copy_private_section_data): Check that
4479 both BFD's are the right flavour.
4480 * ecoff.c (_bfd_ecoff_bfd_copy_private_bfd_data): Likewise.
4481 * elf.c (_bfd_elf_copy_private_symbol_data): Likewise.
4482 * elf32-mips.c (_bfd_mips_elf_copy_private_bfd_data): Likewise.
4483 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
4484 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Likewise.
4485 (ppc_elf_merge_private_bfd_data): Likewise.
4486 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
4487 * peicode.h (pe_bfd_copy_private_section_data): Likewise.
4488
4489 * elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
4490 R_PARISC_DIR32, so that _bfd_stab_section_find_nearest_line passes
4491 its sanity check.
4492
4493 Thu Sep 12 11:45:57 1996 Doug Evans <dje@seba.cygnus.com>
4494
4495 * reloc.c: Add m32r relocs.
4496 * bfd-in2.h, libbfd.h: Rebuilt.
4497 * cpu-m32r.c,elf32-m32r.c: New files.
4498
4499 Thu Sep 12 11:10:05 1996 Ian Lance Taylor <ian@cygnus.com>
4500
4501 * ieee.c (ieee_vec): Set symbol_leading_char field to '_'.
4502
4503 Wed Sep 11 11:57:56 1996 Ian Lance Taylor <ian@cygnus.com>
4504
4505 * tekhex.c (first_phase): Change type parameter from char to int.
4506 (out): Likewise.
4507 (pass_over): Change func to expect int, not char.
4508
4509 * elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
4510 rather than SEC_LOAD when aligning the file offset for the first
4511 section in a segment.
4512
4513 Tue Sep 10 16:18:30 1996 Fred Fish <fnf@cygnus.com>
4514
4515 * syms.c (coff_section_type): Make arg const.
4516 * irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
4517 to make_bfd_asection().
4518 * elf-bfd.h (bfd_section_from_phdr): Add prototype.
4519 * elfcode.h (bfd_section_from_phdr): Remove prototype.
4520 (_bfd_elf_stringtab_init): Remove prototype.
4521
4522 * netbsd-core.c (swap_abort): Add prototype.
4523 * aix386-core.c (swap_abort): Ditto & make static
4524 * hpux-core.c (swap_abort): Ditto & make static.
4525 * irix-core.c (swap_abort): Ditto & make static.
4526 * ptrace-core.c (swap_abort): Ditto & make static.
4527 * trad-core.c (swap_abort): Ditto & make static.
4528 * coffswap.h (coff_swap_reloc_in): Ditto.
4529 (coff_swap_reloc_out): Ditto.
4530 (coff_swap_filehdr_in): Ditto.
4531 (coff_swap_filehdr_out): Ditto.
4532 (coff_swap_sym_in): Ditto.
4533 (coff_swap_sym_out): Ditto.
4534 (coff_swap_aux_in): Ditto.
4535 (coff_swap_aux_out): Ditto.
4536 (coff_swap_lineno_in): Ditto.
4537 (coff_swap_lineno_out): Ditto.
4538 (coff_swap_aouthdr_in): Ditto.
4539 (coff_swap_aouthdr_out): Ditto.
4540 (coff_swap_scnhdr_in): Ditto.
4541 (coff_swap_scnhdr_out): Ditto.
4542 * ihex.c (ihex_sizeof_headers): Ditto.
4543 * tekhex.c (getsym): Ditto.
4544 (find_chunk): Ditto & make static.
4545 (insert_byte): Ditto.
4546 (first_phase): Ditto.
4547 (pass_over): Ditto.
4548 (tekhex_get_symtab): Ditto & make static.
4549 (tekhex_get_symtab_upper_bound): Ditto & make static.
4550 (tekhex_mkobject): Ditto.
4551 (tekhex_object_p): Ditto.
4552 (move_section_contents): Ditto.
4553 (tekhex_get_section_contents): Ditto.
4554 (tekhex_set_arch_mach): Ditto & make static.
4555 (tekhex_set_section_contents): Ditto.
4556 (writevalue): Ditto.
4557 (writesym): Ditto.
4558 (out): Ditto.
4559 (tekhex_write_object_contents): Ditto.
4560 (tekhex_sizeof_headers): Ditto.
4561 (tekhex_make_empty_symbol): Ditto.
4562 (tekhex_get_symbol_info): Ditto.
4563 (tekhex_print_symbol): Ditto.
4564 * irix-core.c (make_bfd_asection): Ditto.
4565 (irix_core_core_file_p): Ditto.
4566 (irix_core_core_file_failing_command): Ditto.
4567 (irix_core_core_file_failing_signal): Ditto.
4568 (irix_core_core_file_matches_executable_p): Ditto.
4569 (irix_core_make_empty_symbol): Ditto.
4570 * coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
4571 * srec.c (srec_new_symbol): Ditto.
4572 (srec_get_section_contents): Ditto.
4573 (srec_set_arch_mach): Ditto.
4574 (srec_set_section_contents): Ditto.
4575 (internal_srec_write_object_contents): Ditto.
4576 (srec_write_object_contents): Ditto.
4577 (symbolsrec_write_object_contents): Ditto.
4578 (srec_sizeof_headers): Ditto.
4579 (srec_make_empty_symbol): Ditto.
4580 (srec_get_symtab_upper_bound): Ditto.
4581 (srec_get_symtab): Ditto.
4582 (srec_print_symbol): Ditto and make static.
4583 * elf.c (elf_read): Ditto
4584 (assign_section_numbers): Ditto.
4585 (elf_fake_sections): Ditto.
4586 (sym_is_global): Ditto.
4587 (elf_map_symbols): Ditto.
4588 (get_program_header_size): Ditto.
4589 * coffgen.c (make_a_section_from_file): Ditto.
4590 (coff_real_object_p): Ditto.
4591 (fixup_symbol_value): Ditto.
4592 (build_debug_section): Ditto.
4593 (copy_name): Ditto.
4594 * syms.c (coff_section_type): Ditto.
4595
4596 Mon Sep 9 22:36:01 1996 Jeffrey A Law (law@cygnus.com)
4597
4598 * bfd-in2.h: Rebuilt after m32r changes.
4599
4600 Mon Sep 9 12:31:22 1996 Doug Evans <dje@canuck.cygnus.com>
4601
4602 * config.bfd,configure.in,configure: Add m32r support.
4603 * Makefile.in,archures.c,elf.c,targets.c: Likewise.
4604 * config.bfd: Keep target list alphabetically sorted.
4605
4606 Mon Sep 9 11:48:41 1996 Jeffrey A Law (law@cygnus.com)
4607
4608 * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
4609 to add in the constant part found in the instruction itself.
4610 (case R_V850_HI16_S): Likewise.
4611
4612 Fri Sep 6 17:04:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
4613
4614 * elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
4615 and R_D10V_18 to be 1 (word).
4616
4617 Thu Sep 5 15:23:08 1996 Ian Lance Taylor <ian@cygnus.com>
4618
4619 * stabs.c (_bfd_link_section_stabs): If the output_section field
4620 of either section is bfd_abs_section, then the linker is
4621 discarding the section and we should not optimize it.
4622
4623 Tue Sep 3 12:16:20 1996 Doug Evans <dje@canuck.cygnus.com>
4624
4625 * Makefile.in (aout-sparcle.o): New target.
4626 * aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
4627 * config.bfd (sparclet-*-aout*): Add case.
4628 * configure.in (sparcle_aout_vec): Add case.
4629 * configure: Regenerated.
4630 * targets.c (sparcle_aout_vec): Declare.
4631 (bfd_target_vector): Add sparcle_aout_vec.
4632 * aout-sparcle.c: New file.
4633
4634 Tue Sep 3 00:57:02 1996 Jeffrey A Law (law@cygnus.com)
4635
4636 * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
4637 low order sign bit propogation for R_V850_HI16_S.
4638
4639 * elf32-v850.c (bfd_elf32_v850_reloc): New function for
4640 handling V850 specific relocs.
4641 (elf_v850_howto_table): Use the new function for some
4642 relocations. Twiddle masks & shifts for some relocs.
4643 Set partial_inplace where needed.
4644
4645 Mon Sep 2 12:12:34 1996 Ian Lance Taylor <ian@cygnus.com>
4646
4647 * cpu-mips.c: Add an explicit mips:3000 entry, and change the
4648 default architecture to a machine number of 0.
4649 * elf32-mips.c (_bfd_mips_elf_object_p): Set the machine number
4650 for E_MIPS_ARCH_1.
4651 (_bfd_mips_elf_merge_private_bfd_data): If the machine number of
4652 the output BFD is the default, set it from the first input BFD.
4653
4654 Sun Sep 1 18:38:01 1996 Jeffrey A Law (law@cygnus.com)
4655
4656 * elf32-v850.c (elf_v850_howto_table): All the 16bit relocs
4657 insert at bitpos zero. The HI16 relocs are shifted right
4658 by 16 bits. Fix src_mask for all relocs.
4659 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define. The V850 is
4660 little endian!
4661 (TARGET_BIG_SYM, TARGET_BIG_NAME): Remove. The V850 is little
4662 endian!
4663
4664 Sun Sep 1 15:41:08 1996 Ian Lance Taylor <ian@cygnus.com>
4665
4666 * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
4667 Rewrite to use BFD file read routines and to avoid using a fixed
4668 length for the file name.
4669
4670 Sat Aug 31 10:22:25 1996 Jeffrey A Law (law@cygnus.com)
4671
4672 * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
4673 (elf_v850_howto_table): Add support for R_V850_{32,16,8}.
4674 (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
4675 to R_V850_{32,16,8}.
4676
4677 Fri Aug 30 18:06:04 1996 J.T. Conklin <jtc@hippo.cygnus.com>
4678
4679 * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
4680 (elf_v850_howto_table): Add info for HI16_S reloc.
4681 (v850_reloc_map): Add HI_16_S reloc.
4682 * reloc.c: Define BFD_RELOC_V850_* relocs.
4683
4684 Fri Aug 30 11:49:19 1996 Ian Lance Taylor <ian@cygnus.com>
4685
4686 Add SH ELF support.
4687 * elf32-sh.c: New file.
4688 * elf.c (prep_headers): Handle bfd_arch_sh.
4689 * elfcode.h (write_relocs): Handle absolute symbol.
4690 * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
4691 (_bfd_elf64_link_read_relocs): Declare.
4692 * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
4693 elf_link_read_relocs. Make globally visible. Change all
4694 callers.
4695 (elf_link_input_bfd): Get external symbols from cache in
4696 symtab_hdr->contents. Get contents from cache in
4697 elf_section_data.
4698 * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
4699 already defined.
4700 * reloc.c: Define BFD_RELOC_SH_* relocs.
4701 * libbfd-in.h (_bfd_sh_align_load_span): Declare.
4702 * coff-sh.c (sh_insns_conflict): Fix a return value.
4703 (_bfd_sh_align_load_span): New globally visible function, broken
4704 out of sh_align_load.
4705 (sh_align_load): Call _bfd_sh_align_load_span.
4706 (sh_swap_insns): Change relocs parameter to PTR.
4707 * bfd-in2.h, libbfd.h: Rebuild.
4708 * targets.c (bfd_elf32_sh_vec): Declare.
4709 (bfd_elf32_shl_vec): Declare.
4710 * config.bfd (sh-*-elf*): New target.
4711 * configure.in (bfd_elf32_sh_vec): New target vector.
4712 (bfd_elf32_shl_vec): New target vector.
4713 * configure: Rebuild.
4714 * Makefile.in: Rebuild dependencies.
4715 (BFD32_BACKENDS): Add elf32-sh.o.
4716 (BFD32_BACKENDS_CFILES): Add elf32-sh.c.
4717
4718 * elf.c (map_sections_to_segments): Check that LMA does not skip a
4719 page before checking D_PAGED.
4720
4721 * ihex.c (ihex_scan): Removed unnecessary extbase variable.
4722 (ihex_write_object_contents): Remove extbase; always use segbase
4723 instead.
4724
4725 Thu Aug 29 16:52:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4726
4727 * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
4728 * configure.host (i[345]86-*-*): Ditto.
4729 * config.bfd (i[345]86-*-*): Ditto.
4730 * configure: Regenerate.
4731
4732 * config.bfd (i[3456]86-*-dgux*): Recognize as a synonym for x86
4733 elf.
4734
4735 Tue Aug 27 09:18:18 1996 Jeffrey A Law (law@cygnus.com)
4736
4737 * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new argument.
4738 * elf32-hppa.h (hppa_elf_gen_reloc_type): Update prototype.
4739 * som.c (hppa_som_gen_reloc_type): Add new argument. If
4740 we encounter an R_DATA_ONE_SYMBOL reloc against a symbol that
4741 will have an ST_CODE type, change the symbol's type to ST_DATA.
4742 * som.c (hppa_som_gen_reloc_type): Update prototype.
4743
4744 Tue Aug 27 00:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
4745
4746 * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
4747 R_MIPS_32 and R_MIPS_REL32. Set sgot and g as soon as possible.
4748 (mips_elf_size_dynamic_sections): Don't require .got to exist.
4749 (mips_elf_finish_dynamic_sections): Likewise.
4750
4751 Thu Aug 22 10:54:38 1996 Ian Lance Taylor <ian@cygnus.com>
4752
4753 * configure.host (HLDENV): New variable to set. Set it for
4754 *-*-sysv4*, since those linkers may not support -R but they always
4755 support LD_RUN_PATH.
4756
4757 * libieee.h (NSECTIONS): Don't define.
4758 (ieee_data_struct): Change section_table to asection **. Add
4759 section_table_size.
4760 * ieee.c (get_section_entry): If the table isn't big enough, make
4761 it bigger.
4762 (ieee_slurp_sections): Remove assertion about number of sections.
4763 (ieee_object_p): Adjust initialization of ieee to match changes to
4764 the structure.
4765
4766 * xcofflink.c (xcoff_mark): Don't copy relocs for undefined
4767 symbols merely because we are generating a shared library.
4768 (xcoff_build_ldsyms): Don't set up global linkage code for an
4769 undefined symbol merely because we are generating a shared
4770 library.
4771
4772 Tue Aug 20 15:06:05 1996 J.T. Conklin <jtc@hippo.cygnus.com>
4773
4774 * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
4775 (BFD32_BACKENDS) Add elf32-v850.o.
4776 * archures.c: Add bfd_v850_arch.
4777 * bfd-in2.h: Add bfd_v850_arch.
4778 * config.bfd (v850-*-*): New target.
4779 * configure: (bfd_elf32_v850_vec) New vector.
4780 * configure.in: (bfd_elf32_v850_vec) New vector.
4781 * cpu-v850.c: New file.
4782 * elf.c (prep_headers): Added case bfd_arch_v850.
4783 * elf32-v850.c: New file.
4784 * targets.c (bfd_elf32_v850_vec): New vector.
4785
4786 Fri Aug 16 16:25:35 1996 Ian Lance Taylor <ian@cygnus.com>
4787
4788 * xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
4789 a function code symbol for an XMC_XO symbol.
4790
4791 Thu Aug 15 12:33:29 1996 Stan Shebs <shebs@andros.cygnus.com>
4792
4793 * mpw-config.in: Update editing of autoconf vars to reflect
4794 Jul 18 configure.in change.
4795 * mpw-make.sed: Update editing of include pathnames to be
4796 more general, add @DASH_C_FLAG@ to explicit compile rule edit.
4797
4798 Thu Aug 15 10:35:13 1996 Richard Henderson <rth@tamu.edu>
4799
4800 * elf64-alpha.c (elf64_alpha_output_extsym): The section from
4801 which to offset to get the .plt entry address is ".plt".
4802
4803 Thu Aug 15 16:40:30 1996 James G. Smith <jsmith@cygnus.co.uk>
4804
4805 * reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
4806 BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
4807 Added, for internal use by the ARM gas.
4808 * libbfd.h: Rebuilt
4809 * bfd-in2.h: Rebuilt
4810
4811 Wed Aug 14 17:02:09 1996 Richard Henderson <rth@tamu.edu>
4812
4813 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
4814 in section dynidx start.
4815
4816 Tue Aug 13 14:35:38 1996 Ian Lance Taylor <ian@cygnus.com>
4817
4818 * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
4819 name begins with .gnu.linkonce as SEC_LINK_ONCE. This is an
4820 optimization for g++.
4821
4822 Tue Aug 13 17:04:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4823
4824 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): If one module has
4825 the -mrelocatable-lib bit set and the other doesn't, clear the
4826 -mrelocatable-lib bit in the header.
4827
4828 Sat Aug 10 22:59:17 1996 Ian Lance Taylor <ian@cygnus.com>
4829
4830 * elflink.h (elf_link_add_object_symbols): Do not resolve a common
4831 symbol against a STT_FUNC symbol in a shared library.
4832
4833 Fri Aug 9 12:44:57 1996 Ian Lance Taylor <ian@cygnus.com>
4834
4835 * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
4836 symbol is found, automatically define the corresponding function
4837 code.
4838
4839 * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
4840 if sym.n_numaux is not zero.
4841 (_bfd_coff_link_input_bfd): Permit the symbol and the hash table
4842 entry to disagree about the number of aux entries if the symbol
4843 has zero.
4844
4845 * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
4846 section if it might be needed, not just if info->shared.
4847 (mips_elf_adjust_dynamic_symbol): Make room for a null element at
4848 the start of .rel.dyn if we are going to use it.
4849 (mips_elf_finish_dynamic_sections): Only clear the first element
4850 of .rel.dyn if the size is greater than zero.
4851
4852 Thu Aug 8 16:24:55 1996 Ian Lance Taylor <ian@cygnus.com>
4853
4854 * xcofflink.c (xcoff_link_input_bfd): If we already called the
4855 undefined_symbol callback for a symbol, then don't issue any more
4856 warnings about loader relocs.
4857 (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
4858 after calling the undefined_symbol callback.
4859
4860 * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
4861 (xcoff_link_add_symbols): Permit multiple definitions of a symbol
4862 as the AIX linker seems to do.
4863
4864 Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
4865
4866 * evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
4867 (evax_initialize): Remove evax_reloc_table.
4868 (evax_close_and_cleanup): Ditto.
4869 (reloc_nil): Ditto.
4870 (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
4871 entries.
4872 (evax_bfd_reloc_type_lookup): Ditto.
4873 * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
4874 cooked_size == raw_size.
4875 * evax-emh.c (_bfd_evax_register_filename): Remove.
4876 * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
4877 * evax-misc.c (add_new_contents): Malloc section at full size.
4878 (_bfd_save_evax_section): Memcpy section contents directly.
4879 * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
4880 (evax_reloc_table): Remove.
4881
4882 * hosts/alphavms.h (O_ACCMODE): Define if needed.
4883
4884 * makefile.vms: Add better support for DEC C compilation
4885 Add evax.h dependencies
4886
4887 * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
4888 (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
4889 (BFD_RELOC_ALPHA_BASEREG): Remove.
4890 * bfd-in2.h, libbfd.h: Rebuild.
4891
4892 Thu Aug 8 08:17:32 1996 Stu Grossman (grossman@critters.cygnus.com)
4893
4894 * archive.c (bsd_write_armap): Ifdef around calls to getuid and
4895 getgid if _WIN32 is defined.
4896 * opncls.c (bfd_fdopenr): Remove unnecessary WINGDB ifdef.
4897
4898 Wed Aug 7 23:19:00 1996 Stu Grossman (grossman@critters.cygnus.com)
4899
4900 * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
4901 Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
4902 include file.
4903 * libbfd.c: Create dummy getpagesize() macro if HAVE_GETPAGESIZE
4904 isn't defined.
4905
4906 Wed Aug 7 14:11:44 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
4907
4908 * configure.in: Call BFD_NEEDED_DECLARATION on strstr and
4909 realloc.
4910 * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
4911 (NEED_DECLARATION_REALLOC): New macro.
4912 * configure, config.in: Rebuild.
4913 * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
4914 (realloc): Declare if NEED_DECLARATION_REALLOC.
4915
4916 * aclocal.m4 (BFD_NEED_DECLARATION): Include <string.h> or
4917 <strings.h> if they exist.
4918
4919 * ieee.c (ieee_set_section_contents): Cast bfd_alloc return.
4920
4921 Wed Aug 7 12:12:03 1996 Ian Lance Taylor <ian@cygnus.com>
4922
4923 * cpu-i386.c (i8086_arch): Architecture info for the i8086.
4924
4925 Based on patches from Eric Valette <valette@crf.canon.fr>:
4926 * elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
4927 LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
4928 (elf_howto_table): Add entries for new relocs.
4929 (elf_i386_reloc_type_lookup): Handle new relocs.
4930 (elf_i386_info_to_howto): Just call abort.
4931 (elf_i386_info_to_howto_rel): Check that the reloc type is valid.
4932 (elf_i386_relocate_section): Likewise.
4933
4934 Tue Aug 6 12:54:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
4935
4936 * elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
4937
4938 Mon Aug 5 13:42:41 1996 Ian Lance Taylor <ian@cygnus.com>
4939
4940 * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
4941 only get the LMA from the phdr if they are in the same part of the
4942 file.
4943
4944 * elf.c (map_sections_to_segments): Rewrite tests for starting a
4945 new segment to make them more comprehensible. If the relationship
4946 between the LMA and the VMA changed, start a new segment. Don't
4947 check dynsec when deciding whether to start a new segment for a
4948 writeable section; -N will now handle this.
4949
4950 Thu Aug 1 22:43:08 1996 Jeffrey A Law (law@cygnus.com)
4951
4952 * libhppa.h: Remove "esel" changes. Not the right approach.
4953 * som.c: Corresponding changes.
4954 (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
4955 which don't have a SOM symbol type associated with them.
4956 Reverses a 1994 change.
4957
4958 Wed Jul 31 15:50:55 1996 Ian Lance Taylor <ian@cygnus.com>
4959
4960 Make ld -N more reasonable for ELF:
4961 * elf.c (map_sections_to_segments): If D_PAGED is not set, set
4962 phdr_in_section to false, and always use a single load segment.
4963 (elf_sort_sections): Sort sections by LMA after VMA.
4964 (assign_file_positions_for_segments): If D_PAGED is not set, don't
4965 align to maxpagesize.
4966 (assign_file_positions_except_relocs): Likewise.
4967 * elfcode.h (elf_object_p): If a section is loaded but not page
4968 aligned, clear D_PAGED.
4969
4970 Wed Jul 31 15:00:12 1996 James G. Smith <jsmith@cygnus.co.uk>
4971
4972 * reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
4973 Added, for internal use by the ARM gas.
4974 * libbfd.h: Rebuilt
4975 * bfd-in2.h: Rebuilt
4976
4977 Tue Jul 30 14:14:57 1996 Jeffrey A Law (law@cygnus.com)
4978
4979 * libhppa.h (R_HPPA_ESEL): New field selector.
4980 (e_esel): Similarly.
4981 * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
4982 then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
4983 (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
4984
4985 Tue Jul 30 13:31:27 1996 Ian Lance Taylor <ian@cygnus.com>
4986
4987 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
4988 archive search before looking for stripped dynamic objects.
4989
4990 Fri Jul 26 17:51:39 1996 Ian Lance Taylor <ian@cygnus.com>
4991
4992 * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
4993 symbol a warning rather than an error.
4994
4995 Wed Jul 24 12:02:53 1996 Ian Lance Taylor <ian@cygnus.com>
4996
4997 * elf.c (assign_file_positions_for_segments): Track the virtual
4998 memory position separately from the file position, and use it to
4999 compute the alignment adjustment.
5000
5001 Tue Jul 23 10:43:31 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
5002
5003 * elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
5004 and fixed mask on R_D10V_10_PCREL_L.
5005
5006 Mon Jul 22 15:30:30 1996 Ian Lance Taylor <ian@cygnus.com>
5007
5008 * elf64-mips.c: Include "aout/ar.h".
5009 (mips_elf64_slurp_armap): New static function.
5010 (mips_elf64_write_armap): New static function.
5011 (bfd_elf64_archive_*): Define.
5012 * elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
5013 Use instead of bfd_generic_archive_p.
5014 (bfd_elfNN_write_archive_contents): Define if not defined. Use
5015 instead of _bfd_write_archive_contents.
5016 (bfd_elfNN_mkdarchive): Define if not defined. Use instead of
5017 _bfd_generic_mkarchive.
5018 (TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
5019 bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
5020 _bfd_archive_coff.
5021 (TARGET_LITTLE_SYM): Likewise.
5022 * archive.c (bfd_slurp_armap): Check for and reject an archive map
5023 name of /SYM64/.
5024 * Makefile.in: Rebuild dependencies.
5025
5026 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
5027 SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
5028 SHT_MIPS_EVENTS sections.
5029 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
5030 SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
5031 sections.
5032 (_bfd_mips_elf_fake_sections): Likewise.
5033
5034 * libecoff.h (ecoff_data_type): Add rdata_in_text field.
5035 * ecoff.c (ecoff_compute_section_file_positions): Copy
5036 rdata_in_text from backend info to tdata. Clear it if any data
5037 section comes before .rdata.
5038 (_bfd_ecoff_write_object_contents): Use rdata_in_text field in
5039 tdata rather than backend info.
5040
5041 Fri Jul 19 18:15:51 1996 Ian Lance Taylor <ian@cygnus.com>
5042
5043 * configure.in: Fix test for whether a compiler has a 64 bit
5044 type. From Jim Wilson <wilson@cygnus.com>.
5045
5046 Thu Jul 18 15:39:10 1996 Ian Lance Taylor <ian@cygnus.com>
5047
5048 * configure.host (mips-sgi-irix6*): New host.
5049
5050 * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
5051 (replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
5052 BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT. Add bfd-in2.h:bfd-in2.h
5053 to AC_OUTPUT call.
5054 * configure: Rebuild.
5055 * bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
5056 (BFD_HOST_64_BIT): Define conditionally.
5057 (BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
5058 (bfd_vma): Typedef as BFD_HOST_U_64_BIT.
5059 (symvalue, bfd_size_type): Likewise.
5060 * bfd-in2.h: Rebuild.
5061 * Makefile.in (do_clean): Remove bfd-tmp.h.
5062 (do_distclean): Remove bfd-in3.h.
5063 (stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
5064 (bfd-in3.h): New target.
5065
5066 * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec. From
5067 Andrew Gierth <ANDREWG@microlise.co.uk>.
5068
5069 * configure.host: Set INSTALL_SHLIB.
5070 * configure.in: Call AC_SUBST (INSTALL_SHLIB).
5071 * configure: Rebuild.
5072 * Makefile.in (install): Use @INSTALL_SHLIB@.
5073
5074 * config.bfd (mips*-*-irix6*): New target.
5075 * configure.host: Handle Irix 6 shared library like Irix 5.
5076
5077 * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
5078 symbol for a magic name.
5079 (xcoff_link_input_bfd): Don't change the reloc symbol for an
5080 XMC_TD symbol.
5081 (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
5082 XMC_TD symbol.
5083
5084 Thu Jul 18 11:36:31 1996 Stan Shebs <shebs@andros.cygnus.com>
5085
5086 * mpw-config.in: Add ELF support to mips config, create the
5087 elf32-target.h file in the object dir.
5088 * mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
5089
5090 Wed Jul 17 18:02:32 1996 Kim Knuttila <krk@cygnus.com>
5091
5092 * coff-ppc.c: Redid debug scheme - numerous fprintf's gone.
5093 Also removed most abort calls, in favor of using bfd reporting.
5094
5095 Wed Jul 17 14:51:52 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
5096
5097 * Makefile.in (ALL_MACHINES): Add cpu-d10v.o.
5098 (BFD32_BACKENDS) Add elf32-d10v.o.
5099 * archures.c: Add bfd_d10v_arch.
5100 * bfd-in2.h: Add bfd_d10v_arch.
5101 * config.bfd (d10v-*-*): New target.
5102 * configure: (bfd_elf32_d10v_vec) New vector.
5103 * configure.in: (bfd_elf32_d10v_vec) New vector.
5104 * cpu-d10v.c: New file.
5105 * elf.c (prep_headers): Added case bfd_arch_d10v.
5106 * elf32-d10v.c: New file.
5107 * libbfd.h: Rebuild.
5108 * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
5109 BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
5110 * targets.c (bfd_elf32_d10v_vec): New vector.
5111
5112 Wed Jul 17 10:58:55 1996 Kim Knuttila <krk@cygnus.com>
5113
5114 * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
5115
5116 Tue Jul 16 23:49:02 1996 Stu Grossman (grossman@critters.cygnus.com)
5117
5118 * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
5119 bfd_mach_i386_i8086 machine types.
5120
5121 Wed Jul 10 12:42:56 1996 Ian Lance Taylor <ian@cygnus.com>
5122
5123 * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
5124 and _FINI sections.
5125
5126 Wed Jul 10 11:18:21 1996 Richard Henderson <rth@tamu.edu>
5127
5128 * coffcode.h (coff_set_section_contents): A/UX does not require
5129 special handling of the _LIB section.
5130
5131 Tue Jul 9 15:52:20 1996 Jeffrey A Law (law@cygnus.com)
5132
5133 * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
5134 value for R_RELBYTE.
5135
5136 * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
5137 array if one was allocated.
5138
5139 Tue Jul 9 12:21:54 1996 Ian Lance Taylor <ian@cygnus.com>
5140
5141 From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
5142 * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
5143 use_rld_obj_head and rld_value.
5144 (mips_elf_link_hash_table_create): Initialize new fields.
5145 (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
5146 dynamic.
5147 (mips_elf_create_dynamic_sections): Create .rld_map section. If
5148 __rld_obj_head symbol not seen, create an __rld_map symbol.
5149 (mips_elf_size_dynamic_sections): Make space in .rld_map section.
5150 Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
5151 (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
5152 __rld_obj_head symbol.
5153 (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
5154
5155 Mon Jul 8 16:18:03 1996 Ian Lance Taylor <ian@cygnus.com>
5156
5157 * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
5158
5159 * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
5160 ppc_elf_addr16_ha_reloc.
5161 (ppc_elf_addr16_ha_reloc): New static function.
5162
5163 * coff-mips.c (struct mips_hi): Define.
5164 (mips_refhi_list): New static variable.
5165 (mips_refhi_addr, mips_refhi_addend): Remove.
5166 (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
5167 (mips_reflo_reloc): Process mips_refhi_list.
5168 (mips_relhi_list): New static variable.
5169 (mips_relhi_addr, mips_relhi_addend): Remove.
5170 (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
5171 (mips_rello_reloc): Process mips_relhi_list.
5172 (mips_relocate_section): Permit an arbitrary number of REFHI or
5173 RELHI relocs before the associated REFLO or RELLO reloc.
5174
5175 Fri Jul 5 19:27:49 1996 Ian Lance Taylor <ian@cygnus.com>
5176
5177 * aout-target.h (MY(callback)): Set reloc_count fields.
5178
5179 Thu Jul 4 12:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
5180
5181 * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
5182 sections unless this is a SunOS link.
5183
5184 * VERSION: Set to 2.7.1.
5185
5186 * Released binutils 2.7.
5187
5188 Wed Jul 3 14:59:47 1996 Ian Lance Taylor <ian@cygnus.com>
5189
5190 * i386aout.c: Include "aout/aout64.h".
5191 (i386aout_write_object_contents): New static function.
5192 (MY_write_object_contents): Define.
5193
5194 * netbsd.h (MY(write_object_contents)): Make sure that
5195 adjust_sizes_and_vmas is called before fiddling with the magic
5196 number.
5197
5198 Tue Jul 2 23:30:39 1996 Ian Lance Taylor <ian@cygnus.com>
5199
5200 * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
5201
5202 Sun Jun 30 13:34:33 1996 Ian Lance Taylor <ian@cygnus.com>
5203
5204 * libbfd-in.h (itos, stoi): Don't define.
5205 * libbfd.h: Rebuild.
5206 * i386lynx.c (KEEPIT): Define as udata.i.
5207 (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
5208 (NAME(lynx,swap_ext_reloc_out)): Likewise.
5209 * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
5210 flags. Don't use stoi.
5211
5212 * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
5213
5214 * elf.c (map_sections_to_segments): Don't start a new segment for
5215 a writable section if it's on the same page as the previous
5216 segment. Reset the writable variable for a readonly section.
5217
5218 Sat Jun 29 16:18:51 1996 Kim Knuttila <krk@cygnus.com>
5219
5220 * peicode.h (coff_swap_aouthdr_in): Missing initializations of
5221 first_thunk_address, thunk_size, and import_table_size.
5222 * peicode.h: Improved some diagnostics regarding edata sections.
5223
5224 * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
5225 on IMGLUE relocs.
5226 (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
5227 (TARGET_LITTLE_SYM): Added missing D_PAGED.
5228
5229 Fri Jun 28 13:48:45 1996 Ian Lance Taylor <ian@cygnus.com>
5230
5231 * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
5232 with XCOFF_DEF_DYNAMIC set is really defined.
5233 (xcoff_link_check_dynamic_ar_symbols): Likewise.
5234 (xcoff_link_add_symbols): Only create special sections if using an
5235 XCOFF hash table.
5236
5237 * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
5238 aixcoff-rs6000.
5239 (bfd_install_relocation): Likewise.
5240
5241 Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
5242
5243 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
5244 field.
5245 (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
5246 (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
5247 (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
5248 (elf64_alpha_link_hash_newfunc): Initialize flags field.
5249 (elf64_alpha_check_relocs): Record types of LITUSE entries that
5250 are found for LITERAL relocs.
5251 (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
5252 taken, we cannot generate a .plt entry for the symbol.
5253
5254 Thu Jun 27 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
5255
5256 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
5257 sysconf functions (for gprof).
5258 * configure, config.in: Rebuild.
5259
5260 Wed Jun 26 16:29:02 1996 Ian Lance Taylor <ian@cygnus.com>
5261
5262 * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
5263 an archive if it has a map. If the object file has the wrong
5264 xvec, reject it.
5265
5266 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
5267 BRADDR, SREL16, SREL32, or SREL64 reloc against an external
5268 symbol.
5269 (alpha_relocate_section): Likewise.
5270
5271 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
5272 (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
5273 (coff_swap_sym_out): Use SYMESZ, not sizeof.
5274 (coff_swap_aux_out): Use AUXESZ, not sizeof.
5275 (coff_swap_lineno_out): Use LINESZ, not sizeof.
5276 (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
5277 (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
5278 * peicode.h: Corresponding changes.
5279
5280 Tue Jun 25 15:28:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5281
5282 * elflink.h (elf_create_pointer_linker_section): Comment out code
5283 dealing with making GOT pointers negative of the GOT symbol for
5284 now.
5285
5286 Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
5287
5288 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
5289 increment the .rela.plt size until after we're done creating the
5290 .plt entry.
5291 (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
5292 .rela.plt offset directly rather than calculating it.
5293
5294 Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
5295
5296 * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
5297 Use autoconf-set values.
5298 * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
5299 includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
5300 values.
5301 (docdir): Deleted.
5302 * configure.in (AC_PREREQ): autoconf v2.5 or higher.
5303 * configure: Rebuilt.
5304
5305 Mon Jun 24 22:50:35 1996 Jeffrey A Law (law@cygnus.com)
5306
5307 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
5308 handling code > 1k away.
5309
5310 Mon Jun 24 18:41:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5311
5312 * elflink.h (elf_create_pointer_linker_section): If DEBUG is
5313 defined, output whenever the symbol is updated.
5314
5315 Mon Jun 24 17:58:12 1996 Jouke Numan <jnuman@bazis.nl>
5316
5317 * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
5318 section to 0 if user_set_vma is set.
5319 * elflink.h (elf_bfd_final_link): Likewise.
5320
5321 Sun Jun 23 20:42:51 1996 Doug Evans <dje@canuck.cygnus.com>
5322
5323 Partially undo patch of Jun 20.
5324 * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
5325 (coff_compute_section_file_positions): Likewise.
5326 (coff_write_object_contents): Likewise. Re-add deleted code, but
5327 use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
5328 * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
5329
5330 Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
5331
5332 * config.bfd: Add support for *-*-rtems* configurations.
5333
5334 Fri Jun 21 15:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
5335
5336 * elf.c (prep_headers): Add bfd_arch_alpha case.
5337
5338 Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
5339
5340 * elf64-alpha.c: New file.
5341 * config.bfd (alpha-*-linuxecoff*): New target.
5342 (alpha-*-linux*, alpha-*-elf*): New targets.
5343 * configure.in (bfd_elf64_alpha_vec): New vector.
5344 * configure: Rebuild.
5345 * targets.c (bfd_elf64_alpha_vec): Declare.
5346 (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
5347 * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
5348 * bfd-in2.h, libbfd.h: Rebuild.
5349 * Makefile.in: Rebuild dependencies.
5350 (BFD64_BACKENDS): Add elf64-alpha.o.
5351 (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
5352
5353 Thu Jun 20 18:14:25 1996 Ian Lance Taylor <ian@cygnus.com>
5354
5355 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
5356 than relying on a right shift of 32.
5357
5358 Thu Jun 20 11:00:57 1996 Doug Evans <dje@canuck.cygnus.com>
5359
5360 * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
5361 ifdef to COFF_WITH_PE.
5362 (coff_compute_section_file_positions): Likewise.
5363 (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
5364 * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
5365 * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
5366 COFF_IMAGE_WITH_PE, always include.
5367
5368 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
5369
5370 Wed Jun 19 11:37:52 1996 Ian Lance Taylor <ian@cygnus.com>
5371
5372 * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
5373 approximate the correct answer if SIZEOF_HEADERS was not used.
5374
5375 * binary.c (binary_set_section_contents): Set section file
5376 position based on LMA rather than VMA.
5377
5378 Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
5379
5380 * linker.c (_bfd_generic_link_output_symbols): Don't output any
5381 symbols if info->strip == strip_all.
5382
5383 Tue Jun 18 15:17:36 1996 Jeffrey A. Law <law@rtl.cygnus.com>
5384
5385 * coff-h8300.c: Remove #if 0 code.
5386 (compatable): Don't allow mixing/matching of different architectures.
5387
5388 * archures.c (bfd_mach_h8300s): Add.
5389 * bfd-in2.h: Rebuilt.
5390 * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
5391 (BADMAG): Likewise.
5392 (h8300_reloc16_estimate): Likewise.
5393 (h8300_reloc16_extra_cases): Likewise.
5394 (h8300_bfd_link_add_symbols): Likewise.
5395 * coffcode.h (coff_set_arch_mach_hook): Likewise.
5396 (coff_set_flags): Likewise.
5397 * cpu-h8300.c (h8300_scan): Likewise.
5398 Add H8/S to bfd_h8300_arch list.
5399
5400 Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
5401
5402 Added support for Alpha OpenVMS:
5403 * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
5404 * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
5405 * config.h-vms, makefile.vms: New files.
5406 * config.bfd (alpha-*-*vms*): New target.
5407 * configure.in (evax_alpha_vec): New target vector.
5408 * configure: Rebuild.
5409 * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
5410 (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
5411 * targets.c (bfd_target_evax_flavour): Define.
5412 (evax_alpha_vec): Declare.
5413 (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
5414 if BFD64 is defined.
5415 * bfd-in2.h, libbfd.h: Rebuild.
5416 * Makefile.in: Rebuild dependencies.
5417 (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
5418 evax-emh.o, and evax-misc.o.
5419 (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
5420 evax-etir.c, evax-emh.c, and evax-misc.c.
5421 (HFILES): Add evax.h.
5422
5423 Tue Jun 18 13:54:18 1996 Ian Lance Taylor <ian@cygnus.com>
5424
5425 * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
5426 pointer.
5427 (h8300_bfd_link_add_symbols): Likewise.
5428
5429 Mon Jun 17 10:06:50 1996 Jeffrey A. Law <law@rtl.cygnus.com>
5430
5431 * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
5432 * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
5433
5434 Mon Jun 17 12:49:11 1996 Ian Lance Taylor <ian@cygnus.com>
5435
5436 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
5437 for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
5438 created.
5439 (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
5440 R_MIPS_32 relocs if creating a shared library.
5441
5442 Thu Jun 13 20:14:51 1996 Doug Evans <dje@canuck.cygnus.com>
5443
5444 * peicode.h (add_data_entry): Use pei_section_data rather than
5445 _cooked_size. Corresponds to May 13 change in coffcode.h.
5446
5447 Thu Jun 13 10:23:40 1996 Ian Lance Taylor <ian@cygnus.com>
5448
5449 * cofflink.c (_bfd_coff_final_link): Handle long section names.
5450 * coffcode.h (coff_write_object_contents): If there are long
5451 section names, always set the f_symptr field, even if there are no
5452 symbols.
5453 * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
5454 if there are no symbols.
5455
5456 * coffgen.c (make_a_section_from_file): Check return value of
5457 _bfd_coff_read_string_table.
5458 (coff_real_object_p): Check return value of
5459 make_a_section_from_file.
5460 (_bfd_coff_read_string_table): Check that there are some symbols
5461 before trying to read the string table size.
5462
5463 Wed Jun 12 11:16:37 1996 Ian Lance Taylor <ian@cygnus.com>
5464
5465 * xcofflink.c (xcoff_link_add_symbols): When considering whether
5466 to replace a symbol in a dynamic object with a symbol from another
5467 dynamic object, do the replacement if the existing symbol is
5468 global linkage code.
5469
5470 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
5471 for _ptrgl, and treat it as global linkage code.
5472
5473 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
5474 filename or N_SO symbol past the offset, and use it to indicate
5475 that there is no line number or function when appropriate.
5476
5477 Tue Jun 11 15:24:48 1996 Ian Lance Taylor <ian@cygnus.com>
5478
5479 * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
5480 common symbol defined by the linker. Don't export function code
5481 even if export_defineds is set.
5482
5483 Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
5484
5485 * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
5486 and R_JMP_DEL.
5487 (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
5488 (h8300_symbol_address_p): New function.
5489 (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
5490 relaxing.
5491
5492 Sun Jun 9 16:30:20 1996 Jeffrey A Law (law@cygnus.com)
5493
5494 * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
5495 problems.
5496 (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
5497 correctly for the two variants. Allow relaxing if the target
5498 is 128 bytes away since after relaxation it'll be 126 bytes away.
5499 (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
5500 "dot" and "value". Allow relaxing if the target is 128 bytes
5501 away since after relaxation it'll be 126 bytes away.
5502 * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
5503 the given section until nothing changes.
5504
5505 Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
5506
5507 * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
5508 alignment hack--we can get the lnnoptr info another way without
5509 suddenly increasing the alignment requirements. Set the flags for
5510 the _PDATA section.
5511 (ecoff_compute_section_file_positions): Do so.
5512
5513 Thu Jun 6 11:24:37 1996 Ian Lance Taylor <ian@cygnus.com>
5514
5515 * ieee.c (ieee_write_object_contents): Put a timestamp in the file
5516 to keep the HP emulator database happy.
5517
5518 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
5519 From Kevin Buettner <kev@primenet.com>.
5520
5521 Wed Jun 5 15:16:04 1996 Ian Lance Taylor <ian@cygnus.com>
5522
5523 * aoutx.h (translate_to_native_sym_flags): Don't try to print the
5524 name of a NULL section.
5525
5526 Tue Jun 4 18:53:58 1996 Ian Lance Taylor <ian@cygnus.com>
5527
5528 * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
5529 set, always call the notice callback.
5530
5531 * VERSION: Increment for bfdlink.h change.
5532
5533 Mon Jun 3 11:01:53 1996 Ian Lance Taylor <ian@cygnus.com>
5534
5535 * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
5536 (sh_relax_delete_bytes): Correct handling of differently sized
5537 trailing alignment reloc.
5538
5539 * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
5540 * bfd-in2.h: Rebuild.
5541 * configure.in: Warn if there is no known 64 bit type.
5542 * configure: Rebuild.
5543
5544 * Makefile.in: Rebuild dependencies.
5545 (BFD32_BACKENDS): Add ppcboot.o.
5546 (BFD32_BACKENDS_CFILES): Add ppcboot.c.
5547
5548 * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
5549 From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
5550
5551 Sat Jun 1 21:49:58 1996 Ian Lance Taylor <ian@cygnus.com>
5552
5553 * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
5554 (bfd_mips_elf64_swap_reginfo_out): Move from here...
5555 * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
5556 (bfd_mips_elf64_swap_reginfo_out): ...to here.
5557
5558 Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
5559
5560 * elf64-mips.c: Improve reloc special_functions and handling of
5561 SHT_MIPS_OPTIONS section.
5562 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
5563 mips_elf_hi16_reloc and make globally visible.
5564 (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
5565 make globally visible.
5566 (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
5567 make globally visible.
5568 (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
5569 and make globally visible.
5570 (gprel16_with_gp): Check howto->src_mask before using value in
5571 insn.
5572 (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
5573 and make globally visible.
5574 (gprel32_with_gp): Check howto->src_mask before fetching value.
5575 (bfd_mips_elf_swap_options_in): New function.
5576 (bfd_mips_elf_swap_options_out): New function.
5577 (_bfd_mips_elf_set_private_flags): Rename from
5578 mips_elf_set_private_flags and make globally visible.
5579 (_bfd_mips_elf_copy_private_bfd_data): Rename from
5580 mips_elf_copy_private_bfd_data and make globally visible.
5581 (_bfd_mips_elf_merge_private_bfd_data): Rename from
5582 mips_elf_merge_private_bfd_data and make globally visible.
5583 (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
5584 for a SHT_MIPS_OPTIONS section.
5585 (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
5586 (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
5587 name of a SHT_MIPS_OPTIONS section.
5588 (_bfd_mips_elf_set_section_contents): New function.
5589 (mips_elf32_section_processing): Set the GP value in a
5590 SHT_MIPS_OPTIONS section.
5591 (_bfd_mips_elf_find_nearest_line): Rename from
5592 mips_elf_find_nearest_line and make globally visible.
5593 (bfd_elf32_set_section_contents): Define.
5594 * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
5595 (_bfd_mips_elf_lo16_reloc): Declare.
5596 (_bfd_mips_elf_gprel16_reloc): Declare.
5597 (_bfd_mips_elf_got16_reloc): Declare.
5598 (_bfd_mips_elf_gprel32_reloc): Declare.
5599 (_bfd_mips_elf_set_private_flags): Declare.
5600 (_bfd_mips_elf_copy_private_bfd_data): Declare.
5601 (_bfd_mips_elf_merge_private_bfd_data): Declare.
5602 (_bfd_mips_elf_find_nearest_line): Declare.
5603 (_bfd_mips_elf_set_section_contents): Declare.
5604
5605 * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
5606 elf_info_to_howto.
5607 (elf_info_to_howto): Define.
5608 * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
5609 elf_info_to_howto.
5610 (elf_info_to_howto): Define.
5611 * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
5612 elf_info_to_howto.
5613 (elf_info_to_howto): Define.
5614
5615 * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
5616 R_MOV16B[12], to match change in coff/internal.h.
5617
5618 Thu May 30 12:38:49 1996 Ian Lance Taylor <ian@cygnus.com>
5619
5620 * elf64-mips.c: Extensive additions to provide better support for
5621 writing files and for gas.
5622 * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
5623 of mips_elf_object_p.
5624 (mips_elf32_object_p): Rename from mips_elf_object_p; call
5625 _bfd_mips_elf_object_p.
5626 (_bfd_mips_elf_final_write_processing): Rename from
5627 mips_elf_final_write_processing and make globally visible.
5628 (_bfd_mips_elf_fake_sections): Rename from
5629 mips_elf_fake_sections and make globally visible.
5630 (_bfd_mips_elf_section_from_bfd_section): Rename from
5631 mips_elf_section_from_bfd_section and make globally visible.
5632 (_bfd_mips_elf_section_processing): New function, broken out of
5633 mips_elf_section_processing.
5634 (mips_elf32_section_processing): Rename from
5635 mips_elf_section_processing; call
5636 _bfd_mips_elf_section_processing.
5637 (_bfd_mips_elf_symbol_processing): Rename from
5638 mips_elf_symbol_processing and make globally visible.
5639 (_bfd_mips_elf_read_ecoff_info): Rename from
5640 mips_elf_read_ecoff_info and make globally visible.
5641 (mips_elf32_ecoff_debug_swap): Rename from
5642 mips_elf_ecoff_debug_swap.
5643 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
5644 struct symbol_cache_entry.
5645 (_bfd_elf_validate_reloc): New function, moved in from
5646 elfcode.h:validate_reloc.
5647 * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
5648 to _bfd_elf_validate_reloc. Change all callers.
5649 * elf-bfd.h (bfd_section_from_shdr): Declare.
5650 (_bfd_elf_symbol_from_bfd_symbol): Declare.
5651 (_bfd_elf_validate_reloc): Declare.
5652 (_bfd_mips_elf_object_p): Declare.
5653 (_bfd_mips_elf_fake_sections): Declare.
5654 (_bfd_mips_elf_section_from_bfd_section): Declare.
5655 (_bfd_mips_elf_section_processing): Declare.
5656 (_bfd_mips_elf_symbol_processing): Declare.
5657 (_bfd_mips_elf_read_ecoff_info): Declare.
5658 (_bfd_mips_elf_final_write_processing): Declare.
5659 * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
5660 if already defined.
5661
5662 * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
5663 (mips_elf_final_write_processing): Likewise.
5664
5665 Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
5666
5667 64-bit MIPS ELF ABI objdump support:
5668 * elf64-mips.c: New file.
5669 * Makefile.in: Rebuild dependencies.
5670 (BFD64_BACKENDS): Add elf64-mips.o.
5671 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
5672 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
5673 bfd_elf64_littlemips_vec to targ_selvecs.
5674 (mips*-*-elf*): Likewise.
5675 * confingure.in: Add bfd_elf64_bigmips_vec and
5676 bfd_elf64_littlemips_vec to vector switch.
5677 * configure: Rebuild.
5678 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
5679 broken out of mips_elf_section_from_shdr.
5680 (mips_elf32_section_from_shdr): Rename from
5681 mips_elf_section_from_shdr. Call new function.
5682 (elf_backend_section_from_shdr): Update name of renamed function.
5683 * elf-bfd.h (struct elf_size_info): Change second parameter of
5684 write_out_phdrs to be const. Likewise for second parameter of
5685 swap_symbol_out.
5686 (struct bfd_elf_section_data): Add rel_hdr2 field.
5687 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
5688 (bfd_elf32_swap_symbol_out): Likewise.
5689 (bfd_elf32_swap_reloc_in): Likewise.
5690 (bfd_elf32_swap_reloc_out): Likewise.
5691 (bfd_elf32_swap_reloca_in): Likewise.
5692 (bfd_elf32_swap_reloca_out): Likewise.
5693 (bfd_elf32_swap_phdr_in): Likewise.
5694 (bfd_elf32_swap_phdr_out): Likewise.
5695 (bfd_elf32_swap_dyn_in): Likewise.
5696 (bfd_elf32_swap_dyn_out): Likewise.
5697 (bfd_elf32_slurp_symbol_table): Declare.
5698 (bfd_elf32_write_shdrs_and_ehdr): Declare.
5699 (bfd_elf32_write_out_phdrs): Declare.
5700 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
5701 (bfd_elf64_swap_symbol_out): Likewise.
5702 (bfd_elf64_swap_reloc_in): Likewise.
5703 (bfd_elf64_swap_reloc_out): Likewise.
5704 (bfd_elf64_swap_reloca_in): Likewise.
5705 (bfd_elf64_swap_reloca_out): Likewise.
5706 (bfd_elf64_swap_phdr_in): Likewise.
5707 (bfd_elf64_swap_phdr_out): Likewise.
5708 (bfd_elf64_swap_dyn_in): Likewise.
5709 (bfd_elf64_swap_dyn_out): Likewise.
5710 (bfd_elf64_slurp_symbol_table): Declare.
5711 (bfd_elf64_write_shdrs_and_ehdr): Declare.
5712 (bfd_elf64_write_out_phdrs): Declare.
5713 (_bfd_mips_elf_section_from_shdr): Declare.
5714 * elf.c (bfd_section_from_shdr): Remove assertion requiring
5715 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
5716 section for the section, add the new one to rel_hdr2. Increment
5717 reloc_count rather than setting it.
5718 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
5719 Remove static declaration.
5720 (elf_write_shdrs_and_ehdr): Define name as macro.
5721 (elf_write_out_phdrs): Likewise.
5722 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
5723 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
5724 (elf_swap_symbol_in): Change second parameter to be const.
5725 (elf_swap_symbol_out): Likewise.
5726 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
5727 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
5728 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
5729 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
5730 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
5731 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
5732 parameter to be const. Make non-static.
5733 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
5734 Make non-static.
5735 (elf_slurp_symbol_table): Make non-static.
5736 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
5737 * elfxx-target.h (elf_info_to_howto): Define if not defined.
5738 (elf_backend_size_info): Likewise.
5739 (elfNN_bed): Use elf_backend_size_info.
5740 * targets.c (bfd_elf64_bigmips_vec): Declare.
5741 (bfd_elf64_littlemips_vec): Declare.
5742 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
5743 bfd_elf64_littlemips_vec if BFD64 is defined.
5744
5745 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
5746
5747 Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
5748
5749 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
5750 zeroes, in alignment holes.
5751
5752 * configure: Rebuild with autoconf 2.10.
5753
5754 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
5755 potential leading underscore in the allocated buffer.
5756
5757 Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5758
5759 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
5760 symbols into .sbss if this is a relocatable link.
5761
5762 Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
5763
5764 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
5765 undefined symbols when creating a shared library.
5766
5767 Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
5768
5769 * coff-sh.c: Add a bunch of new code and static const arrays to
5770 support aligning loads and stores on four byte memory boundaries.
5771 Also:
5772 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
5773 R_SH_LABEL.
5774 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
5775 call sh_align_loads.
5776 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
5777 as unused.
5778
5779 Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
5780
5781 * cache.c (bfd_open_file): Unlink the file before opening it for
5782 write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
5783
5784 * opncls.c (bfd_fdopenr): Set opened_once.
5785
5786 Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
5787
5788 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
5789 freeing it.
5790
5791 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
5792 the code unconditionally.
5793
5794 Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
5795
5796 * libcoff-in.h (struct pei_section_tdata): Define structure.
5797 (pei_section_data): Define macro.
5798 * libcoff.h: Rebuild.
5799 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
5800 store s_paddr field in pei_section_data.
5801 (coff_compute_section_file_positions): Use pei_section_data rather
5802 than _cooked_size, and don't overwrite an existing value.
5803 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
5804 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
5805 * peicode.h (coff_bfd_copy_private_section_data): Define if
5806 COFF_IMAGE_WITH_PE.
5807 (pe_bfd_copy_private_section_data): New static function if
5808 COFF_IMAGE_WITH_PE.
5809
5810 Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
5811
5812 * srec.c (srec_set_arch_mach): Write as a function rather than a
5813 macro definition.
5814
5815 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
5816 no map, just check each member in turn to see whether it is
5817 required.
5818
5819 Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5820
5821 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
5822 table. Call BFD_ASSERT to validate header size, instead of
5823 calling fatal.
5824 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
5825 name.
5826
5827 Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5828
5829 * ppcboot.c: New target for looking at PPCbug boot records.
5830
5831 * config{ure.in,.bfd}: Add support for ppcboot target.
5832 * targets.c: Ditto.
5833 * configure: Regenerate.
5834
5835 Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
5836
5837 * coff-h8300.c (howto_table): Update names to match recent
5838 changes to include/coff/internal.h. Fix minor errors in the
5839 existing relocs. Add R_MOVL1 and R_MOVL2.
5840 (rtype2howto): Similarly.
5841 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
5842 existing relaxing code and peform more relaxing.
5843 (h8300_reloc16_extra_cases): Likewise.
5844
5845 Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
5846
5847 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
5848 symbols correctly.
5849
5850 Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
5851
5852 * elfcode.h (elf_object_p): Reject generic ELF target if
5853 e_machine matches an alternate machine code in a specific backend.
5854
5855 * netbsd-core.c (netbsd_core_vec): Remove initializer for
5856 obsolete align_power_min field.
5857
5858 Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
5859
5860 * coff-h8300.c (reloc_howto_type): Add howto entry for
5861 R_PCRWORD_B.
5862 (rtype2howto): Handle R_PCRWORD_B.
5863 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
5864 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
5865 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
5866 branch (R_PCWORD_B).
5867
5868 Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
5869
5870 * aoutx.h (translate_from_native_sym_flags): Set the section for
5871 BSF_CONSTRUCTOR symbols.
5872
5873 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
5874 last_bf_index.
5875
5876 Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
5877
5878 * coffcode.h (coff_write_object_contents): In comdat section lookup,
5879 stop looking when section is found.
5880
5881 Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
5882
5883 * coffcode.h (STRING_SIZE_SIZE): Define.
5884 (styp_to_sec_flags): Handle long symbol names when looking for the
5885 section symbol.
5886 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
5887 (bfd_coff_long_section_names): Define.
5888 (coff_write_object_contents): Handle long section names.
5889 (bfd_coff_std_swap_table): Initialize new field.
5890 * libcoff.h: Rebuild.
5891 * coffgen.c (make_a_section_from_file): Handle long section
5892 names.
5893 (coff_write_symbols): Handle long section names.
5894 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
5895 * coff-mips.c (mips_ecoff_backend_data): Likewise.
5896 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
5897 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
5898 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
5899 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
5900 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
5901 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
5902
5903 * bout.c (b_out_callback): Set lma of sections.
5904 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
5905 parameter to output_bfd. Used input_bfd instead of output_bfd in
5906 several places.
5907
5908 Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
5909
5910 * aoutx.h (translate_from_native_sym_flags): Don't create
5911 SEC_CONSTRUCTOR sections.
5912 * ecoff.c (ecoff_set_symbol_info): Likewise.
5913
5914 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
5915 From Don Bowman <bowman@waterloo.hp.com>.
5916
5917 Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
5918
5919 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
5920 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
5921
5922 Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
5923
5924 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
5925 mips_32_relocs field.
5926 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
5927 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
5928 relocs against a global symbol which is not defined in a regular
5929 file.
5930 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
5931 against a global symbol, increment mips_32_relocs.
5932 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
5933 the symbol is not defined in a regular file, make room in the
5934 .rel.dyn section.
5935
5936 Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
5937
5938 * ecoff.c (ecoff_compute_section_file_positions): Track the real
5939 file position and the virtual file position separately. Set
5940 filepos information bsaed on the real file position.
5941 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
5942 Jan 23 change to coffcode.h.
5943
5944 * som.c (som_slurp_symbol_table): Set the symbol count to the
5945 number of BFD symbols created.
5946
5947 Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5948
5949 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
5950 output file if linking shared objects. Loop to check all relocs,
5951 rather than returning false on first error.
5952
5953 Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5954
5955 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
5956 (ppc_elf_additional_program_headers): If .interp section, bump #
5957 of program headers by 1.
5958 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
5959 (ppc_elf_size_dynamic_sections): Add support for .plt section.
5960 (ppc_elf_check_relocs): Print out filename in debug code. Enable
5961 PLT support.
5962 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
5963 debug output.
5964 (ppc_elf_relocate_section): If the output section isn't defined,
5965 don't abort, just give an error message.
5966
5967 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
5968 being created is .sdata or .sdata2, don't make the symbol dynamic.
5969
5970 Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
5971
5972 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
5973 members of an archive for dynamic objects with no symbols, and
5974 pass them directly to check_archive_element.
5975 (xcoff_link_check_ar_symbols): Pass dynamic objects to
5976 xcoff_link_check_dynamic_ar_symbols.
5977 (xcoff_link_check_dynamic_ar_symbols): New static function.
5978
5979 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
5980 from _bfd_nodynamic to _bfd_xcoff.
5981 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
5982 Declare.
5983 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
5984 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
5985 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
5986 * libcoff.h: Rebuild.
5987 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
5988 (xcoff_get_section_contents): New static function.
5989 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
5990 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
5991 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
5992 (xcoff_dynamic_reloc): New static variable.
5993 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
5994 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
5995
5996 Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
5997
5998 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
5999 if reloc_entry->addend is not 0.
6000 (CALC_ADDEND): Just set the addend to reloc.r_offset.
6001
6002 Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
6003
6004 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
6005 R_SPARC_GLOB_JMP.
6006 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
6007 Add entries for R_SPARC_[56].
6008 (sparc_reloc_map): Add entries for R_SPARC_[56].
6009
6010 Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
6011
6012 Optimize linking of stabs in sections as used in ELF and COFF.
6013 * stabs.c: New file.
6014 * libbfd-in.h (_bfd_link_section_stabs): Declare.
6015 (_bfd_write_section_stabs): Declare.
6016 (_bfd_write_stab_strings): Declare.
6017 * libbfd.h: Rebuild.
6018 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
6019 (struct coff_link_hash_table): Add stab_info field.
6020 * libcoff.h: Rebuild.
6021 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
6022 stab_info field.
6023 (coff_link_add_symbols): Call _bfd_link_section_stabs if
6024 appropriate.
6025 (_bfd_coff_final_link): Write out stab strings hash table.
6026 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
6027 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
6028 hash table.
6029 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
6030 (struct bfd_elf_section_data): Add stab_info field.
6031 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
6032 field.
6033 * elflink.h (elf_link_add_object_symbols): If appropriate, call
6034 _bfd_link_section_stabs.
6035 (elf_bfd_final_link): Write out stab strings hash table.
6036 (elf_link_input_bfd): Handle optimized stabs sections.
6037 * reloc.c (_bfd_final_link_relocate): Check address against
6038 _raw_size rather than _cooked_size.
6039 * Makefile.in: Rebuild dependencies.
6040 (BFD_LIBS): Add stabs.o
6041 (BFD_LIBS_CFILES): Add stabs.c.
6042
6043 * VERSION: Increment for bfdlink.h change.
6044
6045 * coffgen.c (coff_renumber_symbols): Correct handling of
6046 BSF_NOT_AT_END common symbols.
6047
6048 Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
6049
6050 * coff-ppc.c (record_toc): Add cast to avoid warning.
6051 (ppc_allocate_toc_section): Likewise.
6052 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
6053 (ppc_coff_reloc_type_lookup): Remove unreached code.
6054 * coffcode.h (coff_write_object_contents): Don't take the address
6055 of an array.
6056 * peicode.h (pe_print_idata): Add casts to avoid warning.
6057 (pe_print_edata): Likewise.
6058 (pe_print_reloc): Remove ANSI C string concatenation.
6059
6060 Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
6061
6062 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
6063 and last_bf fields.
6064 * libcoff.h: Rebuild.
6065 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
6066 symbols.
6067 (coff_swap_aux_out): Likewise.
6068 * peicode.h (coff_swap_aux_in): Likewise.
6069 (coff_swap_aux_out): Likewise.
6070 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
6071 symbols.
6072 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
6073 field.
6074 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
6075 Fix up .bf endndx link fields.
6076 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
6077 field.
6078 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
6079 symbols.
6080
6081 Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6082
6083 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
6084 on Solaris PowerPC systems doesn't get confused.
6085
6086 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
6087 #ifdef PPC.
6088
6089 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
6090 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
6091 update did_reg and did_reg2.
6092
6093 Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
6094
6095 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
6096
6097 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
6098 callback routines, pass h->root.string rather than name, in case
6099 copy is true and name is transient.
6100
6101 Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
6102
6103 * elfcore.h: Add support for core files with multiple threads.
6104 (Primarily for Solaris.)
6105
6106 Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
6107
6108 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
6109 section->orelocation is NULL.
6110
6111 * coffgen.c (bfd_coff_get_syment): New function.
6112 (bfd_coff_get_auxent): New function.
6113 * bfd-in.h (bfd_coff_get_syment): Declare.
6114 (bfd_coff_get_auxent): Declare.
6115 * bfd-in2.h: Rebuild.
6116
6117 Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
6118
6119 * elf32-mips.c (struct mips_hi16): Define.
6120 (mips_hi16_addr, mips_hi16_addend): Remove.
6121 (mips_hi16_list): New static variable.
6122 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
6123 (mips_elf_lo16_reloc): Process mips_hi16_list.
6124 (mips_elf_relocate_section): Permit an arbitrary number of HI16
6125 relocs before the associated LO16 reloc.
6126
6127 Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
6128
6129 * versados.c (versados_scan): Check bfd_alloc return value.
6130 (versados_object_p): Check all bfd_read return values. Require
6131 that lang field be less than 10, to avoid confusion with Intel Hex
6132 files.
6133
6134 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
6135 aren't any symbols.
6136 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
6137 not 0, for an absolute symbol.
6138 (NAME(aout,swap_ext_reloc_out)): Likewise.
6139
6140 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
6141 (ihex_write_object_contents): For a large start address, output
6142 the full 32 bit address in record type 5.
6143
6144 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
6145 to int to avoid promotion problems in prototype.
6146
6147 Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
6148
6149 * configure.host: Use ${srcdir} when looking for picfrag.
6150
6151 * configure.host: Switch on ${libdir}, not $(libdir). From
6152 alan@spri.levels.unisa.edu.au (Alan Modra).
6153
6154 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
6155 entry point, not just for DYNAMIC objects.
6156 * sunos.c (sunos_add_dynamic_symbols): Always call
6157 sunos_create_dynamic_sections. If called with a non DYNAMIC
6158 object, don't do anything else.
6159 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
6160
6161 Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
6162
6163 * configure.in: Permit --enable-shared to specify a list of
6164 directories.
6165 * configure: Rebuild.
6166
6167 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
6168 host when configuring with --enable-shard.
6169
6170 Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
6171
6172 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
6173 <jdp@polstra.com>.
6174
6175 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
6176 to avoid crashing in bfd_hash_replace.
6177
6178 * sysdep.h: Use #ifdef, not #if.
6179
6180 Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
6181
6182 * config.in: Rebuild.
6183
6184 Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
6185
6186 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
6187 (AC_CHECK_HEADERS): Check for sys/time.h
6188 (AC_HEADER_TIME): Add macro.
6189 * configure: Rebuild.
6190 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
6191 to control what combination of <time> and <sys/time.h>
6192 get included.
6193
6194 Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
6195
6196 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
6197 (aout_32_sunos4_write_object_contents): Likewise.
6198 * aoutx.h (NAME(aout,machine_type)): Handle
6199 bfd_mach_sparc_{sparclet,sparclite}.
6200 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
6201 (bfd_mach_sparc_v9_p): Update.
6202 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
6203 * libaout.h (enum machine_type): Add M_SPARCLET.
6204 * sunos.c (MACHTYPE_OK): Define.
6205 * bfd-in2.h: Regenerated.
6206
6207 Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
6208
6209 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
6210 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
6211 * elflink.c (_bfd_elf_create_got_section): Store the
6212 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
6213 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
6214 global offset table goes over 0x1000, set the value of
6215 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
6216 (elf32_sparc_relocate_section): Subtract the offset of
6217 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
6218
6219 * elfcode.h: Don't include <string.h>.
6220
6221 Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
6222
6223 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
6224 generic_link_hash_newfunc. All references changed.
6225 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
6226 moved here from libbfd-in.h.
6227 * libbfd-in.h: Corresponding changes.
6228 * libbfd.h: Regenerated.
6229
6230 Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
6231
6232 * aoutx.h (aout_link_input_section_std): When reporting an
6233 overflow error, use the name of the symbol in the hash table if
6234 available.
6235 (aout_link_input_section_ext): Likewise.
6236
6237 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
6238 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
6239
6240 Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
6241
6242 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
6243 * coffcode.h (coff_compute_section_file_positions): Likewise.
6244 (coff_write_object_contents): Likewise.
6245
6246 Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
6247
6248 * section.c (SEC_LINK_ONCE): Define.
6249 (SEC_LINK_DUPLICATES): Define.
6250 (SEC_LINK_DUPLICATES_DISCARD): Define.
6251 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
6252 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
6253 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
6254 * bfd-in2.h: Rebuild.
6255 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
6256 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
6257 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
6258 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
6259 SEC_LINK_ONCE, and look through the symbol table for the setting
6260 for SEC_LINK_DUPLICATES.
6261 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
6262 set for a section, find the section symbol in the symbol table,
6263 and set the aux entry based on SEC_LINK_DUPLICATES.
6264 * coffgen.c (coff_print_symbol): Add a space before "checksum".
6265 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
6266 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
6267 * coff-i386.c (i386coff_vec): Likewise.
6268 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
6269
6270 * VERSION: Bump to 2.6.1.
6271 * Makefile.in (stamp-h): Depend upon VERSION.
6272
6273 Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
6274
6275 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
6276 * libbfd.h: Rebuilt.
6277 * linker.c (generic_link_hash_newfunc): No longer static.
6278 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
6279 to override.
6280 * coff-h8300.c: Add two derived hash tables and their associated
6281 funtions and #defines for use by the h8300 linker.
6282 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
6283 the function vector as needed. Place the address of the function
6284 vector entry in the location specified by the R_MEM_INDIRECT reloc.
6285 Rewrite the vectors section contents as necessary.
6286 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
6287 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
6288 (coff_bfd_link_hash_table_create): Likewise.
6289
6290 Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
6291
6292 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
6293 __attribute__ ((__unused__)) so that -Wall doesn't warn about
6294 them.
6295 (hppa_rebuild_insn): Pass pointer to correct type to
6296 low_sign_unext and dis_assemble_21.
6297
6298 Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
6299
6300 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
6301 Stick with sparc-*-{sysv4*,solaris2*}.
6302
6303 Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
6304
6305 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
6306 (coff_swap_aux_out): Swap out extra PE x_scn fields.
6307 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
6308 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
6309 fields is non-zero, print them.
6310
6311 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
6312 ifdef. Remove unused variables.
6313 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
6314 variables.
6315 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
6316 (get_symbol_value): Ifdef out.
6317 (pe_ppc_reloc): Ifdef out. Remove unused variables.
6318 (coff_ppc_relocate_section): Remove unused variables. Make
6319 fprintf strings and argument types correspond. Put before_addr in
6320 DEBUG_RELOC ifdef.
6321 (dump_toc): Make fprintf strings and argument types correspond.
6322 (ppc_process_before_allocation): Remove unused variables. Always
6323 return a value.
6324 (ppc_reflo_reloc): Ifdef out.
6325 (ppc_addr32nb_reloc): Ifdef out.
6326 (ppc_coff_rtype2howto): Make fprintf strings and argument types
6327 correspond.
6328 (coff_ppc_rtype_to_howto): Likewise.
6329 (ppc_coff_swap_sym_in_hook): Remove unused variables.
6330
6331 * peicode.h (pe_print_idata): Move otherwise unused variables into
6332 the #ifdef where they are used. Always return a value.
6333 (pe_print_edata): Make fprintf strings and argument types
6334 correspond. Always return a value.
6335 (pe_print_pdata): Removed unused variable addr_value. Always
6336 return a value.
6337 (pe_print_reloc): Remove unused variable onaline. Make fprintf
6338 strings and argument types correspond. Always return a value.
6339
6340 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
6341 (ppc_elf_finish_dynamic_symbol): Move definition of unused
6342 variable rela inside #if 0 section where it is used.
6343
6344 * ns32k.h: New file.
6345 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
6346 functions to start with _bfd_.
6347 * aout-ns32k.c: Include ns32k.h. Change references to renamed
6348 functions in cpu-ns32k.h.
6349 * Makefile.in: Rebuild dependencies.
6350 (HFILES): Add ns32k.h.
6351
6352 * section.c (struct sec): Add linker_mark field. Change
6353 user_set_vma and reloc_done to be single bit fields.
6354 (STD_SECTION): Update accordingly.
6355 * bfd-in2.h: Rebuild.
6356 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
6357 link.
6358 (aout_link_input_bfd): Don't link unmarked sections.
6359 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
6360 link.
6361 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
6362 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
6363 the link.
6364 * elflink.h (elf_bfd_final_link): Mark sections included in the
6365 link.
6366 (elf_link_input_bfd): Don't link unmarked sections.
6367 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
6368 in the link.
6369 (xcoff_link_input_bfd): Don't link unmarked sections.
6370
6371 * coffswap.h (coff_swap_scnhdr_out): Include section name in
6372 overflow error messages.
6373
6374 Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
6375
6376 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
6377 is not set, print "BFD: " before the error message.
6378
6379 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
6380 Miles Bader <miles@gnu.ai.mit.edu>.
6381 * configure: Rebuild.
6382
6383 Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
6384
6385 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
6386 symbols.
6387
6388 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
6389 m68k-aout, m68k-coff, and m68k-elf targets.
6390
6391 Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
6392
6393 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
6394 (ieee_generic_stat_arch_elt): Restructured to prevent
6395 ieee_object_p from being called repeatedly.
6396
6397 Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
6398
6399 * coffcode.h (coff_write_object_contents): Allocate
6400 buffers large enough for any FILEHDR or AOUTHDR.
6401
6402 Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
6403
6404 * ecofflink.c (lookup_line): New static function, renamed and
6405 slighly changed from old _bfd_ecoff_locate_line.
6406 (_bfd_ecoff_locate_line): Cache line number information. Use
6407 lookup_line for actual lookup.
6408
6409 Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6410
6411 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
6412 multiple of 20 bytes.
6413
6414 Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
6415
6416 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
6417 allocate ecoff_find_line, and don't initialize by hand.
6418 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
6419 mips_elf_find_line, and don't call memset.
6420
6421 * coffcode.h (coff_compute_section_file_positions): If not
6422 producing a final executable, don't consider sofar when aligning
6423 the section to the correct size.
6424
6425 Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
6426
6427 * coffcode.h (coff_add_missing_symbols): Ifdef out.
6428 (coff_write_object_contents): Don't call coff_add_missing_symbols.
6429 * coffgen.c (coff_section_symbol): Ifdef out.
6430
6431 Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
6432
6433 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
6434 output_bfd is not NULL.
6435
6436 Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
6437
6438 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
6439 of bfd_alloc (fixes fix_line not being initialized).
6440 Delete zeroing of fix_{value,tag,end,scnlen} fields.
6441
6442 Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
6443
6444 * coffcode.h: Allow specific backends to override the
6445 bfd_link_add_symbols routine.
6446
6447 * coff-h8300.c: Include genlink.h.
6448 (howto_table): Add R_MEM_INDIRECT.
6449 (rtype2howto): Support R_MEM_INDIRECT.
6450 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
6451 for now.
6452
6453 Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
6454
6455 * coff-alpha.c (alpha_relocate_section): Use
6456 info->callbacks_warning, rather than _bfd_error_handler, for
6457 "multiple gp" warning.
6458
6459 Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
6460
6461 * linker.c (bfd_wrapped_link_hash_lookup): New function.
6462 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
6463 table string. Use bfd_wrapped_link_hash_lookup.
6464 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
6465 table string.
6466 * aoutx.h (aout_link_write_symbols): Use the name from the hash
6467 table, if any, when writing out symbols.
6468 (aout_link_input_section_std): Use the name from the hash table,
6469 if any, when reporting undefined symbols.
6470 (aout_link_input_section_ext): Likewise.
6471 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
6472 * bout.c (get_value): Likewise.
6473 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
6474 * ecoff.c (ecoff_reloc_link_order): Likewise.
6475 * elflink.h (elf_link_add_object_symbols): Likewise.
6476 (elf_reloc_link_order): Likewise.
6477 * linker.c (_bfd_generic_link_output_symbols): Likewise.
6478 (_bfd_generic_reloc_link_order): Likewise.
6479 (default_indirect_link_order): Likewise.
6480 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
6481 * sunos.c (sunos_add_one_symbol): Likewise.
6482 * xcofflink.c (xcoff_link_add_symbols): Likewise.
6483 (bfd_xcoff_link_count_reloc): Likewise.
6484 (xcoff_reloc_link_order): Likewise.
6485
6486 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
6487 into -1 for intern->rss.
6488
6489 * configure: Rebuild with autoconf 2.8.
6490
6491 Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
6492
6493 * stab-syms.c (__define_stab_duplicate): Define.
6494 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
6495 switch.
6496 * bfd-in.h (bfd_get_stab_name): Declare.
6497 * bfd-in2.h: Rebuild.
6498 * Makefile.in: Rebuild dependencies.
6499 (BFD_LIBS): Add stab-syms.o.
6500 (BFD_LIBS_CFILES): Add stab-syms.c.
6501 (BFD32_BACKENDS): Remove stab-syms.o.
6502 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
6503 * configure.in: Don't list stab-syms.o in bfd_backends.
6504 * configure: Rebuild.
6505 * libaout.h (aout_stab_name): Don't declare.
6506 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
6507 not aout_stab_name.
6508
6509 Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
6510
6511 * elf.c (assign_file_positions_for_segments): Adjust file offset
6512 for section alignment even if SEC_LOAD is not set.
6513
6514 Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
6515
6516 * configure.in: Don't set SHLIB or SHLINK to an empty string,
6517 since they appear as targets in Makefile.in.
6518 * configure: Rebuild.
6519
6520 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
6521 don't fiddle with a symbol which is not defined anywhere.
6522
6523 Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
6524
6525 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
6526 though they are defined in a shared library.
6527 (xcoff_build_ldsyms): Likewise.
6528
6529 * coffgen.c (coff_find_nearest_line): Don't look at the line
6530 numbers for the section if section->lineno is NULL.
6531
6532 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
6533 message rather than calling BFD_ASSERT.
6534 * elfcode.h (write_relocs): Check return value of
6535 _bfd_elf_symbol_from_bfd_symbol.
6536
6537 Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6538
6539 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
6540 for .sbss section.
6541
6542 Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
6543
6544 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
6545 and R_HPPA_NLRSEL.
6546 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
6547 hppa_reloc_field_selector_type_alt.
6548 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
6549 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
6550 selectors.
6551 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
6552
6553 Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
6554
6555 * elf.c (assign_file_positions_for_segments): Adjust the segment
6556 memory size for the alignment of a SEC_ALLOC section, not just a
6557 SEC_LOAD section.
6558
6559 Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6560
6561 * m68klinux.c: New file.
6562 * hosts/m68klinux.h: New file.
6563 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
6564 * configure.in (m68*-*-linux*): New native host.
6565 (m68klinux_vec): New vector.
6566 * configure: Rebuild.
6567 * targets.c (m68klinux_vec): Declare.
6568 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
6569 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
6570 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
6571 declaration from bfd_linux_size_dynamic_sections.
6572 (bfd_m68klinux_size_dynamic_sections): Declare.
6573 * bfd-in2.h: Rebuild.
6574 * Makefile.in: Rebuild dependencies.
6575 (BFD32_BACKENDS): Add m68klinux.o.
6576 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
6577
6578 Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
6579
6580 * libhppa.h (pa_arch): Add pa20.
6581 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
6582 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
6583 (hppa_field_adjust): Handle e_nsel.
6584 * som.c: Provide default definitions for many new relocs found only
6585 in hpux10 include files.
6586 (som_fixup_formats): Add several new relocs from hpux10.
6587 (som_hppa_howto_table): Add hpux10 relocs.
6588 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
6589
6590 Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
6591
6592 * mpw-make.sed: Edit out recent shared library support, and
6593 rules to rebuild .h files using doc/chew.
6594
6595 Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
6596
6597 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
6598 size even of sections with no contents.
6599
6600 Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
6601
6602 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
6603 starting with '$' the way we skip names starting with '.'. When
6604 updating x_endndx, don't be fooled by an index which has been
6605 merged.
6606
6607 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
6608 struct/union/enum type with no elements.
6609
6610 Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
6611
6612 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
6613
6614 * archive.c (bfd_generic_archive_p): If the first file in the
6615 archive can not be recognized as an object, don't assume that this
6616 is the wrong format.
6617
6618 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
6619 format is not bfd_object.
6620 (bfd_elf_get_dt_soname): Likewise.
6621
6622 Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
6623
6624 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
6625 reloc.
6626
6627 Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
6628
6629 * bfd.c (tdata): Add netbsd_core_data.
6630 * bfd-in2.h: Regenerated.
6631
6632 Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
6633
6634 * sunos.c (SUNOS_CONSTRUCTOR): Define.
6635 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
6636 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
6637 appropriate.
6638
6639 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
6640 to get the symbol index, matching 14 Jul 95 change.
6641
6642 Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
6643
6644 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
6645 Remove duplicate definition of gp.
6646
6647 Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
6648
6649 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
6650 assume that we can set the GP value and then get the same value,
6651 since it won't be true if the output file is neither ELF nor
6652 ECOFF.
6653 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
6654 _bfd_get_gp_value here.
6655 (mips_gprel_reloc): Don't assume we can set and get the GP value.
6656 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
6657 mips_elf_final_gp.
6658 (mips_elf_lo16_reloc): Likewise.
6659 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
6660 Don't require that the BFD be ELF.
6661 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
6662 (mips_elf_gprel32_reloc): Likewise.
6663 (mips_elf_relocate_section): Don't assume we can set and get the
6664 GP value.
6665 (mips_elf_finish_dynamic_symbol): Don't bother to use
6666 _bfd_get_gp_value here.
6667
6668 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
6669 Don't change epdr between malloc and free. Be careful not to free
6670 NULL pointers. Zero out the first RPDR.
6671
6672 * configure.host: On Linux, only pass -rpath option if $(libdir)
6673 is neither /lib nor /usr/lib. From Alan Modra
6674 <alan@mullet.Levels.UniSA.Edu.Au>.
6675
6676 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
6677 dt_name.
6678 (elf_dt_name): Rename from elf_dt_needed_name.
6679 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
6680 elf_dt_needed_name.
6681 (bfd_elf_get_dt_soname): New function.
6682 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
6683 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
6684 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
6685 * bfd-in2.h: Rebuild.
6686
6687 Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
6688
6689 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
6690 _bfd_sparc_elf_reloc_type_lookup.
6691 (bfd_elf32_bfd_reloc_type_lookup): Update.
6692 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
6693 (sparc64_elf_howto_table): Define.
6694 (sparc_reloc_map): Define.
6695 (sparc64_elf_reloc_type_lookup): New function.
6696 (sparc_elf_wdisp16_reloc): New function.
6697 (elf_info_to_howto): Use sparc64_elf_howto_table.
6698 (sparc64_elf_relocate_section): Likewise.
6699 (bfd_elf64_bfd_reloc_type_lookup): Update.
6700
6701 Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
6702
6703 * configure.host: Check for 'do not mix' from native linker before
6704 trying to use -rpath.
6705
6706 Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
6707
6708 * bfd.c (_bfd_get_gp_value): New function.
6709 (_bfd_set_gp_value): New function.
6710 * libbfd-in.h (_bfd_get_gp_value): Declare.
6711 (_bfd_set_gp_value): Declare.
6712 * libbfd.h: Rebuild.
6713 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
6714 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
6715 directly to the fields in the tdata information.
6716 (alpha_relocate_section): Likewise.
6717 * coff-mips.c (mips_adjust_reloc_in): Likewise.
6718 (mips_gprel_reloc): Likewise.
6719 (mips_relocate_section): Likewise.
6720 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
6721 (mips_elf_lo16_reloc): Likewise.
6722 (mips_elf_final_gp): Likewise.
6723 (mips_elf_gprel16_reloc): Likewise.
6724 (mips_elf_gprel32_reloc): Likewise.
6725 (mips_elf_relocate_section): Likewise.
6726 (mips_elf_finish_dynamic_symbol): Likewise.
6727
6728 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
6729
6730 Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
6731
6732 * configure.in: Call AC_PROG_CC before configure.host.
6733 * configure: Rebuild.
6734 * configure.host: Don't set information which autoconf should
6735 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
6736
6737 * configure.host: Remove go32 and win32 host information, since it
6738 should no longer be needed.
6739
6740 * elf.c (map_sections_to_segments): If we have a .dynamic section,
6741 then start a new segment rather than put a writable section in a
6742 readonly segment.
6743
6744 * configure.host: Set RPATH_ENVVAR.
6745
6746 * Makefile.in: Rebuild dependencies.
6747
6748 * elflink.c (_bfd_elf_create_linker_section): Remove unused
6749 zero_section variable.
6750
6751 Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
6752
6753 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
6754 ($(srcdir)/libbfd.h): Rename from libbfd.h.
6755 ($(srcdir)/libcoff.h): Rename from libcoff.h.
6756
6757 Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
6758
6759 * ieee.c (ieee_write_expression): Only use an R variable for a
6760 local symbol. Don't output a zero offset. Handle a zero address.
6761 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
6762 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
6763 PCREL_OFFSET.
6764 (parse_expression): Don't try to handle multiple occurrences of a
6765 P variable. Handle I variables differently from X variables. Fix
6766 the order of minus expressions.
6767 (ieee_slurp_external_symbols): Generate an I variable for an NN
6768 record. Fix handling of ATI and ATX records.
6769 (ieee_slurp_sections): Only set minimal section attributes.
6770 Adjust them later, based on the section contents.
6771 (ieee_object_p): Read in the file until just after the ME record.
6772 Call ieee_slurp_section_data to set the section flags.
6773 (do_one): Add iterations parameter. Only repeat the first load
6774 item. Set the section and file reloc flags.
6775 (ieee_slurp_section_data): Set section flags. Pass iterations to
6776 do_one.
6777 (ieee_canonicalize_reloc): Handle I variables.
6778 (do_with_relocs): Only emit relocation size when necessary.
6779 Increase MAXRUN to 127. Change ov to be assigned, and take
6780 src_mask and pcrel_offset into account.
6781 (ieee_write_data_part): Skip sections that are not loaded.
6782 (ieee_write_external_part): Don't output optional last entry of WX
6783 records.
6784 (ieee_write_me_part): Make setting of me_record neater.
6785 (ieee_generic_stat_arch_elt): Get the size of an archive element.
6786
6787 * syms.c (stt): Add entries for zerovars, vars, and code.
6788
6789 * elfcode.h (validate_reloc): New static function.
6790 (write_relocs): Call validate_reloc for non ELF relocs.
6791
6792 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
6793 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
6794 (TARGET_LITTLE_SYM): Likewise.
6795
6796 * config.bfd (m68*-*-psos*): New target.
6797
6798 Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
6799
6800 * i386msdos.c: Remove some #if 0 code.
6801 (msdos_write_object_contents): Don't include empty sections in the
6802 size computation, regardless of their address.
6803
6804 Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6805
6806 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
6807 is NULL, ie, the -r switch is used.
6808
6809 Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
6810
6811 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
6812 (BFD_RELOC_MIPS_GOT_LO16): Define.
6813 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
6814 * bfd-in2.h, libbfd.h: Rebuild.
6815 * elf32-mips.c (mips_reloc_map): Map new relocs.
6816
6817 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
6818
6819 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
6820 $(SHLINK).
6821
6822 * ieee.c (get_symbol): Set the section to bfd_abs_section.
6823 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
6824 simple number for the section address, rather than an expression.
6825 Limit the number of bytes between relocs to MAXRUN.
6826 (ieee_write_me_part): Set me_record to the file offset after the
6827 start address.
6828 (ieee_write_processor): New static function.
6829 (ieee_write_object_contents): Use ieee_write_processor.
6830
6831 Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
6832
6833 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
6834
6835 * coff-aux.c: Change include of aux.h to aux-coff.h.
6836
6837 Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6838
6839 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
6840 relocation put the addend both in the reloc entry and the data.
6841 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
6842 GOT offset value.
6843
6844 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
6845 a R_68K_PCxx reloc against a defined global symbol directly.
6846 (elf_m68k_check_relocs): Don't count such a reloc.
6847
6848 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
6849 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
6850 symbol for now, otherwise always record the symbol as dynamic.
6851 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
6852 is not referenced by a dynamic object, and we are not making a
6853 shared object, then don't make a PLT entry. If we do make a PLT
6854 entry, make sure the symbol has been recorded as dynamic.
6855
6856 Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
6857
6858 * configure.host: When making a shared library, set HLDFLAGS to
6859 pass an appropriate -rpath option. Use the make variable SONAME
6860 as the shared library soname, rather than computing it here. On
6861 SunOS, build stamp-tshlink in place of $(SHLINK).
6862 * Makefile.in (SONAME): New variable.
6863 ($(SHLINK)): Make a link to the transformed name, as well.
6864 (stamp-tshlink): New target.
6865 (install): Skip stamp-tshlink during install.
6866
6867 Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6868
6869 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
6870 linker sections have been set up yet.
6871
6872 * elf.c (make_mapping): Add an additional argument to suppress
6873 making the first section include the program headers.
6874 (map_sections_to_segments): If the user used -Ttext such that the
6875 program headers are on a different page, do not set the flags
6876 saying that this section includes the program headers.
6877
6878 Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
6879
6880 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
6881 don't define TRAD_HEADER.
6882 * configure: Rebuild.
6883
6884 * netbsd-core.c: New file, support for NetBSD core files.
6885 * hosts/*nbsd.h: Removed.
6886
6887 Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
6888
6889 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
6890 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
6891 * libbfd.h, bfd-in2.h: Regenerated.
6892 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
6893 bfd_elf32_bfd_reloc_type_lookup.
6894 (reloc_type{,_names}): Deleted.
6895 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
6896 Add sparc64 relocs.
6897 (sparc_reloc_map): Add sparc64 relocs.
6898 (sparc_elf_notsupported_reloc): New static function.
6899 (sparc_elf_wdisp16_reloc): New static function.
6900 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
6901 (elf32_sparc_relocate_section): Likewise.
6902 (bfd_elf32_bfd_reloc_type_lookup): Define.
6903 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
6904 (reloc_type{,_names}): Deleted.
6905 (elf_sparc_howto_table): Deleted.
6906 (sparc_reloc_map): Deleted.
6907 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
6908 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
6909
6910 Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
6911
6912 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
6913 *-*-hpux* host.
6914
6915 * Makefile.in (program_transform_name): New variable.
6916 (install): Transform library name before installing it.
6917
6918 Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
6919
6920 * archures.c (bfd_mach_i960_hx): Define.
6921 * bfd-in2.h: Rebuild.
6922 * cpu-i960.c (scan_960_mach): Accept machine "hx".
6923 (MATRIX): Expand entries for HX.
6924 (arch_info_struct): Add i960:hx entry.
6925 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
6926 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
6927 (coff_set_flags): Handle bfd_mach_i960_hx.
6928
6929 Support for building as a shared library, based on patches from
6930 Alan Modra <alan@spri.levels.unisa.edu.au>:
6931 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
6932 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
6933 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
6934 * configure: Rebuild.
6935 * configure.host: If --enable-shared, adjust shared library stuff
6936 based on the host. If the host is SunOS, and the linker supports
6937 -rpath, set HLDFLAGS to use it.
6938 * Makefile.in (ALLLIBS): New variable.
6939 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
6940 (COMMON_SHLIB, SHLINK): New variables.
6941 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
6942 (STAGESTUFF): Remove variable.
6943 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
6944 $(TARGETLIB).
6945 (stamp-ofiles): New target, like old ofiles target, but build
6946 using a temporary file and move-if-change, and touch stamp-ofiles
6947 when done.
6948 (ofiles): Just depend upon stamp-ofiles.
6949 (stamp-piclist, piclist): New targets.
6950 ($(SHLIB), $(SHLINK)): New targets.
6951 (targets.o, archures.o): Build twice if PICFLAG is set.
6952 (do_mostlyclean): Remove pic/*.o.
6953 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
6954 stamp-piclist.
6955 (do_distclean): Remove pic and stamp-picdir.
6956 (install): Install shared libraries.
6957 ($(OFILES)): Depend upon stamp-picdir.
6958 (stamp-picdir): New target.
6959
6960 * libcoff-in.h: Add comment reminding people that libcoff.h is a
6961 generated file.
6962 * libcoff.h: Rebuild.
6963
6964 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
6965 flavour of a section with no owner.
6966
6967 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
6968 ELF_LINK_NON_ELF flag.
6969 (mips_elf_create_got_section): Likewise.
6970
6971 * elf.c: Revert last change, since it breaks dynamic linking.
6972 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
6973 field.
6974 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
6975 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
6976 (elfNN_bed): Don't initialize want_hdr_in_seg field.
6977
6978 Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6979
6980 * elf.c (assign_file_positions_for_segments): If the backend does
6981 not want the elf header or the program headers in the address
6982 space, do not include them in the calculations.
6983
6984 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
6985 function to determine if we need additional program headers.
6986 (ppc_elf_modify_segment_map): Define as a NOP function for now.
6987 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
6988
6989 Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
6990
6991 * coffcode.h: Move today's libcoff.h change into coffcode.h.
6992
6993 Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
6994
6995 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
6996 back into one line. Some compilers (sunos 4.1.3 for example)
6997 won't accept args split across more than one line.
6998
6999 Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
7000
7001 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
7002 * configure: Regenerate.
7003
7004 Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
7005
7006 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
7007 try to do arithmetic on a void *, cast it to a unsigned char * first.
7008
7009 Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
7010
7011 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
7012 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
7013 ELF_LINK_NON_ELF.
7014 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
7015 flag for a newly defined symbol.
7016 (NAME(bfd_elf,record_link_assignment)): Likewise.
7017 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
7018 set the DEF or REF_REGULAR flags correctly.
7019
7020 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
7021 (libbfd.h, libcoff.h): Corresponding change.
7022
7023 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
7024 a PLT32 reloc as dynamic.
7025 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
7026 is not referenced by a dynamic object, and we are not making a
7027 shared object, then don't make a PLT entry. If we do make a PLT
7028 entry, make sure the symbol has been recorded as dynamic.
7029
7030 Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
7031
7032 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
7033 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
7034 (powerpcle-*-cygwin32): New.
7035 * peicode.h (add_data_entry): Get address from vma.
7036
7037 Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
7038
7039 * elflink.c (_bfd_elf_create_linker_section): If the symbol
7040 attached to the section has already been created as an undefined
7041 symbol, treat it as if it hasn't been created yet.
7042
7043 Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
7044
7045 * elflink.h (elf_bfd_final_link): Don't output initial dummy
7046 symbol or section symbols if stripping all symbols and this is not
7047 a relocateable link. Don't output the symbol string table if
7048 there are no symbols.
7049 (elf_link_flush_output_syms): Don't do anything if there are no
7050 symbols to flush.
7051
7052 Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
7053
7054 * coff-aux.c: New file.
7055 * hosts/m68kaux.h: New file.
7056 * config.bfd (m68*-apple-aux*): New target.
7057 * configure.in (m68*-apple-aux*): New native host.
7058 (m68kaux_coff_vec): New vector.
7059 * configure: Rebuild.
7060 * targets.c (m68kaux_coff_vec): Declare.
7061 * coffcode.h (bfd_coff_backend_data): Add field
7062 _bfd_coff_link_add_one_symbol.
7063 (bfd_coff_link_add_one_symbol): Define.
7064 (compare_arelent_ptr): New static function if TARG_AUX.
7065 (coff_write_relocs): If TARG_AUX, sort the relocs.
7066 (coff_write_object_contents): Set A/UX aouthdr magic number.
7067 (coff_link_add_one_symbol): Define if not defined.
7068 (bfd_coff_std_swap_table): Initialize new field.
7069 * libcoff.h: Rebuild.
7070 * cofflink.c (coff_link_add_symbols): Call
7071 bfd_coff_link_add_one_symbol rather than
7072 _bfd_generic_link_add_one_symbol.
7073 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
7074 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
7075 * coff-mips.c (mips_ecoff_backend_data): Likewise.
7076 * Makefile.in: Rebuild dependencies.
7077 (BFD32_BACKENDS): Add coff-aux.o.
7078 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
7079
7080 Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7081
7082 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
7083 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
7084
7085 Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
7086
7087 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
7088 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
7089 (maintainer-clean): Warn about deleting special files.
7090 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
7091
7092 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
7093 warning symbols correctly.
7094 * elf32-i386.c (elf_i386_relocate_section): Likewise.
7095 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7096 * elf32-mips.c (mips_elf_relocate_section): Likewise.
7097 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7098 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7099 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7100
7101 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
7102 warnings.
7103
7104 Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
7105
7106 * libcoff-in.h: aligned newly exported names with bfd naming
7107 conventions. Removed an erroneous define of POWERPC_LE_PE.
7108 * libcoff.h: Rebuild.
7109 * cofflink.c, coff-ppc.c: the above function name changes
7110
7111 Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
7112
7113 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
7114 * ecoff.c (struct extsym_info): Define.
7115 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
7116 to ecoff_link_write_external.
7117 (ecoff_link_write_external): Accept a struct extsym_info pointer.
7118 Strip symbols when appropriate.
7119
7120 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
7121 * syms.c (BSF_OBJECT): Define.
7122 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
7123 * bfd-in2.h: Rebuild.
7124 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
7125 STT_OBJECT symbol.
7126 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
7127 is set.
7128
7129 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
7130 copying relocs into a shared object, treat a defined global symbol
7131 as a local symbol.
7132 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7133 * elf32-mips.c (mips_elf_relocate_section): Likewise.
7134 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7135
7136 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
7137 real defined symbol, not to a weak defined symbol.
7138
7139 Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
7140
7141 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
7142 and made a few static functions externs.
7143
7144 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
7145 POWERPC_LE_PE hack in cofflink.
7146
7147 * libcoff-in.h: promoted the following from cofflink.c to allow
7148 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
7149 coff_debug_merge_element, struct coff_debug_merge_type,
7150 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
7151 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
7152 coff_debug_merge_hash_lookup, coff_link_section_info,
7153 coff_final_link_info, coff_debug_merge_hash_newfunc,
7154 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
7155
7156 * libcoff.h: re-gen'd
7157
7158 Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
7159
7160 * syms.c: Include "bfdlink.h".
7161 (struct stab_find_info): Define.
7162 (_bfd_stab_section_find_nearest_line): New function.
7163 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
7164 * libbfd.h: Rebuild.
7165 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
7166 * elf.c (_bfd_elf_find_nearest_line): Try calling
7167 _bfd_stab_section_find_nearest_line before searching the ELF
7168 symbol table. Find the closest STT_FUNC symbol, not the last one.
7169 * libcoff-in.h (coff_data_type): Add line_info field.
7170 * libcoff.h: Rebuild.
7171 * coffgen.c (coff_find_nearest_line): Try calling
7172 _bfd_stab_section_find_nearest_line before searching the COFF
7173 symbol table.
7174 * Makefile.in: Rebuild dependencies.
7175
7176 Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
7177
7178 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
7179 4 bytes, so we get the correct value when updating the register
7180 field in little endian mode.
7181
7182 Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
7183
7184 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
7185 entry_section fields. Add sntoc and snentry fields.
7186 * libcoff.h: Rebuild.
7187 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
7188 not toc_section and entry_section (the COFF file does not have any
7189 sections at this point).
7190 (coff_write_object_contents): Set o_snentry and o_sntoc from
7191 snentry and sntoc rather than entry_section and toc_section.
7192 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
7193 snentry, not toc_section and entry_section.
7194 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
7195 entry_section from hentry.
7196 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
7197 set snenty.
7198 (xcoff_link_input_bfd): Set sntoc, not toc_section.
7199 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
7200 than using toc_section directly.
7201
7202 * archures.c: Add missing `.' in enum bfd_architecture.
7203 * bfd-in2.h: Rebuild.
7204
7205 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
7206 Robert Lipe <robertl@arnet.com>.
7207
7208 Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
7209
7210 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
7211 to sections we allocate. Use bfd_zalloc to allocate initialial
7212 sections, not bfd_alloc.
7213 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
7214 SDA{,2}I16 relocations.
7215 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
7216 whether to put something in .sbss or not.
7217 (ppc_elf_relocate_section): Add support for more relocations. Add
7218 in sec->output_offset where appropriate. Make error messages
7219 include the symbol name.
7220
7221 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
7222 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
7223 doesn't get redefined messages if -shared.
7224
7225 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
7226 section if the rel_section field has been set up.
7227
7228 Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
7229
7230 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
7231 relocations.
7232
7233 Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
7234
7235 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
7236 of flags, only flags used are controlled by mach number. Bump up
7237 output file mach number to highest of input file mach numbers.
7238 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
7239 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
7240
7241 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
7242 bfd_elf64_sparc_vec support.
7243
7244 Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
7245
7246 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
7247 the embedded bit is set on some objects and not on others. Just
7248 or it together.
7249 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
7250 relocations.
7251
7252 Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
7253
7254 * coffcode.h (coff_new_section_hook): Don't try to align the
7255 .stabstr section.
7256
7257 * coffcode.h (coff_set_section_contents): Fix the handling of the
7258 .lib section to work even if the entire section contents are
7259 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
7260 Robert Lipe <robertl@arnet.com>.
7261
7262 Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
7263
7264 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
7265 memory here for contents.
7266
7267 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
7268 _SDA2_BASE_ by 32768.
7269 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
7270 started using. Allocate contents for .sdata and .sdata2 sections
7271 also.
7272 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
7273 rather than _name.
7274 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
7275 size _SDA{,2}_BASE_.
7276 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
7277 done.
7278
7279 Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
7280
7281 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
7282
7283 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
7284 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
7285 (bfd_mach_sparc_v9a): Define.
7286 (bfd_mach_sparc_v9_p): Define.
7287 * bfd-in2.h: Regenerated.
7288 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
7289 bfd_mach_sparc_v9.
7290 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
7291 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
7292 to bfd_elf32_sparc_vec.
7293 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
7294 Add v8plus{,a} support.
7295 Add v9a support.
7296 (sparc_compatible): New function.
7297 * elf32-sparc.h: #include "elf/sparc.h".
7298 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
7299 elf32_sparc_final_write_processing): New functions.
7300 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
7301 elf_backend_final_write_processing): Define.
7302
7303 Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
7304
7305 * elf-bfd.h (struct elf_link_hash_entry): Add
7306 linker_section_pointer field.
7307 (enum elf_linker_section_enum): Enumeration for new way of
7308 creating linker dynamic sections and symbols.
7309 (elf_linker_section{,_pointers}): New structures for creating
7310 dynamic sections and symbols.
7311 (elf_obj_tdata): Add linker_section_pointers and linker_section
7312 fields.
7313 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
7314 (_bfd_elf_create_linker_section): New declarations.
7315 (_bfd_elf_find_pointer_linker_section): Ditto.
7316 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
7317 (_bfd_elf_make_linker_section_rela): Ditto.
7318
7319 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
7320
7321 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
7322 (ppc_elf_create_linker_section): New function to create the
7323 sections .got, .sdata, and .sdata2.
7324 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
7325 needed.
7326 (ppc_elf_check_relocs): Support more of the eabi relocations.
7327 (ppc_elf_relocate_section): Ditto.
7328 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
7329 if the .sdata{,2} + .sbss{,2} section size is > 32k.
7330
7331 * elflink.h (elf_create_pointer_linker_section): New function to
7332 create initialized pointers in dynamic linker sections.
7333 (elf_finish_pointer_linker_section): Actually intialize the
7334 pointers created above.
7335
7336 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
7337 macros to provide both 32 and 64 bit versions of
7338 elf_create_pointer_linker_section.
7339 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
7340 provide both 32 and 64 bit versions of
7341 elf_finish_pointer_linker_section.
7342
7343 * elflink.c (_bfd_elf_create_linker_section): New function to
7344 create a linker section.
7345 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
7346 given address in the linker pointer offsets created for a given
7347 symbol.
7348 (_bfd_elf_make_linker_section_rela): Make a RELA section
7349 corresponding to the generated linker section.
7350
7351 Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
7352
7353 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
7354
7355 Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
7356
7357 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
7358 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
7359 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
7360 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
7361 toc entry in an objdump) for now.
7362 (ppc_do_last, ppc_get_last): New function - needed to save processing
7363 the toc owner to the end.
7364 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
7365 toc owner last.
7366
7367 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
7368 toc owner from being done till last. Must define POWERPC_LE_PC
7369 to enable it.
7370
7371 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
7372
7373 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
7374 to INFO.
7375 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
7376 SizeOfImage for PowerPC. Ignore the size of the .junk section.
7377
7378 Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
7379
7380 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
7381
7382 Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
7383
7384 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
7385 back to first.
7386 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
7387
7388 Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
7389
7390 * elf.c (assign_file_positions_for_segments): Don't increment file
7391 offset for a segment which contains no loadable sections.
7392
7393 Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
7394
7395 * reloc.c: Add new PowerPC relocations.
7396 * {bfd-in2,libbfd}.h: Regenerate.
7397
7398 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
7399 (ppc_elf_reloc_type_lookup): Lookup new relocations.
7400
7401 Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
7402
7403 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
7404 entries.
7405
7406 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
7407 info->shared.
7408
7409 * coffgen.c (coff_find_nearest_line): Don't try to cache
7410 information in sections that are not owned by a BFD. From Richard
7411 Henderson <richard@atheist.tamu.edu>.
7412
7413 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
7414 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
7415 * elflink.h (elf_link_output_extsym): Remove special check for
7416 _rld_new_interface.
7417
7418 * ecoffswap.h: Add prototypes for static functions.
7419
7420 Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
7421
7422 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
7423 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
7424 references.
7425 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
7426 to satisfy a TOC16 relocation. Rewrite unsupported relocation
7427 support. Begin support for R_PPC_SDA{2,}REL.
7428
7429 Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
7430
7431 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
7432 create the .got and .got.neg sections.
7433 (ppc_elf_size_dynamic_sections): Call it.
7434 (ppc_elf_check_relocs): Call it.
7435 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
7436 (ppc_elf_check_relocs): Add error messages for relocations we
7437 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
7438 relocation.
7439
7440 Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
7441
7442 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
7443 section flags for V.4 and eabi.
7444
7445 Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
7446
7447 * elf.c (assign_file_positions_for_segments): If a segment
7448 contains no sections, don't mark it as readable.
7449
7450 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
7451 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
7452
7453 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
7454 dynamic section, if there is one.
7455 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
7456 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
7457 (bfd_elf64_swap_dyn_in): Likewise.
7458 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
7459 PTR.
7460 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
7461
7462 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
7463 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
7464 <pirker@eiunix.tuwien.ac.at>.
7465
7466 Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
7467
7468 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
7469 PowerPC V.4 and eabi.
7470 * bfd-in2.h: Regenerate.
7471 * libfd.h: Regenerate.
7472
7473 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
7474
7475 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
7476 section type and SHF_EXCLUDE section flag, turning them into the
7477 appropriate bfd section flag.
7478
7479 Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
7480
7481 * xcofflink.c (xcoff_link_add_symbols): Create the special
7482 sections if we see a DYNAMIC object, in case that is the only
7483 XCOFF input object we see.
7484
7485 * elf32-mips.c: Extensive changes for a start at dynamic linking
7486 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
7487
7488 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
7489 (struct elf_backend_data): Remove
7490 elf_backend_create_program_headers field. Add
7491 elf_backend_additional_program_headers and
7492 elf_backend_modify_segment_map fields.
7493 * elfxx-target.h (elf_backend_type_change_ok): Define if not
7494 defined.
7495 (elf_backend_additional_program_headers): Likewise.
7496 (elf_backend_modify_segment_map): Likewise.
7497 (elf_backend_create_program_headers): Don't define.
7498 (elfNN_bed): Change to account for field changes.
7499 * elf.c (assign_file_positions_for_segments): Call new
7500 modify_segment_map backend function. Don't call old
7501 create_program_headers backend function.
7502 (get_program_header_size): Call additional_program_headers rather
7503 than create_program_headers.
7504 * elflink.h (elf_link_add_object_symbols): Initialize
7505 type_change_ok from new backend field.
7506 (elf_link_output_extsym): Don't warn if _rld_new_interface is
7507 defined.
7508 (elf_reloc_link_order): Treat a reloc against a defined symbol as
7509 a reloc against the appropriate section.
7510
7511 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
7512 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
7513 (elf_flags_init): Rename from elf_ppc_flags_init.
7514 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
7515 elf_ppc_flags_init.
7516 (ppc_elf_copy_private_bfd_data): Likewise.
7517 (ppc_elf_merge_private_bfd_data): Likewise.
7518
7519 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
7520 relocation entries.
7521
7522 Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
7523
7524 * coff-alpha.c (alpha_relocate_section): During final link, allow
7525 output .lita section to be bigger than 64k by adjusting gp value
7526 on a per-input section basis.
7527 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
7528 field.
7529 (struct ecoff_section_tdata): Add gp field.
7530
7531 Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
7532
7533 Handle Alpha ECOFF changes in OSF/1 3.2.
7534 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
7535 field.
7536 * coff-alpha.c: Include "aout/ar.h".
7537 (alpha_ecoff_get_relocated_section_contents): Don't require an
7538 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
7539 3.2 doesn't generate one.
7540 (alpha_relocate_section): Likewise.
7541 (alpha_ecoff_slurp_armap): Define.
7542 (alpha_ecoff_slurp_extended_name_table): Define.
7543 (alpha_ecoff_construct_extended_name_table): Define.
7544 (alpha_ecoff_truncate_arname): Define.
7545 (alpha_ecoff_write_armap): Define.
7546 (alpha_ecoff_generic_stat_arch_elt): Define.
7547 (alpha_ecoff_update_armap_timestamp): Define.
7548 (ARFZMAG): Define.
7549 (alpha_ecoff_read_ar_hdr): New static function.
7550 (alpha_ecoff_get_elt_at_filepos): New static function.
7551 (alpha_ecoff_openr_next_archived_file): New static function.
7552 (alpha_ecoff_get_elt_at_index): New static function.
7553 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
7554 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
7555 _bfd_ecoff to alpha_ecoff.
7556 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
7557 field from backend structure, rather than always calling
7558 _bfd_get_elt_at_filepos.
7559 * coff-mips.c (mips_ecoff_backend_data): Initialize
7560 get_elt_at_filepos field.
7561 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
7562 from _bfd_generic_read_ar_hdr with minor changes.
7563 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
7564 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
7565 * libbfd.h: Rebuild.
7566
7567 * bfd-in.h (BFD_IN_MEMORY): Define.
7568 * libbfd-in.h (struct bfd_in_memory): Define.
7569 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
7570 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
7571 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
7572 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
7573 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
7574 (bfd_get_size): Handle BFD_IN_MEMORY flag.
7575 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
7576 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
7577 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
7578 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
7579 iostream.
7580 (bfd_openstreamr): Likewise.
7581 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
7582 BFD_IN_MEMORY is not set.
7583 * riscix.c (riscix_some_aout_object_p): Likewise.
7584 * bfd-in2.h, libbfd.h: Rebuild.
7585
7586 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
7587 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
7588 (bfd_get_elt_at_index): Define.
7589 * archive.c (_bfd_generic_get_elt_at_index): Rename from
7590 bfd_get_elt_at_index. Change index parameter from int to
7591 symindex.
7592 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
7593 (_bfd_noarchive_get_elt_at_index): Define.
7594 (_bfd_archive_bsd_get_elt_at_index): Define.
7595 (_bfd_archive_coff_get_elt_at_index): Define.
7596 * bfd-in2.h, libbfd.h: Rebuild.
7597 * aout-target.h (MY_get_elt_at_index): Define if not defined.
7598 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
7599 * ieee.c (ieee_get_elt_at_index): Define.
7600 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
7601 * oasys.c (oasys_get_elt_at_index): Define.
7602 * som.c (som_get_elt_at_index): Define.
7603
7604 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
7605 numbers to the .text section.
7606
7607 Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
7608
7609 * ieee.c (ieee_write_debug_part): Change return type to boolean.
7610 If there is a SEC_DEBUGGING section, get the contents of the debug
7611 information part from it.
7612 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
7613 section in memory.
7614 (ieee_write_object_contents): Check ieee_write_debug_part return.
7615
7616 Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
7617
7618 * config.bfd (i[345]86-*-freebsd*): Add target.
7619 * configure.in (i386freebsd_vec): Add vec.
7620 * configure: Regenerate.
7621 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
7622 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
7623 Rebuild dependencies..
7624 * freebsd.h: New file.
7625 * i386freebsd.c: New file.
7626 * targets.c (i386freebsd_vec): Declare.
7627 (bfd_target_vector): Add i386freebsd_vec.
7628 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
7629 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
7630
7631 Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
7632
7633 * ieee.c (ieee_slurp_debug): New static function.
7634 (ieee_object_p): Call it.
7635 (ieee_slurp_section_data): Skip debugging sections.
7636 (ieee_get_reloc_upper_bound): Likewise.
7637 (ieee_get_section_contents): Likewise.
7638 (ieee_canonicalize_reloc): Likewise.
7639 (ieee_write_section_part): Likewise.
7640 (ieee_write_debug_part): Likewise.
7641 (ieee_write_data_part): Likewise.
7642 (init_for_output): Likewise.
7643
7644 Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
7645
7646 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
7647 work.
7648 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
7649 relocs, since ppc_elf_relocate_section handles the linker case.
7650 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
7651 used.
7652 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
7653 ppc_elf_relocate_section since that is now the only caller.
7654 (ppc_elf_relocate_section): Ditto.
7655
7656 Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
7657
7658 * coffcode.h (coff_write_object_contents): If we don't know the
7659 section of the entry point for an XCOFF executable, always set the
7660 entry address to -1.
7661
7662 Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
7663
7664 * elf.c (bfd_section_from_shdr): Add support for note sections.
7665
7666 Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
7667
7668 * bfd-in.h (struct _symbol_info): Add stab_type field.
7669 * bfd-in2.h: Rebuild.
7670 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
7671
7672 * elf32-ppc.c: Remove trailing newline from calls to
7673 _bfd_error_handler.
7674 (ppc_elf_merge_private_bfd_data): Only warn about endianness
7675 difference if target endianness is known.
7676
7677 Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
7678
7679 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
7680 old style TOC16 references without using R_PPC_GOT.
7681 (ppc_reloc_type): Ditto.
7682 (ppc_elf_reloc_type_lookup): Add support for TOC16.
7683 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
7684 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
7685 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
7686 (ppc_elf_check_relocs): New function for GOT/PLT support that is
7687 work in progress.
7688 (ppc_elf_adjust_dynamic_symbol): Ditto.
7689 (ppc_elf_adjust_dynindx): Ditto.
7690 (ppc_elf_size_dynamic_sections): Ditto.
7691 (ppc_elf_finish_dynamic_symbol): Ditto.
7692 (ppc_elf_finish_dynamic_sections): Ditto.
7693 (ELF_DYNAMIC_INTERPRETER): Define.
7694
7695 Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
7696
7697 * elf.c (copy_private_bfd_data): When attaching sections to
7698 segments ignore sections that won't be allocated. Patch from
7699 Andreas Schwab.
7700
7701 Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
7702
7703 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
7704 anything else.
7705
7706 Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
7707
7708 * coff-i960.c (CALC_ADDEND): Define.
7709 (coff_i960_relocate_section): Add the input section VMA to the
7710 addend for PC relative relocs.
7711
7712 Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
7713
7714 * peicode.h (pe_print_pdata): Must test the entire entry for zero
7715 to correctly terminate.
7716
7717 Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
7718
7719 * targets.c (enum bfd_endian): Define.
7720 (bfd_target): Rename byteorder_big_p to byteorder, and change it
7721 from boolean to enum bfd_endian. Change header_byteorder_big_p
7722 correspondingly.
7723 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
7724 (bfd_header_big_endian, bfd_header_little_endian): New macros.
7725 * bfd-in2.h: Rebuild.
7726 * All targets: Change initialization of byteorder and
7727 header_byteorder to use enum bfd_endian values rather than
7728 booleans.
7729 * All files: Change all references to byteorder_big_p and
7730 header_byteorder_big_p to use new bfd_*_endian macros.
7731
7732 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
7733 s_vaddr.
7734 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
7735 vma.
7736 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
7737
7738 Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
7739
7740 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
7741
7742 Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
7743
7744 * ieee.c: Lots of minor cleanups. Make many functions return
7745 errors rather than calling abort. Also:
7746 (ieee_write_twobyte): Remove; change callers to call existing
7747 ieee_write_2bytes function.
7748 (ieee_write_expression): Don't output the section twice when
7749 outputting a local symbol. Don't emit an extraneous zero if there
7750 is only one term.
7751 (ieee_slurp_sections): Set the lma as well as the vma.
7752 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
7753
7754 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
7755 a recognized one or bfd_arch_unknown.
7756 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
7757 to succeed.
7758 (ihex_get_symtab): Likewise.
7759
7760 Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
7761
7762 * aoutx.h: Include <ctype.h>.
7763 (struct aout_link_includes_table): Define.
7764 (struct aout_link_includes_totals): Define.
7765 (struct aout_link_includes_entry): Define.
7766 (aout_link_includes_lookup): Define macro.
7767 (struct aout_final_link_info): Add includes field.
7768 (aout_link_includes_newfunc): New static function.
7769 (NAME(aout,final_link)): Initialize includes hash table.
7770 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
7771
7772 Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
7773
7774 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
7775
7776 Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
7777
7778 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
7779
7780 Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
7781
7782 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
7783 (pe_print_private_bfd_data): call pe_print_reloc.
7784 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
7785 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
7786 up some debugging as well.
7787
7788 Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
7789
7790 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
7791 <rfg@monkeys.com>.
7792
7793 Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
7794
7795 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
7796 when setting sections to NULL.
7797
7798 Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
7799
7800 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
7801 field.
7802 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
7803 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
7804 for all symbols.
7805 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
7806 * bfd-in2.h: Rebuild.
7807
7808 Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
7809
7810 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
7811
7812 Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
7813
7814 * ihex.c (ihex_scan): Handle record types 4 and 5.
7815 (ihex_object_p): Permit types 4 and 5.
7816 (ihex_set_section_contents): Remove check for out of range
7817 addresses.
7818 (ihex_write_object_contents): Generate types 4 and 5.
7819
7820 * elflink.h (elf_link_output_extsym): Just ignore warning and
7821 indirect references to symbols which don't really exist.
7822
7823 Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
7824
7825 * peicode.h (pe_print_idata): Minor format fixes
7826 (pe_print_edata): New function. Under private printing, this formats
7827 the edata section of a PE file.
7828 (pe_print_private_bfd_data): Added call to pe_print_edata.
7829
7830 Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
7831
7832 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
7833 index, don't call stoi.
7834
7835 Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
7836
7837 * srec.c (srec_scan): Set lma as well as vma.
7838
7839 * ihex.c: New file; support for Intel Hex format.
7840 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
7841 (ihex_vec): Declare.
7842 (bfd_target_vector): Always include ihex_vec.
7843 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
7844 * Makefile.in: Rebuild dependencies.
7845 (BFD_LIBS): Add ihex.o
7846 (BFD_LIBS_CFILES): Add ihex.c.
7847 * bfd-in2.h: Rebuild.
7848
7849 * elf.c (assign_file_positions_for_segments): Sort the sections in
7850 each segment.
7851 (get_program_header_size): Return the right size if segment_map is
7852 not NULL.
7853 (copy_private_bfd_data): Don't bother to sort the sections.
7854
7855 * bfd.c (bfd_record_phdr): New function.
7856 * bfd-in.h (bfd_record_phdr): Declare.
7857 * bfd_in2.h: Rebuild.
7858
7859 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
7860 BFD_ASSERT.
7861
7862 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
7863 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
7864 bfd_size_type.
7865 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
7866 (bfd_zmalloc): Change declaration.
7867 * libbfd.h: Rebuild.
7868 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
7869 and realloc. Don't set bfd_error_no_memory if they fail.
7870
7871 Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
7872
7873 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
7874 uses as well. Added a new howto to deal with TOCREL16 relocs that
7875 are TOCDEFN as well.
7876 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
7877 to handle RVA relocs from dlltool.
7878 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
7879 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
7880 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
7881
7882 * coffcode.h (coff_set_alignment_hook): check idata$X sections
7883 to get the right section alignment.
7884
7885 Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
7886
7887 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
7888 p_paddr if p_paddr is zero.
7889 (make_mapping): Set includes_filehdr and includes_phdrs for first
7890 PT_LOAD segment.
7891 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
7892 segment.
7893 (assign_file_positions_for_segments): Handle includes_filehdr and
7894 includes_phdrs. Remove special handling of PT_PHDR and first
7895 PT_LOAD segments.
7896 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
7897 when appropriate. Remove special handling of PT_PHDR segment.
7898 Use a more complex condition for when a section is included in a
7899 segment to handle Solaris linker oddities.
7900
7901 Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
7902
7903 * coff-m88k.c (howto_table): Reformatted for easier reading;
7904 special_function now points to new function m88k_special_reloc.
7905 (howto_hvrt16): Function previously used for handling HVRT16 relocs
7906 removed.
7907 (rtype2howto): Do not add reloc's r_offset to the addend, this will
7908 be done correctly by m88k_special_reloc.
7909 (reloc_processing): New function to be used by RELOC_PROCESSING.
7910 (RELOC_PROCESSING): Define to call reloc_processing.
7911
7912 Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
7913
7914 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
7915 (pe_print_pdata): Likewise.
7916
7917 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
7918 obstack_alloc fails.
7919 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
7920 fails.
7921 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
7922 * Many files: don't set bfd_error_no_memory if one of the above
7923 routines fails.
7924
7925 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
7926 if p_paddr_valid is set.
7927 (copy_private_bfd_data): New static function.
7928 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
7929
7930 * elf.c (assign_file_positions_for_segments): Fix case where extra
7931 program headers were allocated.
7932
7933 * elf.c (_bfd_elf_print_private_bfd_data): New function.
7934 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
7935 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
7936 _bfd_elf_print_private_bfd_data.
7937
7938 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
7939 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
7940 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
7941 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
7942 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
7943 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
7944 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
7945
7946 Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
7947
7948 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
7949 * elf.c (make_mapping): New static function.
7950 (map_sections_to_segments): New static function.
7951 (elf_sort_sections): New static function.
7952 (assign_file_positions_for_segments): New static function.
7953 (map_program_segments): Remove.
7954 (get_program_header_size): Remove sorted_hdrs, count, and
7955 maxpagesize parameters. Simplify.
7956 (assign_file_positions_except_relocs): When generating an
7957 executable, use assign_file_positions_for_segments.
7958 (elf_sort_hdrs): Remove.
7959 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
7960 to get_program_header_size.
7961
7962 Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
7963
7964 * hp300hpux.c (MY(callback)): Set lma as well as vma.
7965
7966 * configure, config.in: Regenerate with autoconf 2.7.
7967
7968 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
7969 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
7970
7971 Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
7972
7973 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
7974 (ecoff_sec_to_styp_flags): Likewise.
7975 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
7976 (ecoff_set_symbol_info): Handle scRConst.
7977 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
7978 (ecoff_compute_section_file_positions): Handle .rconst section.
7979 (_bfd_ecoff_write_object_contents): Likewise.
7980 (ecoff_link_check_archive_element): Handle scRConst.
7981 (ecoff_link_add_externals): Likewise.
7982 (ecoff_link_write_external): Handle .rconst section.
7983 (ecoff_reloc_link_order): Likewise.
7984 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
7985 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
7986 section.
7987 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
7988
7989 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
7990 DEF_DYNAMIC flag is set.
7991
7992 Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
7993
7994 * host-aout.c: If TRAD_HEADER is defined, include it.
7995
7996 Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
7997
7998 * aclocal.m4 (AC_PROG_CC): Remove local definition.
7999 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
8000 (BFD_NEED_DECLARATION): New function.
8001 * configure.in: Use BFD_NEED_DECLARATION.
8002 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
8003 * configure, config.in: Rebuild with autoconf 2.6.
8004
8005 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
8006 special_sections before returning when called with a non XCOFF
8007 BFD.
8008
8009 * coffgen.c (coff_renumber_symbols): Sort common symbols with
8010 global symbols.
8011
8012 * coffcode.h (coff_compute_section_file_positions): Only pad the
8013 previous section to force file alignment when creating an
8014 executable.
8015
8016 Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
8017
8018 * coffcode.h (coff_compute_section_file_positions): If
8019 RS6000COFF_C, set up the .debug section.
8020
8021 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
8022 if it is not large enough to accomodate the entire TOC area with
8023 signed 16 bit offsets.
8024 (xcoff_write_global_symbol): Handle negative TOC offsets in global
8025 linkage code.
8026 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
8027 TOC anchor to use the TOC value used in the output file.
8028
8029 Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
8030
8031 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
8032 (_bfd_coff_read_string_table): Likewise.
8033
8034 Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
8035
8036 * pe-arm.c: Fix typos.
8037 * coff-arm.c: Likewise.
8038
8039 Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
8040
8041 * coff-ppc.c (list_ele): Added "cat"egory member.
8042 (record_toc): New category parameter (priv or pub).
8043 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
8044 (ppc_process_before_allocation): Removed embrionic data-in-toc from
8045 the mainline. It addes extra toc cells in error.
8046 (ppc_coff_swap_sym_in_hook): Added some documentation.
8047 (dump_toc): Can now diagnose "virtual toc" chicanery.
8048
8049 Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
8050
8051 * elf-bfd.h (struct elf_link_hash_table): Change type of
8052 dynsymcount and bucketcount fields from size_t to bfd_size_type.
8053
8054 Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
8055
8056 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
8057 pointerize C_LEAFSTAT or C_LEAFEXT entries.
8058
8059 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
8060 DT_INIT and DT_FINI entries if the _init or _fini symbol is
8061 defined or mentioned in a regular file.
8062
8063 Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
8064
8065 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
8066 (coff_ppc_relocate_section): Handle TOCDEFN attribute
8067 (coff_ppc_relocate_section): Correct REL24 handling
8068 (ppc_process_before_allocation): Correct TOCDEFN handling
8069
8070 * peicode.h (dir_names): Added name descriptions
8071
8072 Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
8073
8074 * VERSION: Updated to cygnus-2.6.
8075
8076 Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
8077
8078 * targets.c (m68k4knetbsd_vec): Declare.
8079
8080 Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
8081
8082 * targets.c (bfd_target): Change type of second argument to
8083 _bfd_print_private_bfd_data from void * to PTR.
8084 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
8085 using PTR rather than void *.
8086 * bfd-in2, libbfd.h: Rebuild.
8087 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
8088 to PTR.
8089 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
8090 _bfd_generic_bfd_print_private_bfd_data rather than casting
8091 bfd_true.
8092
8093 Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
8094
8095 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
8096 "DO NOT DELETE" lines or blank lines that mkdep writes on some
8097 systems.
8098 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
8099 BFD64_BACKENDS_CFILES): New variables.
8100 (CFILES): Use them.
8101
8102 Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
8103
8104 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
8105 not at the file position of the first section.
8106 * coffcode.h (coff_compute_section_file_positions): Avoid using
8107 unportable #elif.
8108 (coff_write_object_contents): When generating a PPC PE executable
8109 with no symbols, round up the file size to a COFF_PAGE_SIZE
8110 boundary.
8111 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
8112 don't write out a string table.
8113
8114 * elf.c (bfd_section_from_shdr): When using a different section
8115 header, pass the new one to _bfd_elf_make_section_from_shdr.
8116 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
8117 (elf_map_symbols): Add section VMA to symbol value when comparing
8118 against 0.
8119 (_bfd_elf_compute_section_file_positions): Only build symbol table
8120 if there are some symbols. Set file offset of symtab and strtab
8121 sections.
8122 (assign_file_positions_except_relocs): Remove dosyms parameter.
8123 Change all callers. Never set file offset of symtab and strtab
8124 sections.
8125 (_bfd_elf_copy_private_section_data): New function.
8126 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
8127 (_bfd_elf_copy_private_symbol_data): New function.
8128 (swap_out_syms): Check for special mapping of st_shndx created by
8129 copy_private_symbol_data.
8130 * elfxx-target.h: Use new copy routines.
8131 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
8132 (_bfd_elf_copy_private_section_data): Declare.
8133
8134 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
8135
8136 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
8137 C_NT_WEAK.
8138
8139 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
8140 _bfd_dummy_target, matching the recent change to archive
8141 recognition.
8142
8143 Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
8144
8145 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
8146 arithmetic on PTR types.
8147
8148 * aout-target.h (MY(callback)): Set the lma of the sections.
8149
8150 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
8151 symbol into a reloc against the section.
8152
8153 Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
8154
8155 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
8156 glue for the relocs: IMGLUE and IFGLUE.
8157 (record_toc): new function - tracks toc contents
8158 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
8159 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
8160 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
8161 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
8162 (ppc_record_toc_entry): Removed a debug define (duh)
8163
8164 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
8165 (pe_print_idata): New function - formats the idata section data
8166 (pe_print_pdata): New function - formats the pdata section data
8167 (pe_print_private_bfd_data): calls to above
8168
8169 Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
8170
8171 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
8172 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
8173 TARGET_SYM and TARGET_NAME for vector and BFD name.
8174 * coff-pmac.c (pmac_xcoff_vec): Remove.
8175 (TARGET_SYM, TARGET_NAME): Define.
8176 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
8177 machine to 0, not all PowerMacs are 601s.
8178
8179 Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
8180
8181 * elfcode.h (elf_object_p): Read in any program headers.
8182 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
8183 based on the program headers, if any.
8184 (elf_fake_sections): Set sh_addr from the vma, not the lma.
8185 (map_program_segments): Set p_paddr of program headers based on
8186 the lma.
8187
8188 Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
8189
8190 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
8191 failure.
8192
8193 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
8194 trying to do a relocateable link with a non-a.out object file.
8195
8196 * archive.c (bfd_generic_archive_p): Check the first object file
8197 in an archive even if target_defaulted is set. If the object file
8198 has the wrong xvec, reject it.
8199
8200 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
8201 be represented, report the name via _bfd_error_handler.
8202 (translate_to_native_sym_flags): Likewise.
8203 * elf32-mips.c (mips_elf_final_link): Likewise.
8204 * oasys.c (oasys_write_sections): Likewise.
8205
8206 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
8207 which checks for STYP_OVRFLO sections.
8208 (coff_compute_section_file_positions): If RS6000COFF_C, handle
8209 reloc and lineno count overflows.
8210 (coff_write_object_contents): Call coff_count_linenumbers before
8211 coff_compute_section_file_positions. If RS6000COFF_C, handle
8212 reloc and lineno count overflows.
8213 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
8214 relocs before dealing with .pad sections. Count overflow section
8215 headers when handling .pad sections.
8216
8217 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
8218 if RS6000COFF_C.
8219
8220 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
8221 (struct xcoff_link_hash_table): Add descriptor_section and
8222 special_sections fields.
8223 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
8224 (xcoff_link_add_symbols): Set linkage section alignment. Create
8225 descriptor section. Check for magic symbol names (_text, etc.),
8226 and record them in special_sections if found. Set
8227 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
8228 descriptor field to point back to the function code symbol.
8229 (xcoff_sweep): Always mark the special descriptor_section.
8230 (bfd_xcoff_export_symbol): Check whether the symbol might be a
8231 function descriptor, and mark it if it is.
8232 (bfd_xcoff_size_dynamic_sections): Add new special_sections
8233 parameter, and fill it in. Allocate space for the descriptor
8234 section.
8235 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
8236 global linkage code. If an undefined function descriptor is
8237 exported, arrange to define it. Warn about any other undefined
8238 exported symbol.
8239 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
8240 (xcoff_write_global_symbol): Create a function descriptor when
8241 necessary.
8242 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
8243 * bfd-in2.h: Rebuild.
8244
8245 Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
8246
8247 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
8248 (ppc_coff_link_hash_table): new types for hashing
8249 (ppc_coff_link_hash_newfunc): hash entry constructor
8250 (ppc_coff_link_hash_table_init): hash table initializer
8251 (ppc_coff_link_hash_table_create): hash table constructor
8252 (ppc_record_toc_entry): changed references to hash table
8253 (coff_ppc_relocate_section): changed references to hash table
8254
8255 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
8256 * libcoff.h: Rebuild
8257
8258 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
8259 (coff_link_add_symbols): removed toc_offset init
8260
8261 Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
8262
8263 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
8264 first.
8265
8266 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
8267 if it is given and mmep is available.
8268 * acconfig.h: Undef USE_MMAP.
8269 * configure, config.in: Regenerated.
8270 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
8271 table handling the old way.
8272 (aout_get_external_symbols): Don't complain if last byte of string
8273 table is nonzero.
8274 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
8275 (bfd_free_window) [! USE_MMAP]: Don't define.
8276 (bfd_get_file_window,
8277 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
8278
8279 Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
8280
8281 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
8282 0xffff0000.
8283
8284 Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
8285
8286 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
8287 compatible with AMD generated COFF files. Try to support both AMD
8288 and GNU formats simultaneously.
8289 (coff_a29k_relocate_section): Likewise.
8290
8291 * libbfd.c (bfd_get_file_window): Change writable parameter from
8292 int to boolean; update all callers. Pass MAP_SHARED if not
8293 writable--it's required on Solaris. Cast fprintf argument to
8294 avoid warning.
8295 * bfd-in.h (bfd_get_file_window): Update declaration.
8296 * bfd-in2.h: Rebuild.
8297 * aoutx.h: Update calls to bfd_get_file_window.
8298
8299 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
8300 Change all uses.
8301 (xcoff_swap_ldhdr_in): New static function.
8302 (xcoff_swap_ldsym_in): New static function.
8303 (xcoff_find_reloc): Handle the case of a single reloc correctly.
8304 (xcoff_link_add_symbols): If we just created a descriptor, pass it
8305 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
8306 Handle XTY_ER/XMC_XO symbols correctly.
8307 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
8308 rather than normal symbol table.
8309 (bfd_xcoff_import_symbol): It's not an error if the symbol is
8310 already defined with the same absolute value.
8311 (xcoff_mark): When considering called symbols, check whether the
8312 descriptor is from a dynamic object, rather than the symbol
8313 itself.
8314 (xcoff_build_ldsyms): Likewise.
8315
8316 * libbfd.c (bfd_get_file_window): Change return type to boolean.
8317 Cast realloc and malloc return values. If malloc or realloc fail,
8318 set bfd_error_no_memory.
8319 * bfd-in.h (bfd_get_file_window): Change type to boolean.
8320 * bfd-in2.h: Rebuild.
8321
8322 Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
8323
8324 * coff-ppc.c (ppc_record_toc_entry): new function.
8325 (in_reloc_p): changed return value.
8326 (coff_ppc_relocate_section): much rework.
8327 (ppc_allocate_toc_section): new function.
8328 (ppc_process_before_allocation): new function.
8329 (ppc_coff_swap_sym_in_hook): new function.
8330
8331 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
8332 (coff_link_add_symbols): initialize toc_offset.
8333
8334 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
8335 (coff_swap_aouthdr_out): Added more sections to the data
8336 dictionary for the pe file header. Also changed linker version
8337 number on the ppc side.
8338 (dir_names): small improvements to the dictionary printing.
8339 (pe_mkobject_hook): save the file level flags.
8340
8341 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
8342 (pe_tdata): added real_flags field
8343 (coff_tdata): added local_toc_sym_map and access macro
8344
8345 * libcoff.h (coff_link_hash_entry): added toc_offset field
8346 (pe_tdata): added real_flags field
8347 (coff_tdata): added local_toc_sym_map and access macro
8348
8349 * coffcode.h (coff_set_alignment_hook): added hook for PE.
8350 (coff_mkobject): init for local_toc_sym_map
8351 (coff_write_object_contents): set the internal_a.magic to
8352 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
8353 ppc compilers use.
8354
8355 Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
8356
8357 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
8358 entries until both the line number address and the function name
8359 address are too large.
8360
8361 * configure.in: Call AC_CHECK_PROG to find and cache AR.
8362 * configure: Rebuilt.
8363
8364 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
8365 is defined in the environment.
8366
8367 Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
8368
8369 * som.c (som_get_section_contents_in_window): Define to use
8370 generic version.
8371
8372 Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
8373
8374 * coff-i860.c: New file, based on coff-i386.c.
8375 * cpu-i860.c: New file, based on cpu-i386.c.
8376 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
8377 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
8378 targets, using i860coff_vec.
8379 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
8380 trad-core.o and hosts/i860mach3.h.
8381 (i860coff_vec): Use coff-i860.o and cofflink.o.
8382 * configure: Rebuild.
8383 * Makefile.in: Rebuild dependencies.
8384 (ALL_MACHINES): Add cpu-i860.o.
8385 (BFD32_BACKENDS): Add coff-i860.o.
8386 (CFILES): Add cpu-i860.c and coff-i860.c.
8387 * targets.c (i860coff_vec): Declare.
8388 (bfd_target_vector): Add &i860coff_vec.
8389 * archures.c (bfd_i860_arch): Declare.
8390 (bfd_archures_list): Add &bfd_i860_arch.
8391 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
8392 (coff_set_flags): Handle bfd_arch_i860.
8393 (coff_write_object_contents): Handle I860 a.out magic number.
8394
8395 Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
8396
8397 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
8398 the created .tc section to 2.
8399 (xcoff_mark): Don't keep a .loader reloc for a call to an
8400 undefined symbol when creating a shared library.
8401 (xcoff_build_ldsyms): When creating a shared library, generate
8402 global linkage code for a call to an undefined symbol.
8403
8404 Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
8405
8406 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
8407 BFD32_BACKENDS, BFD64_BACKENDS.
8408 (.dep1): Put mkdep output in a separate file.
8409 Rebuilt dependencies.
8410
8411 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
8412 value.
8413
8414 Permit use of mmap when available:
8415
8416 * configure.in: Check for mmap, madvise, mprotect.
8417 * config.in, configure: Regenerated.
8418
8419 * libbfd.c (struct _bfd_window_internal): Define type.
8420 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
8421 functions.
8422 (ok_to_map): New static variable for debugging.
8423 (_bfd_generic_get_section_contents_in_window): New function.
8424 * bfd-in.h (bfd_window_internal): Declare type.
8425 (bfd_window): Define type.
8426 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
8427 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
8428 Declare.
8429
8430 * libaout.h (struct aoutdata): Add two window fields.
8431 (obj_aout_sym_window, obj_aout_string_window): New macros.
8432 * aoutx.h (some_aout_object_p): Initialize windows.
8433 (aout_get_external_symbols): Get symbol data and strings in
8434 windows instead of explicitly allocated buffers.
8435 (slurp_symbol_table): Free window instead of memory.
8436 (bfd_free_cached_info): Release windows instead of freeing storage
8437 directly.
8438 (aout_link_free_symbols): Ditto.
8439
8440 * targets.c (bfd_target): Add new field for
8441 get_section_contents_in_window.
8442 (BFD_JUMP_TABLE_GENERIC): Updated.
8443 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
8444 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
8445 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
8446 macros for get_section_contents_in_window field.
8447
8448 Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
8449
8450 * core.c: Renamed to corefile.c
8451 * makefile.dos (OBJS): Change core.o to corefile.o
8452 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
8453
8454 Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
8455
8456 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
8457 to o. Clobber and restore the list of new csects around the call
8458 to _bfd_generic_link_add_one_symbol, in case it wants to report a
8459 linker error and the linker wants to read the symbol table. Reset
8460 the line number count of a real section even if it has no relocs.
8461 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
8462
8463 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
8464 is too small.
8465
8466 Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
8467
8468 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
8469 an undefined symbol in a shared link.
8470
8471 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
8472 oldtype from bfd_link_order_type to bfd_link_hash_type. From
8473 phdm@info.ucl.ac.be (Philippe De Muyter).
8474
8475 Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
8476
8477 * coff-m88k.c (rtype2howto): New static function.
8478 (RTYPE2HOWTO): Use it rather than a macro definition.
8479
8480 * coffcode.h (coff_write_object_contents): set internal_a.magic
8481 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
8482
8483 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
8484 define TRAD_HEADER to new file hosts/delta68.h.
8485 m88*-motorola-sysv*, however, does use ptrace-core.o.
8486 * hosts/delta68.h: New file.
8487
8488 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
8489 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
8490
8491 Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
8492
8493 * i386linux.c (MY(vec)): Declare before use.
8494
8495 Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
8496
8497 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
8498 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
8499
8500 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
8501 BFD is not of the right type.
8502 (bfd_elf_get_needed_list): Likewise.
8503 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
8504 * sunos.c (bfd_sunos_get_needed_list): Likewise.
8505 * xcofflink.c (XCOFF_XVECP): Define.
8506 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
8507 of the right type.
8508 (bfd_xcoff_import_symbol): Likewise.
8509 (bfd_xcoff_export_symbol): Likewise.
8510 (bfd_xcoff_link_count_reloc): Likewise.
8511 (bfd_xcoff_record_link_assignment): Likewise.
8512 (bfd_xcoff_size_dynamic_sections): Likewise.
8513
8514 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
8515 table index against the number of symbols for a base relative
8516 reloc.
8517
8518 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
8519 static function.
8520 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
8521 full_aouthdr flag here...
8522 (_bfd_xcoff_bfd_final_link): ...not here.
8523
8524 Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
8525
8526 * libelf.h: Rename to elf-bfd.h to avoid conflict with
8527 systems that have a system <libelf.h>.
8528 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
8529 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
8530 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
8531 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
8532 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
8533 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
8534 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
8535
8536 Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
8537
8538 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
8539 set, set BSF_WEAK in symbol. Change all callers.
8540 (ecoff_get_extr): Set weakext based on BSF_WEAK.
8541 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
8542 _bfd_generic_link_add_one_symbol.
8543 (ecoff_indirect_link_order): Check that the section tdata relocs
8544 are not NULL before using them.
8545
8546 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
8547 define TRAD_HEADER as hosts/alphalinux.h.
8548 * configure: Rebuild.
8549 * hosts/alphalinux.h: New file.
8550 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
8551 not int.
8552
8553 Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
8554
8555 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
8556 C_ECOMM storage classes.
8557
8558 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
8559 of xcoff_mark.
8560 (xcoff_mark): Call xcoff_mark_symbol.
8561 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
8562 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
8563 doing it by hand.
8564 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
8565
8566 Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
8567
8568 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
8569 field.
8570 (xcoff_find_reloc): New static function.
8571 (xcoff_link_add_symbols): Use it.
8572 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
8573 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
8574 relocate the value of C_DECL.
8575
8576 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
8577
8578 Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
8579
8580 * cofflink.c (_bfd_coff_generic_relocate_section): Make
8581 callback decide what goes in .relocs.
8582 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
8583 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
8584 there is one.
8585
8586 Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
8587
8588 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
8589 absolute section.
8590
8591 Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
8592
8593 * xcofflink.c: More improvements, mostly to fix handling of
8594 constructors and a few other special cases.
8595 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
8596 zero, reverting yesterday's change.
8597 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
8598 (bfd_xcoff_link_count_reloc): Declare.
8599 (bfd_xcoff_record_link_assignment): Declare.
8600 * bfd-in2.h: Rebuild.
8601
8602 Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
8603
8604 * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
8605 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
8606 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
8607 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
8608 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
8609 Change PAGE_SIZE to TARGET_PAGE_SIZE.
8610
8611 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
8612 format.
8613
8614 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
8615 segments includes the a.out header. See to that the magic number
8616 *always* is big-endian.
8617
8618 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
8619 m68k4k NetBSD configurations.
8620
8621 * configure.in, configure: Separate i386 & mips NetBSD
8622 configurations from other BSD ones. Don't assume DEC is the only
8623 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
8624 configurations. Add support for m68k4k NetBSD object format.
8625
8626 * libaout.h: Added M_68K4K_NETBSD magic.
8627
8628 * m68k4knetbsd.c: New file.
8629
8630 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
8631
8632 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
8633 <machine/endian.h>.
8634
8635 * hosts/mipsnbsd.h: New file.
8636
8637 Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
8638
8639 * xcofflink.c: Numerous changes to get closer to a working XCOFF
8640 linker.
8641 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
8642 toc_section, and entry_section fields.
8643 (struct xcoff_section_tdata): Remove ldrel_count field.
8644 * libcoff.h: Rebuild.
8645 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
8646 fields.
8647 (coff_compute_section_file_positions): If RS6000COFF_C, generate
8648 full a.out header if full_aouthdr is set in xcoff_data.
8649 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
8650 based on sections stored in xcoff_data.
8651 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
8652 fields.
8653 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
8654 (rs6000coff_vec): Set symbol_leading_char to '.'.
8655 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
8656 value stored in ret rather than returning a pointer value.
8657
8658 Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
8659
8660 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
8661 format for now.
8662
8663 Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
8664
8665 * som.c (som_slurp_string_table): Allocate the strings with malloc
8666 since they're free'd by free_cached_info.
8667 (som_slurp_symbol_table): Similarly for the symbol table.
8668
8669 Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
8670
8671 * Makefile.in (diststuff): Don't make headers.
8672
8673 Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
8674
8675 * Makefile.in: Rebuild dependencies.
8676
8677 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
8678 output_bfd is not SunOS.
8679 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
8680 non-SunOS input files.
8681
8682 * xcofflink.c: Extensive changes to support linking shared objects
8683 and generating a .loader section.
8684 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
8685 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
8686 last_symndx, and ldrel_count fields.
8687 * libcoff.h: Rebuild.
8688 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
8689 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
8690 is set.
8691 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
8692 (bfd_xcoff_export_symbol): Declare.
8693 (bfd_xcoff_size_dynamic_sections): Declare.
8694 * bfd-in2.h: Rebuild.
8695
8696 Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
8697
8698 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
8699 * configure: Rebuild.
8700 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
8701 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
8702 contents.
8703 (pmac_xcoff_vec): Update to use new xcoff support.
8704 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
8705 (xcoff_write_armap): Declare buf as unsigned char.
8706 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
8707
8708 * mpw-make.sed: Generalize subdir_do edit.
8709
8710 Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
8711
8712 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
8713 correctly. Don't initialize asect->vma.
8714
8715 Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
8716
8717 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
8718 something a little less than the page size.
8719
8720 Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
8721
8722 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
8723
8724 Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
8725
8726 * coff-i386.c (coff_i386_reloc_type_lookup): New.
8727 * coffcode.h (coff_write_object_contents): If .bss is before
8728 .data us that as data_start.
8729 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
8730 calc correct.
8731 * peicode.h (add_data_entry): Use _cooked_size of data directory.
8732 (coff_swap_outhdr_out): Hardwire in version number.
8733
8734 Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
8735
8736 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
8737 major and minor to *_vno, since the former are also macros in
8738 SunOS header files. Cast result of bfd_alloc to appropriate
8739 type.
8740
8741 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
8742 before assigning to sec_data.
8743
8744 Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
8745
8746 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
8747 now relative to the section, not absolute.
8748 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
8749 get the file name when there is a N_SO directory name. When
8750 handling stabs, remember that section->vma was added to the
8751 offset.
8752
8753 Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
8754
8755 * sunos.c (struct sunos_link_hash_table): Add needed field.
8756 (sunos_link_hash_table_create): Call bfd_release, not free.
8757 (sunos_link_hash_table_create): Initialize needed field.
8758 (sunos_add_dynamic_symbols): Record needed objects.
8759 (bfd_sunos_get_needed_list): New function.
8760 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
8761 * bfd-in2.h: Rebuild.
8762
8763 Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
8764
8765 * libcoff-in.h (pe_data_type.in_reloc_p): New.
8766
8767 Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
8768
8769 * bfd-in.h (struct bfd_link_needed_list): Rename from
8770 bfd_elf_link_needed_list.
8771 * bfd-in2.h: Rebuild.
8772 * elf.c, elflink.h, libelf.h: Corresponding changes.
8773
8774 Add start at AIX linker support; no shared libraries yet.
8775 * xcofflink.c: New file.
8776 * configure.in (rs600coff_vec): Use xcofflink.o.
8777 * configure: Rebuild.
8778 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
8779 fields.
8780 (struct xcoff_section_tdata): Define.
8781 (xcoff_section_data): Define macro.
8782 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
8783 (_bfd_xcoff_bfd_link_add_symbols): Declare.
8784 (_bfd_xcoff_bfd_final_link): Declare.
8785 (_bfd_ppc_xcoff_relocate_section): Declare.
8786 * libcoff.h: Rebuild.
8787 * coff-rs6000.c: Clean up a bit.
8788 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
8789 cputype, csects, and debug_indices.
8790 (xcoff_copy_private_bfd_data): Copy cputype.
8791 (xcoff_howto_table): Rename from rs6000coff_howto_table.
8792 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
8793 (xcoff_reloc_type_lookup): Rename from
8794 rs6000coff_reloc_type_lookup.
8795 (coff_relocate_section): Define.
8796 (_bfd_xcoff_sizeof_headers): Define.
8797 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
8798 (_bfd_xcoff_bfd_relax_section): Define.
8799 (_bfd_xcoff_bfd_link_split_section): Define.
8800 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
8801 coff.
8802 * coffcode.h (coff_compute_section_file_positions): If AIX,
8803 increment sofar by SMALL_AOUTSZ if not executable.
8804 (coff_write_object_contents): If AIX, always output an a.out
8805 header; if not executable, header size of SMALL_AOUTSZ.
8806 * hash.c (struct bfd_strtab_hash): Add xcoff field.
8807 (_bfd_stringtab_init): Initialize xcoff field.
8808 (_bfd_xcoff_stringtab_init): New function.
8809 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
8810 (_bfd_stringtab_emit): In XCOFF mode, write out length.
8811 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
8812 * libbfd.h: Rebuild.
8813 * Makefile.in: Rebuild dependencies.
8814 (BFD32_BACKENDS): Add xcofflink.o.
8815 (CFILES): Add xcofflink.c.
8816
8817 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
8818 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
8819 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
8820
8821 Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
8822
8823 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
8824
8825 Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
8826
8827 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
8828 * config.in: Regenerated.
8829
8830 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
8831 (_bfd_chunksize): New variable.
8832 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
8833 for obstack chunk size.
8834 * configure.in: Check for getpagesize.
8835 * configure: Regenerated.
8836
8837 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8838
8839 * trad-core.c (rawptr): Make it a local variable of
8840 ptrace_unix_core_file_p.
8841
8842 Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
8843
8844 * coff-arm.c (in_reloc_p): New.
8845 * coff-i386.c (in_reloc_p): New.
8846 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
8847 (coff_write_object_contents): Only set has_reloc_section
8848 if PE_IMAGE.
8849 * cofflink.c (_bfd_coff_generic_relocate_section): Call
8850 in_reloc_p to decide if reloc should be emitted.
8851 * libcoff.h (pe_data_type.in_reloc_p): New.
8852 * peicode.h (pe_mkobject): Initialize in_reloc_p.
8853
8854 Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
8855
8856 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
8857 (_bfd_coff_read_internal_relocs): Likewise.
8858 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
8859 (_bfd_coff_read_internal_relocs): Likewise.
8860
8861 * elflink.h (elf_link_add_object_symbols): Correct conditions
8862 under which type and size change warnings are issued.
8863
8864 Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
8865
8866 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
8867 a symbol which is not in a real section.
8868 (coff_write_native_symbol): Corresponding change.
8869
8870 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
8871 coff_link_hash_newfunc and make non-static.
8872 (_bfd_coff_link_hash_table_init): New function, broken out of
8873 _bfd_coff_link_hash_table_create.
8874 (_bfd_coff_link_hash_table_create): Use it.
8875 (process_embedded_commands): Make static.
8876 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
8877 (_bfd_coff_link_hash_table_init): Declare.
8878 * libcoff.h: Rebuild.
8879
8880 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
8881 field in XCOFF tdata.
8882 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
8883 U802ROMAGIC, for clarity. Try to set arch and machine correctly
8884 based on cputype stored in a.out header, or in n_type of initial
8885 .file symbol.
8886 (coff_write_object_contents): Set cputype correctly in a.out
8887 header.
8888 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
8889 warnings.
8890 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
8891 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
8892 old resv1 field.
8893 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
8894 * libcoff.h: Rebuild.
8895
8896 * cpu-rs6000.c (rs6000_compatible): New static function.
8897 (bfd_rs6000_arch): Use it.
8898 * cpu-powerpc.c (powerpc_compatible): New static function.
8899 (arch_info_struct): Define various flavours of PowerPC.
8900 (bfd_powerpc_arch): Use powerpc_compatible. Point at
8901 arch_info_struct.
8902
8903 Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
8904
8905 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
8906
8907 Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
8908
8909 * elflink.h (elf_link_add_object_symbols): Don't warn about
8910 changing the size or type if the old definition was weak.
8911
8912 Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
8913
8914 * coffcode.h (combined_entry_type): Add fix_line field.
8915 (coff_slurp_line_table): Warn if we try to set the lineno field of
8916 a symbol twice.
8917 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
8918 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
8919 * coffgen.c (coff_mangle_symbols): Handle fix_line.
8920 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
8921 absolute section.
8922 (coff_print_symbol): Print fix_value symbols in a useful fashion.
8923 * libcoff.h: Rebuild.
8924
8925 * libcoff-in.h (struct xcoff_tdata): Define.
8926 (xcoff_data): Define.
8927 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
8928 * bfd-in2.h, libcoff.h: Rebuild.
8929 * coff-rs6000.c (xcoff_mkobject): New static function.
8930 (coff_mkobject): Define.
8931 (xcoff_copy_private_bfd_data): New static function.
8932 (coff_bfd_copy_private_bfd_data): Define.
8933 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
8934 signed to bitfield.
8935 (rs6000coff_vec): Add DYNAMIC to object_flags.
8936 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
8937 .loader sections specially.
8938 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
8939 section alignment from the XCOFF tdata information.
8940 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
8941 F_SHROBJ, and copy the extra a.out header information into the
8942 XCOFF tdata structure.
8943 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
8944 F_DYNLOAD and the extra a.out header information.
8945 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
8946 C_HIDEXT symbol with attached csect information.
8947 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
8948 in the o_maxdata field.
8949 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
8950 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
8951 end if BSF_NOT_AT_END is set.
8952
8953 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
8954 _bfd_read_ar_hdr_fn.
8955 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
8956 * bfd-in2.h, libbfd.h: Rebuild.
8957 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
8958 return value.
8959 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
8960 (bfd_slurp_bsd_armap_f2): Likewise.
8961 (_bfd_slurp_extended_name_table): Likewise.
8962
8963 Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
8964
8965 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8966
8967 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
8968 when the symbol table is empty.
8969
8970 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
8971 space for section symbols, since we don't output them either.
8972 (elf_m68k_adjust_dynindx): Removed.
8973
8974 * ptrace-core.c (rawptr): Make it a local variable of
8975 ptrace_unix_core_file_p.
8976
8977 Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
8978
8979 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
8980 NULL.
8981
8982 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
8983 Mac object file formats.
8984
8985 Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
8986
8987 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
8988 auxent if there isn't one.
8989 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
8990 rather than FILNMLEN as the maximum name length.
8991
8992 * coffcode.h (bfd_coff_backend_data): Add new field
8993 _bfd_coff_print_aux.
8994 (bfd_coff_print_aux): New static function.
8995 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
8996 scnlen field of an XTY_LD csect aux entry.
8997 (coff_print_aux): New static function.
8998 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
8999 in coff_pointerize_aux_hook.
9000 (bfd_coff_std_swap_table): Initialize new field.
9001 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
9002 * libcoff.h: Rebuild.
9003 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
9004 * coff-mips.c (mips_ecoff_backend_data): Likewise.
9005
9006 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
9007 if there are symbols, for native AIX ld compatibility.
9008
9009 * coffcode.h (bfd_coff_backend_data): Add new field
9010 _bfd_coff_pointerize_aux_hook.
9011 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
9012 or I960, and as 0 otherwise.
9013 (bfd_coff_std_swap_table): Initialize new field.
9014 * libcoff.h: Rebuild.
9015 * coffgen.c (coff_pointerize_aux): Change parameters to take
9016 symbol pointer instead of type and class, and to take aux index.
9017 Call _bfd_coff_pointerize_aux_hook if it is defined.
9018 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
9019 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
9020 * coff-mips.c (mips_ecoff_backend_data): Likewise.
9021
9022 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
9023 read-only/host-only support.
9024
9025 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
9026 BSF_LOCAL.
9027 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
9028 RS6000COFF_C.
9029
9030 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
9031 BFD_JUMP_TABLE_ARCHIVE accordingly.
9032 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
9033 (_bfd_compute_and_write_armap): Declare.
9034 (_bfd_generic_read_ar_hdr): Declare.
9035 (_bfd_read_ar_hdr): Define.
9036 (_bfd_noarchive_read_ar_hdr): Define.
9037 (_bfd_archive_bsd_read_ar_hdr): Define.
9038 (_bfd_archive_coff_read_ar_hdr): Define.
9039 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
9040 _bfd_read_ar_hdr instead.
9041 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
9042 (_bfd_compute_and_write_armap): Rename from
9043 compute_and_write_armap. Make non-static. Change all callers.
9044 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
9045 than _bfd_snarf_ar_hdr.
9046 * aout-target.h (MY_read_ar_hdr): Define if not defined.
9047 * ieee.c (ieee_read_ar_hdr): Define.
9048 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
9049 * oasys.c (oasys_read_ar_hdr): Define.
9050 * som.c (som_read_ar_hdr): Define.
9051 * bfd-in2.h, libbfd.h: Rebuild.
9052
9053 Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
9054
9055 * peicode.c (coff_swap_filehdr_in): If symptr is
9056 zero, there aren't any symbols, even if nsyms is set.
9057
9058 Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
9059
9060 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
9061 field.
9062 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
9063 sections, and set styp correctly for them: .got, .hash, .dynamic,
9064 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
9065 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
9066 types.
9067 (ecoff_sort_hdrs): New static function.
9068 (ecoff_compute_section_file_positions): Return boolean, not void.
9069 Sort the sections by VMA before looking through them. Put the
9070 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
9071 section on an appropriate boundary within the page.
9072 (ecoff_compute_reloc_file_positions): Check return value of
9073 ecoff_compute_section_file_positions.
9074 (_bfd_ecoff_set_section_contents): Likewise.
9075 (_bfd_ecoff_write_object_contents): Check for various Alpha
9076 section types when incrementing text_size and data_size. Call
9077 adjust_headers backend function if it exists.
9078 * coff-alpha.c (alpha_adjust_headers): New static function.
9079 (alpha_ecoff_backend_data): Initialize adjust_headers field.
9080 * coff-mips.c (mips_ecoff_backend_data): Likewise.
9081
9082 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
9083
9084 Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
9085
9086 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
9087 of ALTERNATE_AIX_CORE_FORMAT.
9088 * configure.in (aix4): No longer need CORE_FLAGS.
9089 * configure: Updated.
9090
9091 Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
9092
9093 NS32k changes from Ian Dall:
9094 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
9095 macros.
9096 (aout_link_input_section_std, aout_link_input_section_ext,
9097 aout_link_reloc_link_order): Call them instead of _bfd_*
9098 versions.
9099 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
9100 to zero.
9101 (backend_data): Use it instead of hardcoded zero.
9102
9103 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
9104 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
9105
9106 * ns32knetbsd.c: Include bfd.h.
9107 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
9108 (MY_bfd_reloc_type_lookup): Declare function too.
9109 * pc532-mach.c (set_sizes): Don't declare.
9110 (MY_text_includes_header, MY_exec_header_not_counted): Define.
9111 (backend_data, MY_backend_data): Don't define.
9112
9113 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
9114 ns32k-*-lites* like ns32k-*-netbsd*.
9115
9116 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
9117 compile on lites.
9118
9119 Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
9120
9121 * coffcode.h (coff_write_object_contents): Restore setting
9122 f_timdat to 0, deleted on August 22.
9123
9124 Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
9125
9126 * coffcode.h (coff_bfd_copy_private_symbol_data,
9127 coff_bfd_copy_private_section_data,
9128 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
9129 * peicode.h (coff_bfd_copy_private_bfd_data): New
9130 (pe_bfd_copy_private_bfd_data): New.
9131 (coff_swap_scnhdr_in): Swap bss size into the right place.
9132 (pe_print_private_bfd_data): Add some newlines.
9133
9134 Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
9135
9136 * som.c (setup_sections): Don't die if a space has no subspaces.
9137
9138 Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
9139
9140 * elflink.h (elf_link_add_object_symbols): Don't let a weak
9141 dynamic symbol override a common symbol. Don't change the size or
9142 type if they have been set and the new symbol is not a definition.
9143 Warn if the size or type changes.
9144
9145 Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
9146
9147 * som.c (som_begin_writing): Don't write the symbol table or
9148 symbol strings.
9149 (som_finish_writing): Write them here. Place them after the
9150 subspace data, but before the relocs.
9151
9152 Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
9153
9154 * sunos.c (sunos_add_one_symbol): Just pass false, not
9155 info->shared_library, to sunos_create_dynamic_sections.
9156 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
9157 section.
9158 (sunos_check_dynamic_reloc): Remove .text section assertion.
9159
9160 Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
9161
9162 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
9163 * configure, configure.in: Add pmac_xcoff_vec case.
9164 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
9165 * coff-pmac.c: New file, PowerMac XCOFF support.
9166 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
9167 * targets.c (pmac_xcoff_vec): Declare.
9168
9169 * mpw-config.in: Various changes to be compatible with the
9170 autoconf-based configury.
9171 * mpw-make.sed: New file, sed commands to translate Unix
9172 makefile into MPW syntax.
9173 * mpw-make.in: Remove.
9174 * hosts/mpw.h: Remove.
9175 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
9176 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
9177
9178 Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
9179
9180 * binary.c (binary_get_symtab): Return an empty string on error.
9181 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
9182
9183 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
9184
9185 * coff-ppc.c: Reformatted according to gnu conventions
9186 Removed irrelevant "if 0" code
9187
9188 Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
9189
9190 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
9191 symbols rather than as indirect symbols.
9192 (MY(slurp_symbol_table)): Don't do anything special about
9193 secondary symbols.
9194
9195 * coffcode.h (coff_new_section_hook): Make sure that the alignment
9196 of .ctors and .dtors sections is no larger than 2.
9197
9198 * sunos.c (sunos_add_one_symbol): Don't change
9199 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
9200 undef list.
9201 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
9202 dynamic symbols when creating a shared library.
9203 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
9204 shared library.
9205 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
9206 written even if it is not defined in a regular object.
9207 (sunos_write_dynamic_symbol): Use plt_offset for the address of
9208 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
9209 rather than the constant 22.
9210 (sunos_check_dynamic_reloc): Handle creating a shared library.
9211 (sunos_finish_dynamic_link): Set the first entry in the GOT to
9212 zero when creating a shared library.
9213 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
9214 write it out at the start of the symbol table.
9215
9216 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
9217
9218 Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
9219
9220 * config.bfd: Add arm-*-coff.
9221 * configure.in, configure: Add armcoff_{little,big}_vec.
9222 * targets.c (armcoff_{little,big}_vec): Declare.
9223 (bfd_target_vector): Add armcoff_{little,big}_vec.
9224 * coff-arm.c (armcoff_{little,big}_vec): Always define.
9225
9226 Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
9227
9228 * targets.c (bfd_find_target): Remove debugging code.
9229
9230 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
9231
9232 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
9233 support on powerpc.
9234 * Makefile.in: added *-ppc files
9235 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
9236 allow pe based .o's to be shared with other tools on ppc/NT
9237 * config.bfd: added powerpc[le]-[pe|winnt] config support
9238 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
9239 * peicode.h: Added more section flags for PE on ppc
9240 Added coff_swap_filehdr_out to allow peicode.h to be
9241 used for non-image PE files on ppc.
9242 Check for image, or not, before copying pe_opthdr
9243 * targets.c: Added new bfd's
9244 * targets.c: Removed two inactive bfds that shouldn't have made it this
9245 far.
9246
9247 Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
9248
9249 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
9250 explicit values to initialize all relocs. Change all users.
9251 (ppc_elf_brtaken_inner): New function to handle branch predicition
9252 relocs.
9253 (ppc_elf_brtaken_reloc): Ditto.
9254 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
9255 relocs use ppc_elf_unsupported_reloc.
9256 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
9257 needs to be reported.
9258 (ppc_elf_relocate_section): Support branch prediction relocs.
9259
9260 Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
9261
9262 * bfd.c (bfd_assert): Remove \n from string passed to
9263 _bfd_error_handler.
9264
9265 * coff-i386.c: (TWO_DATA_SECS): Don't define.
9266 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
9267 (bfd_coff_make_section_hook): Don't define.
9268 (coff_make_section_hook): Remove.
9269 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
9270 (styp_to_sec_flags): Likewise.
9271 (coff_write_object_contents): Likewise.
9272 (bfd_coff_std_swap_table): Don't initialize make_section_hook
9273 field.
9274 * libcoff.h: Rebuild.
9275 * coffgen.c (make_a_section_from_file): Just call
9276 bfd_make_section_anyway, not bfd_make_section or
9277 bfd_coff_make_section_hook.
9278 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
9279 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
9280 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
9281 make_section_hook field.
9282 * coff-mips.c (mips_ecoff_backend_data): Likewise.
9283
9284 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
9285 pointers into value field for warning and indirect symbols; just
9286 leave the value field alone.
9287 * linker.c (generic_link_add_symbol_list): Use next symbol for
9288 warning and indirect symbols, rather than looking in symbol value.
9289 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
9290 parameter. Change all callers. Remove support for indirect
9291 symbols; it didn't work anyhow.
9292 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
9293 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
9294 * bfd-in2.h: Rebuild.
9295
9296 Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
9297
9298 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
9299 go back to telling the tools this reloc operates on 32 bits.
9300
9301 Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
9302
9303 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
9304 rather than a direct fprintf.
9305 * archive.c (_bfd_write_archive_contents): Likewise.
9306 * coffcode.h (coff_slurp_symbol_table): Likewise.
9307 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
9308 (ppc_elf_unsupported_reloc): Likewise.
9309 (ppc_elf_relocate_section): Likewise.
9310 * i386linux.c (linux_tally_symbols): Likewise.
9311 (linux_finish_dynamic_link): Likewise.
9312 * osf-core.c (osf_core_core_file_p): Likewise.
9313 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
9314 * som.c (som_sizeof_headers): Likewise.
9315 * srec.c (srec_bad_byte): Likewise.
9316 * bfd.c (bfd_assert): Likewise. Also change file to be const.
9317 * libbfd-in.h (bfd_assert): Declare first parameter const.
9318 * libbfd.h: Rebuild.
9319 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
9320 bfd_reloc_overflow is enough.
9321 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
9322 * coff-h8500.c (rtype2howto): Likewise.
9323 * coff-z8k.c (rtype2howto): Likewise.
9324 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
9325 * elf.c (_bfd_elf_get_lineno): Likewise.
9326 (_bfd_elf_no_info_to_howto): Likewise.
9327 (_bfd_elf_no_info_to_howto_rel): Likewise.
9328 * hp300hpux.c (convert_sym_type): Likewise.
9329 (MY(swap_std_reloc_in)): Likewise.
9330 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
9331
9332 * libaout.h (struct aoutdata): Add line_buf field.
9333 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
9334 and filename_buffer. Instead, use a malloc buffer stored in the
9335 new line_buf field. Remove length restrictions.
9336
9337 * coffgen.c (string_size): Remove static variable.
9338 (debug_string_size, debug_string_section): Likewise.
9339 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
9340 and debug_string_size_p parameters. Use them instead of the
9341 global variables. Change all callers.
9342 (coff_write_symbol): Likewise.
9343 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
9344 (coff_write_symbols): Add local variables to replace removed
9345 global variables.
9346
9347 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
9348 function, and line_base fields.
9349 * libcoff.h: Rebuild.
9350 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
9351 information, rather than using static variables.
9352
9353 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
9354 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
9355
9356 * init.c (initialized): Remove static variable.
9357 (bfd_init): Don't bother setting initialized.
9358 (bfd_check_init): Remove.
9359 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
9360 * libbfd.h: Rebuild.
9361
9362 Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
9363
9364 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
9365 size for full core dumps. Copy core file header to private data.
9366 (rs6000coff_core_file_failing_command,
9367 rs6000coff_core_file_failing_signal): New functions to extract
9368 the file name and terminating signal from the core file.
9369 * coff-rs6000.c: Use them.
9370
9371 Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
9372
9373 Change arch info to be const, initialized at compile time.
9374 * archures.c: Reindent many functions. Change CONST to const.
9375 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
9376 nothing set it anyhow. Make next const.
9377 (bfd_arch_info_list): Remove.
9378 (bfd_archures_list): Rename from archures_init_table. Change from
9379 a table of function pointers to a table of bfd_arch_info_type
9380 structure addresses.
9381 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
9382 (bfd_lookup_arch): Likewise.
9383 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
9384 const pointer.
9385 (bfd_default_arch_struct): Make const.
9386 (bfd_arch_init, bfd_arch_linkin): Remove.
9387 (bfd_get_arch_info): Return a const pointer.
9388 * init.c (bfd_init): Don't call bfd_arch_init.
9389 * bfd.c (struct _bfd): Make arch_info const.
9390 * bfd-in2.h: Rebuild.
9391 * libbfd.h: Rebuild.
9392 * configure.in: Put & before everything in $selarchs.
9393 * configure: Rebuild.
9394 * cpu-*.c: Change bfd_*_arch from a function which calls
9395 bfd_arch_linkin to a const structure.
9396 * ieee.c (ieee_object_p): Make arch const.
9397
9398 Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
9399
9400 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
9401 PowerPC V.4.
9402 * bfd-in2.h: Regenerate.
9403 * libbfd.h: Regenerate.
9404
9405 * elf32-ppc.c (reloc_type): Update names to match current draft.
9406 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
9407 relative. Update names to current V.4 draft.
9408 (ppc_elf_reloc_type_lookup): Add support for more relocations.
9409 (ppc_elf_relocate_section): Rename relocations to match draft.
9410
9411 Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
9412
9413 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
9414 compiled with -mrelocatable-lib to be linked with either normal
9415 modules or -mrelocatable modules.
9416
9417 Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
9418
9419 * coffcode.h (coff_write_object_contents): Clear the vstamp field
9420 in the a.out header.
9421
9422 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
9423 a reloc against a local symbol, even if it's not a section.
9424
9425 Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
9426
9427 * targets.c (bfd_target): Remove unused align_power_min field.
9428 * bfd-in2.h: Rebuild.
9429 * All backends: Remove initialization of align_power_min.
9430
9431 Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
9432
9433 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
9434
9435 Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
9436
9437 * config.bfd (mips-dec-netbsd*): New target.
9438 * configure.host (mips-dec-netbsd*): New host.
9439 * configure.in (mips-dec-netbsd*): New native.
9440 * configure: Rebuild.
9441
9442 Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
9443
9444 Make the COFF backend linker merge common types:
9445 * cofflink.c (struct coff_debug_merge_element): Define.
9446 (struct coff_debug_merge_type): Define.
9447 (struct coff_debug_merge_hash_entry): Define.
9448 (struct coff_debug_merge_hash_table): Define.
9449 (coff_debug_merge_hash_table_init): Define.
9450 (coff_debug_merge_hash_table_free): Define.
9451 (coff_debug_merge_hash_lookup): Define.
9452 (struct coff_final_link_info): Add debug_merge field.
9453 (coff_debug_merge_hash_newfunc): New static function.
9454 (_bfd_coff_final_link): Allocate and free debug_merge table.
9455 (coff_link_input_bfd): Merge identical enum, struct and union
9456 types.
9457
9458 Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
9459
9460 Convert i960 COFF to use COFF backend linker.
9461 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
9462 structure to store the symbol being used.
9463 (coff_i960_start_final_link): New static function.
9464 (coff_i960_relocate_section): New static function.
9465 (coff_i960_adjust_symndx): New static function.
9466 (coff_start_final_link): Define.
9467 (coff_relocate_section): Define.
9468 (coff_adjust_symndx): Define.
9469 * coffcode.h (bfd_coff_backend_data): Add new callback function
9470 _bfd_coff_start_final_link.
9471 (bfd_coff_start_final_link): Define.
9472 (coff_start_final_link): Define if not defined.
9473 (bfd_coff_std_swap_table): Add coff_start_final_link.
9474 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
9475 visible.
9476 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
9477 function callback is not NULL.
9478 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
9479 (_bfd_coff_internal_syment_name): Declare.
9480 * libcoff.h: Rebuild.
9481 * configure.in (icoff_big_vec): Add cofflink.o.
9482 (icoff_little_vec): Likewise.
9483 * configure: Rebuild.
9484
9485 Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
9486
9487 * Makefile.in (clean-info): Remove extraneous tab from line
9488 following action.
9489
9490 Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
9491
9492 * cofflink.c (coff_link_input_bfd): Fail if a section with no
9493 contents has relocs.
9494
9495 Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
9496
9497 * coffcode.h (coff_compute_section_file_positions): Keep the
9498 raw size safe.
9499 (coff_write_object_contents): Remember if it's a relocatable
9500 file.
9501 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
9502 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
9503 if relocatable file. Swap out saved raw size.
9504
9505 Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
9506
9507 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
9508 (maintainer-clean): Rename from realclean, passing
9509 maintainer-clean down to subdirectories, but leave realclean as a
9510 synonym.
9511
9512 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
9513 warning callback.
9514
9515 * dep-in.sed: Remove config.h from generated dependencies.
9516
9517 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
9518 broken out of sunos_canonicalize_dynamic_symtab.
9519 (sunos_canonicalize_dynamic_symtab): Call new function
9520 sunos_slurp_dynamic_symtab.
9521 (sunos_add_dynamic_symbols): Add three new parameters. Return the
9522 dynamic symbol table to the caller.
9523 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
9524 callback to override the symbols being read.
9525 * libaout.h (struct aout_backend_data): Add three new parameters
9526 to add_dynamic_symbols callback.
9527
9528 Extensive minor changes to avoid various gcc warnings. Also:
9529 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
9530 * archures.c (bfd_arch_info_type): Change mach field from long to
9531 unsigned long.
9532 (bfd_lookup_arch): Change machine parameter from long to unsigned
9533 long.
9534
9535 Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
9536
9537 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
9538 a symbol with a non-zero plt_offset.
9539
9540 Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
9541
9542 * elfcode.h (align_file_position): Remove; not used.
9543
9544 * configure.in: Only check for <sys/procfs.h> on a native system,
9545 and make sure it defines prstatus_t.
9546 * configure: Rebuild.
9547
9548 Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
9549
9550 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
9551
9552 * config.in: Rename from config.h.in.
9553 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
9554 Check for config.h:config.in when creating stamp-h.
9555 * configure: Rebuild.
9556 * Makefile.in (stamp-h): Depend upon config.in rather than
9557 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
9558 calling config.status.
9559
9560 * Makefile.in (do_distclean): Remove config.h and stamp-h.
9561 (Makefile): Just rebuild Makefile.
9562 (config.h, stamp-h): New targets.
9563 * configure.in: Create stamp-h when rebuilding config.h.
9564 * configure: Rebuild.
9565
9566 Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
9567
9568 * configure.in: Call AC_CONFIG_HEADER. Substitute
9569 HOST_64BIT_LONG. Check that various header files exist. Check
9570 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
9571 and/or free need to be declared. Don't make a link to sysdep.h.
9572 Define TRAD_HEADER for various hosts.
9573 * configure: Rebuild.
9574 * configure.host: Don't set my_host. Add definitions taken from
9575 host header files for various entries. Remove entries which now
9576 do nothing.
9577 * acconfig.h: New file.
9578 * config.h.in: New file, built by autoheader.
9579 * sysdep.h: New file.
9580 * Makefile.in (do_distclean): Don't remove sysdep.h.
9581 (RECONFIG): Remove.
9582 (LOCAL_H_DEPS): New variable.
9583 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
9584 $(RECONFIG).
9585 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
9586 ($(OPTIONAL_BACKENDS)): Likewise.
9587 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
9588 looking through sysdep.h.
9589 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
9590 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
9591 (fprintf_vma, sprintf_vma): Likewise.
9592 (int64_type, uint64_type): Don't define.
9593 * bfd-in2.h: Rebuild.
9594 * archures.c, bfd.c, srec.c: Include <ctype.h>.
9595 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
9596 * lynx-core.c: Include stuff from old hosts/lynx.h.
9597 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
9598 rather than NO_FCNTL.
9599 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
9600 rather than NATIVE_HPPAHPUX_COMPILER.
9601 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
9602 is defined.
9603 * hosts/*.h: Remove all header files which merely include,
9604 declare, and define things. Leave header files which define
9605 information needed by trad-core.c.
9606
9607 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
9608 (BFD_CC_FOR_BUILD): Define.
9609 * configure.in: Use BFD_CC_FOR_BUILD.
9610 * configure: Rebuild.
9611
9612 Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
9613
9614 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
9615 * configure: Rebuild.
9616
9617 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
9618 a global symbol.
9619
9620 Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
9621
9622 * config.bfd: i386pe_ve -> i386pe_vec.
9623
9624 Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
9625
9626 * configure.host: Incorporate host Makefile fragments by setting
9627 shell variables.
9628 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
9629 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
9630 value based on whether the code is being compiled by a cross
9631 compiler. Don't substitute host_makefile_frag or frags.
9632 * aclocal.m4: New file to define local AC_PROG_CC.
9633 * configure: Rebuild.
9634 * Makefile.in (INSTALL): Set to @INSTALL@.
9635 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
9636 (INSTALL_DATA): Set to @INSTALL_DATA@.
9637 (AR): Set to @AR@.
9638 (CC): Define as @CC@.
9639 (CFLAGS): Set to @CFLAGS@.
9640 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
9641 (@host_makefile_frag@): Remove.
9642 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
9643 after other options.
9644 (config.status): Remove dependency upon @frags@.
9645 * config/*.mh, config/README: Remove.
9646
9647 * config.bfd: Rewrite to incorporate the contents of the Makefile
9648 fragments by setting shell variables, rather than merely returning
9649 the name of a Makefile fragment.
9650 * configure.in: Use shell variables set by config.bfd rather than
9651 looking at the target Makefile fragment files. Don't substitute
9652 target_makefile_frag. Do substitute TDEFINES.
9653 * configure: Rebuild.
9654 * Makefile.in (@target_makefile_frag@): Remove.
9655 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
9656 * config/*.mt: Remove.
9657
9658 Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
9659
9660 * configure.in: Put changequote lines around "i[345]86" patterns
9661 section of core file support.
9662
9663 Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
9664
9665 * som.c (som_bfd_print_private_bfd_data): Define to use the
9666 generic version.
9667
9668 Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
9669
9670 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
9671 entry, text_start and data_start.
9672
9673 Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
9674
9675 * Makefile.in (OFILES): Remove $(TDEPFILES).
9676 * config/apollo.mt (TDEPFILES): Remove.
9677 * config/README: Update.
9678
9679 * configure.in: For a native configuration, set COREFILE and
9680 COREFLAG based on the canonical host name.
9681 * configure: Rebuild.
9682 * Makefile.in: Rebuild dependencies.
9683 (ALL_CFLAGS): Add @COREFLAG@.
9684 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
9685 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
9686 support routines. Check LYNX_CORE rather than HOST_LYNX.
9687 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
9688 * i386lynx.c: Likewise.
9689 * m68klynx.c: Likewise.
9690 * sparclynx.c: Likewise.
9691 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
9692 * *-core.c: Comment changes.
9693 * config/decstation.mh (HDEPFILES): Remove.
9694 (HDEFINES): Remove -DTRAD_CORE.
9695 * config/irix3.mh (RANLIB): Remove.
9696 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
9697 (HDEFINES): Remove -DIRIX_CORE.
9698 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
9699 (HDEFINES): Remove -DTRAD_CORE.
9700 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
9701 * config/ultra3.mh (RANLIB): Remove.
9702 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
9703 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
9704 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
9705 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
9706 * config/hppahpux.mh, config/hppaosf.mh: Remove.
9707 * config/i386aix.mh, config/i386bsd.mh: Remove.
9708 * config/i386linux.mh, config/i386mach3.mh: Remove.
9709 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
9710 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
9711 * config/mipsmach3.mh, config/news-mips.mh: Remove.
9712 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
9713 * config/rs600.mh, config/rs6000lynx.mh: Remove.
9714 * config/solaris2.mh, config/stratus.mh: Remove.
9715 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
9716 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
9717
9718 Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
9719
9720 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
9721 DT_FINI entry if the appropriate symbol is not in the hash table.
9722
9723 * libelf.h (struct elf_backend_data): Add create_program_headers
9724 and want_hdr_in_seg fields.
9725 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
9726 defined.
9727 (elf_backend_create_program_headers): Likewise.
9728 (elfNN_bed): Initialize create_program_headers and
9729 want_hdr_in_seg.
9730 * elf.c (get_program_header_size): Call create_program_headers
9731 backend routine.
9732 (map_program_segments): Check want_hdr_in_seg backend field. Call
9733 create_program_headers backend routine.
9734
9735 * elf.c (assign_file_positions_except_relocs): Align non allocated
9736 sections when creating an executable.
9737
9738 * elfcode.h (elf_swap_phdr_in): Make non static.
9739 (elf_swap_phdr_out): Make non static.
9740 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
9741 (bfd_elf32_swap_phdr_out): Declare.
9742 (bfd_elf64_swap_phdr_in): Declare.
9743 (bfd_elf64_swap_phdr_out): Declare.
9744
9745 * ecofflink.c (ecoff_collect_shuffle): New static function.
9746 (_bfd_ecoff_get_accumulated_pdr): New function.
9747 (_bfd_ecoff_get_accumulated_sym): New function.
9748 (_bfd_ecoff_get_accumulated_ss): New function.
9749 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
9750 (_bfd_ecoff_get_accumulated_sym): Declare.
9751 (_bfd_ecoff_get_accumulated_ss): Declare.
9752 * libbfd.h: Rebuild.
9753
9754 Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
9755
9756 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
9757
9758 * elflink.h (elf_link_add_object_symbols): Handle indirect and
9759 warning symbols. If any section is named .gnu.warning.XXX, treat
9760 the contents as a warning to be issued if the symbol XXX is
9761 referenced.
9762 (elf_link_output_extsym): For an indirect or warning symbol, just
9763 output the symbol it points to.
9764
9765 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
9766 if bfd_hash_allocate fails, since it will already be set.
9767 (generic_link_hash_newfunc): Likewise.
9768 (archive_hash_newfunc): Likewise.
9769 (hash_entry_bfd): New static function.
9770 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
9771 callback. Allocate a new warning using the hash table newfunc.
9772 Use bfd_hash_replace to update the entry in the hash table, rather
9773 than assuming we can copy the fields with structure assignment.
9774
9775 * hash.c (bfd_hash_replace): New function.
9776 * bfd-in.h (bfd_hash_replace): Declare.
9777 * bfd-in2.h: Rebuild.
9778
9779 Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
9780
9781 * config.bfd: Add mips*vr4300-*-elf* target.
9782 * config/mipsbvr4300.mt: Added.
9783
9784 See file ChangeLog.2
9785
9786 \f
9787 Local Variables:
9788 mode: change-log
9789 left-margin: 8
9790 fill-column: 74
9791 version-control: never
9792 End:
This page took 0.222068 seconds and 3 git commands to generate.