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