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