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