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