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