* config.bfd: Change #if 0 around uses of host_aout_vec to #if
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
3baa24ad
ILT
1Fri May 9 17:40:02 1997 Ian Lance Taylor <ian@cygnus.com>
2
3 * config.bfd: Change #if 0 around uses of host_aout_vec to #if
4 HAVE_host_aout_vec.
5
aba5cc8b
MM
6Mon May 5 13:57:32 1997 Mike Meissner <meissner@cygnus.com>
7
8 * coffgen.c (coff_find_nearest_line): If there are no syments,
9 just return false.
10
6a2922d5
ILT
11Mon May 5 18:18:45 1997 Philip Blundell <pjb27@cam.ac.uk>
12
13 * config.bfd: cope with '*-*-linux-gnuaout' targets.
14
15Thu May 1 11:31:12 1997 Ian Lance Taylor <ian@cygnus.com>
16
17 * targmatch.sed: Add explicit \n characters to work around bug in
18 HP/UX 10.20 sed program.
19
412dfaed
ILT
20Wed Apr 30 12:27:03 1997 Ian Lance Taylor <ian@cygnus.com>
21
22 * elf.c (copy_private_bfd_data): Cast csecs to avoid sign
23 extension problems.
24
3c8caeb7
ILT
25Tue Apr 22 12:06:08 1997 Ian Lance Taylor <ian@cygnus.com>
26
27 * Makefile.in (do_maintainer_clean): Don't remove bfd-in2.h.
28
f4236094
ILT
29Mon Apr 21 11:21:31 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
30
31 * elf32-m68k.c: Follow the last changes in elf32-i386.c:
32 (struct elf_m68k_pcrel_relocs_copied, struct
33 elf_m68k_link_hash_entry, struct elf_m68k_link_hash_table,
34 elf_m68k_link_hash_traverse, elf_m68k_hash_table,
35 elf_m68k_link_hash_newfunc, elf_m68k_link_hash_table_create,
36 elf_m68k_discard_copies, bfd_elf32_bfd_link_hash_table_create):
37 New definitions.
38 (elf_m68k_check_relocs): If linking with -Bsymbolic, don't copy
39 PC relative relocs for a global symbol defined in a regular
40 object, and count the number of PC relative relocs copied for any
41 global symbol.
42 (elf_m68k_size_dynamic_sections): If linking with -Bsymbolic,
43 traverse with elf_m68k_discard_copies.
44
752eaefc
ILT
45Sat Apr 19 22:50:14 1997 Ian Lance Taylor <ian@cygnus.com>
46
9d71be72
ILT
47 * elf32-i386.c (elf_i386_check_relocs): Only count PC relative
48 relocs. From Jamie Lokier <jamie@rebellion.co.uk>.
49
752eaefc
ILT
50 * coffcode.h (coff_compute_section_file_positions): Force the
51 potential last byte in the file to be written out when
52 COFF_IMAGE_WITH_PE.
53
e066f244
ILT
54Thu Apr 17 13:46:56 1997 Per Fogelstrom <pefo@openbsd.org>
55
a0412785 56 * configure.host (mips*-*-openbsd*): New host.
e066f244 57
81f01dd5
ILT
58Thu Apr 17 11:10:54 1997 Ian Lance Taylor <ian@cygnus.com>
59
f02004e9
ILT
60 * elflink.h (elf_link_add_object_symbols): Only subtract the
61 section VMA from the symbol value if this is a fully linked file.
62
6e2183b1
ILT
63 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Define.
64 (struct elf_i386_link_hash_entry): Define.
65 (struct elf_i386_link_hash_table): Define.
66 (elf_i386_link_hash_traverse): Define.
67 (elf_i386_hash_table): Define.
68 (elf_i386_link_hash_newfunc): New static function.
69 (elf_i386_link_hash_table_create): New static function.
70 (elf_i386_check_relocs): If linking with -Bsymbolic, don't copy
71 PC relative relocs for a global symbol defined in a regular
72 object, and count the number of PC relative relocs copied for any
73 global symbol.
74 (elf_i386_size_dynamic_sections): If linking with -Bsymbolic,
75 traverse with elf_i386_discard_copies.
76 (elf_i386_discard_copies): New static function.
77 (bfd_elf32_bfd_link_hash_table_create): Define.
78
81f01dd5
ILT
79 From Gordon W. Ross <gwr@mc.com>:
80 * aoutf1.h (MY_entry_is_text_address): Define if not defined.
81 (sunos4_aout_backend): Use MY_entry_is_text_address.
82
ebec2a6a
MH
83start-sanitize-d30v
84Wed Apr 16 12:43:32 1997 Martin Hunt <hunt@cygnus.com>
85
86 * elf32-d30v.c (elf_d30v_howto_table): Changed size of
87 R_D30V_32_NORMAL to 2 (4 bytes).
88
89end-sanitize-d30v
10888f10
ILT
90Wed Apr 16 14:02:29 1997 Ian Lance Taylor <ian@cygnus.com>
91
a895901a
ILT
92 From Gordon W. Ross <gwr@mc.com>:
93 * netbsd.h (N_SHARED_LIB): Define.
94 (SEGMENT_SIZE): Don't define.
95 * m68knetbsd.c (SEGMENT_SIZE): Don't define (revert change of
96 April 11).
97 * sparcnetbsd.c (TARGET_PAGE_SIZE): Define as 0x2000.
98 (SEGMENT_SIZE): Don't define.
99
10888f10
ILT
100 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set .rela.bss size
101 to sizeof Rela structure, not sizeof Rel structure. From Gary
102 Thomas <g.thomas@opengroup.org>.
103
a0c80726
ILT
104Tue Apr 15 11:50:37 1997 Ian Lance Taylor <ian@cygnus.com>
105
55aba333
ILT
106 * aout-target.h (MY(callback)): If entry_is_text_address, adjust
107 whenever entry is larger than text address, but only by whole
108 pages. From Gordon W. Ross <gwr@mc.com>.
109
9b31e6f5
ILT
110 * Makefile.in (install): Depend upon installdirs. Use
111 mkinstalldirs to build $(oldincludedir).
112 (installdirs): New target.
113
a0c80726
ILT
114 * elflink.h (elf_link_add_object_symbols): Don't call check_relocs
115 if this is a debugging section which we are stripping.
116
117Mon Apr 14 12:39:30 1997 Richard Henderson <rth@tamu.edu>
118
119 * elf64-alpha.c (elf64_alpha_object_p): Allocate the
120 alpha-specific target data struct.
121
e5d7e3df
ILT
122Mon Apr 14 11:45:46 1997 Ian Lance Taylor <ian@cygnus.com>
123
124 From Thomas Graichen <graichen@rzpd.de>:
125 * Makefile.in: Always use $(SHELL) when running move-if-change.
126 * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
127 * configure: Rebuild.
128
4b8c8bb9
ILT
129Fri Apr 11 15:43:24 1997 Ian Lance Taylor <ian@cygnus.com>
130
3bc3351e
ILT
131 * elfcode.h (elf_slurp_symbol_table): Only subtract the section
132 VMA if this is an executable file or a shared object.
133
faa0b8db
ILT
134 * targets.c (netbsd_core_vec): Declare. From Gordon W. Ross
135 <gwr@mc.com>.
136
137 * libaout.h (struct aout_backend_data): Add entry_is_text_address
138 field.
139 * aout-target.h (SEGMENT_SIZE): Define to TARGET_PAGE_SIZE at the
140 start of the file. Remove uses later on which switch using
141 ifdef.
142 (MY(callback)): Handle entry_is_text_address.
143 (MY_entry_is_text_address): Define if not defined.
144 (MY(backend_data)): Initialize new field.
145 * aoutf1.h (sunos4_aout_backend): Likewise.
146 * i386aout.c (MY(backend_data)): Likewise.
147 * i386mach3.c (MY(backend_data)): Likewise.
148 * mipsbsd.c (MY(backend_data)): Likewise.
149 * sparclynx.c (sparclynx_aout_backend): Likewise.
150 * netbsd.h (SEGMENT_SIZE): Define if not defined.
151 (MY_entry_is_text_address): Define.
a895901a 152 * m68knetbsd.c (SEGMENT_SIZE): Define as 0x20000.
faa0b8db 153
4b8c8bb9
ILT
154 * xcofflink.c (bfd_xcoff_import_symbol): Handle importing a symbol
155 whose name starts with `.'.
156
3b1b0308
ILT
157Fri Apr 11 11:57:15 1997 Niklas Hallqvist <niklas@appli.se>
158
159 * config.bfd: (i[3456]86-*-openbsd*, m68*-*-openbsd*,
160 mips*el*-*-openbsd*, mips*-*-openbsd*, ns32k-*-openbsd*,
161 powerpc-*-*bsd*, sparc-*-openbsd*): New targets.
162 * configure.in (i[3456]86-*-openbsd*, mips*-*-openbsd*,
163 m68*-*-openbsd*, ns32k-*-openbsd*, powerpc-*-*bsd*,
164 sparc-*-openbsd*): New targets.
165 * configure: Rebuild.
166
57a3027b
ILT
167Tue Apr 8 18:09:29 1997 Jamie Lokier <jamie@rebellion.co.uk>
168
169 * stabs.c (struct stab_section_info): New field
170 `cumulative_skips'.
171 (_bfd_link_section_stabs): Fill the above array.
172 (_bfd_stab_section_offset): Use `cumulative_skips' to
173 speed up offset calculation.
174
a01362cc
JL
175Tue Apr 8 00:01:31 1997 Jeffrey A Law (law@cygnus.com)
176
69444014
JL
177 * elf-mn10300.c (mn10300_elf_relax_section): Don't forget the
178 addend for non pc-relative relocations.
179
a01362cc
JL
180 * elf-m10300.c (bfd_elf32_mn10300_reloc): Remove prototype
181 for non-existent function.
182
183 * elf-m10300.c (mn10300_elf_relax_section): New function.
184 (mn10300_elf_relax_delete_bytes): Likewise.
185 (mn10300_elf_symbol_address_p): Likewise.
186 (mn10300_elf_get_relocated_section_contents): Likewise.
187 (bfd_elf32_bfd_relax_section): Define.
188 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
189
418d5b05
ILT
190Mon Apr 7 16:47:09 1997 Ian Lance Taylor <ian@cygnus.com>
191
192 * configure.host: Set SHLIB_LIBS.
193 * configure.in: Substitute SHLIB_LIBS.
194 * configure: Rebuild.
195 * Makefile.in (SHLIB_LIBS): New variable.
196 ($(SHLIB)): Use $(SHLIB_LIBS).
197
d9654a71
MS
198Mon Apr 7 10:53:52 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
199
200 * bfd-in.h bfd-in2.h: add bfd_section_lma macro to correspond
201 with bfd_section_vma.
202
5641f23e
ILT
203Fri Apr 4 11:37:15 1997 Ian Lance Taylor <ian@cygnus.com>
204
b872076e
ILT
205 * configure.in: Update file names for bfd_elf32_mn10[23]00_vec.
206 Correct CPU file names for mn10[23]00.
207 * configure: Rebuild.
208
ac664747
ILT
209 * bfd.c (bfd_record_phdr): Cast count to size_t before
210 subtraction.
211
44fe6ab1
ILT
212 * coff-ppc.c (dump_toc): Add cast to avoid warning from SunOS cc.
213 * coff-rs6000.c (xcoff_read_ar_hdr): Likewise.
214 (xcoff_write_archive_contents): LIkewise.
215 * elf32-mips.c (_bfd_mips_elf_set_section_contents): Likewise.
216 (mips_elf_create_procedure_table): Likewise.
217 * peicode.h (pe_print_idata): Likewise.
218 (pe_print_edata, pe_print_pdata, pe_print_reloc): Likewise.
219 * xcofflink.c (xcoff_get_section_contents): Likewise.
220 (_bfd_xcoff_canonicalize_dynamic_symtab): Likewise.
221 (xcoff_link_add_symbols): Likewise.
222 (xcoff_link_add_symbols): Likewise.
223
0cea98f0
ILT
224 * ppcboot.c (ppcboot_set_arch_mach): Make static.
225 (ppcboot_bfd_print_private_bfd_data): Likewise.
226
5641f23e
ILT
227 * elf32-mips.c (elf_mips_ctor64_howto): Set complain_on_overflow
228 to complain_overflow_signed.
229
58b4a8f3
ILT
230Thu Apr 3 11:51:54 1997 Ian Lance Taylor <ian@cygnus.com>
231
232 * VERSION: Set to 2.8.1.
233
234 * Branched binutils 2.8.
235
236 * elf32-ppc.c (ppc_elf_check_relocs): Don't check SEC_ALLOC when
237 deciding whether to copy a reloc into a shared object.
238 (ppc_elf_relocate_section): Likewise. Relocate R_PPC_RELATIVE
239 relocs in unallocated sections.
240 * elf32-sparc.c (elf32_sparc_relocate_section): Relocate
241 R_SPARC_RELATIVE relocs in unallocated sections.
242
acba322e
MM
243Wed Apr 2 16:19:41 1997 Mike Meissner <meissner@cygnus.com>
244
245 * elf32-ppc.c (ppc_elf_check_relocs): Undo March 26 change and
246 always create got section so that the _GLOBAL_OFFSET_TABLE_ label
247 is always created.
248
ab66cc8d
ILT
249Wed Apr 2 10:49:07 1997 Ian Lance Taylor <ian@cygnus.com>
250
ba254dc5
ILT
251 * elflink.h (elf_link_add_object_symbols): Let a common symbol
252 override an uninitialized symbol from a shared library with a
253 smaller size.
f74e2365 254
7a68d1f7
ILT
255 * elf-m10200.c: Rename from elf32-mn10200.c.
256 * elf-m10300.c: Rename from elf32-mn10300.c.
257 * cpu-m10200.c: Rename from cpu-mn10200.c
258 * cpu-m10300.c: Rename from cpu-mn10300.c
259 * Makefile.in: Update accordingly.
260
3072dce9
ILT
261 * elf32-mips.c (elf_mips_ctor64_howto): New static variable.
262 (elf_mips_isa): Move to earlier in file.
263 (mips_reloc_map): Remove BFD_RELOC_CTOR entry.
264 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR
265 specially.
266
ab66cc8d
ILT
267 * elf32-mips.c (mips16_jump_reloc): Print a warning rather than
268 calling abort.
269
0f854557
ILT
270Tue Apr 1 16:18:05 1997 Klaus Kaempf <kkaempf@progis.de>
271
272 * configure.com: New file.
273 * config.h-vms: Remove file.
274 * makefile.vms: Update for new configure scheme.
275
8faaff9e
ILT
276Mon Mar 31 23:28:39 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
277
0f854557
ILT
278 * libcoff-in.h (ppc_allocate_toc_section): Declare.
279 (ppc_process_before_allocation): Declare.
280 * libcoff.h: Rebuild.
281
8faaff9e
ILT
282 * coffcode.h (coff_mkobject_hook): Declare if not a macro.
283
5cfc9987
ILT
284Mon Mar 31 16:29:50 1997 Joel Sherrill <joel@oarcorp.com>
285
3418d8c4 286 * config.bfd (hppa*-*-rtems*): New target, like hppa-*-*elf*.
5cfc9987 287
34c68301
ILT
288Mon Mar 31 16:11:35 1997 Ian Lance Taylor <ian@cygnus.com>
289
290 * coff-a29k.c (coff_a29k_relocate_section): Don't use symndx as a
291 symbol index for a R_IHCONST reloc.
292
774dc17c
ILT
293Mon Mar 31 15:40:59 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
294
295 * targmatch.sed: Do not use \(\) recursively.
296
9e55b695
ILT
297Fri Mar 28 14:44:08 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
298
299 * m68klinux.c (MACHTYPE_OK): Define.
300 * i386linux.c (MACHTYPE_OK): Define.
301
f3f3b475
ILT
302Fri Mar 28 11:56:15 1997 Ian Lance Taylor <ian@cygnus.com>
303
5f792743
ILT
304 From David S. Miller <davem@caip.rutgers.edu> and H.J. Lu
305 <hjl@gnu.ai.mit.edu>:
306 * sparclinux.c: New file.
774dc17c
ILT
307 * bfd-in.h (bfd_sparclinux_size_dynamic_sections): Declare.
308 * bfd-in2.h: Rebuild.
5f792743
ILT
309 * config.bfd (sparc-*-linuxaout*, sparc-*-linux*): New targets.
310 * configure.in (sparclinux_vec): Add to list of vectors.
311 * configure: Rebuild.
312 * targets.c (sparclinux_vec): Declare.
313 (bfd_target_vector): Add sparclinux_vec.
314 * Makefile.in: Rebuild dependencies.
315 (BFD32_BACKENDS): Add sparclinux.o.
316 (BFD32_BACKENDS_CFILES): Add sparclinux.c.
317
bebe5fbf
ILT
318 * coff-mips.c (mips_ecoff_backend_data): Initialize new
319 bfd_coff_backend_data field.
320 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
321
f0315e65
ILT
322 * config.bfd: Add bfd_elf64_{big,little}mips_vec to targ_selvecs
323 for mips*el*-*-linux* and mips*-*-linux*. From H.J. Lu
324 <hjl@lucon.org> and Ralf Baechle <ralf@gnu.ai.mit.edu>.
325
f3f3b475
ILT
326 * bfd.c: Include "libiberty.h".
327 (strerror): Don't declare.
328 (bfd_errmsg): Call xstrerror rather than strerror.
329
013b249f
ILT
330Thu Mar 27 12:55:42 1997 Ian Lance Taylor <ian@cygnus.com>
331
eb80d52a
ILT
332 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Generate a COPY
333 reloc even if the symbol is in the .bss section.
334 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
335 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
336 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
337
f89adeb7
ILT
338 * coffcode.h (bfd_coff_backend_data): Add new field
339 _bfd_coff_default_section_alignment_power.
340 (bfd_coff_default_section_alignment_power): Define.
341 (bfd_coff_std_swap_table): Initialize new field.
342 * libcoff.h: Rebuild.
343 * cofflink.c (coff_link_add_symbols): Limit alignment of a common
344 symbol to the default section alignment.
345
013b249f
ILT
346 * COPYING: Update FSF address.
347
0e9c4377
MH
348start-sanitize-d30v
349Thu Mar 27 00:45:57 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
350
351 * elf32-d30v.c (elf_d30v_howto_table): Fix a typo in the
352 21-bit absolute that made it act as a relative.
353
354end-sanitize-d30v
537327bc
ILT
355Wed Mar 26 14:50:20 1997 Ian Lance Taylor <ian@cygnus.com>
356
0e9c4377
MH
357 * elflink.c (_bfd_elf_create_linker_section): Don't set
358 bss_section and rel_section from existing sections.
359
537327bc
ILT
360 * elf32-ppc.c (ppc_elf_check_relocs): Only create the got section
361 if it is needed.
362
60d1227a
SG
363Tue Mar 25 22:26:56 1997 Stu Grossman (grossman@critters.cygnus.com)
364
365 * aoutx.h (some_aout_object_p): Change executable test to fix
366 problems with embedded a.out systems.
367
3cd5cf3d
ILT
368Tue Mar 25 14:35:37 1997 Ian Lance Taylor <ian@cygnus.com>
369
6717fb0d
ILT
370 * stabs.c (_bfd_stab_section_offset): New function.
371 * libbfd-in.h (_bfd_stab_section_offset): Declare.
372 * libbfd.h: Rebuild.
373 * elf32-i386.c (elf_i386_relocate_section): Adjust the offset of a
374 stab reloc.
375 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
376 * elf32-mips.c (mips_elf_relocate_section): Likewise.
377 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
378 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
379 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
380
3cd5cf3d
ILT
381 * stabs.c (_bfd_link_section_stabs): Copy over the first header
382 symbol. Check for memory allocation failure of *psinfo.
383 (_bfd_write_section_stabs): Add psinfo parameter. Change all
384 callers. Set the value of the header symbol.
385 * libbfd-in.h (_bfd_write_section_stabs): Update declaration.
386 * libbfd.h: Rebuild.
387
67e87a1d
FF
388start-sanitize-tic80
389Mon Mar 24 20:07:29 1997 Fred Fish <fnf@cygnus.com>
390
391 * coff-tic80.c (tic80_howto_table): Add R_ABS entry.
392 (rtype2howto): Handle R_ABS reloc type. Also abort on unhandled
393 reloc types, rather than silently failing to generate an output file.
394
395end-sanitize-tic80
e9148724
ILT
396Mon Mar 24 13:41:00 1997 Ian Lance Taylor <ian@cygnus.com>
397
e1ea3dd5
ILT
398 * targmatch.sed: Use the hold space to put the #ifdef around the
399 the string constant.
400 * targets.c (UNSUPPORTED_TARGET): Don't define.
401 (find_target): Don't check for UNSUPPORTED_TARGET.
402 (bfd_set_default_target): Don't try to optimize by checking for
403 default.
404
032dc9ed
ILT
405 * Makefile.in: Rebuild dependencies.
406 (ALL_MACHINES_CFILES): Add cpu-m32r.c.
407 (BFD32_BACKENDS_CFILES): Add elf32-m32r.c.
408 (elf32-m32r.o): Remove explicit target.
409
19d02576
ILT
410 * config.bfd: Don't set targ_underscore for i[3456]86-*-gnu* or
411 i[3456]86-*-linux*.
412
e9148724
ILT
413 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Don't
414 count section symbols for sections that were created by the
415 linker, or are not allocatable or not loadable.
416 (elf32_sparc_finish_dynamic_sections): Output output section
417 symbols for section for which we made space for them.
418
0727fe10
ILT
419Fri Mar 21 13:08:26 1997 Ian Lance Taylor <ian@cygnus.com>
420
421 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): If there is
422 no .rela.plt section, don't output a DT_PLTGOT dynamic entry.
423
ff22a9db
DE
424Fri Mar 21 12:36:46 1997 Doug Evans <dje@canuck.cygnus.com>
425
426 * elf32-m32r.c (m32r_elf_howto_table): Use special function for LO16.
427 (m32r_hi16_list): New static local.
428 (m32r_elf_hi16_reloc): Don't perform reloc, just queue it up.
429 (m32r_elf_do_hi16_reloc): Delete.
430 (m32r_elf_relocate_hi16): New function.
431 (m32r_elf_lo16_reloc): New function.
432 (m32r_elf_relocate_section): For HI16 relocs, scan for corresponding
433 LO16 reloc.
434
435 Mon Mar 10 16:03:31 1997 Doug Evans <dje@seba.cygnus.com>
436
437 * elf32-m32r.c (m32r_elf_create_linker_section): Delete.
438 (m32r_elf_add_symbol_hook): Rewrite _SDA_BASE_ support.
439 (m32r_elf_final_sda_base): New function.
440 (m32r_elf_relocate_section): Rewrite sdata support.
441 (m32r_elf_finish_dynamic_sections): Delete.
442
34bc6ffc
ILT
443Thu Mar 20 12:39:02 1997 Ian Lance Taylor <ian@cygnus.com>
444
ac388f2a
ILT
445 Based on patches from Philippe De Muyter <phdm@info.ucl.ac.be>.
446 * coff-svm68k.c: New file. Just defines some macros and includes
447 coff-m68k.c.
448 * coff-m68k.c: Add functions to handle common addends, moved in
449 from cf-m68klynx.c. Control them using COFF_COMMON_ADDEND macro.
450 Control whether relocs are visible using STATIC_RELOCS.
451 * cf-m68klynx.c: Simplify greatly: just define macros to control
452 coff-m68k.c.
453 * coff-aux.c: Likewise. Just leave add_one_symbol routine.
454 * targets. (m68ksysvcoff_vec): Declare.
455 (bfd_target_vector): Add m68ksysvcoff_vec.
456 * config.bfd (m68*-motorola-sysv*): New target.
457 * configure.in (m68ksysvcoff_vec): New vector.
458 * configure: Rebuild.
459 * Makefile.in: Rebuild dependencies.
460 (BFD32_BACKENDS): Add coff-svm68k.o.
461 (BFD32_BACKENDS_CFILES): Add coff-svm68k.c.
462
b9576d75
ILT
463 * binary.c (binary_set_section_contents): Don't get misled if the
464 first section is not loadable. From Matthew L. Martin
465 <mlm@xedia.com>.
466
34bc6ffc
ILT
467 * elflink.h (elf_bfd_final_link): Set the value of a section
468 symbol to the section address unless doing a relocateable link.
469
470Tue Mar 18 23:03:17 1997 Richard Henderson <rth@tamu.edu>
471
472 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't create
473 .plt entry if we've taken the function's address.
474 (elf64_alpha_merge_gots): Merge collected flags info as well.
475
303e7257
ILT
476Tue Mar 18 22:40:09 1997 H.J. Lu <hjl@lucon.org>
477
478 * Many files: Add function prototypes.
479 * cpu-m68k.c (bfd_default_scan_num_mach): Don't declare.
480 * ecofflink.c: Include "libcoff.h" and "libecoff.h".
481 * elf32-ppc.c (ppc_elf_fake_sections): Make static.
482 * opncls.c (bfd_openstreamr): Change stream parameter to PTR.
483 * peicode.h: Change several void * parameters to PTR.
484 * srec.c (srec_get_symbol_info): Make static.
485 * syms.c (bfd_symbol_is_absolute): Remove.
7197adc4 486 * Makefile.in: Rebuild dependencies.
303e7257 487
939b2169
ILT
488Tue Mar 18 12:58:08 1997 Ian Lance Taylor <ian@cygnus.com>
489
e76386d2
ILT
490 * elf32-m32r.c (m32r_elf_is_local_label_name): Remove.
491 (bfd_elf32_bfd_is_local_label): Don't define.
492
939b2169
ILT
493 * xcofflink.c (_bfd_xcoff_bfd_final_link): Call bfd_malloc rather
494 than malloc.
495
50ede03d
ILT
496Mon Mar 17 11:32:53 1997 Ian Lance Taylor <ian@cygnus.com>
497
508539ab
ILT
498 * bfd-in.h: Don't include obstack.h.
499 (struct bfd_hash_table): Change memory field to PTR.
500 * bfd.c (struct _bfd): Change memory field to PTR.
501 * bfd-in2.h: Rebuild.
502 * libbfd-in.h (bfd_release): Declare as function, don't define as
503 macro.
504 * libbfd.h: Rebuild.
505 * opncls.c: Include "objalloc.h" rather than "obstack.h". Use
506 objalloc routines rather than obstack routines.
507 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
508 (getpagesize): Don't define.
509 (_bfd_new_bfd): Don't set _bfd_chunksize.
510 (bfd_openr): Free new bfd and objalloc on failure.
511 (bfd_fdopenr, bfd_openstreamr, bfd_openw): Likewise.
512 (bfd_alloc_size): Remove.
513 (bfd_release): New function.
514 * hash.c: Include "objalloc.h" rather than "obstack.h". Use
515 objalloc routines rather than obstack routines.
516 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
517 * ecofflink.c: Include "objalloc.h" rather than "obstack.h". Use
518 objalloc routines rather than obstack routines.
519 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
520 (struct accumulate): Change memory to struct objalloc *.
521 * liboasys.h (oasys_data_type): Remove oasys_obstack field.
522 * dep-in.sed: Don't remove obstack.h from dependency list.
523 * Makefile.in: Rebuild dependencies.
524 (BFD_H_DEPS): Remove obstack.h.
525 (install): Don't install obstack.h.
526 * Many files: Don't include "obstack.h".
527 * VERSION: Bump.
528
062a1b96
ILT
529 * opncls.c (bfd_alloc_grow, bfd_alloc_finish): Remove.
530 * libbfd-in.h (bfd_alloc_grow, bfd_alloc_finish): Don't declare.
531 * libbfd.h: Rebuild.
532 * ieee.c (ieee_archive_p): Rewrite to not use bfd_alloc_grow.
533 * sunos.c (sunos_add_dynamic_symbols): Likewise.
0103b447 534 * srec.c (srec_scan): Rewrite to not use obstack_1grow.
062a1b96 535
50ede03d
ILT
536 * opncls.c (bfd_alloc): Rename from bfd_alloc_by_size_t. Remove
537 old version of bfd_alloc.
538 * libbfd-in.h (bfd_alloc_by_size_t): Don't declare.
539 * libbfd.h: Rebuild.
540 * Several files: Call bfd_alloc rather than bfd_alloc_by_size_t.
541
5e67a3c6
ILT
542Sat Mar 15 15:24:18 1997 Ian Lance Taylor <ian@cygnus.com>
543
544 * elf32-mips.c (mips_elf_is_local_label_name): Accept the generic
545 ELF local label syntax as well.
546
7305cacd
FF
547Sat Mar 15 10:16:42 1997 Fred Fish <fnf@cygnus.com>
548
549 * config.bfd (powerpc-*-beos*): New target.
550 * configure.in (powerpc-*-beos*): Add case that explicitly
551 does not set COREFILE for now. A future BeOS version is
552 expected to support core files.
553 * configure: Regenerate with autoconf.
554
f56d634e
ILT
555Fri Mar 14 16:43:22 1997 Ian Lance Taylor <ian@cygnus.com>
556
4813bbed
ILT
557 * elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is
558 seen with a local symbol, rather than crashing.
559
f56d634e
ILT
560 * elfcode.h (elf_slurp_symbol_table): Don't try to read the
561 version symbols if there aren't any.
562
4507d858
FF
563start-sanitize-tic80
564Thu Mar 13 16:38:30 1997 Fred Fish <fnf@cygnus.com>
565
566 * coff-tic80.c (coff_rtype_to_howto): Define
567 (coff_tic80_rtype_to_howto): Clone generic coff version and
568 add code to handle the funky TI "internal relocations".
569
570end-sanitize-tic80
94ba939a
ILT
571Thu Mar 13 14:08:53 1997 Ian Lance Taylor <ian@cygnus.com>
572
37897db0
ILT
573 * elflink.h (elf_link_add_object_symbols): Don't warn about type
574 or size changes because of a weak symbol.
575
94ba939a
ILT
576 * cisco-core.c (SIGEMT): Define if not defined.
577
e549b1d2
ILT
578Wed Mar 12 21:36:05 1997 Ian Lance Taylor <ian@cygnus.com>
579
580 * elflink.h (elf_link_add_object_symbols): Use extsymoff when
581 setting ever. Sanity check the version number. Sort out copying
582 flags and other information when adding an indirect symbol.
583 (NAME(bfd_elf,size_dynamic_sections)): Preserve any dynamic
584 symbols added by the backend. Clear the entire contents of the
585 versym section.
586 (elf_export_symbol): Ignore indirect symbols.
587 (elf_link_output_extsym): Accept a section without an owner in an
588 assert.
589 * elfcode.h (elf_slurp_symbol_table): Add a sanity check on the
590 version count. Correct the allocation of x_versymp.
591
592 * elf32-mips.c (mips_elf_add_symbol_hook): Don't set the owner of
593 the magic sections used for SHN_MIPS_TEXT and SHN_MIPS_DATA.
594 Don't return bfd_und_section_ptr when info->shared.
595 (mips_elf_final_link): Set the alignment of .rtproc to 4, not 12.
596 (mips_elf_create_dynamic_sections): Correct type: ^= for &=.
597 (mips_elf_check_relocs): Resolve an indirect symbol in
598 sym_hashes.
599 (mips_elf_finish_dynamic_symbol): Don't change SHN_ABS into
600 SHN_MIPS_TEXT or SHN_MIPS_DATA.
601
602 * elf.c (bfd_elf_print_symbol): Tweak version output slightly.
603
604Tue Mar 11 01:38:36 1997 Ian Lance Taylor <ian@cygnus.com>
605
606 From Eric Youngdale <eric@andante.jic.com>:
607 * elf-bfd.h (ELF_LINK_FORCED_LOCAL): Define.
608 * elf.c (bfd_elf_print_symbol): Correct errors in last change.
609 * elflink.h (elf_link_add_object_symbols): Handle cases in which a
610 versioned symbol appears in both a regular and a shared object.
611 (elf_link_assign_sym_version): Set ELF_LINK_FORCED_LOCAL when
612 appropriate. Improve error message.
613 (struct elf_outext_info): Rename from elf_finfo_failed. Change
614 all uses. Add localsyms field.
615 (elf_bfd_final_link): When generating a shared library, call
616 elf_link_output_extsym to output all local symbols.
617 (elf_link_output_extsym): Handle symbols which were forced to
618 become local.
619
d6bfcdb5
ILT
620Sun Mar 9 23:08:49 1997 Ian Lance Taylor <ian@cygnus.com>
621
622 From Eric Youngdale <eric@andante.jic.com>:
623 * elf-bfd.h (elf_symbol_type): Add version field.
624 * elfcode.h (elf_slurp_symbol_table): Set version field.
625 * elflink.h (elf_link_add_object_symbols): When creating an
626 indirect symbol for a default version symbol, set DEF_DYNAMIC if
627 appropriate. Set up an indirection from the nondefault version of
628 the symbol as well.
629 (NAME(bfd_elf,size_dynamic_sections)): Call
630 elf_link_assign_sym_version before checking whether there are any
631 versions. Always record the version name as a dynamic symbol.
632 Initialize counters.
633 (elf_link_assign_sym_version): After finding a version, see if a
634 symbol should be forced to local scope. Create a new version
635 definition if appropriate.
636 (elf_link_output_extsym): Correct indirect symbol handling.
637 * elf.c (bfd_elf_print_symbol): Print version information.
638 (bfd_section_from_shdr): Turn version sections into BFD sections.
639 (elf_fake_sections): Only copy cverdefs and cverrefs into sh_info
640 if sh_info is not already set.
641 (_bfd_elf_copy_private_section_data): Copy sh_info for version
642 sections.
643 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Tell
644 _bfd_stringtab_add to copy the name into permanent memory if
645 appropriate.
646
7debe20c
ILT
647Fri Mar 7 11:55:31 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
648
649 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Fully parenthesize.
650
358bb592
ILT
651Fri Mar 7 10:37:30 1997 Ian Lance Taylor <ian@cygnus.com>
652
ccd0e5e2
ILT
653 * coffcode.h (bfd_coff_backend_data): Change
654 _bfd_coff_compute_section_file_positions to return a boolean
655 value. Change all callers.
656 (coff_compute_section_file_positions): Change return type to
657 boolean. If the size of the last section changed, then output a
658 zero byte at the end of the file.
659 * libcoff.h: Rebuild.
660
e8c4696e
ILT
661 * xcofflink.c (_bfd_xcoff_bfd_final_link): Always allocate space
662 for at least 6 output symbols.
663 (xcoff_write_global_symbol): When emitting TOC entry relocs, also
664 emit a TC csect to represent the space they take up. For an XO
665 symbol, just emit a reference, not a csect.
666
4104dff6
ILT
667 * Makefile.in ($(SHLINK)): Just use ln -s, not ln -sf, since
668 Solaris doesn't like the combined options, and the -f is
669 unnecessary.
5bd7c941 670 (stamp-tshlink, install): Likewise.
4104dff6 671
358bb592
ILT
672 * elf32-mips.c (mips_elf_relocate_section): Correct R_MIPS16_26
673 handling when little endian.
674
77bf22e6
JL
675Thu Mar 6 13:51:51 1997 Jeffrey A Law (law@cygnus.com)
676
5847e6dd
JL
677 * elf32-mn10300.c (mn10300_elf_final_link_relocate): New function.
678 (mn10300_elf_relocate_section): Likewise.
679 (elf_backend_relocate_section): Define.
680
77bf22e6
JL
681 * elf32-mn10300.c (reloc_type): Remove PCREL{8,16,32}_{1,2}BYTE
682 relocs. Replace them with generic PCREL_{8,16,32} relocs.
683 (elf32_mn10300_howto_table): Likewise.
684 (elf32_mn10300_reloc_map): Likewise.
685 (bfd_elf32_mn10300_reloc): Delete unused function.
686
13b58694
FF
687Thu Mar 6 12:19:59 1997 Fred Fish <fnf@cygnus.com>
688
689start-sanitize-tic80
690 * coff-tic80.c (rtype2howto): If passed a relocation type we don't
691 understand, just set the howto field to NULL, and the caller will
692 print an appropriate error message.
693end-sanitize-tic80
694 * coffcode.h (coff_slurp_reloc_table): Pull duplicate declarations and
695 code fragment out of both legs of #ifdef RELOC_PROCESSING ... #endif
696 block. Use NULL for initializations of "ptr" rather than bare 0.
697 * coff-h8300.c: Fix typo in comment.
698 * coff-h8500.c: Ditto.
699 * coff-w65.c: Ditto
700 * coff-z8k.c: Ditto.
701
da171461
DE
702Wed Mar 5 13:59:09 1997 Doug Evans <dje@seba.cygnus.com>
703
704 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc): Fix overflow calc.
705 (m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
706 m32r_elf_get_relocated_section_contents): First pass at relax support.
707
da171461
DE
708Mon Mar 3 13:27:09 1997 Ulrich Drepper <drepper@rtl.cygnus.com>
709
710 * elflink.h (elf_link_add_object_symbols): Use correct sh_size
711 entry for reading verdef records.
712 Use correct braces for computing increments of extverdaux and
713 exteverdef record pointers.
714
4b4ac3ae
FF
715start-sanitize-tic80
716Sun Mar 2 22:47:54 1997 Fred Fish <fnf@cygnus.com>
717
718 * coff-tic80.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set this to 2
719 instead of 4.
720
721end-sanitize-tic80
a48ef404
ILT
722Sun Mar 2 16:25:35 1997 Ian Lance Taylor <ian@cygnus.com>
723
724 * elflink.h (elf_link_find_version_dependencies): Check that
725 DEF_REGULAR is not set as well as checking that DEF_DYNAMIC is
726 set.
727
84fd6e7e
FF
728start-sanitize-tic80
729Fri Feb 28 16:52:40 1997 Fred Fish <fnf@cygnus.com>
730
731 * coffcode.h (coff_set_flags): Add case for TIC80_ARCH_MAGIC.
732
733end-sanitize-tic80
af4dffff
ILT
734Fri Feb 28 15:06:45 1997 Ian Lance Taylor <ian@cygnus.com>
735
73769e1f
ILT
736 * targets.c (bfd_default_vector): Make non-const.
737 (find_target): New static function, broken out of
738 bfd_find_target.
739 (bfd_set_default_target): New function.
740 (bfd_find_target): Call find_target. When defaulting, use
741 bfd_default_vector[0] if it is not NULL.
742 * libbfd-in.h (bfd_default_vector): Adjust declaration.
743 * bfd-in2.h, libbfd.h: Rebuild.
744
af4dffff
ILT
745 * syms.c (bfd_is_local_label): Return false if the symbol has no
746 name.
747 * coff-i960.c (coff_i960_is_local_label_name): New function.
748 (coff_bfd_is_local_label_name): Define.
749 * coff-m68k.c (m68k_coff_is_local_label_name): New function.
750 (coff_bfd_is_local_label_name): Define.
751 * coff-rs6000.c (xcoff_is_local_label_name): New function.
752 (coff_bfd_is_local_label_name): Define.
753 * elf.c (_bfd_elf_is_local_label_name): Treat symbols beginning
754 with .. or _.L_ as local.
755 * elf32-i386.c (elf_i386_is_local_label_name): New function.
756 (bfd_elf32_bfd_is_local_label_name): Define.
757 * evax-alpha.c (evax_bfd_is_local_label_name): Treat symbols
758 beginning with $ as local.
759
85d6f0b4
ILT
760Thu Feb 27 18:36:23 1997 Ian Lance Taylor <ian@cygnus.com>
761
e316f514
ILT
762 * aoutx.h (aout_link_write_symbols): Use bfd_is_local_label_name
763 rather than comparing against info->lprefix.
764 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
765 * elflink.h (elf_link_input_bfd): Likewise.
766 * linker.c (_bfd_generic_link_output_symbols): Likewise.
767 * xcofflink.c (xcoff_link_input_bfd): Likewise.
768
769 * elfxx-target.h (bfd_elfNN_bfd_is_local_label_name): Define as
770 _bfd_elf_is_local_label_name if not already defined.
771 * elf.c (_bfd_elf_is_local_label_name): New function.
772 * elf-bfd.h (_bfd_elf_is_local_label_name): Declare.
773
774 * coff-m88k.c (coff_bfd_is_local_label_name): Define.
775 (m88k_is_local_label_name): New static function.
776
777 * coffcode.h (coff_bfd_is_local_label_name): Define as
778 _bfd_coff_is_local_label_name if not already defined.
779 * coffgen.c (_bfd_coff_is_local_label_name): New function.
780 * libcoff-in.h (_bfd_coff_is_local_label_name): Declare.
781 * libcoff.h: Rebuild.
782
35a3e78e
ILT
783 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Change _bfd_is_local_label
784 to _bfd_is_local_label_name.
785 (bfd_target): Likewise.
786 * syms.c (bfd_is_local_label): Define as function, not macro.
787 (bfd_is_local_name): Define.
788 * libbfd.c (bfd_generic_is_local_label_name): Rename from
789 bfd_generic_is_local_label, and take a string rather than a
790 symbol.
791 * libbfd-in.h (_bfd_nosymbols_bfd_is_local_label): Don't define.
792 (_bfd_nosymbols_bfd_is_local_label_name): Define.
793 (bfd_generic_is_local_label): Don't declare.
794 (bfd_generic_is_local_label_name): Declare.
795 * bfd-in2.h, libbfd.h: Rebuild.
796 * All backends: Change local_label to local_label_name.
797
85d6f0b4
ILT
798 * elf32-mips.c (struct mips_got_info): Add assigned_gotno field.
799 (mips_elf_relocate_got_local): Change return type to boolean.
800 Don't assume that the first zero entry is unassigned; instead, use
801 assigned_gotno.
802 (mips_elf_relocate_section): Check return value of
803 mips_elf_relocate_got_local.
804 (mips_elf_create_got_section): Initialize assigned_gotno field.
805
56819c99
MH
806start-sanitize-d30v
807Wed Feb 26 15:19:51 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
808
809 * elf32-d30v.c (bfd_elf_d30v_reloc): Add code to do 32-bit
810 relocations.
811
812end-sanitize-d30v
fa802cb0
ILT
813Wed Feb 26 13:33:03 1997 Ian Lance Taylor <ian@cygnus.com>
814
815 * elflink.h (elf_link_input_bfd): Don't skip symbols from sections
816 that have no contents merely because linker_mark is not set.
817
818Tue Feb 25 18:51:35 1997 Stan Shebs <shebs@andros.cygnus.com>
819
820 * config.bfd (mips*-*-lnews*): New target.
821 * coff-mips.c (mips_relocate_section): Make assert compare
822 content byteorder instead of header byteorder.
823 (ecoff_biglittle_vec): New BFD, big-endian headers, little-endian
824 data.
55ef0d90 825 * targets.c (bfd_target_vector): Add ecoff_biglittle_vec.
fa802cb0
ILT
826 * configure.in (ecoff_biglittle_vec): Add case.
827 * configure: Update.
828
7b4be668
ILT
829Tue Feb 25 00:32:49 1997 Ian Lance Taylor <ian@cygnus.com>
830
b08f5ac2
ILT
831 * elf.c (elf_fake_sections): Use SHT_NOTE for any section whose
832 name begins with ".note".
833 (map_sections_to_segments): Add a PT_NOTE segment for any loadable
834 section whose name begins with ".note".
835 (get_program_header_size): Corresponding change.
836
7b4be668
ILT
837 * elf32-mips.c (mips_elf_relocate_section): Check for misaligned
838 jal and for jal overflow.
839
840Mon Feb 24 17:53:14 1997 Ian Lance Taylor <ian@cygnus.com>
841
842 From Eric Youngdale <eric@andante.jic.com>:
843 * elflink.h (elf_link_add_archive_symbols): If a default symbol is
844 not found, try looking it up again without the version name.
845 (elf_link_add_object_symbols): Always link against the dynamic
846 symbol table of a dynamic object. When linking against a dynamic
847 object, include version strings in symbol names, and set up
848 version information. Add indirect symbols for default versions.
849 (elf_link_create_dynamic_sections): Add special version sections.
850 (struct elf_assign_sym_version_info): Define.
851 (struct elf_find_verdep_info): Define.
852 (NAME(bfd_elf,size_dynamic_sections)): Add verdefs parameter. Set
853 up version sections.
854 (elf_adjust_dynamic_symbol): Ignore indirect symbols.
855 (elf_link_find_version_dependencies): New static function.
856 (elf_link_assign_sym_version): New static function.
857 (elf_link_renumber_dynsyms): New static function.
858 (struct elf_final_link_info): Add symver_sec field.
859 (elf_bfd_final_link): Initialize finfo.symver_sec. Don't count
860 local symbols of a dynamic object. Handle DT_VER* constants.
861 (elf_link_output_extsym): Simplify BFD_ASSERT checking for a
862 dynamic object. Skip indirect symbols from ELF objects. Remove
863 the version name before choosing a hash bucket. Write out the
864 version information if appropriate.
865 (elf_link_input_bfd): Check for DYNAMIC, not ET_DYN.
866 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
867 (bfd_elf64_size_dynamic_sections): Likewise.
868 * bfd-in2.h: Rebuild.
869 * elf-bfd.h (struct elf_link_hash_entry): Add verinfo field.
870 Change elf_link_hash_flags to unsigned short.
871 (ELF_LINK_HIDDEN): Define.
872 (struct elf_obj_tdata): Add fields dynversym_hdr, dynverref_hdr,
873 dynverdef_hdr, dynversym_section, dynverdef_section,
874 dynverref_section, cverdefs, cverrefs, verdef, verref.
875 (elf_dynversym, elf_dynverdef, elf_dynverref): Define.
876 (_bfd_elf_swap_verdef_in, _bfd_elf_swap_verdef_out): Declare.
877 (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Declare.
878 (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Declare.
879 (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Declare.
880 (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Declare.
881 (_bfd_elf_slurp_version_tables): Declare.
882 * elf.c (_bfd_elf_swap_verdef_in): New function.
883 (_bfd_elf_swap_verdef_out): Likewise.
884 (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Likewise.
885 (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Likewise.
886 (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Likewise.
887 (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Likewise.
888 (_bfd_elf_print_private_bfd_data): Add DT_VER* constants. Print
889 version information if there is any.
890 (_bfd_elf_link_hash_newfunc): Initialize verinfo field.
891 (bfd_section_from_shdr): Handle SHT_GNU_ver* section types.
892 (elf_fake_sections): Handle .gnu.version* section names.
893 (assign_section_numbers): Handle SHT_GNU_ver* section types.
894 (_bfd_elf_slurp_version_tables): New function.
895 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't include
896 version name in string entered in dynamic hash table.
897 * elfcode.h: Include fnmatch.h.
898 * elf32-i386.c (elf_i386_relocate_section): Handle a dynamic
899 symbol which was forced to become local.
900 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
901 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
902 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
903 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
904
7b951eed
JL
905Fri Feb 21 16:15:18 1997 Jeffrey A Law (law@cygnus.com)
906
907 * elf32-mn10200.c (mn10200_elf_final_link_relocate): Simplify
908 somewhat.
909 (mn10200_elf_relax_section): Correctly compute a symbol's value
910 when the symbol is local, but not in the same section as we are
911 relaxing. Implement abs24 -> abs16, imm24 -> imm16 and d24 -> d16
912 relaxing.
913
77dd1a25
DE
914Fri Feb 21 13:55:14 1997 Doug Evans <dje@seba.cygnus.com>
915
916 * elf32-m32r.c: Rewrite to use ELF backend linker.
917 Store lower 16 bits of addend in R_M32R_HI16_[SU]LO insns.
918 Add small data area support (R_M32R_SDA16).
919 * reloc.c: Document BFD_RELOC_M32R_SDA16.
920 * bfd-in2.h,libbfd.h: Regenerated.
921
fd395661
JL
922Thu Feb 20 23:50:31 1997 Jeffrey A Law (law@cygnus.com)
923
924 * elf32-mn10200.c (mn10200_elf_relax_section): New function.
925 (mn10200_elf_relax_delete_bytes): Likewise.
926 (mn10200_elf_symbol_address_p): Likewise.
927 (mn10200_elf_get_relocated_section_contents): Likewise.
928 (bfd_elf32_bfd_relax_section): Define.
929 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
64af6679
JL
930
931 * elf32-mn10200.c (mn10200_elf_final_link_relocate): New function.
932 (mn10200_elf_relocate_section): Likewise.
933 (elf_backend_relocate_section): Define.
934
fd8d7c31
MH
935start-sanitize-d30v
936Tue Feb 18 17:22:59 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
937
938 * Makefile.in, archures.c, config.bfd, configure.in, elf.c,
939 reloc.c, targets.c: New target, elf-*-D30V.
940
941 * bfd-in2.h, configure, libbfd.h: Rebuilt.
942
943 * cpu-d30v.c, elf32-d30v.c: New files.
944
945end-sanitize-d30v
92a956e8
FF
946Tue Feb 18 15:31:48 1997 Fred Fish <fnf@cygnus.com>
947
948 * reloc.c (struct reloc_howto_struct): Fix typo in comment.
949 * bfd-in2.h: Regenerated.
950start-sanitize-tic80
951 * coff-tic80.c (RTYPE2HOWTO): Replace abort with real function.
952 (rtype2howto): Add function.
953 (tic80_howto_table): Add.
954end-sanitize-tic80
955
956Tue Feb 18 11:41:00 1996 Dawn Perchik <dawn@cygnus.com>
957
958 * sysdep.h: Don't define errno in MSVC if error.h is included.
959
8d1ba96e
JL
960start-sanitize-v850
961Tue Feb 18 10:04:13 1997 Jeffrey A Law (law@cygnus.com)
962
963 * elf32-v850.c (v850_elf_relocate_section): Make sure r_symndx
964 is initialized before it is used.
965
966end-sanitize-v850
8ceca983
ILT
967Mon Feb 17 11:28:40 1997 Ian Lance Taylor <ian@cygnus.com>
968
969 * hp300hpux.c (convert_sym_type): Don't convert a secondary common
970 symbol into a weak undefined symbol; leave it as a common symbol.
971
54626f1a
ILT
972Fri Feb 14 19:08:03 1997 Ian Lance Taylor <ian@cygnus.com>
973
974 * elflink.h (elf_link_add_object_symbols): Don't issue a warning
975 about a symbol defined in a dynamic object if it has already been
976 defined in a regular object.
977
236969ac
ILT
978Thu Feb 13 20:53:22 1997 Klaus Kaempf (kkaempf@progis.de)
979
980 * makefile.vms: Add gcc flags to allow compiling with current gcc
981 snapshot
982 (targmatch.h): New dependency.
983
54626f1a
ILT
984 * reloc.c (BFD_RELOC_ALPHA_CODEADDR): New relocation for
985 openVMS/Alpha.
986 * evax.h (ALPHA_R_CODEADDR): New relocation.
987 * evax-alpha.c (ALPHA_R_CODEADDR): 64 bit procedure relocation for
988 openVMS/Alpha.
989 * evax-etir.c (ALPHA_R_CODEADDR): Output object code for this
990 relocation.
991 * bfd-in2.h, libbfd.h: Rebuild.
992
993 Restrict symbol length to 64 bytes, case preserving:
994 * evax-emh.c (_bfd_evax_write_emh): Remove case hacking.
995 * evax-misc.c (_bfd_evax_case_hack_symbol): Remove.
996 (_bfd_evax_length_hash_symbol): Added.
997 * evax-etir.c (_bfd_evax_write_etir): Call
998 _bfd_evax_length_hash_symbol before output of symbol.
999 * evax-egsd.c (_bfd_evax_write_egsd): Likewise.
1000 * evax.h (flag_hash_long_names, flag_show_after_trunc): Remove.
1001
1002 * evax-emh.c: Output filename to object file without path.
1003
1004 * evax-egsd.c: New sections for local and global commons.
1005
1006 * evax-alpha.c, evax-emh.c, evax-egsd.c, evax-etir.c,
1007 evax-misc.c, evax.h: Remove 8 bit characters from copyright
1008 notices. Replace AXP with Alpha.
1009
62332d05
ILT
1010Wed Feb 12 18:10:30 1997 Ian Lance Taylor <ian@cygnus.com>
1011
1012 * sunos.c (sunos_create_dynamic_sections): We need the dynamic
1013 sections if we are creating a shared library.
1014
3883007e
DE
1015Tue Feb 11 15:45:43 1997 Doug Evans <dje@canuck.cygnus.com>
1016
1017 * configure.host (i386-windows): Don't set host64=true.
1018
a4183ba5
ILT
1019Tue Feb 11 15:27:32 1997 Ian Lance Taylor <ian@cygnus.com>
1020
1021 * elf32-mips.c (reloc_type): Add R_MIPS16_GPREL.
1022 (elf_mips16_gprel_howto): New static variable.
1023 (mips16_gprel_reloc): New static function.
1024 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_GPREL.
1025 (mips_info_to_howto_rel): Handle R_MIPS16_GPREL.
1026 (mips_elf_relocate_section): Handle R_MIPS16_GPREL.
1027 * reloc.c (BFD_RELOC_MIPS16_GPREL): Define.
1028 * bfd-in2.h, libbfd.h: Rebuild.
1029
b9c5ee68
DE
1030Mon Feb 10 23:25:00 1997 Doug Evans <dje@seba.ricochet.net>
1031
1032 * elf32-m32r.c (elf_m32r_howto_table): Change partial_inplace to true
1033 for R_M32R_{16,32,24,HI16_ULO,HI16_SLO,LO16}.
1034
276c2d7d
GRK
1035start-sanitize-r5900
1036 Fri Feb 7 16:20:17 1997 Gavin Koch <gavin@cygnus.com>
1037
1038 * config.bfd: add r5900
1039
1040end-sanitize-r5900
ba4a4594
ILT
1041Fri Feb 7 12:39:11 1997 Ian Lance Taylor <ian@cygnus.com>
1042
1043 * elflink.h (elf_link_input_bfd): If we've discarded a section,
1044 the output section will be the absolute section; don't print an
1045 assertion message for that case when doing a relocateable link.
1046
e900e695
ILT
1047Thu Feb 6 16:55:43 1997 Ian Lance Taylor <ian@cygnus.com>
1048
1049 * elf32-mips.c (FN_STUB, CALL_STUB, CALL_FP_STUB): Define.
1050 (struct mips_elf_link_hash_entry): Add new fields fn_stub,
1051 need_fn_sub, call_stub, and call_fp_stub.
1052 (struct mips_elf_link_hash_table): Add field mips16_stubs_seen.
1053 (mips_elf_link_hash_newfunc): Initialize new fields.
1054 (mips_elf_link_hash_table_create): Likewise.
1055 (mips_elf_relocate_section): Redirect relocations to use mips16
1056 stubs when appropriate.
1057 (mips_elf_check_relocs): Attach stub sections to the appropriate
1058 symbol. Set need_fn_stub when appropriate.
1059 (mips_elf_always_size_sections): New static function.
1060 (mips_elf_check_mips16_stubs): New static function.
1061 (elf_backend_always_size_sections): Define.
1062 * elf-bfd.h (struct elf_obj_tdata): Add local_stubs field.
1063
1064 * elflink.h (elf_link_input_bfd): Discard local symbols that are
1065 attached to sections which are not being included in the link.
1066
5b61a02a
ILT
1067Wed Feb 5 13:20:17 1997 Ian Lance Taylor <ian@cygnus.com>
1068
1069 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore the
1070 symbol value when computing the addend for a pc_relative
1071 pcrel_offset reloc.
1072
bcb686ca
ILT
1073Mon Feb 3 11:54:06 1997 Ian Lance Taylor <ian@cygnus.com>
1074
5a50eec6
ILT
1075 * cofflink.c (_bfd_coff_generic_relocate_section): If doing a
1076 relocateable link, just skip pc_relative pcrel_offset relocs.
1077 * coff-arm.c (coff_arm_rtype_to_howto): Return a different howto
1078 structure for an ARM26 reloc which can be resolved.
1079 (coff_arm_adjust_symndx): Only convert ARM26 to ARM26D if the
1080 reloc can be resolved.
1081
bcb686ca
ILT
1082 * coff-h8300.c (h8300_reloc16_extra_cases): Correct off by one
1083 error in overflow check for R_RELBYTE.
1084
167dc907
ILT
1085Fri Jan 31 14:07:27 1997 Ian Lance Taylor <ian@cygnus.com>
1086
6c58561e
ILT
1087 * ieee.c (ieee_slurp_section_data): Pick up the start address.
1088 From Mark Rasin <mark.rasin@telrad.co.il>.
1089
167dc907
ILT
1090 * aoutx.h (aout_link_write_symbols): Don't apply discard_l to
1091 debugging symbols.
1092
1a2faf1f
JL
1093Wed Jan 29 00:00:49 1997 Jeffrey A Law (law@cygnus.com)
1094
1095 * elf32-mn10200.c (reloc_type): Add 16bit pc-relative reloc.
1096 (elf_mn10200_howto_table): Likewise.
1097 (mn10200_reloc_map): Likewise.
1098
1d5c6cfd
DE
1099Mon Jan 27 12:07:35 1997 Doug Evans <dje@seba.cygnus.com>
1100
1101 * reloc.c: Add relocs BFD_RELOC_M32R_{HI16_[US]LO,LO16}.
1102 * bfd-in2.h, libbfd.h: Regenerated.
1103 * elf32-m32r.c: Add support for them.
1104
9950f925
ILT
1105Mon Jan 27 12:25:02 1997 Ian Lance Taylor <ian@cygnus.com>
1106
54aa1dea
ILT
1107 * aout-arm.c (MY_swap_std_reloc_in): Remove unused r_length.
1108 * elf32-ppc.c (ppc_elf_check_relocs): Remove unused plt.
1109start-sanitize-v850
1110 * elf32-v850.c (v850_elf_final_link_relocate): Remove used
1111 r_format and r_pcrel. Always return a value.
1112end-sanitize-v850
1113 * riscix.c (MY_final_link_callback): Define to dummy value.
1114
9950f925
ILT
1115 * elf32-i386.c (elf_i386_size_dynamic_sections): When checking for
1116 relocations against the text segment, look up the output name of
1117 the reloc section.
1118 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1119 * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
1120 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1121 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
1122 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1123
0716c2e9 1124start-sanitize-tic80
8c00b01d
FF
1125Wed Jan 22 15:40:28 1997 Fred Fish <fnf@cygnus.com>
1126
1127 * coff-tic80.c (tic80coff_vec): Use correct data put/get
1128 routines for little endian data.
1129 * coffcode.h (coff_write_object_contents): Set magic to
1130 TIC80_ARCH_MAGIC for TIc80.
1131
0716c2e9
FF
1132Tue Jan 21 12:32:43 1997 Fred Fish <fnf@cygnus.com>
1133
1134 * coff-tic80.c (tic80coff_vec): Change to little endian data
1135 as the default.
1136
1137end-sanitize-tic80
db109ca2
ILT
1138Thu Jan 16 17:45:57 1997 Ian Lance Taylor <ian@cygnus.com>
1139
1140 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Change type of
1141 auxiliary_filters parameter to be const char * const *. Accept a
1142 NULL terminated array.
1143 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
1144 (bfd_elf32_size_dynamic_sections): Update declaration.
1145 * bfd-in2.h: Rebuild.
1146
1147Wed Jan 15 11:21:32 1997 Ian Lance Taylor <ian@cygnus.com>
1148
1149 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Treat a
1150 NOTYPE symbol in a text section as a FUNC symbol.
1151
1152 * coffcode.h (coff_compute_section_file_positions): Force
1153 relocbase to be aligned to COFF_DEFAULT_SECTION_ALIGNMENT_POWER.
1154
e1616e16
DE
1155Tue Jan 14 08:46:33 1997 Doug Evans <dje@canuck.cygnus.com>
1156
1157 * libaout.h (machine_type): Reserve several values for sparclet.
1158
4af93ad0
MM
1159start-sanitize-tic80
1160Mon Jan 13 22:39:08 1997 Michael Meissner <meissner@tiktok.cygnus.com>
1161
1162 * config.bfd (tic80-*-*): Don't require 'coff'.
1163
91eb4378 1164end-sanitize-tic80
0ce71ebd
MM
1165start-sanitize-v850
1166Mon Jan 13 19:36:25 1997 Michael Meissner <meissner@tiktok.cygnus.com>
1167
1168 * elf32-v850.c (v850_elf_howto_table): Set the special_function
1169 table to v850_elf_reloc for all non-standard relocations.
1170 (v850_elf_check_relocs): Add check for h being non-null.
1171 (v850_elf_reloc): Add R_V850_ZDA_OFFSET support. Use switch
1172 statement instead of multiple ifs.
1173 (v850_elf_relocate_section): Fix up error message, don't just call
1174 abort.
1175
1176end-sanitize-v850
483e1b91
JL
1177Mon Jan 6 13:28:35 1997 Jeffrey A Law (law@cygnus.com)
1178
09a7bde3 1179 * elf32-mn10200.c (elf_mn10200_howto): Don't ever set partial-inplace.
40131692
JL
1180 Use bfd_elf_generic_reloc as special function for all relocs.
1181 (bfd_elf32_mn10200_reloc): Remove unnecessary function.
1182
1183 * elf32-mn10200.c (elf_mn10200_howto): Set pcrel_offset for
483e1b91
JL
1184 24bit pc-relative reloc.
1185
28eb95aa
FF
1186start-sanitize-tic80
1187Fri Jan 3 16:33:00 1997 Fred Fish <fnf@cygnus.com>
1188
1189 * Makefile.in (coff-tic80.o): Add coffcode.h to dependency list.
1190 * coff-tic80.c (tic80coff_vec): Data byte order is big endian and
1191 header byte order is little endian. Use correct bfd_get and
1192 bfd_put routines for little endian headers.
1193 * coffcode.h (coff_set_arch_mach_hook): Set arch to
1194 bfd_arch_tic80 for TIC80_ARCH_MAGIC number.
1195
1196end-sanitize-tic80
b3ef3894
JL
1197Fri Jan 3 16:54:08 1997 Jeffrey A Law (law@cygnus.com)
1198
1199 * reloc.c: Add BFD_RELOC_24.
1200 * elf32-mn10200.c (enum reloc_type): Add 24bit and pcrel relocs.
1201 (elf_mn10200_howto, mn10200_reloc_map): Corresponding changes.
1202 * bfd-in2.h, libbfd.h: Rebuilt.
1203
ff12f303
ILT
1204Fri Jan 3 16:58:31 1997 Richard Henderson <rth@tamu.edu>
1205
1206 elf64-alpha multiple .got rewrite:
1207
1208 * elf-bfd.h (struct elf_backend_data): Add always_size_sections entry.
1209 (bfd_elf*_mkobject): Don't define here ...
1210 * elfxx-target.h: ... but rather here. Default always_size_sections
1211 hook to NULL.
1212 * elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was
1213 what the #defines in elf-bfd.h transmuted it to anyway.
1214
1215 * section.c: Add SEC_LINKER_CREATED flag.
1216 * bfd-in2.h: Rebuild.
1217 * elf32-i386.c (elf_i386_check_relocs): Add SEC_LINKER_CREATED to
1218 relocation section flags.
1219 (elf_i386_size_dynamic_sections): Use SEC_LINKER_CREATED instead of
1220 SEC_IN_MEMORY to recognize generated bits.
1221 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_size_dynamic_sections):
1222 Likewise.
1223 * elf32-mips.c (mips_elf_final_link, mips_elf_create_dynamic_sections,
1224 mips_elf_create_compact_rel_section, mips_elf_create_got_section,
1225 mips_elf_check_relocs, mips_elf_size_dynamic_sections): Likewise.
1226 * elf32-ppc.c (ppc_elf_create_linker_section,
1227 ppc_elf_size_dynamic_sections): Likewise.
1228 * elf32-sparc.c (elf32_sparc_check_relocs,
1229 elf32_sparc_size_dynamic_sections): Likewise.
1230 * elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to
1231 section flags.
1232 (_bfd_elf_create_dynamic_sections): Likewise.
1233 (_bfd_elf_make_linker_section_rela): Likewise.
1234 * elflink.h (elf_link_create_dynamic_sections): Likewise.
1235 (bfd_elf,size_dynamic_sections): Call the always_size_sections hook.
1236 (elf_bfd_final_link): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY
1237 to identify generated bits.
1238 (elf_link_input_bfd): Likewise.
1239
1240 * elf64-alpha.c: Rewrite everything touching relocations.
1241
afaed5e9 1242start-sanitize-v850
de224d6a
MM
1243Fri Jan 3 11:42:53 1997 Michael Meissner <meissner@tiktok.cygnus.com>
1244
1245 * elf32-v850.c (all functions and static variables): Go through
1246 and regularize names to be of the form v850_elf_<xxx>.
1247 (toplevel): Include <elf/v850.h>.
1248 (enum reloc_type): Move to include/elf/v850.h.
1249 (v850_elf_check_relocs): For common variables, if the variable is
1250 referenced by a R_V850_{SDA,ZDA,TDA} relocation, put the variable
1251 into the appropriate section.
1252 (elf_backend_check_relocs): Define.
1253
afaed5e9
MM
1254Tue Dec 31 15:15:28 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1255
1256 * elf32-v850.c (elf_v850_howto_table): Fix some spacing.
1257
1258end-sanitize-v850
148437ec
ILT
1259Tue Dec 31 14:44:50 1996 Ian Lance Taylor <ian@cygnus.com>
1260
7c342fc5
ILT
1261 * config.bfd (mips*el-*-linux*): New target.
1262 (mips*-*-linux*): New target.
1263
1264 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Clean up.
1265 Return a useful value.
1266
6ded6615
ILT
1267 * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
1268
dda7af9f
ILT
1269 * configure.in: Check ac_cv_func_mmap_fixed_mapped, not
1270 ac_cv_func_mmap.
1271 * configure: Rebuild.
ab98712a
ILT
1272 * configure.host: Use ac_cv_func_mmap_fixed_mapped instead of
1273 ac_cv_func_mmap in bfd/configure.host.
dda7af9f 1274
148437ec
ILT
1275 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Add
1276 filter_shlib and auxiliary_filter_shlib parameters.
1277 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_AUXILIARY and
1278 DT_FILTER.
1279 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
1280 (bfd_elf64_size_dynamic_sections): Likewise.
1281 * bfd-in2.h: Rebuild.
1282
1eeccb22
ILT
1283Mon Dec 30 18:48:52 1996 Ian Lance Taylor <ian@cygnus.com>
1284
1285 * xcofflink.c (xcoff_build_ldsyms): When exporting all defined
1286 symbols, don't export a symbol which is defined by an object in an
1287 archive which contains shared objects.
1288
60b26712 1289start-sanitize-tic80
fc46a9ec
FF
1290Mon Dec 30 16:12:58 1996 Fred Fish <fnf@cygnus.com>
1291
1292 * archures.c (enum bfd_architecture): Add bfd_arch_tic80
1293 for TI TMS320c80 (MVP).
1294 (bfd_archures_list): Add bfd_tic80_arch.
1295 * bfd-in2.h: Regenerate by running "make headers".
1296
60b26712
FF
1297Sun Dec 29 16:18:52 1996 Fred Fish <fnf@cygnus.com>
1298
1299 * cpu-tic80.c (bfd_tic80_arch): Add struct.
1300 * configure.in (case $vec): Correct typo, "tb" not "tp".
1301 Also add cofflink.o for tic80coff_vec.
1302 * configure: Regenerate with autoconf.
1303
1304end-sanitize-tic80
412f8c93
ILT
1305Mon Dec 30 11:54:56 1996 Ian Lance Taylor <ian@cygnus.com>
1306
1307 * libbfd.c: Patch up the mmap code so that it is only built if BFD
1308 is configured with --with-mmap.
1309
5a608f5b 1310start-sanitize-tic80
fc46a9ec 1311Sun Dec 29 10:48:57 1996 Fred Fish <fnf@cygnus.com>
5a608f5b
FF
1312
1313 * Makefile.in (BFD32_BACKENDS): Add coff-tic80.o
1314 (ALL_MACHINES): Add cpu-tic80.o
1315 (cpu-tic80.o, coff-tic80.o): Add dependencies.
1316 * coff-tic80.c: Add skeleton, cloned from another coff config.
1317 * coffcode.h (coff_write_object_contents): Set magic to TIC80MAGIC
1318 for TIc80.
1319
1320end-sanitize-tic80
60b26712 1321Fri Dec 27 20:56:41 1996 Fred Fish <fnf@cygnus.com>
cd6213ff
FF
1322
1323 * TODO: Correct a misspelling.
1324start-sanitize-tic80
1325 * coff-tic80.c: New file for TI TMS320C80 (MVP).
1326 * cpu-tic80.c: New file for TI TMS320C80 (MVP).
1327 * configure.in (case $vec): Add tic80coff_vec entry.
1328 * configure: Regenerate with autoconf.
1329 * archures.c (bfd_tic80_arch): Declare.
1330 * bfd-in2.h (enum bfd_architecture): Add bfd_arch_tic80.
1331 * config.bfd (case ${targ}): Add tic80*-*-coff* target.
1332 * targets.c (tic80coff_vec): Add decl as extern bfd_target.
1333 (bfd_target_vector): Add tic80coff_vec entry.
1334end-sanitize-tic80
1335
6b8ec6f3
ILT
1336Fri Dec 27 11:48:12 1996 H.J. Lu <hjl@lucon.org>
1337
1338 * elflink.h (elf_buckets): Add some more values for larger
1339 binaries.
1340
78650abd
ILT
1341Thu Dec 26 18:36:54 1996 Ian Lance Taylor <ian@cygnus.com>
1342
1343 * Makefile.in (install): Move subdir_do out of conditional. From
1344 Fred Fish <fnf@cygnus.com>.
1345
8d16fe5c
JL
1346Wed Dec 18 10:04:30 1996 Jeffrey A Law (law@cygnus.com)
1347
1348 * elf32-mn10200.c (enum reloc_type): Enable basic 8, 16, and
1349 32 bit relocs.
1350 (elf_mn10200_howto_table): Likewise.
1351 (mn10200_reloc_map): Likewise.
1352
69e2ff18
ILT
1353Tue Dec 17 11:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
1354
e4f4813f
ILT
1355 * elf32-mips.c (mips_elf_add_symbol_hook): Add 1 to the value of a
1356 mips16 symbol during the link.
1357 (mips_elf_finish_dynamic_symbol): Subtract 1 from the value of a
1358 mips16 symbol.
1359 (mips_elf_link_output_symbol_hook): New static function.
1360 (elf_backend_link_output_symbol_hook): Define.
1361
69e2ff18
ILT
1362 * elf.c (bfd_elf_print_symbol): Print the st_other field if it is
1363 not zero.
1364
e85f2fbd
ILT
1365Mon Dec 16 14:38:39 1996 Ian Lance Taylor <ian@cygnus.com>
1366
1367 * elf.c (bfd_section_from_shdr): Don't check for reloc sections
1368 against SEC_DEBUGGING sections here (revert patch of December 5).
1369 * elfcode.h (elf_object_p): Check for them here, instead.
1370
e35765a9
ILT
1371Sun Dec 15 14:46:06 1996 Ian Lance Taylor <ian@cygnus.com>
1372
1373 * elfcode.h (elf_slurp_reloc_table): Add dynamic parameter.
1374 * elf.c (_bfd_elf_canonicalize_reloc): Pass new argument to
1375 slurp_reloc_table.
1376 (_bfd_elf_get_dynamic_reloc_upper_bound): New function.
1377 (_bfd_elf_canonicalize_dynamic_reloc): New function.
1378 * elf-bfd.h (struct elf_size_info): Update declaration of
1379 slurp_reloc_table.
1380 (_bfd_elf_get_dynamic_reloc_upper_bound): Declare.
1381 (_bfd_elf_canonicalize_dynamic_reloc): Declare.
1382 * elfxx-target.h: Use new dynamic reloc routines by default.
1383 * elf64-mips.c (mips_elf64_slurp_reloc_table): Add dynamic
1384 parameter.
1385
6270adfb
ILT
1386Fri Dec 13 13:18:49 1996 Dan Wilder <dan@gasboy.com>
1387
1388 * coffcode.h (coff_set_flags): Use MC68KBCSMAGIC for bfd_arch_m68k
1389 if NAMES_HAVE_UNDERSCORE is defined.
1390
21e45f82
DE
1391Fri Dec 13 11:13:23 1996 Doug Evans <dje@canuck.cygnus.com>
1392
1393 * libaout.h (enum machine_type): Change M_SPARCLET from 142 to 131.
1394
e7bab9df
MM
1395Thu Dec 12 15:07:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1396
1397 * elf32-ppc.c (ppc_elf_check_relocs): Move R_PPC_PLTREL24 into the
1398 supported relocs.
1399
a5147005
ILT
1400Thu Dec 12 14:55:41 1996 Ian Lance Taylor <ian@cygnus.com>
1401
440f3914
ILT
1402 * elflink.h (elf_link_add_object_symbols): Only add a weak
1403 symbol if the real definition is in the dynamic symbol table.
1404 After finding the real definition, then, if it is dynamic, add the
1405 weak symbol to the dynamic symbol table.
1406
e5c3708d
ILT
1407 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Make static.
1408
a5147005
ILT
1409 * ppcboot.c (ppcboot_set_arch_mach): Don't define; it's a
1410 function.
1411 (ppcboot_bfd_print_private_bfd_data): Don't take the address of an
1412 array.
1413
1414Tue Dec 10 23:23:52 1996 Jeffrey A Law (law@cygnus.com)
1415
1416 * elf32-mn10300.c (reloc_type): Remove big endian mn10300 reloc
1417 variants.
1418 (elf32_mn10300_howto_table, mn10300_reloc_map): Likewise.
1419 (bfd_elf32_mn10300_reloc): Write data in little endian format.
1420 * reloc.c: Remove mn10300 big endian relocs.
1421 * bfd-in2.h, libbfd.h: Rebuilt.
1422
1423 * elf32-mn10200.c: Update from elf32-mn10300.c.
1424
207e944c
JL
1425Fri Dec 6 15:18:05 1996 Jeffrey A Law (law@cygnus.com)
1426
31cffd2e
JL
1427 * elf32-mn10300.c (elf_symbol_leading_char): Define.
1428
207e944c
JL
1429 * elf32-mn10300.c: Add some comments.
1430
6dcf1ef5
ILT
1431Fri Dec 6 17:16:43 1996 Ian Lance Taylor <ian@cygnus.com>
1432
1433 * ihex.c (ihex_scan): Always initialize buf before jumping to
1434 error_return.
1435 (ihex_read_section): Likewise.
1436
d28f058e
JL
1437Thu Dec 5 22:29:18 1996 Jeffrey A Law (law@cygnus.com)
1438
1439 * elf32-mn10300.c (elf_mn10300_howto_table): Don't set partial-
1440 inplace for most relocs.
1441
80be821d
ILT
1442Thu Dec 5 13:24:46 1996 Ian Lance Taylor <ian@cygnus.com>
1443
1444 * elflink.h (elf_link_add_object_symbols): Calling check_relocs
1445 even if SEC_ALLOC is not set.
1446 * elf32-i386.c (elf_i386_check_relocs): Don't check SEC_ALLOC
1447 when deciding whether to copy a reloc into a shared object.
1448 (elf_i386_relocate_section): Likewise.
1449 * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
1450 (elf32_sparc_relocate_section): Likewise.
1451 * elf32-i386.c (elf_i386_check_relocs): Don't set SEC_ALLOC in a
1452 reloc section if it is not set in the source section.
1453 * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
1454 * elf.c (bfd_section_from_shdr): Mark a reloc section associated
1455 with a SEC_DEBUGGING section as SEC_DEBUGGING.
1456
e5c4495c
MM
1457Wed Dec 4 14:18:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1458
1459 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): #if 0 code that
1460 expects a .got.plt until we actually create it.
1461
179b58d9
ILT
1462Mon Dec 2 12:13:51 1996 Ian Lance Taylor <ian@cygnus.com>
1463
e5c4495c
MM
1464 * cofflink.c (_bfd_coff_generic_relocate_section): Print an error
1465 message for bfd_reloc_outofrange, rather than aborting. From
1466 Philippe De Muyter <phdm@info.ucl.ac.be>.
1467
179b58d9
ILT
1468 * cofflink.c (_bfd_coff_final_link): If there aren't any relocs in
1469 a relocateable link, don't try to process them. From Heinz Wrobel
1470 <wrobel@lpr.e-technik.tu-muenchen.de>.
1471
943686fa
JL
1472Mon Dec 2 00:39:24 1996 Jeffrey A Law (law@cygnus.com)
1473
1474 * elf32-mn10300.c (mn10300_info_howto): Renamed from
a5147005 1475 mn10300_info_howto_rel. Tweak reloc argument to be an
943686fa
JL
1476 Elf32_Internal_Rela.
1477 (USE_RELA): Define instead of USE_REL.
1478 (elf_info_to_howto, elf_info_howto_rel): Corresponding changes.
1479
0e0f4106
PS
1480Sun Dec 1 00:18:59 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1481
1482 * configure.in, configure: Handle mips*-sgi-irix6*.
1483 * irix-core.c (irix_core_core_file_p): Accept CORE_MAGICN32
1484 core files.
1485
15aafe49
ILT
1486Wed Nov 27 12:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
1487
1488 * elf32-i386.c (elf_i386_relocate_section): Warn about a
1489 relocation against a symbol defined in a section with no output
1490 section.
1491
6c02f1a0
ILT
1492Tue Nov 26 11:07:31 1996 Ian Lance Taylor <ian@cygnus.com>
1493
dfc7020d
ILT
1494 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't require AC_C_CROSS.
1495 * configure, config.in: Rebuild with autoconf 2.12.
1496
6c02f1a0
ILT
1497 * elf-bfd.h (struct elf_link_hash_entry): Add other field.
1498 * elf.c (_bfd_elf_link_hash_newfunc): Initialize other field.
1499 (swap_out_syms): Set st_other from existing st_other field.
1500 * elflink.h (elf_link_add_object_symbols): Store st_other in hash
1501 table other field.
1502 (elf_link_output_extsym): Set the other field from the global hash
1503 table entry.
1504 * elf32-mips.c (enum reloc_type): Add R_MIPS16_26.
1505 (elf_mips16_jump_howto): New static variable.
1506 (mips16_jump_reloc): New static function.
1507 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_JMP.
1508 (mips_info_to_howto_rel): Handle R_MIPS16_26.
1509 (mips_elf_relocate_section): Handle R_MIPS16_26. Handle R_MIPS_26
1510 to a mips16 symbol.
1511 * reloc.c (BFD_RELOC_MIPS16_JMP): Add to list of relocs.
1512 * bfd-in2.h, libbfd.h: Rebuild.
1513 * cpu-mips.c (arch_info_struct): Add mips:16 entry.
1514
f082b5ea
ILT
1515Mon Nov 25 11:23:32 1996 Ian Lance Taylor <ian@cygnus.com>
1516
1517 * configure.host: Use long long for mips-sgi-irix6*.
1518
1519 * coffswap.h (coff_swap_scnhdr_out): Make line number overflow
1520 only a warning. From Philippe De Muyter <phdemuyt@ulb.ac.be>.
1521
12fdaaf8
JL
1522Mon Nov 25 08:52:29 1996 Jeffrey A Law (law@cygnus.com)
1523
1524 * elf32-mn10300.c (bfd_elf32_mn10300_reloc): New function.
1525 (enum reloc_type): Add more reloc types.
1526 (elf32_mn10300_howto_table): Update for new reloc types.
1527 (elf32_mn10300_reloc_map): Update for new reloc types.
1528 * reloc.c: Add some new relocs for the mn10300 series.
1529 * bfd-in2.h, libbfd.h: Rebuilt.
1530
23def276
JL
1531Sat Nov 23 13:26:18 1996 Jeffrey A Law (law@cygnus.com)
1532
1533 * som.c (setup_sections): Don't lose for a space which has
1534 no data, but some symbols.
1535
a600a89e
ILT
1536Fri Nov 22 11:32:13 1996 Ian Lance Taylor <ian@cygnus.com>
1537
1538 * sunos.c (struct sunos_link_hash_table): Add got_needed field.
1539 (sunos_link_hash_table_create): Initialize got_needed.
1540 (sunos_create_dynamic_sections): Only set .got section size if it
1541 is not already set. Set got_needed.
1542 (bfd_sunos_size_dynamic_sections): Check got_needed. Only set
1543 sdynptr, and only handle dynamic sections, if dynamic sections are
1544 needed.
1545 (sunos_scan_std_relocs): Pass false to create_dynamic_sections.
1546 Initialize .got section.
1547 (sunos_scan_ext_relocs): Likewise.
1548 (sunos_write_dynamic_symbol): Set up PLT entry even if this is not
1549 a dynamic symbol.
1550 (sunos_finish_dynamic_link): Check got_needed. Only set up
1551 dynamic linking information if needed.
1552
aa09d6b2
RS
1553Thu Nov 21 10:31:31 1996 Rob Savoye (rob@cygnus.com)
1554
1555 * config.bfd: Added VersaDOS format to the Ericsson configuration.
1556
c3239e66
JL
1557Wed Nov 20 16:31:31 1996 Jeffrey A Law (law@cygnus.com)
1558
1559 * elf32-mn10300.c: Rough cut at relocs for the mn10300.
1560
c3239e66
JL
1561Wed Nov 13 08:12:38 1996 Jeffrey A Law (law@cygnus.com)
1562
1563 * Makefile.in (elf32-d10v.o): Don't depend on elf/d10v.h
1564 anymore.
1565
c3239e66
JL
1566Tue Nov 12 13:30:00 1996 Dawn Perchik <dawn@cygnus.com>
1567
1568 * filemode.c: Include sysdep.h.
1569 * ihex.c: Add casts to eliminate compiler warnings.
1570 * sunos.c: Add casts to eliminate compiler warnings.
1571
9e23db76
MM
1572Mon Nov 11 10:37:02 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1573
1574 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Create .got.plt
1575 section.
1576 (ppc_elf_check_relocs): Add support for R_PPC_LOCAL24PC. Make
1577 appropriate relocations in the .so file if shared.
1578 (ppc_elf_relocate_section): Ditto.
1579
affcfcf9
DE
1580Tue Oct 29 15:03:02 1996 Doug Evans <dje@canuck.cygnus.com>
1581
1582 * elf32-m32r.c (elf_m32r_howto_table, R_M32R_24): Use
1583 complain_overflow_unsigned.
1584
421a2956
MH
1585Tue Oct 29 12:53:46 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
1586
1587 * elf32-d10v.c (elf_d10v_howto_table): Don't complain on
1588 overflows for R_D10V_16 and R_D10V_18.
1589
061cc10b
ILT
1590Tue Oct 29 13:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
1591
1592 * ieee.c (ieee_write_section_part): Use LMA rather than VMA.
1593 (do_with_relocs): Likewise.
1594 (do_as_repeat): Likewise.
1595 (copy_expression): Likewise.
1596
1597Fri Oct 25 16:56:40 1996 Ian Lance Taylor <ian@cygnus.com>
1598
1599 * ieee.c (ieee_write_external_part): Correctly record whether
1600 there is an external part.
1601
1602start-sanitize-v850
1603Thu Oct 24 14:32:52 1996 Jeffrey A Law (law@cygnus.com)
1604
1605 * elf32-v850.c (elf32_v850_bfd_final_link_relocate): Correctly
1606 handle tda offsets for sld.w and sst.w instructions.
1607 Fix alignment check in sld.w and sst.w tda reloc handling.
1608
1609end-sanitize-v850
27c7e907
SG
1610Thu Oct 24 09:08:47 1996 Stu Grossman (grossman@critters.cygnus.com)
1611
1612 * aclocal.m4, configure: Set USE_BINARY_FOPEN for *-*-windows.
1613
90ffe48b
JL
1614start-sanitize-v850
1615Wed Oct 23 00:53:16 1996 Jeffrey A Law (law@cygnus.com)
1616
1617 * elf32-v850.c: Add comments about assumptions about
1618 char, short & long sizes.
1619 (elf32_v850_bfd_final_link_relocate): Fix sign extension
1620 problems for several relocs.
1621
1622 * elf32-v850.c (elf32_v850_howto_table): Fix typo in
1623 R_V850_SDA_OFFSET entry.
1624
c0e8bfc0 1625end-sanitize-v850
84be2a8f
ILT
1626Wed Oct 23 00:20:34 1996 Ian Lance Taylor <ian@cygnus.com>
1627
1628 * xcofflink.c (bfd_xcoff_import_symbol): Don't allocate ldsym.
1629 Store import file index in ldindx.
1630 (xcoff_build_ldsyms): Assume that ldsym was not previously
1631 allocated. For an imported symbol, copy ldindx into l_ifile.
1632
725b96f5
JL
1633start-sanitize-v850
1634Tue Oct 22 19:20:38 1996 Jeffrey A Law (law@cygnus.com)
1635
c322f1b5 1636 * elf32-v850.c (elf_v850_howto_table): Fix ordering of
90ffe48b
JL
1637 R_V850_ZDA_OFFSET and R_V850_TDA_OFFSET. Fix various
1638 fields in R_V850_TDA_OFFSET.
c322f1b5 1639 (elf32_v850_bfd_final_link_relocate): Tweak pc-relative
90ffe48b 1640 relocs to work more like other relocs. Handle R_V850_TDA_OFFSET
c322f1b5
JL
1641 relocations.
1642
725b96f5
JL
1643 * elf32-v850.c: Include bfdlink.h.
1644 (bfd_elf32_v850_reloc): Return an error if we get a reloc
1645 we can't handle.
1646 (elf32_v850_bfd_final_link_relocate): New function.
1647 (v850_elf_relocation_section): Likewise.
1648 (elf_backend_relocate_section): Define.
1649
1650end-sanitize-v850
40c0ea5a
ILT
1651Tue Oct 22 17:22:43 1996 Ian Lance Taylor <ian@cygnus.com>
1652
1653 * binary.c (binary_set_section_contents): Ignore sections which
1654 don't have SEC_LOAD and SEC_ALLOC set.
1655
9c52f4b2
JL
1656Mon Oct 21 12:13:05 1996 Jeffrey A Law (law@cygnus.com)
1657
1658 * linker.c (_bfd_generic_final_link): Avoid losing static
1659 symbols in the .bss section.
1660
bd4dd3d0
ILT
1661Mon Oct 21 10:54:58 1996 Ian Lance Taylor <ian@cygnus.com>
1662
68553b63
ILT
1663 * elf32-mips.c (elf_mips_howto_table): Describe R_MIPS_64.
1664 (mips32_64bit_reloc): New static function.
1665 (mips_reloc_map): Add entry for BFD_RELOC_64.
1666 (mips_elf_relocate_section): Handle R_MIPS_64.
1667
bd4dd3d0
ILT
1668 * linker.c (default_indirect_link_order): Print an error message
1669 when attempting to do a relocateable link with different object
1670 file formats, rather than calling abort.
1671
56910544
DE
1672Thu Oct 17 10:43:29 1996 Doug Evans <dje@canuck.cygnus.com>
1673
1674 * reloc.c (m32r relocs): Rename them.
1675 * bfd-in2.h, libbfd.h: Regenerated.
1676 * elf32-m32r.c: Update.
1677 (m32r_elf_10_pcrel_reloc): New function.
1678 (elf_m32r_howto_table, R_M32R_10_PCREL entry): Use it.
1679 (elf_m32r_howto_table, R_M32R_24 entry): Fix {src,dst}_masks.
1680
e1d98a0a
JL
1681Wed Oct 16 11:24:35 1996 Jeffrey A Law (law@cygnus.com)
1682
4948949e
JL
1683 * linker.c (_bfd_generic_final_link): Set "linker_mark" for
1684 all sections that will be included in the output file.
1685 (_bfd_generic_link_output_symbols): Discard symbols in sections
1686 which are being discarded.
1687
1688start-sanitize-v850
b6d08fce
JL
1689
1690 * elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,
1691 R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET.
1692 (elf_v850_howto_table): Corresponding changes.
1693 (elf_v850_reloc_map): Corresponding changes.
1694 * reloc.c: Add additional V850 relocations.
1695 * bfd-in2.h, libbfd.h: Rebuilt.
1696
e1d98a0a
JL
1697 * elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
1698 no longer want in pc-relative relocs.
1699
05f1baaa
JL
1700Tue Oct 15 22:17:37 1996 Jeffrey A Law (law@cygnus.com)
1701
1702 * elf32-v850.c (bfd_elf32_v850_reloc): Don't silently
1703 accept a reloc against an undefined sybmol!
1704
1336da39
SG
1705Tue Oct 15 16:17:28 1996 Stu Grossman (grossman@critters.cygnus.com)
1706
1707 * elf32-v850.c: Define elf_symbol_leading_char to be '_'.
1708
1709end-sanitize-v850
c24453fe
ILT
1710Tue Oct 15 12:40:41 1996 Ian Lance Taylor <ian@cygnus.com>
1711
ede836b9
ILT
1712 * VERSION: Bump for new relocation.
1713
c24453fe
ILT
1714 * hosts/i386bsd.h: If NBPG is not defined, define it as
1715 PAGE_SIZE, for recent versions of FreeBSD.
1716
e7a50458
ILT
1717Mon Oct 14 12:37:26 1996 Ian Lance Taylor <ian@cygnus.com>
1718
1719 * configure.host: Use `long long' as the 64 bit type on a Solaris
1720 host, since both gcc and the SunPRO compilers support it.
1721
6b31fd3a
ILT
1722Mon Oct 14 11:17:24 1996 Richard Henderson <rth@tamu.edu>
1723
1724 * reloc.c: Create a new BFD_RELOC_ALPHA_ELF_LITERAL. It was a
1725 mistake to have reused the ECOFF LITERAL for ELF since they have
1726 different semantics.
1727 * elf64-alpha.c (elf_reloc_map): Map from ELF_LITERAL.
1728 * bfd-in2.h, libbfd.h: Rebuild.
1729
1730 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Trap .got
1731 section overflow.
1732
1733 * elf64-alpha.c (elf64_alpha_relocate_section): Do not emit a
1734 dynamic relocation for an undefweak symbol when we are building
1735 a static executable.
1736
f20f2474
SS
1737Thu Oct 10 11:15:06 1996 Stan Shebs <shebs@andros.cygnus.com>
1738
1739 * mpw-make.sed (config.bfd, targmatch.sed): Edit references to
1740 point explicitly to srcdir.
1741 (targmatch.h): Edit references to point explicitly to objdir.
1742
3e222a5a
ILT
1743Thu Oct 10 14:14:23 1996 Ian Lance Taylor <ian@cygnus.com>
1744
1745 * config.bfd: When setting targ_cpu, don't get confused by
1746 linux-gnu.
1747
81501797
SG
1748Tue Oct 8 08:51:19 1996 Stu Grossman (grossman@critters.cygnus.com)
1749
1750 * configure.host: Add support for windows host (a build done
1751 under the Microsoft build environment).
1752
fe4ff515
ILT
1753Tue Oct 8 11:40:16 1996 Ian Lance Taylor <ian@cygnus.com>
1754
1c4794f5
ILT
1755 * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
1756 definition in a dynamic object, add it to the dynamic symbol table
1757 if any dynamic object mentions it. Reverts part of last patch.
1758
9d81de19
ILT
1759 * sunos.c (struct sunos_link_hash_table): Add got_base field.
1760 (sunos_link_hash_table_create): Initialize got_base.
1761 (bfd_sunos_size_dynamic_sections): If the .got section is more
1762 than 0x1000 bytes, set __GLOBAL_OFFSET_TABLE_ and got_base to
1763 0x1000.
1764 (sunos_check_dynamic_reloc): Subtract got_base from a base
1765 relative relocation.
1766
fe4ff515
ILT
1767 * elf32-mips.c (elf_mips_isa): New static function.
1768 (_bfd_mips_elf_merge_private_bfd_data): Don't warn about linking
1769 -mips1 and -mips2 code together, or -mips3 and -mips4 code.
1770
1233f74b
ILT
1771Mon Oct 7 11:44:17 1996 Ian Lance Taylor <ian@cygnus.com>
1772
1773 * archive.c (do_slurp_coff_armap): Only treat archive as little
1774 endian for i960 COFF.
1775
a3d5a706
ILT
1776Fri Oct 4 13:49:01 1996 Ian Lance Taylor <ian@cygnus.com>
1777
65f56a58
ILT
1778 * coffcode.h (coff_compute_section_file_positions): Adjust sofar
1779 by the change in size of the section when EXEC_P is not set.
1780
a9dd34a9
ILT
1781 * coff-m68k.c (coff_rtype_to_howto): Define if not defined.
1782 (m68kcoff_rtype_to_howto): New static function.
1783 * cf-m68klynx.c (coff_m68k_lynx_rtype_to_howto): Add the section
1784 VMA to the addend for a PC relative reloc.
1785
05a68c24
ILT
1786 * dep-in.sed: Rework backslash loop a bit to avoid bug in sed on
1787 HP/UX 10.20.
1788 * Makefile.in: Rebuild dependencies.
1789
a3d5a706
ILT
1790 * dep-in.sed: Remove ../bfd/sysdep.h, since it will appear when
1791 som.h is included.
1792
c00ae065
JL
1793Fri Oct 4 11:41:39 1996 Jeffrey A Law (law@cygnus.com)
1794
1795 * Makefile.in: Remove explicit dependencies for mn10200 and
1796 mn10300 files.
1797 (ALL_MACHINE_CFILES): Add cpu-mn10200.c and cpu-mn10300.c.
1798 (BFD32_BACKENDS_CFILES): Add elf32-mn10200.c and elf32-mn10300.c
1799 (dependencies): Rebuilt.
1800
dee99794
ILT
1801Thu Oct 3 16:57:51 1996 Ian Lance Taylor <ian@cygnus.com>
1802
1d871eb7
ILT
1803 * cofflink.c (coff_link_add_symbols): Set obj_coff_keep_syms
1804 during this function.
1805
6b5af55c
ILT
1806 * elflink.c (_bfd_elf_create_linker_section): Only use an existing
1807 section if the flags are compatible.
1808
dee99794
ILT
1809 * configure.in: Add havevecs, and put it in tdefaults.
1810 * mpw-config.in: Likewise.
1811 * configure: Rebuild.
1812 * targmatch.sed: New file; a sed script to build targmatch.h from
1813 config.bfd.
1814 * config.bfd: Add #if, #endif, and comments for targmatch.h.
1815 * targets.c: Include "fnmatch.h".
1816 (struct targmatch): Define.
1817 (bfd_target_match): Define by including targmatch.h.
1818 (bfd_find_target): If the target is not found by name, search for
1819 it as a configuration triplet.
1820 * Makefile.in: Rebuild dependencies.
1821 (BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o,
1822 i386dynix.o, m68k4knetbsd.o, and riscix.o.
1823 (BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c,
1824 hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c.
1825 (HFILES): Add targmatch.h. Also, alphabetize and reindent.
1826 (CFILES): Remove i386dynix.c and hp300bsd.c.
1827 (targmatch.h): New target.
1828 (do_clean): Remove targmatch.h.
1829
1830 * configure.in: Add BFD_NEED_DECLARATION(getenv).
1831 * acconfig.h: Add NEED_DECLARATION_GETENV.
1832 * configure, config.in: Rebuild.
1833 * sysdep.h: If NEED_DECLARATION_GETENV, declare getenv.
1834 * aout-adobe.c (aout_adobe_object_p): Don't declare getenv.
1835
ae1b99e4
JL
1836Thu Oct 3 09:29:09 1996 Jeffrey A Law (law@cygnus.com)
1837
1838 * cpu-mn10x00.c, elf32-mn10x00: Removed.
1839 * cpu-mn10200.c, cpu-mn10300.c: New files.
1840 * elf32-mn10200.c, elf32-mn10300.c: New files.
1841 * Makefile.in: Break mn10x00 support into two separate
1842 configurations, mn10200 and mn10300.
1843 * archures.c, config.bfd, configure.in, elf.c, targets.c: Likewise.
1844 * bfd-in2.h, configure: Rebuilt.
1845
4c7f3fde
JM
1846Thu Oct 3 15:38:19 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
1847
1848 * Makefile.in (do_clean): Move config.log to do_distclean.
1849
efc2b064
JL
1850Wed Oct 2 21:40:55 1996 Jeffrey A Law (law@cygnus.com)
1851
1852 * cpu-mn10x00.c, elf32-mn10x00.c: New files.
1853 * Makefile.in (ALL_MACHINES): Add cpu-mn10x00.o.
1854 (BFD32_BACKENDS): Similarly for elf32-mn10x00.o.
1855 (elf32-mn10x00.o): Add dependencies.
1856 * archures.c (enum bfd_architecture): Add bfd_arch_mn10x00.
1857 (bfd_mn10x00_arch): Declare.
1858 (bfd_archures_list): Add bfd_mn10x00_arch.
1859 * config.bfd: Add mn10x00-*-*.
1860 * configure.in: Add bfd_elf32_mn10x00_vec.
1861 * elf.c (prep_headers): Handle bfd_arch_mn10x00.
1862 * targets.c (bfd_elf32_mn10x00_vec): Declare.
1863 (bfd_target_vector): Add bfd_elf32_mn10x00_vec.
1864 * bfd-in2.h, configure: Rebuilt.
1865
bf53bd9f
ILT
1866Wed Oct 2 15:46:45 1996 Klaus Kaempf <kkaempf@progis.de>
1867
1868 openVMS/Alpha: Provide filename and case_hack flags via
1869 symbol table from gas.
1870 Add case_hack code for symbol output from vax/vms.
1871 * evax-alpha.c (evax_initialize): Remove filename handling,
1872 filename is provided via symbol table.
1873 (evax_get_symtab): Use local symbol count when setting up table.
1874 * evax-egsd.c (_bfd_evax_slurp_egsd): Print correct name when
1875 debugging.
1876 (_bfd_evax_write_egsd): Skip file name symbol.
1877 * evax-emh.c (get_vms_time_string): Local function now.
1878 (_bfd_evax_write_emh): Extract source filename and case_hack flags
1879 from symbol table.
1880 * evax_write_etir (_bfd_evax_write_etir): Pass all symbol names
1881 through _bfd_evax_case_hack_symbol.
1882 * evax-misc.c (hash_string, _bfd_evax_case_hack_symbol): New
1883 functions.
1884 (_bfd_evax_basename): Removed.
1885 (_bfd_get_vms_time_string): Moved to evax-emh.c.
1886 * evax.h (evax_private_data_struct): Remove filename.
1887 (flag_hash_long_names, flag_show_after_trunc,
1888 flag_no_hash_mixed_case, vms_name_mapping): New flags for
1889 vms_case_hack.
1890
263d4a62
ILT
1891Wed Oct 2 12:02:02 1996 Ian Lance Taylor <ian@cygnus.com>
1892
a0fe6c2d
ILT
1893 * freebsd.h (N_GET_MAGIC_NET): Don't use ntohl.
1894 (N_GETMID_NET, N_GETFLAG_NET): Likewise.
1895 (NO_SWAP_MAGIC): Don't define.
1896 (SWAP_MAGIC): Define.
1897
263d4a62
ILT
1898 * cofflink.c (_bfd_coff_link_input_bfd): Don't crash if there is
1899 no hash table entry for a global symbol.
1900
161ac690
ILT
1901Tue Oct 1 16:14:22 1996 Joel Sherrill <joel@oarcorp.com>
1902
1903 * config.bfd (mips*-*-rtems*): New target, like mips*-*-elf*.
1904
0db6249c
ILT
1905Tue Oct 1 12:31:39 1996 Ian Lance Taylor <ian@cygnus.com>
1906
8dd53b5c
ILT
1907 * cofflink.c (coff_link_add_symbols): Don't override a meaningful
1908 symbol type with T_NULL. Warn if symbol type changes. Based on
e5c4495c 1909 patch from Philippe De Muyter <phdm@info.ucl.ac.be>.
8dd53b5c 1910
0db6249c
ILT
1911 * elflink.h (elf_link_add_object_symbols): Only put a symbol from
1912 a dynamic object in the dynamic symbol table if it is referenced
1913 or defined by a regular object.
1914
1915start-sanitize-v850
1916Fri Sep 27 18:41:07 1996 Stu Grossman (grossman@critters.cygnus.com)
1917
1918 * elf32-v850.c (bfd_elf32_v850_is_local_label): New function to
1919 remove dwarf local labels. Shrinks binaries by a factor of 3!
1920
1921end-sanitize-v850
1922Mon Sep 23 13:33:00 1996 Ian Lance Taylor <ian@cygnus.com>
1923
1924 * elf32-ppc.c (ppc_elf_add_symbol_hook): Create the .sbss section
1925 by hand, rather than by calling bfd_make_section.
1926
80675684
DE
1927Mon Sep 23 09:23:41 1996 Doug Evans <dje@seba.cygnus.com>
1928
1929 * reloc.c: Rename m32r relocs.
1930 * bfd-in2.h, libbfd.h: Rebuilt.
1931 * elf32-m32r.c: Update.
80675684 1932
a5a43df1
ILT
1933Fri Sep 20 11:43:43 1996 Ian Lance Taylor <ian@cygnus.com>
1934
e12ab364
ILT
1935 * aoutx.h (aout_link_input_section_ext): When doing a relocateable
1936 link, adjust the symbol index of a base relative reloc. Don't
1937 change the addend of a PC relative reloc if pcrel_offset is set.
1938 * sunos.c (bfd_sunos_size_dynamic_sections): Don't do anything for
1939 a relocateable link.
1940
a5a43df1
ILT
1941 * reloc.c (bfd_perform_relocation): Apply the relocation even if
1942 it is zero, in case src_mask matters.
1943 (bfd_install_relocation): Likewise.
1944
e425358f
ILT
1945Thu Sep 19 11:03:06 1996 Ian Lance Taylor <ian@cygnus.com>
1946
1947 * xcofflink.c (xcoff_link_add_symbols): Always initialize
1948 keep_syms.
1949 (_bfd_xcoff_bfd_final_link): Don't set target_index
1950 to an uninitialized value.
1951
7f21c97c
ILT
1952Tue Sep 17 14:18:31 1996 Ian Lance Taylor <ian@cygnus.com>
1953
1954 * coffcode.h (coff_slurp_line_table): Warn about illegal symbol
1955 indices, rather than crashing.
1956 (coff_slurp_reloc_table): Likewise. Check whether the howto field
1957 is NULL.
8d784abe
ILT
1958 * coff-sh.c (sh_relocate_section): Check for an illegal symbol
1959 index.
7f21c97c 1960
9859bc31
ILT
1961Mon Sep 16 12:39:36 1996 Ian Lance Taylor <ian@cygnus.com>
1962
1153e84b
ILT
1963 * coff-arm.c (aoutarm_std_reloc_howto): Change dst_mask for ARM26D
1964 reloc to 0.
1965 (coff_arm_adjust_symndx): New static function.
1966 (coff_adjust_symndx): Define.
1967
9859bc31
ILT
1968 * srec.c (srec_scan): Accept multiple symbols on a single line.
1969 From Pascal Martin <pmartin@alsys.com>.
1970
1971 * README: New file.
1972
f8b82e49
DE
1973Fri Sep 13 14:32:42 1996 Doug Evans <dje@canuck.cygnus.com>
1974
1975 * aoutf1.h (MY_bfd_merge_private_bfd_data): Define.
1976 (sunos_merge_private_bfd_data): New function.
1977
0a7b8735
ILT
1978Fri Sep 13 15:50:57 1996 Ian Lance Taylor <ian@cygnus.com>
1979
76d30c3f
ILT
1980 * bfd.c (bfd_copy_private_bfd_data): Switch on output BFD rather
1981 than input BFD.
1982 (bfd_merge_private_bfd_data): Likewise.
1983 * section.c (bfd_copy_private_section_data): Likewise.
1984 * syms.c (bfd_copy_private_symbol_data): Likewise.
1985 * bfd-in2.h: Rebuild.
1986 * aout-target.h (MY_bfd_copy_private_section_data): Check that
1987 both BFD's are the right flavour.
1988 * ecoff.c (_bfd_ecoff_bfd_copy_private_bfd_data): Likewise.
1989 * elf.c (_bfd_elf_copy_private_symbol_data): Likewise.
1990 * elf32-mips.c (_bfd_mips_elf_copy_private_bfd_data): Likewise.
1991 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1992 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Likewise.
1993 (ppc_elf_merge_private_bfd_data): Likewise.
1994 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
1995 * peicode.h (pe_bfd_copy_private_section_data): Likewise.
1996
0a7b8735
ILT
1997 * elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
1998 R_PARISC_DIR32, so that _bfd_stab_section_find_nearest_line passes
1999 its sanity check.
2000
3ebefb07
DE
2001Thu Sep 12 11:45:57 1996 Doug Evans <dje@seba.cygnus.com>
2002
2003 * reloc.c: Add m32r relocs.
2004 * bfd-in2.h, libbfd.h: Rebuilt.
6cb9c903 2005 * cpu-m32r.c,elf32-m32r.c: New files.
3ebefb07 2006
cacfb845
ILT
2007Thu Sep 12 11:10:05 1996 Ian Lance Taylor <ian@cygnus.com>
2008
2009 * ieee.c (ieee_vec): Set symbol_leading_char field to '_'.
2010
d7775b43
ILT
2011Wed Sep 11 11:57:56 1996 Ian Lance Taylor <ian@cygnus.com>
2012
e461da9b
ILT
2013 * tekhex.c (first_phase): Change type parameter from char to int.
2014 (out): Likewise.
2015 (pass_over): Change func to expect int, not char.
2016
d7775b43
ILT
2017 * elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
2018 rather than SEC_LOAD when aligning the file offset for the first
2019 section in a segment.
2020
ea3f0585
FF
2021Tue Sep 10 16:18:30 1996 Fred Fish <fnf@cygnus.com>
2022
2023 * syms.c (coff_section_type): Make arg const.
2024 * irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
2025 to make_bfd_asection().
2026 * elf-bfd.h (bfd_section_from_phdr): Add prototype.
2027 * elfcode.h (bfd_section_from_phdr): Remove prototype.
2028 (_bfd_elf_stringtab_init): Remove prototype.
2029
2030 * netbsd-core.c (swap_abort): Add prototype.
2031 * aix386-core.c (swap_abort): Ditto & make static
2032 * hpux-core.c (swap_abort): Ditto & make static.
2033 * irix-core.c (swap_abort): Ditto & make static.
2034 * ptrace-core.c (swap_abort): Ditto & make static.
2035 * trad-core.c (swap_abort): Ditto & make static.
2036 * coffswap.h (coff_swap_reloc_in): Ditto.
2037 (coff_swap_reloc_out): Ditto.
2038 (coff_swap_filehdr_in): Ditto.
2039 (coff_swap_filehdr_out): Ditto.
2040 (coff_swap_sym_in): Ditto.
2041 (coff_swap_sym_out): Ditto.
2042 (coff_swap_aux_in): Ditto.
2043 (coff_swap_aux_out): Ditto.
2044 (coff_swap_lineno_in): Ditto.
2045 (coff_swap_lineno_out): Ditto.
2046 (coff_swap_aouthdr_in): Ditto.
2047 (coff_swap_aouthdr_out): Ditto.
2048 (coff_swap_scnhdr_in): Ditto.
2049 (coff_swap_scnhdr_out): Ditto.
2050 * ihex.c (ihex_sizeof_headers): Ditto.
2051 * tekhex.c (getsym): Ditto.
2052 (find_chunk): Ditto & make static.
2053 (insert_byte): Ditto.
2054 (first_phase): Ditto.
2055 (pass_over): Ditto.
2056 (tekhex_get_symtab): Ditto & make static.
2057 (tekhex_get_symtab_upper_bound): Ditto & make static.
2058 (tekhex_mkobject): Ditto.
2059 (tekhex_object_p): Ditto.
2060 (move_section_contents): Ditto.
2061 (tekhex_get_section_contents): Ditto.
2062 (tekhex_set_arch_mach): Ditto & make static.
2063 (tekhex_set_section_contents): Ditto.
2064 (writevalue): Ditto.
2065 (writesym): Ditto.
2066 (out): Ditto.
2067 (tekhex_write_object_contents): Ditto.
2068 (tekhex_sizeof_headers): Ditto.
2069 (tekhex_make_empty_symbol): Ditto.
2070 (tekhex_get_symbol_info): Ditto.
2071 (tekhex_print_symbol): Ditto.
2072 * irix-core.c (make_bfd_asection): Ditto.
2073 (irix_core_core_file_p): Ditto.
2074 (irix_core_core_file_failing_command): Ditto.
2075 (irix_core_core_file_failing_signal): Ditto.
2076 (irix_core_core_file_matches_executable_p): Ditto.
2077 (irix_core_make_empty_symbol): Ditto.
2078 * coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
2079 * srec.c (srec_new_symbol): Ditto.
2080 (srec_get_section_contents): Ditto.
2081 (srec_set_arch_mach): Ditto.
2082 (srec_set_section_contents): Ditto.
2083 (internal_srec_write_object_contents): Ditto.
2084 (srec_write_object_contents): Ditto.
2085 (symbolsrec_write_object_contents): Ditto.
2086 (srec_sizeof_headers): Ditto.
2087 (srec_make_empty_symbol): Ditto.
2088 (srec_get_symtab_upper_bound): Ditto.
2089 (srec_get_symtab): Ditto.
2090 (srec_print_symbol): Ditto and make static.
2091 * elf.c (elf_read): Ditto
2092 (assign_section_numbers): Ditto.
2093 (elf_fake_sections): Ditto.
2094 (sym_is_global): Ditto.
2095 (elf_map_symbols): Ditto.
2096 (get_program_header_size): Ditto.
2097 * coffgen.c (make_a_section_from_file): Ditto.
2098 (coff_real_object_p): Ditto.
2099 (fixup_symbol_value): Ditto.
2100 (build_debug_section): Ditto.
2101 (copy_name): Ditto.
2102 * syms.c (coff_section_type): Ditto.
2103
00d7a64b
JL
2104Mon Sep 9 22:36:01 1996 Jeffrey A Law (law@cygnus.com)
2105
2106 * bfd-in2.h: Rebuilt after m32r changes.
2107
71d7d44f
DE
2108Mon Sep 9 12:31:22 1996 Doug Evans <dje@canuck.cygnus.com>
2109
66e4c229 2110 * config.bfd,configure.in,configure: Add m32r support.
f0c12b73 2111 * Makefile.in,archures.c,elf.c,targets.c: Likewise.
71d7d44f
DE
2112 * config.bfd: Keep target list alphabetically sorted.
2113
629f776a
JL
2114start-sanitize-v850
2115Mon Sep 9 11:48:41 1996 Jeffrey A Law (law@cygnus.com)
2116
2117 * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
2118 to add in the constant part found in the instruction itself.
2119 (case R_V850_HI16_S): Likewise.
2120
2121end-sanitize-v850
9c85b19d
MH
2122Fri Sep 6 17:04:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
2123
2124 * elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
2125 and R_D10V_18 to be 1 (word).
2126
4be2140e
ILT
2127Thu Sep 5 15:23:08 1996 Ian Lance Taylor <ian@cygnus.com>
2128
2129 * stabs.c (_bfd_link_section_stabs): If the output_section field
2130 of either section is bfd_abs_section, then the linker is
2131 discarding the section and we should not optimize it.
2132
0cd98b92
DE
2133Tue Sep 3 12:16:20 1996 Doug Evans <dje@canuck.cygnus.com>
2134
2135 * Makefile.in (aout-sparcle.o): New target.
2136 * aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
2137 * config.bfd (sparclet-*-aout*): Add case.
2138 * configure.in (sparcle_aout_vec): Add case.
2139 * configure: Regenerated.
0cd98b92
DE
2140 * targets.c (sparcle_aout_vec): Declare.
2141 (bfd_target_vector): Add sparcle_aout_vec.
2142 * aout-sparcle.c: New file.
2143
b5ef63c4 2144start-sanitize-v850
7b0af209 2145Tue Sep 3 00:57:02 1996 Jeffrey A Law (law@cygnus.com)
b5ef63c4 2146
e73b6ae6
JL
2147 * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
2148 low order sign bit propogation for R_V850_HI16_S.
2149
2150 * elf32-v850.c (bfd_elf32_v850_reloc): New function for
7b0af209
JL
2151 handling V850 specific relocs.
2152 (elf_v850_howto_table): Use the new function for some
2153 relocations. Twiddle masks & shifts for some relocs.
2154 Set partial_inplace where needed.
2155
2156end-sanitize-v850
2157Mon Sep 2 12:12:34 1996 Ian Lance Taylor <ian@cygnus.com>
2158
2159 * cpu-mips.c: Add an explicit mips:3000 entry, and change the
2160 default architecture to a machine number of 0.
2161 * elf32-mips.c (_bfd_mips_elf_object_p): Set the machine number
2162 for E_MIPS_ARCH_1.
2163 (_bfd_mips_elf_merge_private_bfd_data): If the machine number of
2164 the output BFD is the default, set it from the first input BFD.
2165
2166start-sanitize-v850
2167Sun Sep 1 18:38:01 1996 Jeffrey A Law (law@cygnus.com)
2168
2169 * elf32-v850.c (elf_v850_howto_table): All the 16bit relocs
2170 insert at bitpos zero. The HI16 relocs are shifted right
2171 by 16 bits. Fix src_mask for all relocs.
2172 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define. The V850 is
2173 little endian!
2174 (TARGET_BIG_SYM, TARGET_BIG_NAME): Remove. The V850 is little
2175 endian!
b5ef63c4
MA
2176
2177end-sanitize-v850
bde9d875
ILT
2178Sun Sep 1 15:41:08 1996 Ian Lance Taylor <ian@cygnus.com>
2179
2180 * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
2181 Rewrite to use BFD file read routines and to avoid using a fixed
2182 length for the file name.
2183
01b49cb3 2184start-sanitize-v850
237b5c4c
JL
2185Sat Aug 31 10:22:25 1996 Jeffrey A Law (law@cygnus.com)
2186
2187 * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
2188 (elf_v850_howto_table): Add support for R_V850_{32,16,8}.
2189 (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
2190 to R_V850_{32,16,8}.
2191
01b49cb3
C
2192Fri Aug 30 18:06:04 1996 J.T. Conklin <jtc@hippo.cygnus.com>
2193
2194 * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
2195 (elf_v850_howto_table): Add info for HI16_S reloc.
2196 (v850_reloc_map): Add HI_16_S reloc.
2197 * reloc.c: Define BFD_RELOC_V850_* relocs.
2198
2199end-sanitize-v850
492cfc71
ILT
2200Fri Aug 30 11:49:19 1996 Ian Lance Taylor <ian@cygnus.com>
2201
c86158e5
ILT
2202 Add SH ELF support.
2203 * elf32-sh.c: New file.
2204 * elf.c (prep_headers): Handle bfd_arch_sh.
2205 * elfcode.h (write_relocs): Handle absolute symbol.
2206 * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
2207 (_bfd_elf64_link_read_relocs): Declare.
2208 * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
2209 elf_link_read_relocs. Make globally visible. Change all
2210 callers.
2211 (elf_link_input_bfd): Get external symbols from cache in
2212 symtab_hdr->contents. Get contents from cache in
2213 elf_section_data.
2214 * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
2215 already defined.
2216 * reloc.c: Define BFD_RELOC_SH_* relocs.
2217 * libbfd-in.h (_bfd_sh_align_load_span): Declare.
2218 * coff-sh.c (sh_insns_conflict): Fix a return value.
2219 (_bfd_sh_align_load_span): New globally visible function, broken
2220 out of sh_align_load.
2221 (sh_align_load): Call _bfd_sh_align_load_span.
2222 (sh_swap_insns): Change relocs parameter to PTR.
2223 * bfd-in2.h, libbfd.h: Rebuild.
2224 * targets.c (bfd_elf32_sh_vec): Declare.
2225 (bfd_elf32_shl_vec): Declare.
2226 * config.bfd (sh-*-elf*): New target.
2227 * configure.in (bfd_elf32_sh_vec): New target vector.
2228 (bfd_elf32_shl_vec): New target vector.
2229 * configure: Rebuild.
2230 * Makefile.in: Rebuild dependencies.
2231 (BFD32_BACKENDS): Add elf32-sh.o.
2232 (BFD32_BACKENDS_CFILES): Add elf32-sh.c.
2233
2234 * elf.c (map_sections_to_segments): Check that LMA does not skip a
2235 page before checking D_PAGED.
2236
492cfc71
ILT
2237 * ihex.c (ihex_scan): Removed unnecessary extbase variable.
2238 (ihex_write_object_contents): Remove extbase; always use segbase
2239 instead.
2240
f7954d86
MM
2241Thu Aug 29 16:52:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2242
2243 * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
2244 * configure.host (i[345]86-*-*): Ditto.
2245 * config.bfd (i[345]86-*-*): Ditto.
2246 * configure: Regenerate.
2247
2248 * config.bfd (i[3456]86-*-dgux*): Recognize as a synonym for x86
2249 elf.
2250
2251Tue Aug 27 09:18:18 1996 Jeffrey A Law (law@cygnus.com)
2252
2253 * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new argument.
2254 * elf32-hppa.h (hppa_elf_gen_reloc_type): Update prototype.
2255 * som.c (hppa_som_gen_reloc_type): Add new argument. If
2256 we encounter an R_DATA_ONE_SYMBOL reloc against a symbol that
2257 will have an ST_CODE type, change the symbol's type to ST_DATA.
2258 * som.c (hppa_som_gen_reloc_type): Update prototype.
2259
4da624dd
ILT
2260Tue Aug 27 00:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
2261
2262 * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
2263 R_MIPS_32 and R_MIPS_REL32. Set sgot and g as soon as possible.
2264 (mips_elf_size_dynamic_sections): Don't require .got to exist.
2265 (mips_elf_finish_dynamic_sections): Likewise.
2266
9461513b
ILT
2267Thu Aug 22 10:54:38 1996 Ian Lance Taylor <ian@cygnus.com>
2268
1c952df6
ILT
2269 * configure.host (HLDENV): New variable to set. Set it for
2270 *-*-sysv4*, since those linkers may not support -R but they always
2271 support LD_RUN_PATH.
2272
9461513b
ILT
2273 * libieee.h (NSECTIONS): Don't define.
2274 (ieee_data_struct): Change section_table to asection **. Add
2275 section_table_size.
2276 * ieee.c (get_section_entry): If the table isn't big enough, make
2277 it bigger.
2278 (ieee_slurp_sections): Remove assertion about number of sections.
2279 (ieee_object_p): Adjust initialization of ieee to match changes to
2280 the structure.
2281
2282 * xcofflink.c (xcoff_mark): Don't copy relocs for undefined
2283 symbols merely because we are generating a shared library.
2284 (xcoff_build_ldsyms): Don't set up global linkage code for an
2285 undefined symbol merely because we are generating a shared
2286 library.
2287
0c1d95c7
C
2288start-sanitize-v850
2289Tue Aug 20 15:06:05 1996 J.T. Conklin <jtc@hippo.cygnus.com>
2290
2291 * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
2292 (BFD32_BACKENDS) Add elf32-v850.o.
2293 * archures.c: Add bfd_v850_arch.
2294 * bfd-in2.h: Add bfd_v850_arch.
2295 * config.bfd (v850-*-*): New target.
2296 * configure: (bfd_elf32_v850_vec) New vector.
2297 * configure.in: (bfd_elf32_v850_vec) New vector.
2298 * cpu-v850.c: New file.
2299 * elf.c (prep_headers): Added case bfd_arch_v850.
2300 * elf32-v850.c: New file.
2301 * targets.c (bfd_elf32_v850_vec): New vector.
2302
2303end-sanitize-v850
2304Fri Aug 16 16:25:35 1996 Ian Lance Taylor <ian@cygnus.com>
2305
2306 * xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
2307 a function code symbol for an XMC_XO symbol.
2308
22edd547
SS
2309Thu Aug 15 12:33:29 1996 Stan Shebs <shebs@andros.cygnus.com>
2310
2311 * mpw-config.in: Update editing of autoconf vars to reflect
2312 Jul 18 configure.in change.
2313 * mpw-make.sed: Update editing of include pathnames to be
2314 more general, add @DASH_C_FLAG@ to explicit compile rule edit.
2315
2316Thu Aug 15 10:35:13 1996 Richard Henderson <rth@tamu.edu>
2317
2318 * elf64-alpha.c (elf64_alpha_output_extsym): The section from
2319 which to offset to get the .plt entry address is ".plt".
2320
53ef6e60
JSC
2321Thu Aug 15 16:40:30 1996 James G. Smith <jsmith@cygnus.co.uk>
2322
2323 * reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
2324 BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
2325 Added, for internal use by the ARM gas.
2326 * libbfd.h: Rebuilt
2327 * bfd-in2.h: Rebuilt
2328
37d7888d
ILT
2329Wed Aug 14 17:02:09 1996 Richard Henderson <rth@tamu.edu>
2330
2331 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
2332 in section dynidx start.
2333
e38d6d36
ILT
2334Tue Aug 13 14:35:38 1996 Ian Lance Taylor <ian@cygnus.com>
2335
2336 * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
2337 name begins with .gnu.linkonce as SEC_LINK_ONCE. This is an
2338 optimization for g++.
2339
ae20860e
MM
2340Tue Aug 13 17:04:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2341
2342 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): If one module has
2343 the -mrelocatable-lib bit set and the other doesn't, clear the
2344 -mrelocatable-lib bit in the header.
2345
4596421b
ILT
2346Sat Aug 10 22:59:17 1996 Ian Lance Taylor <ian@cygnus.com>
2347
2348 * elflink.h (elf_link_add_object_symbols): Do not resolve a common
2349 symbol against a STT_FUNC symbol in a shared library.
2350
f11e3f62
ILT
2351Fri Aug 9 12:44:57 1996 Ian Lance Taylor <ian@cygnus.com>
2352
410bc61d
ILT
2353 * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
2354 symbol is found, automatically define the corresponding function
2355 code.
2356
d92099f1
ILT
2357 * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
2358 if sym.n_numaux is not zero.
2359 (_bfd_coff_link_input_bfd): Permit the symbol and the hash table
2360 entry to disagree about the number of aux entries if the symbol
2361 has zero.
2362
f11e3f62
ILT
2363 * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
2364 section if it might be needed, not just if info->shared.
2365 (mips_elf_adjust_dynamic_symbol): Make room for a null element at
2366 the start of .rel.dyn if we are going to use it.
2367 (mips_elf_finish_dynamic_sections): Only clear the first element
2368 of .rel.dyn if the size is greater than zero.
2369
fbc4ed7d
ILT
2370Thu Aug 8 16:24:55 1996 Ian Lance Taylor <ian@cygnus.com>
2371
b2a05baf
ILT
2372 * xcofflink.c (xcoff_link_input_bfd): If we already called the
2373 undefined_symbol callback for a symbol, then don't issue any more
2374 warnings about loader relocs.
2375 (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
2376 after calling the undefined_symbol callback.
2377
fbc4ed7d
ILT
2378 * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
2379 (xcoff_link_add_symbols): Permit multiple definitions of a symbol
2380 as the AIX linker seems to do.
2381
8612a388
ILT
2382Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
2383
2384 * evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
2385 (evax_initialize): Remove evax_reloc_table.
2386 (evax_close_and_cleanup): Ditto.
2387 (reloc_nil): Ditto.
2388 (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
2389 entries.
2390 (evax_bfd_reloc_type_lookup): Ditto.
2391 * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
2392 cooked_size == raw_size.
2393 * evax-emh.c (_bfd_evax_register_filename): Remove.
2394 * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
2395 * evax-misc.c (add_new_contents): Malloc section at full size.
2396 (_bfd_save_evax_section): Memcpy section contents directly.
2397 * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
2398 (evax_reloc_table): Remove.
2399
2400 * hosts/alphavms.h (O_ACCMODE): Define if needed.
2401
2402 * makefile.vms: Add better support for DEC C compilation
2403 Add evax.h dependencies
2404
2405 * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
2406 (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
2407 (BFD_RELOC_ALPHA_BASEREG): Remove.
2408 * bfd-in2.h, libbfd.h: Rebuild.
2409
320a5c6b
SG
2410Thu Aug 8 08:17:32 1996 Stu Grossman (grossman@critters.cygnus.com)
2411
2412 * archive.c (bsd_write_armap): Ifdef around calls to getuid and
2413 getgid if _WIN32 is defined.
2414 * opncls.c (bfd_fdopenr): Remove unnecessary WINGDB ifdef.
2415
2055bf85
SG
2416Wed Aug 7 23:19:00 1996 Stu Grossman (grossman@critters.cygnus.com)
2417
2418 * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
2419 Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
2420 include file.
2421 * libbfd.c: Create dummy getpagesize() macro if HAVE_GETPAGESIZE
2422 isn't defined.
2423
85fe9d3e
ILT
2424Wed Aug 7 14:11:44 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
2425
2426 * configure.in: Call BFD_NEEDED_DECLARATION on strstr and
2427 realloc.
2428 * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
2429 (NEED_DECLARATION_REALLOC): New macro.
2430 * configure, config.in: Rebuild.
2431 * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
2432 (realloc): Declare if NEED_DECLARATION_REALLOC.
2433
2434 * aclocal.m4 (BFD_NEED_DECLARATION): Include <string.h> or
2435 <strings.h> if they exist.
2436
2437 * ieee.c (ieee_set_section_contents): Cast bfd_alloc return.
2438
9b3307b0
ILT
2439Wed Aug 7 12:12:03 1996 Ian Lance Taylor <ian@cygnus.com>
2440
cc425b55
ILT
2441 * cpu-i386.c (i8086_arch): Architecture info for the i8086.
2442
9b3307b0
ILT
2443 Based on patches from Eric Valette <valette@crf.canon.fr>:
2444 * elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
2445 LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
2446 (elf_howto_table): Add entries for new relocs.
2447 (elf_i386_reloc_type_lookup): Handle new relocs.
2448 (elf_i386_info_to_howto): Just call abort.
2449 (elf_i386_info_to_howto_rel): Check that the reloc type is valid.
2450 (elf_i386_relocate_section): Likewise.
2451
75e3a45a
MH
2452Tue Aug 6 12:54:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
2453
2454 * elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
2455
191d910c
ILT
2456Mon Aug 5 13:42:41 1996 Ian Lance Taylor <ian@cygnus.com>
2457
b944e7e8
ILT
2458 * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
2459 only get the LMA from the phdr if they are in the same part of the
2460 file.
2461
191d910c
ILT
2462 * elf.c (map_sections_to_segments): Rewrite tests for starting a
2463 new segment to make them more comprehensible. If the relationship
2464 between the LMA and the VMA changed, start a new segment. Don't
2465 check dynsec when deciding whether to start a new segment for a
2466 writeable section; -N will now handle this.
2467
e751d506
JL
2468Thu Aug 1 22:43:08 1996 Jeffrey A Law (law@cygnus.com)
2469
2470 * libhppa.h: Remove "esel" changes. Not the right approach.
2471 * som.c: Corresponding changes.
2472 (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
2473 which don't have a SOM symbol type associated with them.
2474 Reverses a 1994 change.
2475
cdb88e87
ILT
2476Wed Jul 31 15:50:55 1996 Ian Lance Taylor <ian@cygnus.com>
2477
2478 Make ld -N more reasonable for ELF:
2479 * elf.c (map_sections_to_segments): If D_PAGED is not set, set
2480 phdr_in_section to false, and always use a single load segment.
2481 (elf_sort_sections): Sort sections by LMA after VMA.
2482 (assign_file_positions_for_segments): If D_PAGED is not set, don't
2483 align to maxpagesize.
2484 (assign_file_positions_except_relocs): Likewise.
2485 * elfcode.h (elf_object_p): If a section is loaded but not page
2486 aligned, clear D_PAGED.
2487
d1b40d8e
JSC
2488Wed Jul 31 15:00:12 1996 James G. Smith <jsmith@cygnus.co.uk>
2489
2490 * reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
2491 Added, for internal use by the ARM gas.
2492 * libbfd.h: Rebuilt
2493 * bfd-in2.h: Rebuilt
2494
ad240a82
JL
2495Tue Jul 30 14:14:57 1996 Jeffrey A Law (law@cygnus.com)
2496
2497 * libhppa.h (R_HPPA_ESEL): New field selector.
2498 (e_esel): Similarly.
2499 * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
2500 then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
2501 (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
2502
fb4dc1eb
ILT
2503Tue Jul 30 13:31:27 1996 Ian Lance Taylor <ian@cygnus.com>
2504
2505 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
2506 archive search before looking for stripped dynamic objects.
2507
b223f950
ILT
2508Fri Jul 26 17:51:39 1996 Ian Lance Taylor <ian@cygnus.com>
2509
2510 * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
2511 symbol a warning rather than an error.
2512
64f808f9
ILT
2513Wed Jul 24 12:02:53 1996 Ian Lance Taylor <ian@cygnus.com>
2514
2515 * elf.c (assign_file_positions_for_segments): Track the virtual
2516 memory position separately from the file position, and use it to
2517 compute the alignment adjustment.
2518
11609502
MH
2519Tue Jul 23 10:43:31 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
2520
2521 * elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
2522 and fixed mask on R_D10V_10_PCREL_L.
2523
9bd65136
ILT
2524Mon Jul 22 15:30:30 1996 Ian Lance Taylor <ian@cygnus.com>
2525
bf9884d4
ILT
2526 * elf64-mips.c: Include "aout/ar.h".
2527 (mips_elf64_slurp_armap): New static function.
2528 (mips_elf64_write_armap): New static function.
2529 (bfd_elf64_archive_*): Define.
2530 * elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
2531 Use instead of bfd_generic_archive_p.
2532 (bfd_elfNN_write_archive_contents): Define if not defined. Use
2533 instead of _bfd_write_archive_contents.
2534 (bfd_elfNN_mkdarchive): Define if not defined. Use instead of
2535 _bfd_generic_mkarchive.
2536 (TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
2537 bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
2538 _bfd_archive_coff.
2539 (TARGET_LITTLE_SYM): Likewise.
2540 * archive.c (bfd_slurp_armap): Check for and reject an archive map
2541 name of /SYM64/.
2542 * Makefile.in: Rebuild dependencies.
2543
2544 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
2545 SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
2546 SHT_MIPS_EVENTS sections.
2547 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
2548 SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
2549 sections.
2550 (_bfd_mips_elf_fake_sections): Likewise.
2551
9bd65136
ILT
2552 * libecoff.h (ecoff_data_type): Add rdata_in_text field.
2553 * ecoff.c (ecoff_compute_section_file_positions): Copy
2554 rdata_in_text from backend info to tdata. Clear it if any data
2555 section comes before .rdata.
2556 (_bfd_ecoff_write_object_contents): Use rdata_in_text field in
2557 tdata rather than backend info.
2558
194141a9
ILT
2559Fri Jul 19 18:15:51 1996 Ian Lance Taylor <ian@cygnus.com>
2560
2561 * configure.in: Fix test for whether a compiler has a 64 bit
2562 type. From Jim Wilson <wilson@cygnus.com>.
2563
a8a3d83a
ILT
2564Thu Jul 18 15:39:10 1996 Ian Lance Taylor <ian@cygnus.com>
2565
f4e14cb9
ILT
2566 * configure.host (mips-sgi-irix6*): New host.
2567
2568 * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
2569 (replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
2570 BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT. Add bfd-in2.h:bfd-in2.h
2571 to AC_OUTPUT call.
2572 * configure: Rebuild.
2573 * bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
2574 (BFD_HOST_64_BIT): Define conditionally.
2575 (BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
2576 (bfd_vma): Typedef as BFD_HOST_U_64_BIT.
2577 (symvalue, bfd_size_type): Likewise.
2578 * bfd-in2.h: Rebuild.
2579 * Makefile.in (do_clean): Remove bfd-tmp.h.
2580 (do_distclean): Remove bfd-in3.h.
2581 (stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
2582 (bfd-in3.h): New target.
2583
74556b94
ILT
2584 * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec. From
2585 Andrew Gierth <ANDREWG@microlise.co.uk>.
2586
ab659fd6
ILT
2587 * configure.host: Set INSTALL_SHLIB.
2588 * configure.in: Call AC_SUBST (INSTALL_SHLIB).
2589 * configure: Rebuild.
2590 * Makefile.in (install): Use @INSTALL_SHLIB@.
2591
e8c249cb
ILT
2592 * config.bfd (mips*-*-irix6*): New target.
2593 * configure.host: Handle Irix 6 shared library like Irix 5.
2594
a8a3d83a
ILT
2595 * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
2596 symbol for a magic name.
2597 (xcoff_link_input_bfd): Don't change the reloc symbol for an
2598 XMC_TD symbol.
2599 (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
2600 XMC_TD symbol.
2601
b576c7b3
SS
2602Thu Jul 18 11:36:31 1996 Stan Shebs <shebs@andros.cygnus.com>
2603
2604 * mpw-config.in: Add ELF support to mips config, create the
2605 elf32-target.h file in the object dir.
2606 * mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
2607
2ba0d82d
KK
2608Wed Jul 17 18:02:32 1996 Kim Knuttila <krk@cygnus.com>
2609
2610 * coff-ppc.c: Redid debug scheme - numerous fprintf's gone.
2611 Also removed most abort calls, in favor of using bfd reporting.
2612
b576c7b3 2613Wed Jul 17 14:51:52 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
50bd50d4 2614
b576c7b3
SS
2615 * Makefile.in (ALL_MACHINES): Add cpu-d10v.o.
2616 (BFD32_BACKENDS) Add elf32-d10v.o.
50bd50d4
MH
2617 * archures.c: Add bfd_d10v_arch.
2618 * bfd-in2.h: Add bfd_d10v_arch.
2619 * config.bfd (d10v-*-*): New target.
2620 * configure: (bfd_elf32_d10v_vec) New vector.
2621 * configure.in: (bfd_elf32_d10v_vec) New vector.
2622 * cpu-d10v.c: New file.
2623 * elf.c (prep_headers): Added case bfd_arch_d10v.
2624 * elf32-d10v.c: New file.
2625 * libbfd.h: Rebuild.
b576c7b3
SS
2626 * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
2627 BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
50bd50d4 2628 * targets.c (bfd_elf32_d10v_vec): New vector.
50bd50d4 2629
2ce9802e
KK
2630Wed Jul 17 10:58:55 1996 Kim Knuttila <krk@cygnus.com>
2631
2632 * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
2633
9676e446 2634Tue Jul 16 23:49:02 1996 Stu Grossman (grossman@critters.cygnus.com)
3cc21bf6 2635
9676e446
SG
2636 * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
2637 bfd_mach_i386_i8086 machine types.
3cc21bf6 2638
f7171978
ILT
2639Wed Jul 10 12:42:56 1996 Ian Lance Taylor <ian@cygnus.com>
2640
2641 * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
2642 and _FINI sections.
2643
74e2ab38
ILT
2644Wed Jul 10 11:18:21 1996 Richard Henderson <rth@tamu.edu>
2645
2646 * coffcode.h (coff_set_section_contents): A/UX does not require
2647 special handling of the _LIB section.
2648
01cfaa6b
JL
2649Tue Jul 9 15:52:20 1996 Jeffrey A Law (law@cygnus.com)
2650
2651 * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
2652 value for R_RELBYTE.
2653
2654 * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
2655 array if one was allocated.
2656
eb52b9dc
ILT
2657Tue Jul 9 12:21:54 1996 Ian Lance Taylor <ian@cygnus.com>
2658
2659 From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
2660 * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
2661 use_rld_obj_head and rld_value.
2662 (mips_elf_link_hash_table_create): Initialize new fields.
2663 (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
2664 dynamic.
2665 (mips_elf_create_dynamic_sections): Create .rld_map section. If
2666 __rld_obj_head symbol not seen, create an __rld_map symbol.
2667 (mips_elf_size_dynamic_sections): Make space in .rld_map section.
2668 Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
2669 (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
2670 __rld_obj_head symbol.
2671 (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
2672
56b4cbaa
ILT
2673Mon Jul 8 16:18:03 1996 Ian Lance Taylor <ian@cygnus.com>
2674
9b292d4c
ILT
2675 * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
2676
dab45734
ILT
2677 * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
2678 ppc_elf_addr16_ha_reloc.
2679 (ppc_elf_addr16_ha_reloc): New static function.
2680
56b4cbaa
ILT
2681 * coff-mips.c (struct mips_hi): Define.
2682 (mips_refhi_list): New static variable.
2683 (mips_refhi_addr, mips_refhi_addend): Remove.
2684 (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
2685 (mips_reflo_reloc): Process mips_refhi_list.
2686 (mips_relhi_list): New static variable.
2687 (mips_relhi_addr, mips_relhi_addend): Remove.
2688 (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
2689 (mips_rello_reloc): Process mips_relhi_list.
2690 (mips_relocate_section): Permit an arbitrary number of REFHI or
2691 RELHI relocs before the associated REFLO or RELLO reloc.
2692
b777c6a7
ILT
2693Fri Jul 5 19:27:49 1996 Ian Lance Taylor <ian@cygnus.com>
2694
2695 * aout-target.h (MY(callback)): Set reloc_count fields.
2696
100b65dd
ILT
2697Thu Jul 4 12:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
2698
48f3aaf3
ILT
2699 * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
2700 sections unless this is a SunOS link.
2701
100b65dd
ILT
2702 * VERSION: Set to 2.7.1.
2703
2704 * Released binutils 2.7.
2705
a31e14f4
ILT
2706Wed Jul 3 14:59:47 1996 Ian Lance Taylor <ian@cygnus.com>
2707
4d3daf4f
ILT
2708 * i386aout.c: Include "aout/aout64.h".
2709 (i386aout_write_object_contents): New static function.
2710 (MY_write_object_contents): Define.
2711
a31e14f4
ILT
2712 * netbsd.h (MY(write_object_contents)): Make sure that
2713 adjust_sizes_and_vmas is called before fiddling with the magic
2714 number.
2715
d2d04f7a
ILT
2716Tue Jul 2 23:30:39 1996 Ian Lance Taylor <ian@cygnus.com>
2717
2718 * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
2719
4f6ee760
ILT
2720Sun Jun 30 13:34:33 1996 Ian Lance Taylor <ian@cygnus.com>
2721
2722 * libbfd-in.h (itos, stoi): Don't define.
2723 * libbfd.h: Rebuild.
2724 * i386lynx.c (KEEPIT): Define as udata.i.
2725 (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
2726 (NAME(lynx,swap_ext_reloc_out)): Likewise.
2727 * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
2728 flags. Don't use stoi.
2729
2730 * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
2731
2732 * elf.c (map_sections_to_segments): Don't start a new segment for
2733 a writable section if it's on the same page as the previous
2734 segment. Reset the writable variable for a readonly section.
2735
dfb89b82
KK
2736Sat Jun 29 16:18:51 1996 Kim Knuttila <krk@cygnus.com>
2737
2738 * peicode.h (coff_swap_aouthdr_in): Missing initializations of
2739 first_thunk_address, thunk_size, and import_table_size.
2740 * peicode.h: Improved some diagnostics regarding edata sections.
2741
2742 * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
2743 on IMGLUE relocs.
2744 (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
2745 (TARGET_LITTLE_SYM): Added missing D_PAGED.
2746
8e80606f
ILT
2747Fri Jun 28 13:48:45 1996 Ian Lance Taylor <ian@cygnus.com>
2748
f93fb275
ILT
2749 * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
2750 with XCOFF_DEF_DYNAMIC set is really defined.
2751 (xcoff_link_check_dynamic_ar_symbols): Likewise.
2752 (xcoff_link_add_symbols): Only create special sections if using an
2753 XCOFF hash table.
2754
8e80606f
ILT
2755 * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
2756 aixcoff-rs6000.
2757 (bfd_install_relocation): Likewise.
2758
eec2f824
ILT
2759Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
2760
2761 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
2762 field.
2763 (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
2764 (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
2765 (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
2766 (elf64_alpha_link_hash_newfunc): Initialize flags field.
2767 (elf64_alpha_check_relocs): Record types of LITUSE entries that
2768 are found for LITERAL relocs.
2769 (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
2770 taken, we cannot generate a .plt entry for the symbol.
2771
5304aea9
ILT
2772Thu Jun 27 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
2773
2774 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
2775 sysconf functions (for gprof).
2776 * configure, config.in: Rebuild.
2777
017047d4
ILT
2778Wed Jun 26 16:29:02 1996 Ian Lance Taylor <ian@cygnus.com>
2779
f292bbe9
ILT
2780 * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
2781 an archive if it has a map. If the object file has the wrong
2782 xvec, reject it.
2783
566e2325
ILT
2784 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
2785 BRADDR, SREL16, SREL32, or SREL64 reloc against an external
2786 symbol.
2787 (alpha_relocate_section): Likewise.
2788
017047d4
ILT
2789 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
2790 (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
2791 (coff_swap_sym_out): Use SYMESZ, not sizeof.
2792 (coff_swap_aux_out): Use AUXESZ, not sizeof.
2793 (coff_swap_lineno_out): Use LINESZ, not sizeof.
2794 (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
2795 (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
2796 * peicode.h: Corresponding changes.
2797
cb73f5d7
MM
2798Tue Jun 25 15:28:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2799
2800 * elflink.h (elf_create_pointer_linker_section): Comment out code
2801 dealing with making GOT pointers negative of the GOT symbol for
2802 now.
2803
297a4f1a
ILT
2804Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
2805
2806 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
2807 increment the .rela.plt size until after we're done creating the
2808 .plt entry.
2809 (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
2810 .rela.plt offset directly rather than calculating it.
2811
dbbfec07
JM
2812Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
2813
01e58ff6
JM
2814 * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
2815 Use autoconf-set values.
2816 * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
2817 includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
2818 values.
dbbfec07
JM
2819 (docdir): Deleted.
2820 * configure.in (AC_PREREQ): autoconf v2.5 or higher.
2821 * configure: Rebuilt.
2822
50004d8d
JL
2823Mon Jun 24 22:50:35 1996 Jeffrey A Law (law@cygnus.com)
2824
2825 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
2826 handling code > 1k away.
2827
2828Mon Jun 24 18:41:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2829
2830 * elflink.h (elf_create_pointer_linker_section): If DEBUG is
2831 defined, output whenever the symbol is updated.
2832
2e0567eb
ILT
2833Mon Jun 24 17:58:12 1996 Jouke Numan <jnuman@bazis.nl>
2834
2835 * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
2836 section to 0 if user_set_vma is set.
2837 * elflink.h (elf_bfd_final_link): Likewise.
2838
2839Sun Jun 23 20:42:51 1996 Doug Evans <dje@canuck.cygnus.com>
2840
2841 Partially undo patch of Jun 20.
2842 * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
2843 (coff_compute_section_file_positions): Likewise.
2844 (coff_write_object_contents): Likewise. Re-add deleted code, but
2845 use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
2846 * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
2847
bff4a496
ILT
2848Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
2849
2850 * config.bfd: Add support for *-*-rtems* configurations.
2851
7ae6550f
ILT
2852Fri Jun 21 15:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
2853
2854 * elf.c (prep_headers): Add bfd_arch_alpha case.
2855
e8f46717
ILT
2856Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
2857
2858 * elf64-alpha.c: New file.
2859 * config.bfd (alpha-*-linuxecoff*): New target.
2860 (alpha-*-linux*, alpha-*-elf*): New targets.
2861 * configure.in (bfd_elf64_alpha_vec): New vector.
2862 * configure: Rebuild.
2863 * targets.c (bfd_elf64_alpha_vec): Declare.
2864 (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
2865 * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
2866 * bfd-in2.h, libbfd.h: Rebuild.
2867 * Makefile.in: Rebuild dependencies.
2868 (BFD64_BACKENDS): Add elf64-alpha.o.
2869 (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
2870
bacecac8
ILT
2871Thu Jun 20 18:14:25 1996 Ian Lance Taylor <ian@cygnus.com>
2872
2873 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
2874 than relying on a right shift of 32.
2875
9ca108cd
DE
2876Thu Jun 20 11:00:57 1996 Doug Evans <dje@canuck.cygnus.com>
2877
b9110a3c
DE
2878 * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
2879 ifdef to COFF_WITH_PE.
2880 (coff_compute_section_file_positions): Likewise.
2881 (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
2882 * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
2883 * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
2884 COFF_IMAGE_WITH_PE, always include.
2885
9ca108cd
DE
2886 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
2887
c2073f05
ILT
2888Wed Jun 19 11:37:52 1996 Ian Lance Taylor <ian@cygnus.com>
2889
7fc6a16a
ILT
2890 * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
2891 approximate the correct answer if SIZEOF_HEADERS was not used.
2892
c2073f05
ILT
2893 * binary.c (binary_set_section_contents): Set section file
2894 position based on LMA rather than VMA.
2895
4838929e
ILT
2896Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
2897
2898 * linker.c (_bfd_generic_link_output_symbols): Don't output any
2899 symbols if info->strip == strip_all.
2900
2901Tue Jun 18 15:17:36 1996 Jeffrey A. Law <law@rtl.cygnus.com>
2902
2903 * coff-h8300.c: Remove #if 0 code.
2904 (compatable): Don't allow mixing/matching of different architectures.
2905
4838929e
ILT
2906 * archures.c (bfd_mach_h8300s): Add.
2907 * bfd-in2.h: Rebuilt.
2908 * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
2909 (BADMAG): Likewise.
2910 (h8300_reloc16_estimate): Likewise.
2911 (h8300_reloc16_extra_cases): Likewise.
2912 (h8300_bfd_link_add_symbols): Likewise.
2913 * coffcode.h (coff_set_arch_mach_hook): Likewise.
2914 (coff_set_flags): Likewise.
2915 * cpu-h8300.c (h8300_scan): Likewise.
2916 Add H8/S to bfd_h8300_arch list.
2917
c3d8e071
ILT
2918Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
2919
2920 Added support for Alpha OpenVMS:
2921 * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
2922 * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
2923 * config.h-vms, makefile.vms: New files.
2924 * config.bfd (alpha-*-*vms*): New target.
2925 * configure.in (evax_alpha_vec): New target vector.
2926 * configure: Rebuild.
2927 * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
2928 (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
2929 * targets.c (bfd_target_evax_flavour): Define.
2930 (evax_alpha_vec): Declare.
2931 (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
2932 if BFD64 is defined.
2933 * bfd-in2.h, libbfd.h: Rebuild.
2934 * Makefile.in: Rebuild dependencies.
2935 (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
2936 evax-emh.o, and evax-misc.o.
2937 (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
2938 evax-etir.c, evax-emh.c, and evax-misc.c.
2939 (HFILES): Add evax.h.
2940
142aa7d9
ILT
2941Tue Jun 18 13:54:18 1996 Ian Lance Taylor <ian@cygnus.com>
2942
2943 * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
2944 pointer.
2945 (h8300_bfd_link_add_symbols): Likewise.
2946
b658d64d
JL
2947Mon Jun 17 10:06:50 1996 Jeffrey A. Law <law@rtl.cygnus.com>
2948
2949 * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
2950 * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
2951
2df1e84b
ILT
2952Mon Jun 17 12:49:11 1996 Ian Lance Taylor <ian@cygnus.com>
2953
2954 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
2955 for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
2956 created.
2957 (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
2958 R_MIPS_32 relocs if creating a shared library.
2959
2960Thu Jun 13 20:14:51 1996 Doug Evans <dje@canuck.cygnus.com>
2961
2962 * peicode.h (add_data_entry): Use pei_section_data rather than
2963 _cooked_size. Corresponds to May 13 change in coffcode.h.
2964
8100e72c
ILT
2965Thu Jun 13 10:23:40 1996 Ian Lance Taylor <ian@cygnus.com>
2966
51bc9642
ILT
2967 * cofflink.c (_bfd_coff_final_link): Handle long section names.
2968 * coffcode.h (coff_write_object_contents): If there are long
2969 section names, always set the f_symptr field, even if there are no
2970 symbols.
2971 * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
2972 if there are no symbols.
2973
8100e72c
ILT
2974 * coffgen.c (make_a_section_from_file): Check return value of
2975 _bfd_coff_read_string_table.
2976 (coff_real_object_p): Check return value of
2977 make_a_section_from_file.
2978 (_bfd_coff_read_string_table): Check that there are some symbols
2979 before trying to read the string table size.
2980
0e3bd85e
ILT
2981Wed Jun 12 11:16:37 1996 Ian Lance Taylor <ian@cygnus.com>
2982
ed675a04
ILT
2983 * xcofflink.c (xcoff_link_add_symbols): When considering whether
2984 to replace a symbol in a dynamic object with a symbol from another
2985 dynamic object, do the replacement if the existing symbol is
2986 global linkage code.
2987
49144784
ILT
2988 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
2989 for _ptrgl, and treat it as global linkage code.
2990
0e3bd85e
ILT
2991 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
2992 filename or N_SO symbol past the offset, and use it to indicate
2993 that there is no line number or function when appropriate.
2994
a5c7acea
ILT
2995Tue Jun 11 15:24:48 1996 Ian Lance Taylor <ian@cygnus.com>
2996
2997 * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
2998 common symbol defined by the linker. Don't export function code
2999 even if export_defineds is set.
3000
3001Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
3002
3003 * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
3004 and R_JMP_DEL.
3005 (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
3006 (h8300_symbol_address_p): New function.
3007 (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
3008 relaxing.
3009
890f5b7f
JL
3010Sun Jun 9 16:30:20 1996 Jeffrey A Law (law@cygnus.com)
3011
3012 * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
3013 problems.
3014 (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
3015 correctly for the two variants. Allow relaxing if the target
3016 is 128 bytes away since after relaxation it'll be 126 bytes away.
3017 (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
3018 "dot" and "value". Allow relaxing if the target is 128 bytes
3019 away since after relaxation it'll be 126 bytes away.
3020 * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
3021 the given section until nothing changes.
3022
0593fc16
ILT
3023Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
3024
3025 * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
3026 alignment hack--we can get the lnnoptr info another way without
3027 suddenly increasing the alignment requirements. Set the flags for
3028 the _PDATA section.
3029 (ecoff_compute_section_file_positions): Do so.
3030
9b263b79
ILT
3031Thu Jun 6 11:24:37 1996 Ian Lance Taylor <ian@cygnus.com>
3032
bbf7c335
ILT
3033 * ieee.c (ieee_write_object_contents): Put a timestamp in the file
3034 to keep the HP emulator database happy.
3035
9b263b79
ILT
3036 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
3037 From Kevin Buettner <kev@primenet.com>.
3038
3039Wed Jun 5 15:16:04 1996 Ian Lance Taylor <ian@cygnus.com>
3040
3041 * aoutx.h (translate_to_native_sym_flags): Don't try to print the
3042 name of a NULL section.
3043
26145b15
ILT
3044Tue Jun 4 18:53:58 1996 Ian Lance Taylor <ian@cygnus.com>
3045
3046 * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
3047 set, always call the notice callback.
3048
3049 * VERSION: Increment for bfdlink.h change.
3050
3a2080d8
ILT
3051Mon Jun 3 11:01:53 1996 Ian Lance Taylor <ian@cygnus.com>
3052
9d175198
ILT
3053 * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
3054 (sh_relax_delete_bytes): Correct handling of differently sized
3055 trailing alignment reloc.
3056
5a04f1bd
ILT
3057 * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
3058 * bfd-in2.h: Rebuild.
3059 * configure.in: Warn if there is no known 64 bit type.
3060 * configure: Rebuild.
3061
60c8b04f
ILT
3062 * Makefile.in: Rebuild dependencies.
3063 (BFD32_BACKENDS): Add ppcboot.o.
3064 (BFD32_BACKENDS_CFILES): Add ppcboot.c.
3065
3a2080d8
ILT
3066 * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
3067 From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
3068
903612a2
ILT
3069Sat Jun 1 21:49:58 1996 Ian Lance Taylor <ian@cygnus.com>
3070
3071 * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
3072 (bfd_mips_elf64_swap_reginfo_out): Move from here...
3073 * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
3074 (bfd_mips_elf64_swap_reginfo_out): ...to here.
3075
38893c8c
ILT
3076Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
3077
bc05732b
ILT
3078 * elf64-mips.c: Improve reloc special_functions and handling of
3079 SHT_MIPS_OPTIONS section.
3080 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
3081 mips_elf_hi16_reloc and make globally visible.
3082 (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
3083 make globally visible.
3084 (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
3085 make globally visible.
3086 (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
3087 and make globally visible.
3088 (gprel16_with_gp): Check howto->src_mask before using value in
3089 insn.
3090 (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
3091 and make globally visible.
3092 (gprel32_with_gp): Check howto->src_mask before fetching value.
3093 (bfd_mips_elf_swap_options_in): New function.
3094 (bfd_mips_elf_swap_options_out): New function.
3095 (_bfd_mips_elf_set_private_flags): Rename from
3096 mips_elf_set_private_flags and make globally visible.
3097 (_bfd_mips_elf_copy_private_bfd_data): Rename from
3098 mips_elf_copy_private_bfd_data and make globally visible.
3099 (_bfd_mips_elf_merge_private_bfd_data): Rename from
3100 mips_elf_merge_private_bfd_data and make globally visible.
3101 (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
3102 for a SHT_MIPS_OPTIONS section.
3103 (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
3104 (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
3105 name of a SHT_MIPS_OPTIONS section.
3106 (_bfd_mips_elf_set_section_contents): New function.
3107 (mips_elf32_section_processing): Set the GP value in a
3108 SHT_MIPS_OPTIONS section.
3109 (_bfd_mips_elf_find_nearest_line): Rename from
3110 mips_elf_find_nearest_line and make globally visible.
3111 (bfd_elf32_set_section_contents): Define.
3112 * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
3113 (_bfd_mips_elf_lo16_reloc): Declare.
3114 (_bfd_mips_elf_gprel16_reloc): Declare.
3115 (_bfd_mips_elf_got16_reloc): Declare.
3116 (_bfd_mips_elf_gprel32_reloc): Declare.
3117 (_bfd_mips_elf_set_private_flags): Declare.
3118 (_bfd_mips_elf_copy_private_bfd_data): Declare.
3119 (_bfd_mips_elf_merge_private_bfd_data): Declare.
3120 (_bfd_mips_elf_find_nearest_line): Declare.
3121 (_bfd_mips_elf_set_section_contents): Declare.
3122
38893c8c
ILT
3123 * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
3124 elf_info_to_howto.
3125 (elf_info_to_howto): Define.
3126 * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
3127 elf_info_to_howto.
3128 (elf_info_to_howto): Define.
3129 * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
3130 elf_info_to_howto.
3131 (elf_info_to_howto): Define.
3132
3133 * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
3134 R_MOV16B[12], to match change in coff/internal.h.
3135
cabd8fa0
ILT
3136Thu May 30 12:38:49 1996 Ian Lance Taylor <ian@cygnus.com>
3137
00176555
ILT
3138 * elf64-mips.c: Extensive additions to provide better support for
3139 writing files and for gas.
3140 * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
3141 of mips_elf_object_p.
3142 (mips_elf32_object_p): Rename from mips_elf_object_p; call
3143 _bfd_mips_elf_object_p.
3144 (_bfd_mips_elf_final_write_processing): Rename from
3145 mips_elf_final_write_processing and make globally visible.
3146 (_bfd_mips_elf_fake_sections): Rename from
3147 mips_elf_fake_sections and make globally visible.
3148 (_bfd_mips_elf_section_from_bfd_section): Rename from
3149 mips_elf_section_from_bfd_section and make globally visible.
3150 (_bfd_mips_elf_section_processing): New function, broken out of
3151 mips_elf_section_processing.
3152 (mips_elf32_section_processing): Rename from
3153 mips_elf_section_processing; call
3154 _bfd_mips_elf_section_processing.
3155 (_bfd_mips_elf_symbol_processing): Rename from
3156 mips_elf_symbol_processing and make globally visible.
3157 (_bfd_mips_elf_read_ecoff_info): Rename from
3158 mips_elf_read_ecoff_info and make globally visible.
3159 (mips_elf32_ecoff_debug_swap): Rename from
3160 mips_elf_ecoff_debug_swap.
3161 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
3162 struct symbol_cache_entry.
3163 (_bfd_elf_validate_reloc): New function, moved in from
3164 elfcode.h:validate_reloc.
3165 * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
3166 to _bfd_elf_validate_reloc. Change all callers.
3167 * elf-bfd.h (bfd_section_from_shdr): Declare.
3168 (_bfd_elf_symbol_from_bfd_symbol): Declare.
3169 (_bfd_elf_validate_reloc): Declare.
3170 (_bfd_mips_elf_object_p): Declare.
3171 (_bfd_mips_elf_fake_sections): Declare.
3172 (_bfd_mips_elf_section_from_bfd_section): Declare.
3173 (_bfd_mips_elf_section_processing): Declare.
3174 (_bfd_mips_elf_symbol_processing): Declare.
3175 (_bfd_mips_elf_read_ecoff_info): Declare.
3176 (_bfd_mips_elf_final_write_processing): Declare.
3177 * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
3178 if already defined.
3179
cabd8fa0
ILT
3180 * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
3181 (mips_elf_final_write_processing): Likewise.
3182
d1bf45aa
ILT
3183Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
3184
3185 64-bit MIPS ELF ABI objdump support:
3186 * elf64-mips.c: New file.
3187 * Makefile.in: Rebuild dependencies.
3188 (BFD64_BACKENDS): Add elf64-mips.o.
3189 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
3190 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
3191 bfd_elf64_littlemips_vec to targ_selvecs.
3192 (mips*-*-elf*): Likewise.
3193 * confingure.in: Add bfd_elf64_bigmips_vec and
3194 bfd_elf64_littlemips_vec to vector switch.
3195 * configure: Rebuild.
3196 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
3197 broken out of mips_elf_section_from_shdr.
3198 (mips_elf32_section_from_shdr): Rename from
3199 mips_elf_section_from_shdr. Call new function.
3200 (elf_backend_section_from_shdr): Update name of renamed function.
3201 * elf-bfd.h (struct elf_size_info): Change second parameter of
3202 write_out_phdrs to be const. Likewise for second parameter of
3203 swap_symbol_out.
3204 (struct bfd_elf_section_data): Add rel_hdr2 field.
3205 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
3206 (bfd_elf32_swap_symbol_out): Likewise.
3207 (bfd_elf32_swap_reloc_in): Likewise.
3208 (bfd_elf32_swap_reloc_out): Likewise.
3209 (bfd_elf32_swap_reloca_in): Likewise.
3210 (bfd_elf32_swap_reloca_out): Likewise.
3211 (bfd_elf32_swap_phdr_in): Likewise.
3212 (bfd_elf32_swap_phdr_out): Likewise.
3213 (bfd_elf32_swap_dyn_in): Likewise.
3214 (bfd_elf32_swap_dyn_out): Likewise.
3215 (bfd_elf32_slurp_symbol_table): Declare.
3216 (bfd_elf32_write_shdrs_and_ehdr): Declare.
3217 (bfd_elf32_write_out_phdrs): Declare.
3218 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
3219 (bfd_elf64_swap_symbol_out): Likewise.
3220 (bfd_elf64_swap_reloc_in): Likewise.
3221 (bfd_elf64_swap_reloc_out): Likewise.
3222 (bfd_elf64_swap_reloca_in): Likewise.
3223 (bfd_elf64_swap_reloca_out): Likewise.
3224 (bfd_elf64_swap_phdr_in): Likewise.
3225 (bfd_elf64_swap_phdr_out): Likewise.
3226 (bfd_elf64_swap_dyn_in): Likewise.
3227 (bfd_elf64_swap_dyn_out): Likewise.
3228 (bfd_elf64_slurp_symbol_table): Declare.
3229 (bfd_elf64_write_shdrs_and_ehdr): Declare.
3230 (bfd_elf64_write_out_phdrs): Declare.
3231 (_bfd_mips_elf_section_from_shdr): Declare.
3232 * elf.c (bfd_section_from_shdr): Remove assertion requiring
3233 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
3234 section for the section, add the new one to rel_hdr2. Increment
3235 reloc_count rather than setting it.
3236 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
3237 Remove static declaration.
3238 (elf_write_shdrs_and_ehdr): Define name as macro.
3239 (elf_write_out_phdrs): Likewise.
3240 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
3241 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
3242 (elf_swap_symbol_in): Change second parameter to be const.
3243 (elf_swap_symbol_out): Likewise.
3244 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
3245 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
3246 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
3247 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
3248 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
3249 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
3250 parameter to be const. Make non-static.
3251 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
3252 Make non-static.
3253 (elf_slurp_symbol_table): Make non-static.
3254 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
3255 * elfxx-target.h (elf_info_to_howto): Define if not defined.
3256 (elf_backend_size_info): Likewise.
3257 (elfNN_bed): Use elf_backend_size_info.
3258 * targets.c (bfd_elf64_bigmips_vec): Declare.
3259 (bfd_elf64_littlemips_vec): Declare.
3260 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
3261 bfd_elf64_littlemips_vec if BFD64 is defined.
3262
3263 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
3264
7dd3d45a
ILT
3265Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
3266
07692951
ILT
3267 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
3268 zeroes, in alignment holes.
3269
a4322a77
ILT
3270 * configure: Rebuild with autoconf 2.10.
3271
7dd3d45a
ILT
3272 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
3273 potential leading underscore in the allocated buffer.
3274
0293d5b0
MM
3275Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3276
3277 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
3278 symbols into .sbss if this is a relocatable link.
3279
a5d0cd50
ILT
3280Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
3281
3282 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
3283 undefined symbols when creating a shared library.
3284
3285Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
3286
3287 * coff-sh.c: Add a bunch of new code and static const arrays to
3288 support aligning loads and stores on four byte memory boundaries.
3289 Also:
3290 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
3291 R_SH_LABEL.
3292 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
3293 call sh_align_loads.
3294 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
3295 as unused.
3296
c403d358
ILT
3297Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
3298
3299 * cache.c (bfd_open_file): Unlink the file before opening it for
3300 write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
3301
3302 * opncls.c (bfd_fdopenr): Set opened_once.
3303
2f710e17
ILT
3304Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
3305
ff60fc3a
ILT
3306 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
3307 freeing it.
3308
2f710e17
ILT
3309 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
3310 the code unconditionally.
3311
efb33f6b
ILT
3312Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
3313
3314 * libcoff-in.h (struct pei_section_tdata): Define structure.
3315 (pei_section_data): Define macro.
3316 * libcoff.h: Rebuild.
3317 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
3318 store s_paddr field in pei_section_data.
3319 (coff_compute_section_file_positions): Use pei_section_data rather
3320 than _cooked_size, and don't overwrite an existing value.
3321 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
3322 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
3323 * peicode.h (coff_bfd_copy_private_section_data): Define if
3324 COFF_IMAGE_WITH_PE.
3325 (pe_bfd_copy_private_section_data): New static function if
3326 COFF_IMAGE_WITH_PE.
3327
5ecd6d7f
ILT
3328Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
3329
db1e2aa7
ILT
3330 * srec.c (srec_set_arch_mach): Write as a function rather than a
3331 macro definition.
3332
5ecd6d7f
ILT
3333 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
3334 no map, just check each member in turn to see whether it is
3335 required.
3336
aefee5c8
MM
3337Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3338
3339 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
3340 table. Call BFD_ASSERT to validate header size, instead of
3341 calling fatal.
3342 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
3343 name.
3344
0d1fcbbb
MM
3345Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3346
3347 * ppcboot.c: New target for looking at PPCbug boot records.
3348
3349 * config{ure.in,.bfd}: Add support for ppcboot target.
3350 * targets.c: Ditto.
3351 * configure: Regenerate.
3352
f4597f8c
JL
3353Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
3354
3355 * coff-h8300.c (howto_table): Update names to match recent
3356 changes to include/coff/internal.h. Fix minor errors in the
3357 existing relocs. Add R_MOVL1 and R_MOVL2.
3358 (rtype2howto): Similarly.
3359 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
3360 existing relaxing code and peform more relaxing.
3361 (h8300_reloc16_extra_cases): Likewise.
3362
0dc70e1a
JL
3363Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
3364
3365 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
3366 symbols correctly.
3367
d1b8ccb0
PS
3368Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3369
3370 * elfcode.h (elf_object_p): Reject generic ELF target if
3371 e_machine matches an alternate machine code in a specific backend.
3372
3373 * netbsd-core.c (netbsd_core_vec): Remove initializer for
3374 obsolete align_power_min field.
3375
c9f5444e
JL
3376Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
3377
3378 * coff-h8300.c (reloc_howto_type): Add howto entry for
3379 R_PCRWORD_B.
3380 (rtype2howto): Handle R_PCRWORD_B.
3381 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
3382 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
3383 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
3384 branch (R_PCWORD_B).
3385
4ad842aa
ILT
3386Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
3387
340d654f
ILT
3388 * aoutx.h (translate_from_native_sym_flags): Set the section for
3389 BSF_CONSTRUCTOR symbols.
3390
4ad842aa
ILT
3391 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
3392 last_bf_index.
3393
9c7a5748
DE
3394Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
3395
3396 * coffcode.h (coff_write_object_contents): In comdat section lookup,
3397 stop looking when section is found.
3398
622c93a3
ILT
3399Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
3400
e8f3bb64 3401 * coffcode.h (STRING_SIZE_SIZE): Define.
9aac8e83
ILT
3402 (styp_to_sec_flags): Handle long symbol names when looking for the
3403 section symbol.
e8f3bb64
ILT
3404 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
3405 (bfd_coff_long_section_names): Define.
3406 (coff_write_object_contents): Handle long section names.
3407 (bfd_coff_std_swap_table): Initialize new field.
3408 * libcoff.h: Rebuild.
3409 * coffgen.c (make_a_section_from_file): Handle long section
3410 names.
3411 (coff_write_symbols): Handle long section names.
3412 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
3413 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3414 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
3415 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
3416 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
3417 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
3418 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
3419 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
3420
622c93a3
ILT
3421 * bout.c (b_out_callback): Set lma of sections.
3422 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
3423 parameter to output_bfd. Used input_bfd instead of output_bfd in
3424 several places.
3425
6b725f83
ILT
3426Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
3427
b7d1158a
ILT
3428 * aoutx.h (translate_from_native_sym_flags): Don't create
3429 SEC_CONSTRUCTOR sections.
3430 * ecoff.c (ecoff_set_symbol_info): Likewise.
3431
6b725f83
ILT
3432 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
3433 From Don Bowman <bowman@waterloo.hp.com>.
3434
e28a1e77
DE
3435Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
3436
3437 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
3438 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
3439
abec70b9
ILT
3440Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
3441
3442 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
3443 mips_32_relocs field.
3444 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
3445 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
3446 relocs against a global symbol which is not defined in a regular
3447 file.
3448 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
3449 against a global symbol, increment mips_32_relocs.
3450 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
3451 the symbol is not defined in a regular file, make room in the
3452 .rel.dyn section.
3453
ecba7a3a
ILT
3454Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
3455
656c5b6d
ILT
3456 * ecoff.c (ecoff_compute_section_file_positions): Track the real
3457 file position and the virtual file position separately. Set
3458 filepos information bsaed on the real file position.
3459 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
3460 Jan 23 change to coffcode.h.
3461
ecba7a3a
ILT
3462 * som.c (som_slurp_symbol_table): Set the symbol count to the
3463 number of BFD symbols created.
3464
e25a7988
MM
3465Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3466
3467 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
3468 output file if linking shared objects. Loop to check all relocs,
3469 rather than returning false on first error.
3470
5c28a96e
MM
3471Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3472
3f7ca26b
MM
3473 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
3474 (ppc_elf_additional_program_headers): If .interp section, bump #
3475 of program headers by 1.
3476 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
3477 (ppc_elf_size_dynamic_sections): Add support for .plt section.
3478 (ppc_elf_check_relocs): Print out filename in debug code. Enable
3479 PLT support.
3480 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
3481 debug output.
3482 (ppc_elf_relocate_section): If the output section isn't defined,
3483 don't abort, just give an error message.
3484
5c28a96e
MM
3485 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
3486 being created is .sdata or .sdata2, don't make the symbol dynamic.
3487
f5d65485
ILT
3488Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
3489
3490 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
3491 members of an archive for dynamic objects with no symbols, and
3492 pass them directly to check_archive_element.
3493 (xcoff_link_check_ar_symbols): Pass dynamic objects to
3494 xcoff_link_check_dynamic_ar_symbols.
3495 (xcoff_link_check_dynamic_ar_symbols): New static function.
3496
3497 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
3498 from _bfd_nodynamic to _bfd_xcoff.
3499 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
3500 Declare.
3501 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
3502 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
3503 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
3504 * libcoff.h: Rebuild.
3505 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
3506 (xcoff_get_section_contents): New static function.
3507 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
3508 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
3509 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
3510 (xcoff_dynamic_reloc): New static variable.
3511 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
3512 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
3513
3514Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
3515
3516 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
3517 if reloc_entry->addend is not 0.
3518 (CALC_ADDEND): Just set the addend to reloc.r_offset.
3519
34249b2f
DE
3520Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
3521
3522 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
3523 R_SPARC_GLOB_JMP.
3524 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
3525 Add entries for R_SPARC_[56].
3526 (sparc_reloc_map): Add entries for R_SPARC_[56].
3527
af50cd91
ILT
3528Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
3529
1726b8f0
ILT
3530 Optimize linking of stabs in sections as used in ELF and COFF.
3531 * stabs.c: New file.
3532 * libbfd-in.h (_bfd_link_section_stabs): Declare.
3533 (_bfd_write_section_stabs): Declare.
3534 (_bfd_write_stab_strings): Declare.
3535 * libbfd.h: Rebuild.
3536 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
3537 (struct coff_link_hash_table): Add stab_info field.
3538 * libcoff.h: Rebuild.
3539 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
3540 stab_info field.
3541 (coff_link_add_symbols): Call _bfd_link_section_stabs if
3542 appropriate.
3543 (_bfd_coff_final_link): Write out stab strings hash table.
3544 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
3545 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
3546 hash table.
3547 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
3548 (struct bfd_elf_section_data): Add stab_info field.
3549 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
3550 field.
3551 * elflink.h (elf_link_add_object_symbols): If appropriate, call
3552 _bfd_link_section_stabs.
3553 (elf_bfd_final_link): Write out stab strings hash table.
3554 (elf_link_input_bfd): Handle optimized stabs sections.
3555 * reloc.c (_bfd_final_link_relocate): Check address against
3556 _raw_size rather than _cooked_size.
3557 * Makefile.in: Rebuild dependencies.
3558 (BFD_LIBS): Add stabs.o
3559 (BFD_LIBS_CFILES): Add stabs.c.
3560
3561 * VERSION: Increment for bfdlink.h change.
3562
af50cd91
ILT
3563 * coffgen.c (coff_renumber_symbols): Correct handling of
3564 BSF_NOT_AT_END common symbols.
3565
f9fa5df3
ILT
3566Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
3567
3568 * coff-ppc.c (record_toc): Add cast to avoid warning.
3569 (ppc_allocate_toc_section): Likewise.
3570 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
3571 (ppc_coff_reloc_type_lookup): Remove unreached code.
3572 * coffcode.h (coff_write_object_contents): Don't take the address
3573 of an array.
3574 * peicode.h (pe_print_idata): Add casts to avoid warning.
3575 (pe_print_edata): Likewise.
3576 (pe_print_reloc): Remove ANSI C string concatenation.
3577
d6e0e2f7
ILT
3578Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
3579
3580 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
3581 and last_bf fields.
3582 * libcoff.h: Rebuild.
3583 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
3584 symbols.
3585 (coff_swap_aux_out): Likewise.
3586 * peicode.h (coff_swap_aux_in): Likewise.
3587 (coff_swap_aux_out): Likewise.
3588 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
3589 symbols.
3590 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
3591 field.
3592 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
3593 Fix up .bf endndx link fields.
3594 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
3595 field.
3596 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
3597 symbols.
3598
221d1e19
MM
3599Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3600
3601 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
3602 on Solaris PowerPC systems doesn't get confused.
3603
3604 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
3605 #ifdef PPC.
3606
3607 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
3608 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
3609 update did_reg and did_reg2.
3610
8f9a56c6
ILT
3611Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
3612
f97fca78
ILT
3613 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
3614
8f9a56c6
ILT
3615 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
3616 callback routines, pass h->root.string rather than name, in case
3617 copy is true and name is transient.
3618
603fdf16
SG
3619Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
3620
3621 * elfcore.h: Add support for core files with multiple threads.
3622 (Primarily for Solaris.)
3623
a2d914e1
ILT
3624Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
3625
cdf23557
ILT
3626 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
3627 section->orelocation is NULL.
3628
a2d914e1
ILT
3629 * coffgen.c (bfd_coff_get_syment): New function.
3630 (bfd_coff_get_auxent): New function.
3631 * bfd-in.h (bfd_coff_get_syment): Declare.
3632 (bfd_coff_get_auxent): Declare.
3633 * bfd-in2.h: Rebuild.
3634
5cf36a32
ILT
3635Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
3636
3637 * elf32-mips.c (struct mips_hi16): Define.
3638 (mips_hi16_addr, mips_hi16_addend): Remove.
3639 (mips_hi16_list): New static variable.
3640 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
3641 (mips_elf_lo16_reloc): Process mips_hi16_list.
3642 (mips_elf_relocate_section): Permit an arbitrary number of HI16
3643 relocs before the associated LO16 reloc.
3644
b7fce5be
ILT
3645Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
3646
176512da
ILT
3647 * versados.c (versados_scan): Check bfd_alloc return value.
3648 (versados_object_p): Check all bfd_read return values. Require
3649 that lang field be less than 10, to avoid confusion with Intel Hex
3650 files.
3651
18de3f19
ILT
3652 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
3653 aren't any symbols.
3654 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
3655 not 0, for an absolute symbol.
3656 (NAME(aout,swap_ext_reloc_out)): Likewise.
3657
66ab4152
ILT
3658 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
3659 (ihex_write_object_contents): For a large start address, output
3660 the full 32 bit address in record type 5.
3661
b7fce5be
ILT
3662 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
3663 to int to avoid promotion problems in prototype.
3664
f1b45745
ILT
3665Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
3666
f400f358
ILT
3667 * configure.host: Use ${srcdir} when looking for picfrag.
3668
3d9a5986
ILT
3669 * configure.host: Switch on ${libdir}, not $(libdir). From
3670 alan@spri.levels.unisa.edu.au (Alan Modra).
3671
f1b45745
ILT
3672 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
3673 entry point, not just for DYNAMIC objects.
3674 * sunos.c (sunos_add_dynamic_symbols): Always call
3675 sunos_create_dynamic_sections. If called with a non DYNAMIC
3676 object, don't do anything else.
3677 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
3678
6f21f2e3
ILT
3679Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
3680
639b5a09
ILT
3681 * configure.in: Permit --enable-shared to specify a list of
3682 directories.
3683 * configure: Rebuild.
3684
6f21f2e3
ILT
3685 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
3686 host when configuring with --enable-shard.
3687
3f5f565b
ILT
3688Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
3689
1ac75f5c
ILT
3690 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
3691 <jdp@polstra.com>.
3692
1a9951a9
ILT
3693 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
3694 to avoid crashing in bfd_hash_replace.
3695
f1ac3acb 3696 * sysdep.h: Use #ifdef, not #if.
3f5f565b 3697
eb5f58e0
ILT
3698Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
3699
3700 * config.in: Rebuild.
3701
ab1aa5cd
FF
3702Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
3703
3704 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
3705 (AC_CHECK_HEADERS): Check for sys/time.h
3706 (AC_HEADER_TIME): Add macro.
3707 * configure: Rebuild.
3708 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
3709 to control what combination of <time> and <sys/time.h>
3710 get included.
3711
d1f74cd2
DE
3712Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
3713
3714 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
3715 (aout_32_sunos4_write_object_contents): Likewise.
3716 * aoutx.h (NAME(aout,machine_type)): Handle
3717 bfd_mach_sparc_{sparclet,sparclite}.
3718 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
3719 (bfd_mach_sparc_v9_p): Update.
3720 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
3721 * libaout.h (enum machine_type): Add M_SPARCLET.
3722 * sunos.c (MACHTYPE_OK): Define.
3723 * bfd-in2.h: Regenerated.
3724
1dad72bd
ILT
3725Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
3726
19bfbcbe
ILT
3727 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
3728 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
3729 * elflink.c (_bfd_elf_create_got_section): Store the
3730 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
3731 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
3732 global offset table goes over 0x1000, set the value of
3733 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
3734 (elf32_sparc_relocate_section): Subtract the offset of
3735 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
3736
1dad72bd
ILT
3737 * elfcode.h: Don't include <string.h>.
3738
ca4e2190
JL
3739Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
3740
3741 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
3742 generic_link_hash_newfunc. All references changed.
3743 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
3744 moved here from libbfd-in.h.
3745 * libbfd-in.h: Corresponding changes.
3746 * libbfd.h: Regenerated.
3747
ce6a7731
ILT
3748Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
3749
aad53b0d
ILT
3750 * aoutx.h (aout_link_input_section_std): When reporting an
3751 overflow error, use the name of the symbol in the hash table if
3752 available.
3753 (aout_link_input_section_ext): Likewise.
3754
ce6a7731
ILT
3755 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
3756 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
3757
323b430f
SC
3758Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
3759
3760 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
3761 * coffcode.h (coff_compute_section_file_positions): Likewise.
3762 (coff_write_object_contents): Likewise.
3763
7fc1cd16
ILT
3764Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
3765
5a28331f
ILT
3766 * section.c (SEC_LINK_ONCE): Define.
3767 (SEC_LINK_DUPLICATES): Define.
3768 (SEC_LINK_DUPLICATES_DISCARD): Define.
3769 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
3770 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
3771 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
3772 * bfd-in2.h: Rebuild.
3773 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
3774 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
3775 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
3776 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
3777 SEC_LINK_ONCE, and look through the symbol table for the setting
3778 for SEC_LINK_DUPLICATES.
3779 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
3780 set for a section, find the section symbol in the symbol table,
3781 and set the aux entry based on SEC_LINK_DUPLICATES.
3782 * coffgen.c (coff_print_symbol): Add a space before "checksum".
3783 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
3784 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
3785 * coff-i386.c (i386coff_vec): Likewise.
3786 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
3787
7fc1cd16
ILT
3788 * VERSION: Bump to 2.6.1.
3789 * Makefile.in (stamp-h): Depend upon VERSION.
3790
9399a257
JL
3791Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
3792
3793 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
3794 * libbfd.h: Rebuilt.
3795 * linker.c (generic_link_hash_newfunc): No longer static.
3796 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
3797 to override.
3798 * coff-h8300.c: Add two derived hash tables and their associated
3799 funtions and #defines for use by the h8300 linker.
3800 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
3801 the function vector as needed. Place the address of the function
3802 vector entry in the location specified by the R_MEM_INDIRECT reloc.
3803 Rewrite the vectors section contents as necessary.
3804 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
3805 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
3806 (coff_bfd_link_hash_table_create): Likewise.
3807
506f2bb4
ILT
3808Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
3809
3810 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
3811 __attribute__ ((__unused__)) so that -Wall doesn't warn about
3812 them.
3813 (hppa_rebuild_insn): Pass pointer to correct type to
3814 low_sign_unext and dis_assemble_21.
3815
05a84ae1
DE
3816Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
3817
3818 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
3819 Stick with sparc-*-{sysv4*,solaris2*}.
3820
919cf4b5
ILT
3821Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
3822
8230f31c
ILT
3823 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
3824 (coff_swap_aux_out): Swap out extra PE x_scn fields.
3825 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
3826 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
3827 fields is non-zero, print them.
3828
9addd1d4
ILT
3829 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
3830 ifdef. Remove unused variables.
3831 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
3832 variables.
3833 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
3834 (get_symbol_value): Ifdef out.
3835 (pe_ppc_reloc): Ifdef out. Remove unused variables.
3836 (coff_ppc_relocate_section): Remove unused variables. Make
3837 fprintf strings and argument types correspond. Put before_addr in
3838 DEBUG_RELOC ifdef.
ff0e4a93
ILT
3839 (dump_toc): Make fprintf strings and argument types correspond.
3840 (ppc_process_before_allocation): Remove unused variables. Always
3841 return a value.
9addd1d4
ILT
3842 (ppc_reflo_reloc): Ifdef out.
3843 (ppc_addr32nb_reloc): Ifdef out.
3844 (ppc_coff_rtype2howto): Make fprintf strings and argument types
3845 correspond.
3846 (coff_ppc_rtype_to_howto): Likewise.
3847 (ppc_coff_swap_sym_in_hook): Remove unused variables.
3848
3849 * peicode.h (pe_print_idata): Move otherwise unused variables into
3850 the #ifdef where they are used. Always return a value.
ff0e4a93
ILT
3851 (pe_print_edata): Make fprintf strings and argument types
3852 correspond. Always return a value.
9addd1d4
ILT
3853 (pe_print_pdata): Removed unused variable addr_value. Always
3854 return a value.
3855 (pe_print_reloc): Remove unused variable onaline. Make fprintf
ff0e4a93 3856 strings and argument types correspond. Always return a value.
9addd1d4
ILT
3857
3858 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
3859 (ppc_elf_finish_dynamic_symbol): Move definition of unused
3860 variable rela inside #if 0 section where it is used.
3861
c877bdf1
ILT
3862 * ns32k.h: New file.
3863 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
3864 functions to start with _bfd_.
3865 * aout-ns32k.c: Include ns32k.h. Change references to renamed
3866 functions in cpu-ns32k.h.
3867 * Makefile.in: Rebuild dependencies.
3868 (HFILES): Add ns32k.h.
3869
ff0e4a93
ILT
3870 * section.c (struct sec): Add linker_mark field. Change
3871 user_set_vma and reloc_done to be single bit fields.
3872 (STD_SECTION): Update accordingly.
7ec49f91
ILT
3873 * bfd-in2.h: Rebuild.
3874 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
3875 link.
3876 (aout_link_input_bfd): Don't link unmarked sections.
3877 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
3878 link.
3879 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
3880 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
3881 the link.
3882 * elflink.h (elf_bfd_final_link): Mark sections included in the
3883 link.
3884 (elf_link_input_bfd): Don't link unmarked sections.
3885 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
3886 in the link.
3887 (xcoff_link_input_bfd): Don't link unmarked sections.
3888
919cf4b5
ILT
3889 * coffswap.h (coff_swap_scnhdr_out): Include section name in
3890 overflow error messages.
3891
986cf3b8
ILT
3892Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
3893
fd681dcd
ILT
3894 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
3895 is not set, print "BFD: " before the error message.
3896
986cf3b8
ILT
3897 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
3898 Miles Bader <miles@gnu.ai.mit.edu>.
3899 * configure: Rebuild.
3900
3998d526
ILT
3901Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
3902
c3dffbd7
ILT
3903 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
3904 symbols.
3905
3998d526
ILT
3906 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
3907 m68k-aout, m68k-coff, and m68k-elf targets.
3908
e4d27380
ILT
3909Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
3910
3911 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
3912 (ieee_generic_stat_arch_elt): Restructured to prevent
3913 ieee_object_p from being called repeatedly.
3914
51776a11
SC
3915Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
3916
3917 * coffcode.h (coff_write_object_contents): Allocate
3918 buffers large enough for any FILEHDR or AOUTHDR.
3919
3920Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
3921
3922 * ecofflink.c (lookup_line): New static function, renamed and
3923 slighly changed from old _bfd_ecoff_locate_line.
3924 (_bfd_ecoff_locate_line): Cache line number information. Use
3925 lookup_line for actual lookup.
3926
9e4ebb1b
MM
3927Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3928
3929 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
3930 multiple of 20 bytes.
3931
9e7427a4
ILT
3932Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
3933
51776a11
SC
3934 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
3935 allocate ecoff_find_line, and don't initialize by hand.
3936 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
3937 mips_elf_find_line, and don't call memset.
3938
9e7427a4
ILT
3939 * coffcode.h (coff_compute_section_file_positions): If not
3940 producing a final executable, don't consider sofar when aligning
3941 the section to the correct size.
3942
3943Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
3944
3945 * coffcode.h (coff_add_missing_symbols): Ifdef out.
3946 (coff_write_object_contents): Don't call coff_add_missing_symbols.
3947 * coffgen.c (coff_section_symbol): Ifdef out.
3948
e7f9ba4f
ILT
3949Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
3950
3951 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
3952 output_bfd is not NULL.
3953
34c4d647
DE
3954Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
3955
3956 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
3957 of bfd_alloc (fixes fix_line not being initialized).
3958 Delete zeroing of fix_{value,tag,end,scnlen} fields.
3959
4e054247
JL
3960Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
3961
57289b5c
JL
3962 * coffcode.h: Allow specific backends to override the
3963 bfd_link_add_symbols routine.
3964
4e054247
JL
3965 * coff-h8300.c: Include genlink.h.
3966 (howto_table): Add R_MEM_INDIRECT.
3967 (rtype2howto): Support R_MEM_INDIRECT.
3968 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
3969 for now.
3970
a10d3dec
ILT
3971Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
3972
3973 * coff-alpha.c (alpha_relocate_section): Use
3974 info->callbacks_warning, rather than _bfd_error_handler, for
3975 "multiple gp" warning.
3976
ea2488ad
ILT
3977Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
3978
8881b321
ILT
3979 * linker.c (bfd_wrapped_link_hash_lookup): New function.
3980 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
3981 table string. Use bfd_wrapped_link_hash_lookup.
3982 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
3983 table string.
3984 * aoutx.h (aout_link_write_symbols): Use the name from the hash
3985 table, if any, when writing out symbols.
3986 (aout_link_input_section_std): Use the name from the hash table,
3987 if any, when reporting undefined symbols.
3988 (aout_link_input_section_ext): Likewise.
3989 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
3990 * bout.c (get_value): Likewise.
3991 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3992 * ecoff.c (ecoff_reloc_link_order): Likewise.
3993 * elflink.h (elf_link_add_object_symbols): Likewise.
3994 (elf_reloc_link_order): Likewise.
3995 * linker.c (_bfd_generic_link_output_symbols): Likewise.
3996 (_bfd_generic_reloc_link_order): Likewise.
3997 (default_indirect_link_order): Likewise.
3998 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
3999 * sunos.c (sunos_add_one_symbol): Likewise.
4000 * xcofflink.c (xcoff_link_add_symbols): Likewise.
4001 (bfd_xcoff_link_count_reloc): Likewise.
4002 (xcoff_reloc_link_order): Likewise.
4003
4004 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
4005 into -1 for intern->rss.
4006
ea2488ad
ILT
4007 * configure: Rebuild with autoconf 2.8.
4008
c189fdfb
ILT
4009Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
4010
4011 * stab-syms.c (__define_stab_duplicate): Define.
4012 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
4013 switch.
4014 * bfd-in.h (bfd_get_stab_name): Declare.
4015 * bfd-in2.h: Rebuild.
4016 * Makefile.in: Rebuild dependencies.
4017 (BFD_LIBS): Add stab-syms.o.
4018 (BFD_LIBS_CFILES): Add stab-syms.c.
4019 (BFD32_BACKENDS): Remove stab-syms.o.
4020 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
4021 * configure.in: Don't list stab-syms.o in bfd_backends.
4022 * configure: Rebuild.
4023 * libaout.h (aout_stab_name): Don't declare.
4024 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
4025 not aout_stab_name.
4026
4027Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
4028
4029 * elf.c (assign_file_positions_for_segments): Adjust file offset
4030 for section alignment even if SEC_LOAD is not set.
4031
c5bde1ef
ILT
4032Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
4033
8f218e05
ILT
4034 * configure.in: Don't set SHLIB or SHLINK to an empty string,
4035 since they appear as targets in Makefile.in.
4036 * configure: Rebuild.
4037
c5bde1ef
ILT
4038 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
4039 don't fiddle with a symbol which is not defined anywhere.
4040
cb84f028
ILT
4041Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
4042
4e59f523
ILT
4043 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
4044 though they are defined in a shared library.
4045 (xcoff_build_ldsyms): Likewise.
4046
ea2504d5
ILT
4047 * coffgen.c (coff_find_nearest_line): Don't look at the line
4048 numbers for the section if section->lineno is NULL.
4049
cb84f028
ILT
4050 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
4051 message rather than calling BFD_ASSERT.
4052 * elfcode.h (write_relocs): Check return value of
4053 _bfd_elf_symbol_from_bfd_symbol.
4054
6e036cf7
MM
4055Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4056
4057 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
4058 for .sbss section.
4059
d08435de
JL
4060Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
4061
4062 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
4063 and R_HPPA_NLRSEL.
4064 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
4065 hppa_reloc_field_selector_type_alt.
4066 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
4067 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
4068 selectors.
4069 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
4070
09609415
ILT
4071Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
4072
4073 * elf.c (assign_file_positions_for_segments): Adjust the segment
4074 memory size for the alignment of a SEC_ALLOC section, not just a
4075 SEC_LOAD section.
4076
55626bf0
ILT
4077Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4078
4079 * m68klinux.c: New file.
4080 * hosts/m68klinux.h: New file.
4081 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
4082 * configure.in (m68*-*-linux*): New native host.
4083 (m68klinux_vec): New vector.
4084 * configure: Rebuild.
4085 * targets.c (m68klinux_vec): Declare.
4086 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
4087 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
4088 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
4089 declaration from bfd_linux_size_dynamic_sections.
4090 (bfd_m68klinux_size_dynamic_sections): Declare.
4091 * bfd-in2.h: Rebuild.
4092 * Makefile.in: Rebuild dependencies.
4093 (BFD32_BACKENDS): Add m68klinux.o.
4094 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
4095
6c7b3090
JL
4096Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
4097
4098 * libhppa.h (pa_arch): Add pa20.
4099 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
4100 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
4101 (hppa_field_adjust): Handle e_nsel.
4102 * som.c: Provide default definitions for many new relocs found only
4103 in hpux10 include files.
4104 (som_fixup_formats): Add several new relocs from hpux10.
4105 (som_hppa_howto_table): Add hpux10 relocs.
4106 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
4107
14fd4616
SS
4108Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
4109
4110 * mpw-make.sed: Edit out recent shared library support, and
4111 rules to rebuild .h files using doc/chew.
4112
3d9f042c
ILT
4113Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
4114
4115 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
4116 size even of sections with no contents.
4117
bdec6228
ILT
4118Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
4119
88358469
ILT
4120 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
4121 starting with '$' the way we skip names starting with '.'. When
4122 updating x_endndx, don't be fooled by an index which has been
4123 merged.
4124
bdec6228
ILT
4125 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
4126 struct/union/enum type with no elements.
4127
053ae1d7
ILT
4128Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
4129
15f4406c
ILT
4130 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
4131
c8435133
ILT
4132 * archive.c (bfd_generic_archive_p): If the first file in the
4133 archive can not be recognized as an object, don't assume that this
4134 is the wrong format.
4135
053ae1d7
ILT
4136 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
4137 format is not bfd_object.
4138 (bfd_elf_get_dt_soname): Likewise.
4139
ea74d979
ILT
4140Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
4141
4142 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
4143 reloc.
4144
871a3f3b
C
4145Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
4146
4147 * bfd.c (tdata): Add netbsd_core_data.
4148 * bfd-in2.h: Regenerated.
4149
4150Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
4151
fe6fc35f
ILT
4152 * sunos.c (SUNOS_CONSTRUCTOR): Define.
4153 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
4154 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
4155 appropriate.
4156
871a3f3b
C
4157 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
4158 to get the symbol index, matching 14 Jul 95 change.
4159
d3785301
FF
4160Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
4161
4162 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4163 Remove duplicate definition of gp.
4164
60a49e7f
ILT
4165Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
4166
81bdcecf
ILT
4167 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
4168 assume that we can set the GP value and then get the same value,
4169 since it won't be true if the output file is neither ELF nor
4170 ECOFF.
4171 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
4172 _bfd_get_gp_value here.
4173 (mips_gprel_reloc): Don't assume we can set and get the GP value.
4174 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
4175 mips_elf_final_gp.
4176 (mips_elf_lo16_reloc): Likewise.
4177 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
4178 Don't require that the BFD be ELF.
4179 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
4180 (mips_elf_gprel32_reloc): Likewise.
4181 (mips_elf_relocate_section): Don't assume we can set and get the
4182 GP value.
4183 (mips_elf_finish_dynamic_symbol): Don't bother to use
4184 _bfd_get_gp_value here.
4185
4186 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
4187 Don't change epdr between malloc and free. Be careful not to free
4188 NULL pointers. Zero out the first RPDR.
4189
7b61165a
ILT
4190 * configure.host: On Linux, only pass -rpath option if $(libdir)
4191 is neither /lib nor /usr/lib. From Alan Modra
4192 <alan@mullet.Levels.UniSA.Edu.Au>.
4193
60a49e7f
ILT
4194 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
4195 dt_name.
4196 (elf_dt_name): Rename from elf_dt_needed_name.
4197 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
4198 elf_dt_needed_name.
4199 (bfd_elf_get_dt_soname): New function.
4200 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
4201 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
4202 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
4203 * bfd-in2.h: Rebuild.
4204
b268e261
DE
4205Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
4206
4207 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
4208 _bfd_sparc_elf_reloc_type_lookup.
4209 (bfd_elf32_bfd_reloc_type_lookup): Update.
4210 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
4211 (sparc64_elf_howto_table): Define.
4212 (sparc_reloc_map): Define.
4213 (sparc64_elf_reloc_type_lookup): New function.
4214 (sparc_elf_wdisp16_reloc): New function.
4215 (elf_info_to_howto): Use sparc64_elf_howto_table.
4216 (sparc64_elf_relocate_section): Likewise.
4217 (bfd_elf64_bfd_reloc_type_lookup): Update.
4218
9e2ef098
ILT
4219Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
4220
4221 * configure.host: Check for 'do not mix' from native linker before
4222 trying to use -rpath.
4223
4c70373f
ILT
4224Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
4225
cba3f8a9
ILT
4226 * bfd.c (_bfd_get_gp_value): New function.
4227 (_bfd_set_gp_value): New function.
4228 * libbfd-in.h (_bfd_get_gp_value): Declare.
4229 (_bfd_set_gp_value): Declare.
4230 * libbfd.h: Rebuild.
4231 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
4232 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
4233 directly to the fields in the tdata information.
4234 (alpha_relocate_section): Likewise.
4235 * coff-mips.c (mips_adjust_reloc_in): Likewise.
4236 (mips_gprel_reloc): Likewise.
4237 (mips_relocate_section): Likewise.
4238 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
4239 (mips_elf_lo16_reloc): Likewise.
4240 (mips_elf_final_gp): Likewise.
4241 (mips_elf_gprel16_reloc): Likewise.
4242 (mips_elf_gprel32_reloc): Likewise.
4243 (mips_elf_relocate_section): Likewise.
4244 (mips_elf_finish_dynamic_symbol): Likewise.
4245
4c70373f
ILT
4246 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
4247
a0a2dd54
ILT
4248Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
4249
f54c7482 4250 * configure.in: Call AC_PROG_CC before configure.host.
65eed095
ILT
4251 * configure: Rebuild.
4252 * configure.host: Don't set information which autoconf should
4253 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
65eed095 4254
14293419
ILT
4255 * configure.host: Remove go32 and win32 host information, since it
4256 should no longer be needed.
4257
edf3fe48
ILT
4258 * elf.c (map_sections_to_segments): If we have a .dynamic section,
4259 then start a new segment rather than put a writable section in a
4260 readonly segment.
4261
b5e4f369
ILT
4262 * configure.host: Set RPATH_ENVVAR.
4263
f2e33e27
ILT
4264 * Makefile.in: Rebuild dependencies.
4265
a0a2dd54
ILT
4266 * elflink.c (_bfd_elf_create_linker_section): Remove unused
4267 zero_section variable.
4268
52c6bc4d
ILT
4269Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
4270
4271 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
4272 ($(srcdir)/libbfd.h): Rename from libbfd.h.
4273 ($(srcdir)/libcoff.h): Rename from libcoff.h.
4274
c9e5279f
ILT
4275Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
4276
cb50baea
ILT
4277 * ieee.c (ieee_write_expression): Only use an R variable for a
4278 local symbol. Don't output a zero offset. Handle a zero address.
4279 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
4280 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
4281 PCREL_OFFSET.
4282 (parse_expression): Don't try to handle multiple occurrences of a
4283 P variable. Handle I variables differently from X variables. Fix
4284 the order of minus expressions.
4285 (ieee_slurp_external_symbols): Generate an I variable for an NN
4286 record. Fix handling of ATI and ATX records.
4287 (ieee_slurp_sections): Only set minimal section attributes.
4288 Adjust them later, based on the section contents.
4289 (ieee_object_p): Read in the file until just after the ME record.
4290 Call ieee_slurp_section_data to set the section flags.
4291 (do_one): Add iterations parameter. Only repeat the first load
4292 item. Set the section and file reloc flags.
4293 (ieee_slurp_section_data): Set section flags. Pass iterations to
4294 do_one.
4295 (ieee_canonicalize_reloc): Handle I variables.
4296 (do_with_relocs): Only emit relocation size when necessary.
4297 Increase MAXRUN to 127. Change ov to be assigned, and take
4298 src_mask and pcrel_offset into account.
4299 (ieee_write_data_part): Skip sections that are not loaded.
4300 (ieee_write_external_part): Don't output optional last entry of WX
4301 records.
4302 (ieee_write_me_part): Make setting of me_record neater.
4303 (ieee_generic_stat_arch_elt): Get the size of an archive element.
4304
c9e5279f
ILT
4305 * syms.c (stt): Add entries for zerovars, vars, and code.
4306
4307 * elfcode.h (validate_reloc): New static function.
4308 (write_relocs): Call validate_reloc for non ELF relocs.
4309
4310 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
4311 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
4312 (TARGET_LITTLE_SYM): Likewise.
4313
4314 * config.bfd (m68*-*-psos*): New target.
4315
d9d65be6
ILT
4316Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
4317
4318 * i386msdos.c: Remove some #if 0 code.
4319 (msdos_write_object_contents): Don't include empty sections in the
4320 size computation, regardless of their address.
4321
4322Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4323
4324 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
4325 is NULL, ie, the -r switch is used.
4326
db5970c7
ILT
4327Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
4328
e9f03cd4
ILT
4329 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
4330 (BFD_RELOC_MIPS_GOT_LO16): Define.
b7384d22 4331 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
e9f03cd4
ILT
4332 * bfd-in2.h, libbfd.h: Rebuild.
4333 * elf32-mips.c (mips_reloc_map): Map new relocs.
4334
fe7c066a
ILT
4335 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
4336
1ab628e4
ILT
4337 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
4338 $(SHLINK).
4339
db5970c7
ILT
4340 * ieee.c (get_symbol): Set the section to bfd_abs_section.
4341 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
4342 simple number for the section address, rather than an expression.
4343 Limit the number of bytes between relocs to MAXRUN.
4344 (ieee_write_me_part): Set me_record to the file offset after the
4345 start address.
4346 (ieee_write_processor): New static function.
4347 (ieee_write_object_contents): Use ieee_write_processor.
4348
318b7c18
ILT
4349Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
4350
db5970c7
ILT
4351 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
4352
4353 * coff-aux.c: Change include of aux.h to aux-coff.h.
318b7c18 4354
56b64690
ILT
4355Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4356
4357 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
4358 relocation put the addend both in the reloc entry and the data.
4359 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
4360 GOT offset value.
4361
4362 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
4363 a R_68K_PCxx reloc against a defined global symbol directly.
4364 (elf_m68k_check_relocs): Don't count such a reloc.
4365
4366 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
4367 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
4368 symbol for now, otherwise always record the symbol as dynamic.
4369 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
4370 is not referenced by a dynamic object, and we are not making a
4371 shared object, then don't make a PLT entry. If we do make a PLT
4372 entry, make sure the symbol has been recorded as dynamic.
4373
5d649ca8
ILT
4374Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
4375
4376 * configure.host: When making a shared library, set HLDFLAGS to
4377 pass an appropriate -rpath option. Use the make variable SONAME
4378 as the shared library soname, rather than computing it here. On
4379 SunOS, build stamp-tshlink in place of $(SHLINK).
4380 * Makefile.in (SONAME): New variable.
4381 ($(SHLINK)): Make a link to the transformed name, as well.
4382 (stamp-tshlink): New target.
4383 (install): Skip stamp-tshlink during install.
4384
8cc98cd5
MM
4385Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4386
56b64690
ILT
4387 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
4388 linker sections have been set up yet.
4389
8cc98cd5
MM
4390 * elf.c (make_mapping): Add an additional argument to suppress
4391 making the first section include the program headers.
4392 (map_sections_to_segments): If the user used -Ttext such that the
4393 program headers are on a different page, do not set the flags
4394 saying that this section includes the program headers.
4395
fe16107d
C
4396Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
4397
4398 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
4399 don't define TRAD_HEADER.
4400 * configure: Rebuild.
4401
4402 * netbsd-core.c: New file, support for NetBSD core files.
4403 * hosts/*nbsd.h: Removed.
4404
f1783016
DE
4405Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
4406
4407 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
4408 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
4409 * libbfd.h, bfd-in2.h: Regenerated.
4410 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
4411 bfd_elf32_bfd_reloc_type_lookup.
4412 (reloc_type{,_names}): Deleted.
4413 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
4414 Add sparc64 relocs.
4415 (sparc_reloc_map): Add sparc64 relocs.
4416 (sparc_elf_notsupported_reloc): New static function.
4417 (sparc_elf_wdisp16_reloc): New static function.
4418 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
4419 (elf32_sparc_relocate_section): Likewise.
4420 (bfd_elf32_bfd_reloc_type_lookup): Define.
4421 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
4422 (reloc_type{,_names}): Deleted.
4423 (elf_sparc_howto_table): Deleted.
4424 (sparc_reloc_map): Deleted.
4425 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
4426 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
4427
48fd00b6
ILT
4428Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
4429
2300e217
ILT
4430 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
4431 *-*-hpux* host.
4432
48fd00b6
ILT
4433 * Makefile.in (program_transform_name): New variable.
4434 (install): Transform library name before installing it.
4435
8adca582
ILT
4436Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
4437
cbe75cb6
ILT
4438 * archures.c (bfd_mach_i960_hx): Define.
4439 * bfd-in2.h: Rebuild.
4440 * cpu-i960.c (scan_960_mach): Accept machine "hx".
4441 (MATRIX): Expand entries for HX.
4442 (arch_info_struct): Add i960:hx entry.
4443 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
4444 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
4445 (coff_set_flags): Handle bfd_mach_i960_hx.
4446
44f795f7
ILT
4447 Support for building as a shared library, based on patches from
4448 Alan Modra <alan@spri.levels.unisa.edu.au>:
4449 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
4450 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
4451 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
4452 * configure: Rebuild.
4453 * configure.host: If --enable-shared, adjust shared library stuff
4454 based on the host. If the host is SunOS, and the linker supports
4455 -rpath, set HLDFLAGS to use it.
4456 * Makefile.in (ALLLIBS): New variable.
4457 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
4458 (COMMON_SHLIB, SHLINK): New variables.
4459 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
4460 (STAGESTUFF): Remove variable.
4461 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
4462 $(TARGETLIB).
4463 (stamp-ofiles): New target, like old ofiles target, but build
4464 using a temporary file and move-if-change, and touch stamp-ofiles
4465 when done.
4466 (ofiles): Just depend upon stamp-ofiles.
4467 (stamp-piclist, piclist): New targets.
4468 ($(SHLIB), $(SHLINK)): New targets.
4469 (targets.o, archures.o): Build twice if PICFLAG is set.
4470 (do_mostlyclean): Remove pic/*.o.
4471 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
4472 stamp-piclist.
4473 (do_distclean): Remove pic and stamp-picdir.
4474 (install): Install shared libraries.
4475 ($(OFILES)): Depend upon stamp-picdir.
4476 (stamp-picdir): New target.
4477
cb62d2bc
ILT
4478 * libcoff-in.h: Add comment reminding people that libcoff.h is a
4479 generated file.
4480 * libcoff.h: Rebuild.
4481
8adca582
ILT
4482 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
4483 flavour of a section with no owner.
4484
4485 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
4486 ELF_LINK_NON_ELF flag.
4487 (mips_elf_create_got_section): Likewise.
4488
4489 * elf.c: Revert last change, since it breaks dynamic linking.
4490 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
4491 field.
4492 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
4493 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
4494 (elfNN_bed): Don't initialize want_hdr_in_seg field.
4495
4496Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4497
4498 * elf.c (assign_file_positions_for_segments): If the backend does
4499 not want the elf header or the program headers in the address
4500 space, do not include them in the calculations.
4501
4502 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
4503 function to determine if we need additional program headers.
4504 (ppc_elf_modify_segment_map): Define as a NOP function for now.
4505 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
4506
0f09ddd4
ILT
4507Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
4508
4509 * coffcode.h: Move today's libcoff.h change into coffcode.h.
4510
b48f10ba
FF
4511Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
4512
0f09ddd4
ILT
4513 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
4514 back into one line. Some compilers (sunos 4.1.3 for example)
4515 won't accept args split across more than one line.
b48f10ba 4516
50761d3b
SC
4517Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
4518
4519 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
4520 * configure: Regenerate.
4521
9dce8260
JL
4522Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
4523
4524 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
4525 try to do arithmetic on a void *, cast it to a unsigned char * first.
4526
6c55897c
ILT
4527Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
4528
869b7d80
ILT
4529 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
4530 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
4531 ELF_LINK_NON_ELF.
4532 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
4533 flag for a newly defined symbol.
4534 (NAME(bfd_elf,record_link_assignment)): Likewise.
4535 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
4536 set the DEF or REF_REGULAR flags correctly.
4537
6f6956c6
ILT
4538 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
4539 (libbfd.h, libcoff.h): Corresponding change.
4540
6c55897c
ILT
4541 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
4542 a PLT32 reloc as dynamic.
4543 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
4544 is not referenced by a dynamic object, and we are not making a
4545 shared object, then don't make a PLT entry. If we do make a PLT
4546 entry, make sure the symbol has been recorded as dynamic.
4547
b06136f2
SC
4548Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
4549
4550 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
4551 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
4552 (powerpcle-*-cygwin32): New.
4553 * peicode.h (add_data_entry): Get address from vma.
4554
5c867ecd
MM
4555Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4556
4557 * elflink.c (_bfd_elf_create_linker_section): If the symbol
4558 attached to the section has already been created as an undefined
4559 symbol, treat it as if it hasn't been created yet.
4560
28c16b55
ILT
4561Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
4562
4563 * elflink.h (elf_bfd_final_link): Don't output initial dummy
4564 symbol or section symbols if stripping all symbols and this is not
4565 a relocateable link. Don't output the symbol string table if
4566 there are no symbols.
4567 (elf_link_flush_output_syms): Don't do anything if there are no
4568 symbols to flush.
4569
d19df9b5
ILT
4570Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
4571
4572 * coff-aux.c: New file.
4573 * hosts/m68kaux.h: New file.
4574 * config.bfd (m68*-apple-aux*): New target.
4575 * configure.in (m68*-apple-aux*): New native host.
4576 (m68kaux_coff_vec): New vector.
4577 * configure: Rebuild.
4578 * targets.c (m68kaux_coff_vec): Declare.
4579 * coffcode.h (bfd_coff_backend_data): Add field
4580 _bfd_coff_link_add_one_symbol.
4581 (bfd_coff_link_add_one_symbol): Define.
4582 (compare_arelent_ptr): New static function if TARG_AUX.
4583 (coff_write_relocs): If TARG_AUX, sort the relocs.
4584 (coff_write_object_contents): Set A/UX aouthdr magic number.
4585 (coff_link_add_one_symbol): Define if not defined.
4586 (bfd_coff_std_swap_table): Initialize new field.
4587 * libcoff.h: Rebuild.
4588 * cofflink.c (coff_link_add_symbols): Call
4589 bfd_coff_link_add_one_symbol rather than
4590 _bfd_generic_link_add_one_symbol.
4591 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
4592 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
4593 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4594 * Makefile.in: Rebuild dependencies.
4595 (BFD32_BACKENDS): Add coff-aux.o.
4596 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
4597
a796aafd
ILT
4598Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4599
4600 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
4601 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
4602
a8763553
ILT
4603Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
4604
66761e59
ILT
4605 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
4606 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
4607 (maintainer-clean): Warn about deleting special files.
4608 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
4609
cf5138e3
ILT
4610 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
4611 warning symbols correctly.
4612 * elf32-i386.c (elf_i386_relocate_section): Likewise.
4613 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4614 * elf32-mips.c (mips_elf_relocate_section): Likewise.
4615 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4616 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4617 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4618
a8763553
ILT
4619 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
4620 warnings.
4621
bdd2e7f1
KK
4622Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
4623
4624 * libcoff-in.h: aligned newly exported names with bfd naming
4625 conventions. Removed an erroneous define of POWERPC_LE_PE.
4626 * libcoff.h: Rebuild.
4627 * cofflink.c, coff-ppc.c: the above function name changes
4628
d2bb6c79
ILT
4629Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
4630
eb5bc1f3
ILT
4631 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
4632 * ecoff.c (struct extsym_info): Define.
4633 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
4634 to ecoff_link_write_external.
4635 (ecoff_link_write_external): Accept a struct extsym_info pointer.
4636 Strip symbols when appropriate.
4637
052b35d2
ILT
4638 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
4639 * syms.c (BSF_OBJECT): Define.
4640 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
4641 * bfd-in2.h: Rebuild.
4642 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
4643 STT_OBJECT symbol.
4644 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
4645 is set.
4646
53787b23
ILT
4647 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
4648 copying relocs into a shared object, treat a defined global symbol
4649 as a local symbol.
4650 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4651 * elf32-mips.c (mips_elf_relocate_section): Likewise.
4652 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4653
d2bb6c79
ILT
4654 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
4655 real defined symbol, not to a weak defined symbol.
4656
13d1a4dd
KK
4657Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
4658
4659 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
4660 and made a few static functions externs.
4661
4662 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
4663 POWERPC_LE_PE hack in cofflink.
4664
4665 * libcoff-in.h: promoted the following from cofflink.c to allow
4666 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
4667 coff_debug_merge_element, struct coff_debug_merge_type,
4668 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
4669 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
4670 coff_debug_merge_hash_lookup, coff_link_section_info,
4671 coff_final_link_info, coff_debug_merge_hash_newfunc,
4672 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
4673
4674 * libcoff.h: re-gen'd
4675
86aac8ea
ILT
4676Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
4677
4678 * syms.c: Include "bfdlink.h".
4679 (struct stab_find_info): Define.
4680 (_bfd_stab_section_find_nearest_line): New function.
4681 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
4682 * libbfd.h: Rebuild.
4683 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
4684 * elf.c (_bfd_elf_find_nearest_line): Try calling
4685 _bfd_stab_section_find_nearest_line before searching the ELF
4686 symbol table. Find the closest STT_FUNC symbol, not the last one.
4687 * libcoff-in.h (coff_data_type): Add line_info field.
bdd2e7f1 4688 * libcoff.h: Rebuild.
86aac8ea
ILT
4689 * coffgen.c (coff_find_nearest_line): Try calling
4690 _bfd_stab_section_find_nearest_line before searching the COFF
4691 symbol table.
4692 * Makefile.in: Rebuild dependencies.
4693
4694Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4695
4696 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
4697 4 bytes, so we get the correct value when updating the register
4698 field in little endian mode.
4699
43d36aad
ILT
4700Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
4701
f0a97077
ILT
4702 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
4703 entry_section fields. Add sntoc and snentry fields.
4704 * libcoff.h: Rebuild.
4705 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
4706 not toc_section and entry_section (the COFF file does not have any
4707 sections at this point).
4708 (coff_write_object_contents): Set o_snentry and o_sntoc from
4709 snentry and sntoc rather than entry_section and toc_section.
4710 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
4711 snentry, not toc_section and entry_section.
4712 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
4713 entry_section from hentry.
4714 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
ea2504d5 4715 set snenty.
f0a97077
ILT
4716 (xcoff_link_input_bfd): Set sntoc, not toc_section.
4717 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
4718 than using toc_section directly.
4719
9b4598d0
ILT
4720 * archures.c: Add missing `.' in enum bfd_architecture.
4721 * bfd-in2.h: Rebuild.
4722
43d36aad
ILT
4723 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
4724 Robert Lipe <robertl@arnet.com>.
4725
eb82bc60
MM
4726Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4727
4728 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
4729 to sections we allocate. Use bfd_zalloc to allocate initialial
4730 sections, not bfd_alloc.
4731 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
4732 SDA{,2}I16 relocations.
4733 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
4734 whether to put something in .sbss or not.
4735 (ppc_elf_relocate_section): Add support for more relocations. Add
c1e65e24
MM
4736 in sec->output_offset where appropriate. Make error messages
4737 include the symbol name.
eb82bc60
MM
4738
4739 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
4740 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
4741 doesn't get redefined messages if -shared.
4742
4743 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
4744 section if the rel_section field has been set up.
4745
9d621c7d
MM
4746Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4747
4748 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
4749 relocations.
4750
75c9ddc9
DE
4751Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
4752
4753 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
4754 of flags, only flags used are controlled by mach number. Bump up
4755 output file mach number to highest of input file mach numbers.
4756 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
4757 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
4758
72c513bc
DE
4759 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
4760 bfd_elf64_sparc_vec support.
4761
3cbe19d2
MM
4762Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4763
4764 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
4765 the embedded bit is set on some objects and not on others. Just
4766 or it together.
d8fd85ad
MM
4767 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
4768 relocations.
3cbe19d2 4769
5eb83ede
ILT
4770Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
4771
4a3d3b42
ILT
4772 * coffcode.h (coff_new_section_hook): Don't try to align the
4773 .stabstr section.
4774
5eb83ede
ILT
4775 * coffcode.h (coff_set_section_contents): Fix the handling of the
4776 .lib section to work even if the entire section contents are
4777 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
4778 Robert Lipe <robertl@arnet.com>.
4779
05f927dd
MM
4780Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4781
4782 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
4783 memory here for contents.
4784
4785 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
4786 _SDA2_BASE_ by 32768.
4787 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
4788 started using. Allocate contents for .sdata and .sdata2 sections
4789 also.
4790 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
4791 rather than _name.
4792 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
4793 size _SDA{,2}_BASE_.
4794 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
4795 done.
4796
5bc513b4
DE
4797Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
4798
5a5bac64
DE
4799 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
4800
5bc513b4 4801 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
5bc513b4 4802 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
5bc513b4 4803 (bfd_mach_sparc_v9a): Define.
049f3d4c 4804 (bfd_mach_sparc_v9_p): Define.
5bc513b4
DE
4805 * bfd-in2.h: Regenerated.
4806 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
4807 bfd_mach_sparc_v9.
d3366d23 4808 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
5bc513b4
DE
4809 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
4810 to bfd_elf32_sparc_vec.
4811 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
5bc513b4 4812 Add v8plus{,a} support.
5bc513b4 4813 Add v9a support.
768b8ade 4814 (sparc_compatible): New function.
5bc513b4 4815 * elf32-sparc.h: #include "elf/sparc.h".
75c9ddc9 4816 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
5bc513b4 4817 elf32_sparc_final_write_processing): New functions.
75c9ddc9 4818 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
5bc513b4 4819 elf_backend_final_write_processing): Define.
5bc513b4 4820
3b3753b8
MM
4821Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4822
4823 * elf-bfd.h (struct elf_link_hash_entry): Add
4824 linker_section_pointer field.
4825 (enum elf_linker_section_enum): Enumeration for new way of
4826 creating linker dynamic sections and symbols.
4827 (elf_linker_section{,_pointers}): New structures for creating
4828 dynamic sections and symbols.
4829 (elf_obj_tdata): Add linker_section_pointers and linker_section
4830 fields.
4831 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
4832 (_bfd_elf_create_linker_section): New declarations.
4833 (_bfd_elf_find_pointer_linker_section): Ditto.
4834 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
4835 (_bfd_elf_make_linker_section_rela): Ditto.
4836
4837 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
4838
4839 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
4840 (ppc_elf_create_linker_section): New function to create the
4841 sections .got, .sdata, and .sdata2.
4842 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
4843 needed.
4844 (ppc_elf_check_relocs): Support more of the eabi relocations.
4845 (ppc_elf_relocate_section): Ditto.
4846 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
4847 if the .sdata{,2} + .sbss{,2} section size is > 32k.
4848
4849 * elflink.h (elf_create_pointer_linker_section): New function to
4850 create initialized pointers in dynamic linker sections.
4851 (elf_finish_pointer_linker_section): Actually intialize the
4852 pointers created above.
4853
4854 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
4855 macros to provide both 32 and 64 bit versions of
4856 elf_create_pointer_linker_section.
4857 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
4858 provide both 32 and 64 bit versions of
4859 elf_finish_pointer_linker_section.
4860
4861 * elflink.c (_bfd_elf_create_linker_section): New function to
4862 create a linker section.
4863 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
4864 given address in the linker pointer offsets created for a given
4865 symbol.
4866 (_bfd_elf_make_linker_section_rela): Make a RELA section
4867 corresponding to the generated linker section.
4868
6b3eb07e
DE
4869Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
4870
4871 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
4872
e7894f6b
KK
4873Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
4874
4875 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
4876 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
4877 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
4878 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
4879 toc entry in an objdump) for now.
4880 (ppc_do_last, ppc_get_last): New function - needed to save processing
4881 the toc owner to the end.
4882 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
4883 toc owner last.
4884
4885 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
4886 toc owner from being done till last. Must define POWERPC_LE_PC
4887 to enable it.
4888
4889 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
4890
4891 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
4892 to INFO.
4893 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
4894 SizeOfImage for PowerPC. Ignore the size of the .junk section.
4895
80b99ca0
ILT
4896Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
4897
4898 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
4899
df96df4c
ILT
4900Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
4901
4902 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
4903 back to first.
4904 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
4905
d49ddb85
ILT
4906Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
4907
4908 * elf.c (assign_file_positions_for_segments): Don't increment file
4909 offset for a segment which contains no loadable sections.
4910
4500a112
MM
4911Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4912
4913 * reloc.c: Add new PowerPC relocations.
4914 * {bfd-in2,libbfd}.h: Regenerate.
4915
4916 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
4917 (ppc_elf_reloc_type_lookup): Lookup new relocations.
4918
252239f8
ILT
4919Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
4920
20ab764e
ILT
4921 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
4922 entries.
4923
0a4ffa2d
ILT
4924 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
4925 info->shared.
4926
45ca3195
ILT
4927 * coffgen.c (coff_find_nearest_line): Don't try to cache
4928 information in sections that are not owned by a BFD. From Richard
4929 Henderson <richard@atheist.tamu.edu>.
4930
252239f8
ILT
4931 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
4932 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
4933 * elflink.h (elf_link_output_extsym): Remove special check for
4934 _rld_new_interface.
4935
4936 * ecoffswap.h: Add prototypes for static functions.
4937
bd2d10c0
MM
4938Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4939
4940 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
4941 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
4942 references.
4943 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
4944 to satisfy a TOC16 relocation. Rewrite unsupported relocation
4945 support. Begin support for R_PPC_SDA{2,}REL.
4946
1c3a295b
MM
4947Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4948
4949 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
4950 create the .got and .got.neg sections.
4951 (ppc_elf_size_dynamic_sections): Call it.
4952 (ppc_elf_check_relocs): Call it.
4953 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
4954 (ppc_elf_check_relocs): Add error messages for relocations we
4955 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
4956 relocation.
4957
57081126
MM
4958Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4959
4960 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
4961 section flags for V.4 and eabi.
4962
3c38b3df
ILT
4963Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
4964
14899eb7
ILT
4965 * elf.c (assign_file_positions_for_segments): If a segment
4966 contains no sections, don't mark it as readable.
4967
98bb57ad
ILT
4968 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
4969 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
4970
02fcd126
ILT
4971 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
4972 dynamic section, if there is one.
4973 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
4974 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
4975 (bfd_elf64_swap_dyn_in): Likewise.
4976 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
4977 PTR.
4978 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
4979
3c38b3df
ILT
4980 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
4981 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
4982 <pirker@eiunix.tuwien.ac.at>.
4983
83f4323e
MM
4984Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4985
4986 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
4987 PowerPC V.4 and eabi.
4988 * bfd-in2.h: Regenerate.
4989 * libfd.h: Regenerate.
4990
4991 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
4992
4993 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
4994 section type and SHF_EXCLUDE section flag, turning them into the
4995 appropriate bfd section flag.
4996
a0271667
ILT
4997Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
4998
c9746fb6
ILT
4999 * xcofflink.c (xcoff_link_add_symbols): Create the special
5000 sections if we see a DYNAMIC object, in case that is the only
5001 XCOFF input object we see.
5002
5b3b9ff6
ILT
5003 * elf32-mips.c: Extensive changes for a start at dynamic linking
5004 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
5005
5006 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
5007 (struct elf_backend_data): Remove
5008 elf_backend_create_program_headers field. Add
5009 elf_backend_additional_program_headers and
5010 elf_backend_modify_segment_map fields.
5011 * elfxx-target.h (elf_backend_type_change_ok): Define if not
5012 defined.
5013 (elf_backend_additional_program_headers): Likewise.
5014 (elf_backend_modify_segment_map): Likewise.
5015 (elf_backend_create_program_headers): Don't define.
5016 (elfNN_bed): Change to account for field changes.
5017 * elf.c (assign_file_positions_for_segments): Call new
5018 modify_segment_map backend function. Don't call old
5019 create_program_headers backend function.
5020 (get_program_header_size): Call additional_program_headers rather
5021 than create_program_headers.
5022 * elflink.h (elf_link_add_object_symbols): Initialize
5023 type_change_ok from new backend field.
5024 (elf_link_output_extsym): Don't warn if _rld_new_interface is
5025 defined.
5026 (elf_reloc_link_order): Treat a reloc against a defined symbol as
5027 a reloc against the appropriate section.
5028
761f377f
ILT
5029 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
5030 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
5031 (elf_flags_init): Rename from elf_ppc_flags_init.
5032 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
5033 elf_ppc_flags_init.
5034 (ppc_elf_copy_private_bfd_data): Likewise.
5035 (ppc_elf_merge_private_bfd_data): Likewise.
5036
a0271667
ILT
5037 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
5038 relocation entries.
5039
64d5f5d0
ILT
5040Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
5041
5042 * coff-alpha.c (alpha_relocate_section): During final link, allow
5043 output .lita section to be bigger than 64k by adjusting gp value
5044 on a per-input section basis.
5045 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
5046 field.
5047 (struct ecoff_section_tdata): Add gp field.
5048
c40d9c77
ILT
5049Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
5050
64d5f5d0
ILT
5051 Handle Alpha ECOFF changes in OSF/1 3.2.
5052 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
5053 field.
5054 * coff-alpha.c: Include "aout/ar.h".
5055 (alpha_ecoff_get_relocated_section_contents): Don't require an
5056 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
5057 3.2 doesn't generate one.
5058 (alpha_relocate_section): Likewise.
5059 (alpha_ecoff_slurp_armap): Define.
5060 (alpha_ecoff_slurp_extended_name_table): Define.
5061 (alpha_ecoff_construct_extended_name_table): Define.
5062 (alpha_ecoff_truncate_arname): Define.
5063 (alpha_ecoff_write_armap): Define.
5064 (alpha_ecoff_generic_stat_arch_elt): Define.
5065 (alpha_ecoff_update_armap_timestamp): Define.
5066 (ARFZMAG): Define.
5067 (alpha_ecoff_read_ar_hdr): New static function.
5068 (alpha_ecoff_get_elt_at_filepos): New static function.
5069 (alpha_ecoff_openr_next_archived_file): New static function.
5070 (alpha_ecoff_get_elt_at_index): New static function.
5071 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
5072 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
5073 _bfd_ecoff to alpha_ecoff.
5074 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
5075 field from backend structure, rather than always calling
5076 _bfd_get_elt_at_filepos.
5077 * coff-mips.c (mips_ecoff_backend_data): Initialize
5078 get_elt_at_filepos field.
5079 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
5080 from _bfd_generic_read_ar_hdr with minor changes.
5081 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
5082 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
5083 * libbfd.h: Rebuild.
5084
5085 * bfd-in.h (BFD_IN_MEMORY): Define.
5086 * libbfd-in.h (struct bfd_in_memory): Define.
5087 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
5088 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
5089 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
5090 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
5091 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
5092 (bfd_get_size): Handle BFD_IN_MEMORY flag.
5093 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
5094 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
5095 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
5096 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
5097 iostream.
5098 (bfd_openstreamr): Likewise.
5099 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
5100 BFD_IN_MEMORY is not set.
5101 * riscix.c (riscix_some_aout_object_p): Likewise.
5102 * bfd-in2.h, libbfd.h: Rebuild.
5103
5104 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
5105 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
5106 (bfd_get_elt_at_index): Define.
5107 * archive.c (_bfd_generic_get_elt_at_index): Rename from
5108 bfd_get_elt_at_index. Change index parameter from int to
5109 symindex.
5110 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
5111 (_bfd_noarchive_get_elt_at_index): Define.
5112 (_bfd_archive_bsd_get_elt_at_index): Define.
5113 (_bfd_archive_coff_get_elt_at_index): Define.
5114 * bfd-in2.h, libbfd.h: Rebuild.
5115 * aout-target.h (MY_get_elt_at_index): Define if not defined.
5116 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
5117 * ieee.c (ieee_get_elt_at_index): Define.
5118 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
5119 * oasys.c (oasys_get_elt_at_index): Define.
5120 * som.c (som_get_elt_at_index): Define.
5121
c40d9c77
ILT
5122 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
5123 numbers to the .text section.
5124
efa77952
ILT
5125Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
5126
5127 * ieee.c (ieee_write_debug_part): Change return type to boolean.
5128 If there is a SEC_DEBUGGING section, get the contents of the debug
5129 information part from it.
5130 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
5131 section in memory.
5132 (ieee_write_object_contents): Check ieee_write_debug_part return.
5133
767f22d5
FF
5134Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
5135
5136 * config.bfd (i[345]86-*-freebsd*): Add target.
5137 * configure.in (i386freebsd_vec): Add vec.
5138 * configure: Regenerate.
5139 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
5140 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
5141 Rebuild dependencies..
5142 * freebsd.h: New file.
5143 * i386freebsd.c: New file.
5144 * targets.c (i386freebsd_vec): Declare.
5145 (bfd_target_vector): Add i386freebsd_vec.
5146 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
5147 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
5148
f8254a3c
ILT
5149Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
5150
5151 * ieee.c (ieee_slurp_debug): New static function.
5152 (ieee_object_p): Call it.
5153 (ieee_slurp_section_data): Skip debugging sections.
5154 (ieee_get_reloc_upper_bound): Likewise.
5155 (ieee_get_section_contents): Likewise.
5156 (ieee_canonicalize_reloc): Likewise.
5157 (ieee_write_section_part): Likewise.
5158 (ieee_write_debug_part): Likewise.
5159 (ieee_write_data_part): Likewise.
5160 (init_for_output): Likewise.
5161
07a159db
MM
5162Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
5163
5164 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
5165 work.
5166 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
5167 relocs, since ppc_elf_relocate_section handles the linker case.
5168 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
5169 used.
5170 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
5171 ppc_elf_relocate_section since that is now the only caller.
5172 (ppc_elf_relocate_section): Ditto.
5173
d812945a
ILT
5174Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
5175
5176 * coffcode.h (coff_write_object_contents): If we don't know the
5177 section of the entry point for an XCOFF executable, always set the
5178 entry address to -1.
5179
3a56d0b4
MM
5180Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5181
5182 * elf.c (bfd_section_from_shdr): Add support for note sections.
5183
c4406e50
ILT
5184Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
5185
d812945a
ILT
5186 * bfd-in.h (struct _symbol_info): Add stab_type field.
5187 * bfd-in2.h: Rebuild.
5188 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
5189
c4406e50
ILT
5190 * elf32-ppc.c: Remove trailing newline from calls to
5191 _bfd_error_handler.
5192 (ppc_elf_merge_private_bfd_data): Only warn about endianness
5193 difference if target endianness is known.
5194
08556813
MM
5195Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
5196
5197 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
5198 old style TOC16 references without using R_PPC_GOT.
5199 (ppc_reloc_type): Ditto.
5200 (ppc_elf_reloc_type_lookup): Add support for TOC16.
5201 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
5202 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
5203 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
5204 (ppc_elf_check_relocs): New function for GOT/PLT support that is
5205 work in progress.
5206 (ppc_elf_adjust_dynamic_symbol): Ditto.
5207 (ppc_elf_adjust_dynindx): Ditto.
5208 (ppc_elf_size_dynamic_sections): Ditto.
5209 (ppc_elf_finish_dynamic_symbol): Ditto.
5210 (ppc_elf_finish_dynamic_sections): Ditto.
5211 (ELF_DYNAMIC_INTERPRETER): Define.
5212
86587dd4
KR
5213Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
5214
5215 * elf.c (copy_private_bfd_data): When attaching sections to
5216 segments ignore sections that won't be allocated. Patch from
5217 Andreas Schwab.
5218
bf7f243f
KR
5219Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
5220
5221 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
5222 anything else.
5223
d9518e2e
ILT
5224Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
5225
5226 * coff-i960.c (CALC_ADDEND): Define.
5227 (coff_i960_relocate_section): Add the input section VMA to the
5228 addend for PC relative relocs.
5229
5230Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
5231
5232 * peicode.h (pe_print_pdata): Must test the entire entry for zero
5233 to correctly terminate.
5234
010a405a
ILT
5235Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
5236
dc092b6b
ILT
5237 * targets.c (enum bfd_endian): Define.
5238 (bfd_target): Rename byteorder_big_p to byteorder, and change it
5239 from boolean to enum bfd_endian. Change header_byteorder_big_p
5240 correspondingly.
5241 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
5242 (bfd_header_big_endian, bfd_header_little_endian): New macros.
5243 * bfd-in2.h: Rebuild.
5244 * All targets: Change initialization of byteorder and
5245 header_byteorder to use enum bfd_endian values rather than
5246 booleans.
5247 * All files: Change all references to byteorder_big_p and
5248 header_byteorder_big_p to use new bfd_*_endian macros.
5249
010a405a
ILT
5250 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
5251 s_vaddr.
5252 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
5253 vma.
5254 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
5255
fcb43906
SC
5256Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
5257
5258 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
5259
0d709d31
ILT
5260Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
5261
14578105
ILT
5262 * ieee.c: Lots of minor cleanups. Make many functions return
5263 errors rather than calling abort. Also:
5264 (ieee_write_twobyte): Remove; change callers to call existing
5265 ieee_write_2bytes function.
5266 (ieee_write_expression): Don't output the section twice when
5267 outputting a local symbol. Don't emit an extraneous zero if there
5268 is only one term.
5269 (ieee_slurp_sections): Set the lma as well as the vma.
5270 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
5271
0d709d31
ILT
5272 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
5273 a recognized one or bfd_arch_unknown.
5274 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
5275 to succeed.
5276 (ihex_get_symtab): Likewise.
5277
14dc2f77
ILT
5278Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
5279
5280 * aoutx.h: Include <ctype.h>.
5281 (struct aout_link_includes_table): Define.
5282 (struct aout_link_includes_totals): Define.
5283 (struct aout_link_includes_entry): Define.
5284 (aout_link_includes_lookup): Define macro.
5285 (struct aout_final_link_info): Add includes field.
5286 (aout_link_includes_newfunc): New static function.
5287 (NAME(aout,final_link)): Initialize includes hash table.
5288 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
5289
480ccad5
SS
5290Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
5291
5292 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
5293
3920d9c9
KK
5294Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
5295
5296 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
5297
207345f2
KK
5298Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
5299
5300 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
5301 (pe_print_private_bfd_data): call pe_print_reloc.
5302 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
5303 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
5304 up some debugging as well.
5305
273c019e
ILT
5306Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
5307
5308 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
5309 <rfg@monkeys.com>.
5310
010d9f2d
ILT
5311Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
5312
5313 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
5314 when setting sections to NULL.
5315
4a4a66bd
ILT
5316Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
5317
5318 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
5319 field.
5320 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
5321 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
5322 for all symbols.
5323 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
5324 * bfd-in2.h: Rebuild.
5325
545bf026
KK
5326Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
5327
5328 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
5329
1f4ae0d6
ILT
5330Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
5331
55cac920
ILT
5332 * ihex.c (ihex_scan): Handle record types 4 and 5.
5333 (ihex_object_p): Permit types 4 and 5.
5334 (ihex_set_section_contents): Remove check for out of range
5335 addresses.
5336 (ihex_write_object_contents): Generate types 4 and 5.
5337
1f4ae0d6
ILT
5338 * elflink.h (elf_link_output_extsym): Just ignore warning and
5339 indirect references to symbols which don't really exist.
5340
53d45489
KK
5341Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
5342
5343 * peicode.h (pe_print_idata): Minor format fixes
5344 (pe_print_edata): New function. Under private printing, this formats
5345 the edata section of a PE file.
5346 (pe_print_private_bfd_data): Added call to pe_print_edata.
5347
361e8876
DE
5348Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
5349
5350 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
5351 index, don't call stoi.
5352
58142f10
ILT
5353Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
5354
ffd15489
ILT
5355 * srec.c (srec_scan): Set lma as well as vma.
5356
5357 * ihex.c: New file; support for Intel Hex format.
5358 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
5359 (ihex_vec): Declare.
5360 (bfd_target_vector): Always include ihex_vec.
5361 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
5362 * Makefile.in: Rebuild dependencies.
5363 (BFD_LIBS): Add ihex.o
5364 (BFD_LIBS_CFILES): Add ihex.c.
5365 * bfd-in2.h: Rebuild.
5366
ae0a6bea
ILT
5367 * elf.c (assign_file_positions_for_segments): Sort the sections in
5368 each segment.
5369 (get_program_header_size): Return the right size if segment_map is
5370 not NULL.
5371 (copy_private_bfd_data): Don't bother to sort the sections.
5372
5373 * bfd.c (bfd_record_phdr): New function.
5374 * bfd-in.h (bfd_record_phdr): Declare.
5375 * bfd_in2.h: Rebuild.
5376
ce0ee4bf
ILT
5377 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
5378 BFD_ASSERT.
5379
58142f10
ILT
5380 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
5381 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
5382 bfd_size_type.
5383 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
5384 (bfd_zmalloc): Change declaration.
5385 * libbfd.h: Rebuild.
5386 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
5387 and realloc. Don't set bfd_error_no_memory if they fail.
5388
59066248
KK
5389Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
5390
5391 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
5392 uses as well. Added a new howto to deal with TOCREL16 relocs that
5393 are TOCDEFN as well.
5394 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
5395 to handle RVA relocs from dlltool.
5396 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
5397 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
5398 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
5399
5400 * coffcode.h (coff_set_alignment_hook): check idata$X sections
5401 to get the right section alignment.
5402
6933148a
ILT
5403Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
5404
5405 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
5406 p_paddr if p_paddr is zero.
5407 (make_mapping): Set includes_filehdr and includes_phdrs for first
5408 PT_LOAD segment.
5409 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
5410 segment.
5411 (assign_file_positions_for_segments): Handle includes_filehdr and
5412 includes_phdrs. Remove special handling of PT_PHDR and first
5413 PT_LOAD segments.
5414 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
5415 when appropriate. Remove special handling of PT_PHDR segment.
5416 Use a more complex condition for when a section is included in a
5417 segment to handle Solaris linker oddities.
5418
f62fed1c
ILT
5419Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
5420
5421 * coff-m88k.c (howto_table): Reformatted for easier reading;
5422 special_function now points to new function m88k_special_reloc.
5423 (howto_hvrt16): Function previously used for handling HVRT16 relocs
5424 removed.
5425 (rtype2howto): Do not add reloc's r_offset to the addend, this will
5426 be done correctly by m88k_special_reloc.
5427 (reloc_processing): New function to be used by RELOC_PROCESSING.
5428 (RELOC_PROCESSING): Define to call reloc_processing.
5429
64ecde46
ILT
5430Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
5431
b00c57ec
ILT
5432 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
5433 (pe_print_pdata): Likewise.
5434
a9713b91
ILT
5435 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
5436 obstack_alloc fails.
5437 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
5438 fails.
5439 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
5440 * Many files: don't set bfd_error_no_memory if one of the above
5441 routines fails.
5442
3dbf33ee
ILT
5443 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
5444 if p_paddr_valid is set.
5445 (copy_private_bfd_data): New static function.
5446 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
5447
44ef8897
ILT
5448 * elf.c (assign_file_positions_for_segments): Fix case where extra
5449 program headers were allocated.
5450
27fb8f29
ILT
5451 * elf.c (_bfd_elf_print_private_bfd_data): New function.
5452 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
5453 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
5454 _bfd_elf_print_private_bfd_data.
5455
64ecde46
ILT
5456 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
5457 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
5458 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
5459 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
5460 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
5461 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
5462 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
5463
fd0198f0
ILT
5464Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
5465
5466 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
5467 * elf.c (make_mapping): New static function.
5468 (map_sections_to_segments): New static function.
5469 (elf_sort_sections): New static function.
5470 (assign_file_positions_for_segments): New static function.
5471 (map_program_segments): Remove.
5472 (get_program_header_size): Remove sorted_hdrs, count, and
5473 maxpagesize parameters. Simplify.
5474 (assign_file_positions_except_relocs): When generating an
5475 executable, use assign_file_positions_for_segments.
5476 (elf_sort_hdrs): Remove.
5477 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
5478 to get_program_header_size.
5479
3b3f7625
ILT
5480Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
5481
1ff0461b
ILT
5482 * hp300hpux.c (MY(callback)): Set lma as well as vma.
5483
80c8485c
ILT
5484 * configure, config.in: Regenerate with autoconf 2.7.
5485
3b3f7625
ILT
5486 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
5487 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
5488
fa63d1ef
ILT
5489Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
5490
a877f591
ILT
5491 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
5492 (ecoff_sec_to_styp_flags): Likewise.
5493 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
5494 (ecoff_set_symbol_info): Handle scRConst.
5495 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
5496 (ecoff_compute_section_file_positions): Handle .rconst section.
5497 (_bfd_ecoff_write_object_contents): Likewise.
5498 (ecoff_link_check_archive_element): Handle scRConst.
5499 (ecoff_link_add_externals): Likewise.
5500 (ecoff_link_write_external): Handle .rconst section.
5501 (ecoff_reloc_link_order): Likewise.
5502 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
5503 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
5504 section.
5505 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
5506
fa63d1ef
ILT
5507 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
5508 DEF_DYNAMIC flag is set.
5509
25bada65
KR
5510Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
5511
5512 * host-aout.c: If TRAD_HEADER is defined, include it.
5513
7938b4cb
ILT
5514Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
5515
85e493f0
ILT
5516 * aclocal.m4 (AC_PROG_CC): Remove local definition.
5517 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
5518 (BFD_NEED_DECLARATION): New function.
5519 * configure.in: Use BFD_NEED_DECLARATION.
bd77213b
ILT
5520 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
5521 * configure, config.in: Rebuild with autoconf 2.6.
85e493f0 5522
83dcdc61
ILT
5523 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
5524 special_sections before returning when called with a non XCOFF
5525 BFD.
5526
7938b4cb
ILT
5527 * coffgen.c (coff_renumber_symbols): Sort common symbols with
5528 global symbols.
5529
5530 * coffcode.h (coff_compute_section_file_positions): Only pad the
5531 previous section to force file alignment when creating an
5532 executable.
5533
b5403ad7
ILT
5534Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
5535
a418e05d
ILT
5536 * coffcode.h (coff_compute_section_file_positions): If
5537 RS6000COFF_C, set up the .debug section.
5538
b5403ad7
ILT
5539 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
5540 if it is not large enough to accomodate the entire TOC area with
5541 signed 16 bit offsets.
5542 (xcoff_write_global_symbol): Handle negative TOC offsets in global
5543 linkage code.
5544 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
5545 TOC anchor to use the TOC value used in the output file.
5546
90a7abbc
ILT
5547Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
5548
5549 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
5550 (_bfd_coff_read_string_table): Likewise.
5551
177b1932
DE
5552Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
5553
5554 * pe-arm.c: Fix typos.
5555 * coff-arm.c: Likewise.
5556
5557Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
5558
5559 * coff-ppc.c (list_ele): Added "cat"egory member.
5560 (record_toc): New category parameter (priv or pub).
5561 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
5562 (ppc_process_before_allocation): Removed embrionic data-in-toc from
5563 the mainline. It addes extra toc cells in error.
5564 (ppc_coff_swap_sym_in_hook): Added some documentation.
5565 (dump_toc): Can now diagnose "virtual toc" chicanery.
5566
e34314c4
ILT
5567Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
5568
5569 * elf-bfd.h (struct elf_link_hash_table): Change type of
5570 dynsymcount and bucketcount fields from size_t to bfd_size_type.
5571
73a68447
ILT
5572Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
5573
535e9e29
ILT
5574 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
5575 pointerize C_LEAFSTAT or C_LEAFEXT entries.
5576
73a68447
ILT
5577 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
5578 DT_INIT and DT_FINI entries if the _init or _fini symbol is
5579 defined or mentioned in a regular file.
5580
cd2b2402
KK
5581Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
5582
5583 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
5584 (coff_ppc_relocate_section): Handle TOCDEFN attribute
5585 (coff_ppc_relocate_section): Correct REL24 handling
5586 (ppc_process_before_allocation): Correct TOCDEFN handling
5587
5588 * peicode.h (dir_names): Added name descriptions
5589
b218076e
KR
5590Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
5591
5592 * VERSION: Updated to cygnus-2.6.
5593
5594Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
5595
5596 * targets.c (m68k4knetbsd_vec): Declare.
5597
e9f30616
ILT
5598Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
5599
5600 * targets.c (bfd_target): Change type of second argument to
5601 _bfd_print_private_bfd_data from void * to PTR.
5602 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
5603 using PTR rather than void *.
5604 * bfd-in2, libbfd.h: Rebuild.
5605 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
5606 to PTR.
5607 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
5608 _bfd_generic_bfd_print_private_bfd_data rather than casting
5609 bfd_true.
5610
ae75c4a4
KR
5611Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
5612
5613 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
5614 "DO NOT DELETE" lines or blank lines that mkdep writes on some
5615 systems.
5616 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
5617 BFD64_BACKENDS_CFILES): New variables.
5618 (CFILES): Use them.
5619
bebcd3db
ILT
5620Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
5621
4b71e164
ILT
5622 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
5623 not at the file position of the first section.
5624 * coffcode.h (coff_compute_section_file_positions): Avoid using
5625 unportable #elif.
5626 (coff_write_object_contents): When generating a PPC PE executable
5627 with no symbols, round up the file size to a COFF_PAGE_SIZE
5628 boundary.
5629 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
5630 don't write out a string table.
5631
631b10f4
ILT
5632 * elf.c (bfd_section_from_shdr): When using a different section
5633 header, pass the new one to _bfd_elf_make_section_from_shdr.
5634 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
5635 (elf_map_symbols): Add section VMA to symbol value when comparing
5636 against 0.
5637 (_bfd_elf_compute_section_file_positions): Only build symbol table
5638 if there are some symbols. Set file offset of symtab and strtab
5639 sections.
5640 (assign_file_positions_except_relocs): Remove dosyms parameter.
5641 Change all callers. Never set file offset of symtab and strtab
5642 sections.
5643 (_bfd_elf_copy_private_section_data): New function.
5644 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
5645 (_bfd_elf_copy_private_symbol_data): New function.
5646 (swap_out_syms): Check for special mapping of st_shndx created by
5647 copy_private_symbol_data.
5648 * elfxx-target.h: Use new copy routines.
5649 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
5650 (_bfd_elf_copy_private_section_data): Declare.
5651
5652 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
5653
5654 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
5655 C_NT_WEAK.
5656
bebcd3db
ILT
5657 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
5658 _bfd_dummy_target, matching the recent change to archive
5659 recognition.
5660
7ad4ba81
ILT
5661Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
5662
afa67334
ILT
5663 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
5664 arithmetic on PTR types.
5665
f2bd8915
ILT
5666 * aout-target.h (MY(callback)): Set the lma of the sections.
5667
7ad4ba81
ILT
5668 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
5669 symbol into a reloc against the section.
5670
93b6a3f8
KK
5671Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
5672
5673 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
5674 glue for the relocs: IMGLUE and IFGLUE.
5675 (record_toc): new function - tracks toc contents
5676 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
5677 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
5678 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
5679 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
125d37c4 5680 (ppc_record_toc_entry): Removed a debug define (duh)
93b6a3f8
KK
5681
5682 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
5683 (pe_print_idata): New function - formats the idata section data
5684 (pe_print_pdata): New function - formats the pdata section data
5685 (pe_print_private_bfd_data): calls to above
5686
c769947b
SS
5687Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
5688
5689 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
5690 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
5691 TARGET_SYM and TARGET_NAME for vector and BFD name.
5692 * coff-pmac.c (pmac_xcoff_vec): Remove.
5693 (TARGET_SYM, TARGET_NAME): Define.
5694 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
5695 machine to 0, not all PowerMacs are 601s.
5696
5697Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
5698
5699 * elfcode.h (elf_object_p): Read in any program headers.
5700 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
5701 based on the program headers, if any.
5702 (elf_fake_sections): Set sh_addr from the vma, not the lma.
5703 (map_program_segments): Set p_paddr of program headers based on
5704 the lma.
5705
ee174815
ILT
5706Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
5707
839087b7
ILT
5708 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
5709 failure.
5710
922530a6
ILT
5711 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
5712 trying to do a relocateable link with a non-a.out object file.
5713
5714 * archive.c (bfd_generic_archive_p): Check the first object file
5715 in an archive even if target_defaulted is set. If the object file
5716 has the wrong xvec, reject it.
5717
a1774c51
ILT
5718 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
5719 be represented, report the name via _bfd_error_handler.
5720 (translate_to_native_sym_flags): Likewise.
5721 * elf32-mips.c (mips_elf_final_link): Likewise.
5722 * oasys.c (oasys_write_sections): Likewise.
5723
4a378b13
ILT
5724 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
5725 which checks for STYP_OVRFLO sections.
5726 (coff_compute_section_file_positions): If RS6000COFF_C, handle
5727 reloc and lineno count overflows.
5728 (coff_write_object_contents): Call coff_count_linenumbers before
5729 coff_compute_section_file_positions. If RS6000COFF_C, handle
5730 reloc and lineno count overflows.
5731 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
5732 relocs before dealing with .pad sections. Count overflow section
5733 headers when handling .pad sections.
5734
7906bf87
ILT
5735 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
5736 if RS6000COFF_C.
5737
ee174815
ILT
5738 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
5739 (struct xcoff_link_hash_table): Add descriptor_section and
5740 special_sections fields.
5741 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
5742 (xcoff_link_add_symbols): Set linkage section alignment. Create
5743 descriptor section. Check for magic symbol names (_text, etc.),
5744 and record them in special_sections if found. Set
5745 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
5746 descriptor field to point back to the function code symbol.
5747 (xcoff_sweep): Always mark the special descriptor_section.
5748 (bfd_xcoff_export_symbol): Check whether the symbol might be a
5749 function descriptor, and mark it if it is.
5750 (bfd_xcoff_size_dynamic_sections): Add new special_sections
5751 parameter, and fill it in. Allocate space for the descriptor
5752 section.
5753 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
5754 global linkage code. If an undefined function descriptor is
5755 exported, arrange to define it. Warn about any other undefined
5756 exported symbol.
5757 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
5758 (xcoff_write_global_symbol): Create a function descriptor when
5759 necessary.
5760 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
5761 * bfd-in2.h: Rebuild.
5762
0e829f18
KK
5763Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
5764
5765 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
5766 (ppc_coff_link_hash_table): new types for hashing
5767 (ppc_coff_link_hash_newfunc): hash entry constructor
5768 (ppc_coff_link_hash_table_init): hash table initializer
5769 (ppc_coff_link_hash_table_create): hash table constructor
5770 (ppc_record_toc_entry): changed references to hash table
5771 (coff_ppc_relocate_section): changed references to hash table
5772
5773 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
5774 * libcoff.h: Rebuild
5775
5776 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
5777 (coff_link_add_symbols): removed toc_offset init
5778
7ac84736
KR
5779Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
5780
b27cc4bc
KR
5781 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
5782 first.
5783
7ac84736
KR
5784 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
5785 if it is given and mmep is available.
5786 * acconfig.h: Undef USE_MMAP.
5787 * configure, config.in: Regenerated.
5788 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
5789 table handling the old way.
5790 (aout_get_external_symbols): Don't complain if last byte of string
5791 table is nonzero.
5792 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
5793 (bfd_free_window) [! USE_MMAP]: Don't define.
5794 (bfd_get_file_window,
5795 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
5796
1b3b0c03
ILT
5797Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
5798
5799 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
5800 0xffff0000.
5801
092abcdf
ILT
5802Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
5803
33698029
ILT
5804 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
5805 compatible with AMD generated COFF files. Try to support both AMD
5806 and GNU formats simultaneously.
5807 (coff_a29k_relocate_section): Likewise.
5808
0bb8ff19
ILT
5809 * libbfd.c (bfd_get_file_window): Change writable parameter from
5810 int to boolean; update all callers. Pass MAP_SHARED if not
5811 writable--it's required on Solaris. Cast fprintf argument to
5812 avoid warning.
5813 * bfd-in.h (bfd_get_file_window): Update declaration.
5814 * bfd-in2.h: Rebuild.
5815 * aoutx.h: Update calls to bfd_get_file_window.
5816
0634a431
ILT
5817 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
5818 Change all uses.
5819 (xcoff_swap_ldhdr_in): New static function.
5820 (xcoff_swap_ldsym_in): New static function.
7812bf9c 5821 (xcoff_find_reloc): Handle the case of a single reloc correctly.
0634a431
ILT
5822 (xcoff_link_add_symbols): If we just created a descriptor, pass it
5823 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
417acf22 5824 Handle XTY_ER/XMC_XO symbols correctly.
0634a431
ILT
5825 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
5826 rather than normal symbol table.
417acf22
ILT
5827 (bfd_xcoff_import_symbol): It's not an error if the symbol is
5828 already defined with the same absolute value.
0634a431
ILT
5829 (xcoff_mark): When considering called symbols, check whether the
5830 descriptor is from a dynamic object, rather than the symbol
5831 itself.
5832 (xcoff_build_ldsyms): Likewise.
5833
092abcdf
ILT
5834 * libbfd.c (bfd_get_file_window): Change return type to boolean.
5835 Cast realloc and malloc return values. If malloc or realloc fail,
5836 set bfd_error_no_memory.
5837 * bfd-in.h (bfd_get_file_window): Change type to boolean.
5838 * bfd-in2.h: Rebuild.
5839
d6f41a7d
KK
5840Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
5841
5842 * coff-ppc.c (ppc_record_toc_entry): new function.
5843 (in_reloc_p): changed return value.
5844 (coff_ppc_relocate_section): much rework.
5845 (ppc_allocate_toc_section): new function.
5846 (ppc_process_before_allocation): new function.
5847 (ppc_coff_swap_sym_in_hook): new function.
5848
5849 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
5850 (coff_link_add_symbols): initialize toc_offset.
5851
5852 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
5853 (coff_swap_aouthdr_out): Added more sections to the data
5854 dictionary for the pe file header. Also changed linker version
5855 number on the ppc side.
5856 (dir_names): small improvements to the dictionary printing.
5857 (pe_mkobject_hook): save the file level flags.
5858
5859 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
5860 (pe_tdata): added real_flags field
5861 (coff_tdata): added local_toc_sym_map and access macro
5862
5863 * libcoff.h (coff_link_hash_entry): added toc_offset field
5864 (pe_tdata): added real_flags field
5865 (coff_tdata): added local_toc_sym_map and access macro
5866
5867 * coffcode.h (coff_set_alignment_hook): added hook for PE.
5868 (coff_mkobject): init for local_toc_sym_map
5869 (coff_write_object_contents): set the internal_a.magic to
5870 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
5871 ppc compilers use.
5872
6bc200f2
ILT
5873Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
5874
c0971298
ILT
5875 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
5876 entries until both the line number address and the function name
5877 address are too large.
5878
6a468850
ILT
5879 * configure.in: Call AC_CHECK_PROG to find and cache AR.
5880 * configure: Rebuilt.
5881
6bc200f2
ILT
5882 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
5883 is defined in the environment.
5884
c44bf94c
JL
5885Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
5886
5887 * som.c (som_get_section_contents_in_window): Define to use
5888 generic version.
5889
cf587de8
ILT
5890Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
5891
5892 * coff-i860.c: New file, based on coff-i386.c.
5893 * cpu-i860.c: New file, based on cpu-i386.c.
5894 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
5895 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
5896 targets, using i860coff_vec.
5897 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
5898 trad-core.o and hosts/i860mach3.h.
5899 (i860coff_vec): Use coff-i860.o and cofflink.o.
5900 * configure: Rebuild.
5901 * Makefile.in: Rebuild dependencies.
5902 (ALL_MACHINES): Add cpu-i860.o.
5903 (BFD32_BACKENDS): Add coff-i860.o.
5904 (CFILES): Add cpu-i860.c and coff-i860.c.
5905 * targets.c (i860coff_vec): Declare.
5906 (bfd_target_vector): Add &i860coff_vec.
5907 * archures.c (bfd_i860_arch): Declare.
5908 (bfd_archures_list): Add &bfd_i860_arch.
5909 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
5910 (coff_set_flags): Handle bfd_arch_i860.
5911 (coff_write_object_contents): Handle I860 a.out magic number.
5912
83c23fca
ILT
5913Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
5914
5915 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
5916 the created .tc section to 2.
5917 (xcoff_mark): Don't keep a .loader reloc for a call to an
5918 undefined symbol when creating a shared library.
5919 (xcoff_build_ldsyms): When creating a shared library, generate
5920 global linkage code for a call to an undefined symbol.
5921
5d9eb9c3
KR
5922Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
5923
5924 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
5925 BFD32_BACKENDS, BFD64_BACKENDS.
5926 (.dep1): Put mkdep output in a separate file.
5927 Rebuilt dependencies.
5928
ffacb892
KR
5929 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
5930 value.
5931
4fe6d901
KR
5932 Permit use of mmap when available:
5933
5934 * configure.in: Check for mmap, madvise, mprotect.
5935 * config.in, configure: Regenerated.
5936
5937 * libbfd.c (struct _bfd_window_internal): Define type.
5938 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
5939 functions.
5940 (ok_to_map): New static variable for debugging.
5941 (_bfd_generic_get_section_contents_in_window): New function.
5942 * bfd-in.h (bfd_window_internal): Declare type.
5943 (bfd_window): Define type.
5944 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
5945 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
5946 Declare.
5947
5948 * libaout.h (struct aoutdata): Add two window fields.
5949 (obj_aout_sym_window, obj_aout_string_window): New macros.
5950 * aoutx.h (some_aout_object_p): Initialize windows.
5951 (aout_get_external_symbols): Get symbol data and strings in
5952 windows instead of explicitly allocated buffers.
5953 (slurp_symbol_table): Free window instead of memory.
5954 (bfd_free_cached_info): Release windows instead of freeing storage
5955 directly.
5956 (aout_link_free_symbols): Ditto.
5957
5958 * targets.c (bfd_target): Add new field for
5959 get_section_contents_in_window.
5960 (BFD_JUMP_TABLE_GENERIC): Updated.
5961 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
5962 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
5963 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
5964 macros for get_section_contents_in_window field.
5965
d9e771e3
FF
5966Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
5967
5968 * core.c: Renamed to corefile.c
5969 * makefile.dos (OBJS): Change core.o to corefile.o
5970 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
5971
bf917766
SG
5972start-sanitize-gm
5973Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
5974
5975 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
5976 targ_selvecs to allow debugging under Irix-5 native.
5977
5978end-sanitize-gm
583db7a8
ILT
5979Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
5980
5981 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
5982 to o. Clobber and restore the list of new csects around the call
5983 to _bfd_generic_link_add_one_symbol, in case it wants to report a
5984 linker error and the linker wants to read the symbol table. Reset
5985 the line number count of a real section even if it has no relocs.
5986 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
5987
5988 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
5989 is too small.
5990
68aed7db
ILT
5991Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
5992
18a9609c
ILT
5993 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
5994 an undefined symbol in a shared link.
5995
68aed7db
ILT
5996 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
5997 oldtype from bfd_link_order_type to bfd_link_hash_type. From
5998 phdm@info.ucl.ac.be (Philippe De Muyter).
5999
7f82c7e1
ILT
6000Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
6001
6002 * coff-m88k.c (rtype2howto): New static function.
6003 (RTYPE2HOWTO): Use it rather than a macro definition.
6004
6005 * coffcode.h (coff_write_object_contents): set internal_a.magic
6006 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
6007
4c8b9746 6008 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
7f82c7e1
ILT
6009 define TRAD_HEADER to new file hosts/delta68.h.
6010 m88*-motorola-sysv*, however, does use ptrace-core.o.
6011 * hosts/delta68.h: New file.
6012
6013 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
6014 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
6015
619c7730
KR
6016Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
6017
6018 * i386linux.c (MY(vec)): Declare before use.
6019
73246ff8
ILT
6020Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
6021
e8d6d5d0
ILT
6022 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
6023 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
6024
b2193cc5
ILT
6025 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
6026 BFD is not of the right type.
6027 (bfd_elf_get_needed_list): Likewise.
6028 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
6029 * sunos.c (bfd_sunos_get_needed_list): Likewise.
6030 * xcofflink.c (XCOFF_XVECP): Define.
6031 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
6032 of the right type.
6033 (bfd_xcoff_import_symbol): Likewise.
6034 (bfd_xcoff_export_symbol): Likewise.
6035 (bfd_xcoff_link_count_reloc): Likewise.
6036 (bfd_xcoff_record_link_assignment): Likewise.
6037 (bfd_xcoff_size_dynamic_sections): Likewise.
6038
baabeb74
ILT
6039 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
6040 table index against the number of symbols for a base relative
6041 reloc.
6042
73246ff8
ILT
6043 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
6044 static function.
6045 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
6046 full_aouthdr flag here...
6047 (_bfd_xcoff_bfd_final_link): ...not here.
6048
6ab826bd
FF
6049Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
6050
6051 * libelf.h: Rename to elf-bfd.h to avoid conflict with
6052 systems that have a system <libelf.h>.
6053 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
6054 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
6055 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
6056 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
6057 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
6058 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
6059 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
6060
999cc186
ILT
6061Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
6062
0652d579
ILT
6063 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
6064 set, set BSF_WEAK in symbol. Change all callers.
6065 (ecoff_get_extr): Set weakext based on BSF_WEAK.
6066 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
6067 _bfd_generic_link_add_one_symbol.
6068 (ecoff_indirect_link_order): Check that the section tdata relocs
6069 are not NULL before using them.
6070
999cc186
ILT
6071 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
6072 define TRAD_HEADER as hosts/alphalinux.h.
6073 * configure: Rebuild.
6074 * hosts/alphalinux.h: New file.
6075 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
6076 not int.
6077
e6080520
ILT
6078Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
6079
2bd0aeb9
ILT
6080 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
6081 C_ECOMM storage classes.
6082
e6080520
ILT
6083 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
6084 of xcoff_mark.
6085 (xcoff_mark): Call xcoff_mark_symbol.
6086 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
6087 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
6088 doing it by hand.
6089 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
6090
5fe14a9f
ILT
6091Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
6092
f630a0a4
ILT
6093 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
6094 field.
6095 (xcoff_find_reloc): New static function.
6096 (xcoff_link_add_symbols): Use it.
6097 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
6098 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
6099 relocate the value of C_DECL.
6100
5fe14a9f
ILT
6101 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
6102
dff77ed7
SC
6103Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
6104
6105 * cofflink.c (_bfd_coff_generic_relocate_section): Make
6106 callback decide what goes in .relocs.
6107 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
6108 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
6109 there is one.
6110
697a8fe8
ILT
6111Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
6112
6113 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
6114 absolute section.
6115
2d7de17d
ILT
6116Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
6117
6118 * xcofflink.c: More improvements, mostly to fix handling of
6119 constructors and a few other special cases.
6120 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
6121 zero, reverting yesterday's change.
6122 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
6123 (bfd_xcoff_link_count_reloc): Declare.
6124 (bfd_xcoff_record_link_assignment): Declare.
6125 * bfd-in2.h: Rebuild.
6126
f552f751
NH
6127Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
6128
4906b2a3 6129 * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
f552f751
NH
6130 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
6131 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
6132 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
6133 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
6134 Change PAGE_SIZE to TARGET_PAGE_SIZE.
6135
6136 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
6137 format.
6138
6139 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
6140 segments includes the a.out header. See to that the magic number
6141 *always* is big-endian.
6142
6143 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
6144 m68k4k NetBSD configurations.
6145
6146 * configure.in, configure: Separate i386 & mips NetBSD
6147 configurations from other BSD ones. Don't assume DEC is the only
6148 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
6149 configurations. Add support for m68k4k NetBSD object format.
6150
6151 * libaout.h: Added M_68K4K_NETBSD magic.
6fd1f40d
NH
6152
6153 * m68k4knetbsd.c: New file.
f552f751
NH
6154
6155 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
6156
6157 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
6158 <machine/endian.h>.
6159
6fd1f40d
NH
6160 * hosts/mipsnbsd.h: New file.
6161
d6d44ef9
SG
6162start-sanitize-gm
6163Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
6164
6165 * config.bfd: Add config stuff for mips*-*-magic* to set
6166 targ_defvec to ecoff_big_vec.
6167
6168end-sanitize-gm
867d923d
ILT
6169Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
6170
6171 * xcofflink.c: Numerous changes to get closer to a working XCOFF
6172 linker.
6173 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
6174 toc_section, and entry_section fields.
6175 (struct xcoff_section_tdata): Remove ldrel_count field.
6176 * libcoff.h: Rebuild.
6177 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
6178 fields.
6179 (coff_compute_section_file_positions): If RS6000COFF_C, generate
6180 full a.out header if full_aouthdr is set in xcoff_data.
6181 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
6182 based on sections stored in xcoff_data.
6183 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
6184 fields.
aad2c618
ILT
6185 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
6186 (rs6000coff_vec): Set symbol_leading_char to '.'.
867d923d
ILT
6187 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
6188 value stored in ret rather than returning a pointer value.
6189
6bd9ffdb
MM
6190Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
6191
6192 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
6193 format for now.
6194
9d14250f
JL
6195Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
6196
6197 * som.c (som_slurp_string_table): Allocate the strings with malloc
6198 since they're free'd by free_cached_info.
6199 (som_slurp_symbol_table): Similarly for the symbol table.
6200
a2bd0529
PB
6201Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
6202
6203 * Makefile.in (diststuff): Don't make headers.
6204
28a0c103
ILT
6205Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
6206
356cd465
ILT
6207 * Makefile.in: Rebuild dependencies.
6208
1edd3a7b
ILT
6209 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
6210 output_bfd is not SunOS.
6211 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
6212 non-SunOS input files.
6213
28a0c103
ILT
6214 * xcofflink.c: Extensive changes to support linking shared objects
6215 and generating a .loader section.
6216 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
b73322d9
ILT
6217 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
6218 last_symndx, and ldrel_count fields.
28a0c103
ILT
6219 * libcoff.h: Rebuild.
6220 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
6221 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
6222 is set.
6223 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
6224 (bfd_xcoff_export_symbol): Declare.
6225 (bfd_xcoff_size_dynamic_sections): Declare.
6226 * bfd-in2.h: Rebuild.
6227
aadf04f7
SS
6228Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
6229
6230 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
6231 * configure: Rebuild.
6232 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
6233 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
6234 contents.
6235 (pmac_xcoff_vec): Update to use new xcoff support.
6236 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
6237 (xcoff_write_armap): Declare buf as unsigned char.
6238 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
6239
6240 * mpw-make.sed: Generalize subdir_do edit.
6241
ddf4639b
JL
6242Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
6243
6244 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
6245 correctly. Don't initialize asect->vma.
6246
e7bedf65
KR
6247Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
6248
6249 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
6250 something a little less than the page size.
6251
6252Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
6253
6254 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
6255
3a70e298
SC
6256Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
6257
6258 * coff-i386.c (coff_i386_reloc_type_lookup): New.
6259 * coffcode.h (coff_write_object_contents): If .bss is before
6260 .data us that as data_start.
6261 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
6262 calc correct.
6263 * peicode.h (add_data_entry): Use _cooked_size of data directory.
6264 (coff_swap_outhdr_out): Hardwire in version number.
6265
5a2846e3
KR
6266Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
6267
3c3a5268
KR
6268 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
6269 major and minor to *_vno, since the former are also macros in
6270 SunOS header files. Cast result of bfd_alloc to appropriate
6271 type.
6272
5a2846e3
KR
6273 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
6274 before assigning to sec_data.
6275
0f6c885e
ILT
6276Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
6277
6278 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
6279 now relative to the section, not absolute.
6280 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
6281 get the file name when there is a N_SO directory name. When
6282 handling stabs, remember that section->vma was added to the
6283 offset.
6284
11fa6636
ILT
6285Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
6286
6287 * sunos.c (struct sunos_link_hash_table): Add needed field.
6288 (sunos_link_hash_table_create): Call bfd_release, not free.
6289 (sunos_link_hash_table_create): Initialize needed field.
6290 (sunos_add_dynamic_symbols): Record needed objects.
6291 (bfd_sunos_get_needed_list): New function.
6292 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
6293 * bfd-in2.h: Rebuild.
6294
c974e19e
SC
6295Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
6296
6297 * libcoff-in.h (pe_data_type.in_reloc_p): New.
6298
22a35f0b
ILT
6299Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
6300
54406786
ILT
6301 * bfd-in.h (struct bfd_link_needed_list): Rename from
6302 bfd_elf_link_needed_list.
6303 * bfd-in2.h: Rebuild.
6304 * elf.c, elflink.h, libelf.h: Corresponding changes.
6305
dd984644
ILT
6306 Add start at AIX linker support; no shared libraries yet.
6307 * xcofflink.c: New file.
6308 * configure.in (rs600coff_vec): Use xcofflink.o.
6309 * configure: Rebuild.
6310 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
6311 fields.
6312 (struct xcoff_section_tdata): Define.
6313 (xcoff_section_data): Define macro.
6314 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
6315 (_bfd_xcoff_bfd_link_add_symbols): Declare.
6316 (_bfd_xcoff_bfd_final_link): Declare.
6317 (_bfd_ppc_xcoff_relocate_section): Declare.
6318 * libcoff.h: Rebuild.
6319 * coff-rs6000.c: Clean up a bit.
6320 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
6321 cputype, csects, and debug_indices.
6322 (xcoff_copy_private_bfd_data): Copy cputype.
6323 (xcoff_howto_table): Rename from rs6000coff_howto_table.
6324 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
6325 (xcoff_reloc_type_lookup): Rename from
6326 rs6000coff_reloc_type_lookup.
6327 (coff_relocate_section): Define.
6328 (_bfd_xcoff_sizeof_headers): Define.
6329 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
6330 (_bfd_xcoff_bfd_relax_section): Define.
6331 (_bfd_xcoff_bfd_link_split_section): Define.
6332 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
6333 coff.
6334 * coffcode.h (coff_compute_section_file_positions): If AIX,
6335 increment sofar by SMALL_AOUTSZ if not executable.
6336 (coff_write_object_contents): If AIX, always output an a.out
6337 header; if not executable, header size of SMALL_AOUTSZ.
6338 * hash.c (struct bfd_strtab_hash): Add xcoff field.
6339 (_bfd_stringtab_init): Initialize xcoff field.
6340 (_bfd_xcoff_stringtab_init): New function.
6341 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
6342 (_bfd_stringtab_emit): In XCOFF mode, write out length.
6343 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
6344 * libbfd.h: Rebuild.
6345 * Makefile.in: Rebuild dependencies.
6346 (BFD32_BACKENDS): Add xcofflink.o.
6347 (CFILES): Add xcofflink.c.
6348
22a35f0b
ILT
6349 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
6350 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
6351 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
6352
fb417a21
MM
6353Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
6354
6355 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
6356
6357Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
6358
6359 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
6360 * config.in: Regenerated.
6361
6362 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
6363 (_bfd_chunksize): New variable.
6364 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
6365 for obstack chunk size.
6366 * configure.in: Check for getpagesize.
6367 * configure: Regenerated.
6368
6369 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6370
6371 * trad-core.c (rawptr): Make it a local variable of
6372 ptrace_unix_core_file_p.
6373
b1e46369
SC
6374Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
6375
6376 * coff-arm.c (in_reloc_p): New.
6377 * coff-i386.c (in_reloc_p): New.
6378 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
6379 (coff_write_object_contents): Only set has_reloc_section
6380 if PE_IMAGE.
6381 * cofflink.c (_bfd_coff_generic_relocate_section): Call
6382 in_reloc_p to decide if reloc should be emitted.
6383 * libcoff.h (pe_data_type.in_reloc_p): New.
6384 * peicode.h (pe_mkobject): Initialize in_reloc_p.
6385
ee9f09cd
ILT
6386Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
6387
b1e46369
SC
6388 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
6389 (_bfd_coff_read_internal_relocs): Likewise.
6390 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
6391 (_bfd_coff_read_internal_relocs): Likewise.
6392
ee9f09cd
ILT
6393 * elflink.h (elf_link_add_object_symbols): Correct conditions
6394 under which type and size change warnings are issued.
6395
78b31b6b
ILT
6396Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
6397
6398 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
6399 a symbol which is not in a real section.
6400 (coff_write_native_symbol): Corresponding change.
6401
6402 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
6403 coff_link_hash_newfunc and make non-static.
6404 (_bfd_coff_link_hash_table_init): New function, broken out of
6405 _bfd_coff_link_hash_table_create.
6406 (_bfd_coff_link_hash_table_create): Use it.
6407 (process_embedded_commands): Make static.
6408 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
6409 (_bfd_coff_link_hash_table_init): Declare.
6410 * libcoff.h: Rebuild.
6411
6412 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
6413 field in XCOFF tdata.
6414 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
6415 U802ROMAGIC, for clarity. Try to set arch and machine correctly
6416 based on cputype stored in a.out header, or in n_type of initial
6417 .file symbol.
6418 (coff_write_object_contents): Set cputype correctly in a.out
6419 header.
6420 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
6421 warnings.
6422 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
6423 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
6424 old resv1 field.
6425 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
6426 * libcoff.h: Rebuild.
6427
6428 * cpu-rs6000.c (rs6000_compatible): New static function.
6429 (bfd_rs6000_arch): Use it.
6430 * cpu-powerpc.c (powerpc_compatible): New static function.
6431 (arch_info_struct): Define various flavours of PowerPC.
6432 (bfd_powerpc_arch): Use powerpc_compatible. Point at
6433 arch_info_struct.
6434
9dd7e56f
FF
6435Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
6436
78b31b6b 6437 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
9dd7e56f 6438
8235c112
ILT
6439Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
6440
6441 * elflink.h (elf_link_add_object_symbols): Don't warn about
6442 changing the size or type if the old definition was weak.
6443
0322af0d
ILT
6444Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
6445
49488f2b
ILT
6446 * coffcode.h (combined_entry_type): Add fix_line field.
6447 (coff_slurp_line_table): Warn if we try to set the lineno field of
6448 a symbol twice.
6449 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
6450 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
6451 * coffgen.c (coff_mangle_symbols): Handle fix_line.
6452 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
6453 absolute section.
6454 (coff_print_symbol): Print fix_value symbols in a useful fashion.
6455 * libcoff.h: Rebuild.
6456
5f710a3a
ILT
6457 * libcoff-in.h (struct xcoff_tdata): Define.
6458 (xcoff_data): Define.
6459 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
6460 * bfd-in2.h, libcoff.h: Rebuild.
6461 * coff-rs6000.c (xcoff_mkobject): New static function.
6462 (coff_mkobject): Define.
6463 (xcoff_copy_private_bfd_data): New static function.
6464 (coff_bfd_copy_private_bfd_data): Define.
6465 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
6466 signed to bitfield.
6467 (rs6000coff_vec): Add DYNAMIC to object_flags.
6468 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
6469 .loader sections specially.
6470 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
6471 section alignment from the XCOFF tdata information.
6472 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
6473 F_SHROBJ, and copy the extra a.out header information into the
6474 XCOFF tdata structure.
6475 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
6476 F_DYNLOAD and the extra a.out header information.
6477 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
6478 C_HIDEXT symbol with attached csect information.
6479 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
6480 in the o_maxdata field.
6481 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
6482 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
6483 end if BSF_NOT_AT_END is set.
3f2c5b2d 6484
0322af0d
ILT
6485 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
6486 _bfd_read_ar_hdr_fn.
6487 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
6488 * bfd-in2.h, libbfd.h: Rebuild.
6489 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
6490 return value.
6491 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
6492 (bfd_slurp_bsd_armap_f2): Likewise.
6493 (_bfd_slurp_extended_name_table): Likewise.
6494
3266eaff
KR
6495Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
6496
6497 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6498
6499 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
6500 when the symbol table is empty.
6501
6502 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
6503 space for section symbols, since we don't output them either.
6504 (elf_m68k_adjust_dynindx): Removed.
6505
6506 * ptrace-core.c (rawptr): Make it a local variable of
6507 ptrace_unix_core_file_p.
3266eaff 6508
249479fa
MM
6509Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
6510
45b5d2f0
MM
6511 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
6512 NULL.
6513
249479fa
MM
6514 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
6515 Mac object file formats.
6516
c53fac12
ILT
6517Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
6518
4372f33f
ILT
6519 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
6520 auxent if there isn't one.
6521 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
6522 rather than FILNMLEN as the maximum name length.
6523
0fc9ada9
ILT
6524 * coffcode.h (bfd_coff_backend_data): Add new field
6525 _bfd_coff_print_aux.
6526 (bfd_coff_print_aux): New static function.
6527 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
6528 scnlen field of an XTY_LD csect aux entry.
6529 (coff_print_aux): New static function.
6530 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
6531 in coff_pointerize_aux_hook.
6532 (bfd_coff_std_swap_table): Initialize new field.
6533 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
6534 * libcoff.h: Rebuild.
6535 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
6536 * coff-mips.c (mips_ecoff_backend_data): Likewise.
6537
7860fe38
ILT
6538 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
6539 if there are symbols, for native AIX ld compatibility.
6540
c80cc833
ILT
6541 * coffcode.h (bfd_coff_backend_data): Add new field
6542 _bfd_coff_pointerize_aux_hook.
6543 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
6544 or I960, and as 0 otherwise.
6545 (bfd_coff_std_swap_table): Initialize new field.
6546 * libcoff.h: Rebuild.
6547 * coffgen.c (coff_pointerize_aux): Change parameters to take
6548 symbol pointer instead of type and class, and to take aux index.
6549 Call _bfd_coff_pointerize_aux_hook if it is defined.
6550 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
6551 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
6552 * coff-mips.c (mips_ecoff_backend_data): Likewise.
6553
c53fac12
ILT
6554 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
6555 read-only/host-only support.
6556
6557 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
6558 BSF_LOCAL.
d11e6b52
ILT
6559 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
6560 RS6000COFF_C.
c53fac12
ILT
6561
6562 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
6563 BFD_JUMP_TABLE_ARCHIVE accordingly.
6564 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
6565 (_bfd_compute_and_write_armap): Declare.
6566 (_bfd_generic_read_ar_hdr): Declare.
6567 (_bfd_read_ar_hdr): Define.
6568 (_bfd_noarchive_read_ar_hdr): Define.
6569 (_bfd_archive_bsd_read_ar_hdr): Define.
6570 (_bfd_archive_coff_read_ar_hdr): Define.
6571 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
6572 _bfd_read_ar_hdr instead.
6573 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
6574 (_bfd_compute_and_write_armap): Rename from
6575 compute_and_write_armap. Make non-static. Change all callers.
6576 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
6577 than _bfd_snarf_ar_hdr.
6578 * aout-target.h (MY_read_ar_hdr): Define if not defined.
6579 * ieee.c (ieee_read_ar_hdr): Define.
6580 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
6581 * oasys.c (oasys_read_ar_hdr): Define.
6582 * som.c (som_read_ar_hdr): Define.
6583 * bfd-in2.h, libbfd.h: Rebuild.
6584
f8e47484
SC
6585Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
6586
6587 * peicode.c (coff_swap_filehdr_in): If symptr is
6588 zero, there aren't any symbols, even if nsyms is set.
6589
2b874a2d
ILT
6590Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
6591
aca73687
ILT
6592 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
6593 field.
6594 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
6595 sections, and set styp correctly for them: .got, .hash, .dynamic,
6596 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
6597 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
6598 types.
6599 (ecoff_sort_hdrs): New static function.
6600 (ecoff_compute_section_file_positions): Return boolean, not void.
6601 Sort the sections by VMA before looking through them. Put the
6602 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
6603 section on an appropriate boundary within the page.
6604 (ecoff_compute_reloc_file_positions): Check return value of
6605 ecoff_compute_section_file_positions.
6606 (_bfd_ecoff_set_section_contents): Likewise.
6607 (_bfd_ecoff_write_object_contents): Check for various Alpha
6608 section types when incrementing text_size and data_size. Call
6609 adjust_headers backend function if it exists.
6610 * coff-alpha.c (alpha_adjust_headers): New static function.
6611 (alpha_ecoff_backend_data): Initialize adjust_headers field.
6612 * coff-mips.c (mips_ecoff_backend_data): Likewise.
6613
2b874a2d
ILT
6614 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
6615
c780e5db
JL
6616Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
6617
6618 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
6619 of ALTERNATE_AIX_CORE_FORMAT.
6620 * configure.in (aix4): No longer need CORE_FLAGS.
6621 * configure: Updated.
6622
2a01c351
KR
6623Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
6624
6625 NS32k changes from Ian Dall:
6626 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
6627 macros.
6628 (aout_link_input_section_std, aout_link_input_section_ext,
6629 aout_link_reloc_link_order): Call them instead of _bfd_*
6630 versions.
6631 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
6632 to zero.
6633 (backend_data): Use it instead of hardcoded zero.
6634
6635 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
6636 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
6637
6638 * ns32knetbsd.c: Include bfd.h.
6639 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
6640 (MY_bfd_reloc_type_lookup): Declare function too.
6641 * pc532-mach.c (set_sizes): Don't declare.
6642 (MY_text_includes_header, MY_exec_header_not_counted): Define.
6643 (backend_data, MY_backend_data): Don't define.
6644
6645 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
6646 ns32k-*-lites* like ns32k-*-netbsd*.
6647
6648 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
6649 compile on lites.
6650
5944d75b
ILT
6651Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
6652
6653 * coffcode.h (coff_write_object_contents): Restore setting
6654 f_timdat to 0, deleted on August 22.
6655
db344f82
SC
6656Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
6657
6658 * coffcode.h (coff_bfd_copy_private_symbol_data,
6659 coff_bfd_copy_private_section_data,
6660 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
6661 * peicode.h (coff_bfd_copy_private_bfd_data): New
6662 (pe_bfd_copy_private_bfd_data): New.
6663 (coff_swap_scnhdr_in): Swap bss size into the right place.
6664 (pe_print_private_bfd_data): Add some newlines.
5944d75b 6665
c780e5db 6666Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
97f1feda
JL
6667
6668 * som.c (setup_sections): Don't die if a space has no subspaces.
6669
3d7c42c9
ILT
6670Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
6671
6672 * elflink.h (elf_link_add_object_symbols): Don't let a weak
6673 dynamic symbol override a common symbol. Don't change the size or
6674 type if they have been set and the new symbol is not a definition.
6675 Warn if the size or type changes.
6676
c780e5db 6677Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
709af562
JL
6678
6679 * som.c (som_begin_writing): Don't write the symbol table or
6680 symbol strings.
6681 (som_finish_writing): Write them here. Place them after the
6682 subspace data, but before the relocs.
6683
6684Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
6685
6686 * sunos.c (sunos_add_one_symbol): Just pass false, not
6687 info->shared_library, to sunos_create_dynamic_sections.
6688 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
6689 section.
6690 (sunos_check_dynamic_reloc): Remove .text section assertion.
6691
7009e451
SS
6692Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
6693
6694 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
6695 * configure, configure.in: Add pmac_xcoff_vec case.
6696 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
6697 * coff-pmac.c: New file, PowerMac XCOFF support.
6698 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
6699 * targets.c (pmac_xcoff_vec): Declare.
6700
6701 * mpw-config.in: Various changes to be compatible with the
6702 autoconf-based configury.
6703 * mpw-make.sed: New file, sed commands to translate Unix
6704 makefile into MPW syntax.
6705 * mpw-make.in: Remove.
6706 * hosts/mpw.h: Remove.
6707 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
6708 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
6709
b91537be
SC
6710Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
6711
6712 * binary.c (binary_get_symtab): Return an empty string on error.
6713 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
6714
30360a6f
KK
6715Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
6716
6717 * coff-ppc.c: Reformatted according to gnu conventions
6718 Removed irrelevant "if 0" code
6719
20d1e233
ILT
6720Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
6721
69fd4fdd
ILT
6722 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
6723 symbols rather than as indirect symbols.
6724 (MY(slurp_symbol_table)): Don't do anything special about
6725 secondary symbols.
6726
46b5a892
ILT
6727 * coffcode.h (coff_new_section_hook): Make sure that the alignment
6728 of .ctors and .dtors sections is no larger than 2.
6729
9db59230
ILT
6730 * sunos.c (sunos_add_one_symbol): Don't change
6731 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
6732 undef list.
6733 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
6734 dynamic symbols when creating a shared library.
6735 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
6736 shared library.
6737 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
6738 written even if it is not defined in a regular object.
6739 (sunos_write_dynamic_symbol): Use plt_offset for the address of
6740 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
6741 rather than the constant 22.
6742 (sunos_check_dynamic_reloc): Handle creating a shared library.
6743 (sunos_finish_dynamic_link): Set the first entry in the GOT to
6744 zero when creating a shared library.
6745 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
6746 write it out at the start of the symbol table.
6747
20d1e233
ILT
6748 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
6749
a11e10fe
DE
6750Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
6751
6752 * config.bfd: Add arm-*-coff.
6753 * configure.in, configure: Add armcoff_{little,big}_vec.
6754 * targets.c (armcoff_{little,big}_vec): Declare.
6755 (bfd_target_vector): Add armcoff_{little,big}_vec.
6756 * coff-arm.c (armcoff_{little,big}_vec): Always define.
6757
99062cfc
ILT
6758Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
6759
6760 * targets.c (bfd_find_target): Remove debugging code.
6761
deacbe0f
KK
6762Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
6763
6764 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
6765 support on powerpc.
6766 * Makefile.in: added *-ppc files
6767 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
6768 allow pe based .o's to be shared with other tools on ppc/NT
6769 * config.bfd: added powerpc[le]-[pe|winnt] config support
6770 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
6771 * peicode.h: Added more section flags for PE on ppc
6772 Added coff_swap_filehdr_out to allow peicode.h to be
6773 used for non-image PE files on ppc.
6774 Check for image, or not, before copying pe_opthdr
6775 * targets.c: Added new bfd's
30360a6f
KK
6776 * targets.c: Removed two inactive bfds that shouldn't have made it this
6777 far.
deacbe0f 6778
d22b02e0
MM
6779Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
6780
6781 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
6782 explicit values to initialize all relocs. Change all users.
6783 (ppc_elf_brtaken_inner): New function to handle branch predicition
6784 relocs.
6785 (ppc_elf_brtaken_reloc): Ditto.
6786 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
6787 relocs use ppc_elf_unsupported_reloc.
6788 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
6789 needs to be reported.
6790 (ppc_elf_relocate_section): Support branch prediction relocs.
6791
fcf490c0
ILT
6792Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
6793
e6cb7b41
ILT
6794 * bfd.c (bfd_assert): Remove \n from string passed to
6795 _bfd_error_handler.
6796
1af85fbb
ILT
6797 * coff-i386.c: (TWO_DATA_SECS): Don't define.
6798 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
6799 (bfd_coff_make_section_hook): Don't define.
6800 (coff_make_section_hook): Remove.
6801 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
6802 (styp_to_sec_flags): Likewise.
6803 (coff_write_object_contents): Likewise.
6804 (bfd_coff_std_swap_table): Don't initialize make_section_hook
6805 field.
6806 * libcoff.h: Rebuild.
6807 * coffgen.c (make_a_section_from_file): Just call
6808 bfd_make_section_anyway, not bfd_make_section or
6809 bfd_coff_make_section_hook.
6810 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
6811 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
6812 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
6813 make_section_hook field.
6814 * coff-mips.c (mips_ecoff_backend_data): Likewise.
6815
fcf490c0
ILT
6816 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
6817 pointers into value field for warning and indirect symbols; just
6818 leave the value field alone.
6819 * linker.c (generic_link_add_symbol_list): Use next symbol for
6820 warning and indirect symbols, rather than looking in symbol value.
6821 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
6822 parameter. Change all callers. Remove support for indirect
6823 symbols; it didn't work anyhow.
6824 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
6825 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
6826 * bfd-in2.h: Rebuild.
6827
cc47d19a
MM
6828Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
6829
6830 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
6831 go back to telling the tools this reloc operates on 32 bits.
6832
81449d47
ILT
6833Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
6834
7a7fbffb
ILT
6835 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
6836 rather than a direct fprintf.
6837 * archive.c (_bfd_write_archive_contents): Likewise.
6838 * coffcode.h (coff_slurp_symbol_table): Likewise.
6839 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
6840 (ppc_elf_unsupported_reloc): Likewise.
6841 (ppc_elf_relocate_section): Likewise.
6842 * i386linux.c (linux_tally_symbols): Likewise.
6843 (linux_finish_dynamic_link): Likewise.
6844 * osf-core.c (osf_core_core_file_p): Likewise.
6845 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
6846 * som.c (som_sizeof_headers): Likewise.
6847 * srec.c (srec_bad_byte): Likewise.
6848 * bfd.c (bfd_assert): Likewise. Also change file to be const.
6849 * libbfd-in.h (bfd_assert): Declare first parameter const.
6850 * libbfd.h: Rebuild.
6851 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
6852 bfd_reloc_overflow is enough.
6853 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
6854 * coff-h8500.c (rtype2howto): Likewise.
6855 * coff-z8k.c (rtype2howto): Likewise.
6856 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
6857 * elf.c (_bfd_elf_get_lineno): Likewise.
6858 (_bfd_elf_no_info_to_howto): Likewise.
6859 (_bfd_elf_no_info_to_howto_rel): Likewise.
6860 * hp300hpux.c (convert_sym_type): Likewise.
6861 (MY(swap_std_reloc_in)): Likewise.
6862 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
6863
f1c6dd5d
ILT
6864 * libaout.h (struct aoutdata): Add line_buf field.
6865 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
6866 and filename_buffer. Instead, use a malloc buffer stored in the
6867 new line_buf field. Remove length restrictions.
6868
f0500a41
ILT
6869 * coffgen.c (string_size): Remove static variable.
6870 (debug_string_size, debug_string_section): Likewise.
6871 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
6872 and debug_string_size_p parameters. Use them instead of the
6873 global variables. Change all callers.
6874 (coff_write_symbol): Likewise.
6875 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
6876 (coff_write_symbols): Add local variables to replace removed
6877 global variables.
6878
25b5a53d
ILT
6879 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
6880 function, and line_base fields.
6881 * libcoff.h: Rebuild.
6882 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
6883 information, rather than using static variables.
6884
641ac26a
ILT
6885 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
6886 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
6887
81449d47
ILT
6888 * init.c (initialized): Remove static variable.
6889 (bfd_init): Don't bother setting initialized.
6890 (bfd_check_init): Remove.
6891 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
6892 * libbfd.h: Rebuild.
6893
138b9b81
PS
6894Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
6895
6896 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
6897 size for full core dumps. Copy core file header to private data.
6898 (rs6000coff_core_file_failing_command,
6899 rs6000coff_core_file_failing_signal): New functions to extract
6900 the file name and terminating signal from the core file.
6901 * coff-rs6000.c: Use them.
6902
2ffbb79a
ILT
6903Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
6904
6905 Change arch info to be const, initialized at compile time.
6906 * archures.c: Reindent many functions. Change CONST to const.
6907 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
6908 nothing set it anyhow. Make next const.
6909 (bfd_arch_info_list): Remove.
6910 (bfd_archures_list): Rename from archures_init_table. Change from
6911 a table of function pointers to a table of bfd_arch_info_type
6912 structure addresses.
6913 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
6914 (bfd_lookup_arch): Likewise.
6915 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
6916 const pointer.
6917 (bfd_default_arch_struct): Make const.
6918 (bfd_arch_init, bfd_arch_linkin): Remove.
6919 (bfd_get_arch_info): Return a const pointer.
6920 * init.c (bfd_init): Don't call bfd_arch_init.
6921 * bfd.c (struct _bfd): Make arch_info const.
6922 * bfd-in2.h: Rebuild.
6923 * libbfd.h: Rebuild.
6924 * configure.in: Put & before everything in $selarchs.
6925 * configure: Rebuild.
6926 * cpu-*.c: Change bfd_*_arch from a function which calls
6927 bfd_arch_linkin to a const structure.
6928 * ieee.c (ieee_object_p): Make arch const.
6929
02f85cda
MM
6930Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
6931
6932 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
6933 PowerPC V.4.
6934 * bfd-in2.h: Regenerate.
6935 * libbfd.h: Regenerate.
6936
6937 * elf32-ppc.c (reloc_type): Update names to match current draft.
6938 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
6939 relative. Update names to current V.4 draft.
6940 (ppc_elf_reloc_type_lookup): Add support for more relocations.
6941 (ppc_elf_relocate_section): Rename relocations to match draft.
6942
dd82c578
MM
6943Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
6944
6945 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
6946 compiled with -mrelocatable-lib to be linked with either normal
6947 modules or -mrelocatable modules.
6948
f69e888e
ILT
6949Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
6950
e18c4e8f
ILT
6951 * coffcode.h (coff_write_object_contents): Clear the vstamp field
6952 in the a.out header.
6953
f69e888e
ILT
6954 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
6955 a reloc against a local symbol, even if it's not a section.
6956
a5655244
ILT
6957Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
6958
6959 * targets.c (bfd_target): Remove unused align_power_min field.
6960 * bfd-in2.h: Rebuild.
6961 * All backends: Remove initialization of align_power_min.
6962
500d7394
SC
6963Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
6964
6965 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
500d7394 6966
049df0a8
ILT
6967Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
6968
6969 * config.bfd (mips-dec-netbsd*): New target.
6970 * configure.host (mips-dec-netbsd*): New host.
6971 * configure.in (mips-dec-netbsd*): New native.
6972 * configure: Rebuild.
6973
1862bbd8
ILT
6974Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
6975
6976 Make the COFF backend linker merge common types:
6977 * cofflink.c (struct coff_debug_merge_element): Define.
6978 (struct coff_debug_merge_type): Define.
6979 (struct coff_debug_merge_hash_entry): Define.
6980 (struct coff_debug_merge_hash_table): Define.
6981 (coff_debug_merge_hash_table_init): Define.
6982 (coff_debug_merge_hash_table_free): Define.
6983 (coff_debug_merge_hash_lookup): Define.
6984 (struct coff_final_link_info): Add debug_merge field.
6985 (coff_debug_merge_hash_newfunc): New static function.
6986 (_bfd_coff_final_link): Allocate and free debug_merge table.
6987 (coff_link_input_bfd): Merge identical enum, struct and union
6988 types.
6989
a208a70f
ILT
6990Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
6991
6992 Convert i960 COFF to use COFF backend linker.
6993 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
6994 structure to store the symbol being used.
6995 (coff_i960_start_final_link): New static function.
6996 (coff_i960_relocate_section): New static function.
6997 (coff_i960_adjust_symndx): New static function.
6998 (coff_start_final_link): Define.
6999 (coff_relocate_section): Define.
7000 (coff_adjust_symndx): Define.
7001 * coffcode.h (bfd_coff_backend_data): Add new callback function
7002 _bfd_coff_start_final_link.
7003 (bfd_coff_start_final_link): Define.
7004 (coff_start_final_link): Define if not defined.
7005 (bfd_coff_std_swap_table): Add coff_start_final_link.
7006 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
7007 visible.
7008 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
7009 function callback is not NULL.
7010 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
7011 (_bfd_coff_internal_syment_name): Declare.
7012 * libcoff.h: Rebuild.
7013 * configure.in (icoff_big_vec): Add cofflink.o.
7014 (icoff_little_vec): Likewise.
7015 * configure: Rebuild.
7016
f0abedbe
FF
7017Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
7018
7019 * Makefile.in (clean-info): Remove extraneous tab from line
7020 following action.
7021
aa4b3dc5
ILT
7022Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
7023
7024 * cofflink.c (coff_link_input_bfd): Fail if a section with no
7025 contents has relocs.
7026
4ca63811 7027Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
beee31b1
SC
7028
7029 * coffcode.h (coff_compute_section_file_positions): Keep the
7030 raw size safe.
7031 (coff_write_object_contents): Remember if it's a relocatable
7032 file.
7033 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
7034 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
7035 if relocatable file. Swap out saved raw size.
7036
ae115e51
ILT
7037Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
7038
9521bac3
ILT
7039 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
7040 (maintainer-clean): Rename from realclean, passing
7041 maintainer-clean down to subdirectories, but leave realclean as a
7042 synonym.
7043
4ca63811
ILT
7044 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
7045 warning callback.
7046
5aa4c3ff
ILT
7047 * dep-in.sed: Remove config.h from generated dependencies.
7048
396aaeb2
ILT
7049 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
7050 broken out of sunos_canonicalize_dynamic_symtab.
7051 (sunos_canonicalize_dynamic_symtab): Call new function
7052 sunos_slurp_dynamic_symtab.
7053 (sunos_add_dynamic_symbols): Add three new parameters. Return the
7054 dynamic symbol table to the caller.
7055 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
7056 callback to override the symbols being read.
7057 * libaout.h (struct aout_backend_data): Add three new parameters
7058 to add_dynamic_symbols callback.
7059
ae115e51
ILT
7060 Extensive minor changes to avoid various gcc warnings. Also:
7061 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
7062 * archures.c (bfd_arch_info_type): Change mach field from long to
7063 unsigned long.
7064 (bfd_lookup_arch): Change machine parameter from long to unsigned
7065 long.
7066
b088e4b2
ILT
7067Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
7068
7069 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
7070 a symbol with a non-zero plt_offset.
7071
1dff7902
ILT
7072Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
7073
2b71e1e4
ILT
7074 * elfcode.h (align_file_position): Remove; not used.
7075
1dff7902
ILT
7076 * configure.in: Only check for <sys/procfs.h> on a native system,
7077 and make sure it defines prstatus_t.
7078 * configure: Rebuild.
7079
870015b1
ILT
7080Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
7081
535c89f0
ILT
7082 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
7083
936b870c
ILT
7084 * config.in: Rename from config.h.in.
7085 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
a7873a6c 7086 Check for config.h:config.in when creating stamp-h.
936b870c 7087 * configure: Rebuild.
a7873a6c
ILT
7088 * Makefile.in (stamp-h): Depend upon config.in rather than
7089 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
7090 calling config.status.
936b870c 7091
870015b1
ILT
7092 * Makefile.in (do_distclean): Remove config.h and stamp-h.
7093 (Makefile): Just rebuild Makefile.
7094 (config.h, stamp-h): New targets.
7095 * configure.in: Create stamp-h when rebuilding config.h.
7096 * configure: Rebuild.
7097
b7577823
ILT
7098Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
7099
7100 * configure.in: Call AC_CONFIG_HEADER. Substitute
7101 HOST_64BIT_LONG. Check that various header files exist. Check
7102 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
7103 and/or free need to be declared. Don't make a link to sysdep.h.
7104 Define TRAD_HEADER for various hosts.
7105 * configure: Rebuild.
7106 * configure.host: Don't set my_host. Add definitions taken from
7107 host header files for various entries. Remove entries which now
7108 do nothing.
7109 * acconfig.h: New file.
7110 * config.h.in: New file, built by autoheader.
7111 * sysdep.h: New file.
7112 * Makefile.in (do_distclean): Don't remove sysdep.h.
7113 (RECONFIG): Remove.
7114 (LOCAL_H_DEPS): New variable.
7115 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
7116 $(RECONFIG).
7117 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
7118 ($(OPTIONAL_BACKENDS)): Likewise.
7119 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
7120 looking through sysdep.h.
7121 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
7122 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
7123 (fprintf_vma, sprintf_vma): Likewise.
7124 (int64_type, uint64_type): Don't define.
7125 * bfd-in2.h: Rebuild.
7126 * archures.c, bfd.c, srec.c: Include <ctype.h>.
7127 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
7128 * lynx-core.c: Include stuff from old hosts/lynx.h.
7129 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
7130 rather than NO_FCNTL.
7131 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
7132 rather than NATIVE_HPPAHPUX_COMPILER.
7133 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
7134 is defined.
7135 * hosts/*.h: Remove all header files which merely include,
7136 declare, and define things. Leave header files which define
7137 information needed by trad-core.c.
7138
7139 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
7140 (BFD_CC_FOR_BUILD): Define.
7141 * configure.in: Use BFD_CC_FOR_BUILD.
7142 * configure: Rebuild.
7143
7a93ebdd
ILT
7144Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
7145
4c2e4d0e
ILT
7146 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
7147 * configure: Rebuild.
7148
7a93ebdd
ILT
7149 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
7150 a global symbol.
7151
866bb9e5
JM
7152Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
7153
7154 * config.bfd: i386pe_ve -> i386pe_vec.
7155
2b79a104
ILT
7156Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
7157
f515fb2f
ILT
7158 * configure.host: Incorporate host Makefile fragments by setting
7159 shell variables.
7160 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
7161 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
7162 value based on whether the code is being compiled by a cross
7163 compiler. Don't substitute host_makefile_frag or frags.
7164 * aclocal.m4: New file to define local AC_PROG_CC.
7165 * configure: Rebuild.
7166 * Makefile.in (INSTALL): Set to @INSTALL@.
7167 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
7168 (INSTALL_DATA): Set to @INSTALL_DATA@.
7169 (AR): Set to @AR@.
7170 (CC): Define as @CC@.
7171 (CFLAGS): Set to @CFLAGS@.
7172 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
7173 (@host_makefile_frag@): Remove.
7174 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
7175 after other options.
7176 (config.status): Remove dependency upon @frags@.
7177 * config/*.mh, config/README: Remove.
7178
2b79a104
ILT
7179 * config.bfd: Rewrite to incorporate the contents of the Makefile
7180 fragments by setting shell variables, rather than merely returning
7181 the name of a Makefile fragment.
7182 * configure.in: Use shell variables set by config.bfd rather than
7183 looking at the target Makefile fragment files. Don't substitute
7184 target_makefile_frag. Do substitute TDEFINES.
7185 * configure: Rebuild.
7186 * Makefile.in (@target_makefile_frag@): Remove.
7187 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
7188 * config/*.mt: Remove.
7189
2cb159a5
KR
7190Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
7191
7192 * configure.in: Put changequote lines around "i[345]86" patterns
7193 section of core file support.
7194
ef07871c
JL
7195Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
7196
7197 * som.c (som_bfd_print_private_bfd_data): Define to use the
7198 generic version.
7199
1613e075
SC
7200Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
7201
7202 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
7203 entry, text_start and data_start.
7204
a52a3ce8
ILT
7205Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
7206
a21227ef
ILT
7207 * Makefile.in (OFILES): Remove $(TDEPFILES).
7208 * config/apollo.mt (TDEPFILES): Remove.
7209 * config/README: Update.
7210
a52a3ce8
ILT
7211 * configure.in: For a native configuration, set COREFILE and
7212 COREFLAG based on the canonical host name.
7213 * configure: Rebuild.
7214 * Makefile.in: Rebuild dependencies.
7215 (ALL_CFLAGS): Add @COREFLAG@.
7216 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
7217 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
7218 support routines. Check LYNX_CORE rather than HOST_LYNX.
7219 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
7220 * i386lynx.c: Likewise.
7221 * m68klynx.c: Likewise.
7222 * sparclynx.c: Likewise.
7223 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
7224 * *-core.c: Comment changes.
7225 * config/decstation.mh (HDEPFILES): Remove.
7226 (HDEFINES): Remove -DTRAD_CORE.
7227 * config/irix3.mh (RANLIB): Remove.
7228 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
7229 (HDEFINES): Remove -DIRIX_CORE.
7230 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
7231 (HDEFINES): Remove -DTRAD_CORE.
7232 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
7233 * config/ultra3.mh (RANLIB): Remove.
7234 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
7235 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
7236 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
7237 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
7238 * config/hppahpux.mh, config/hppaosf.mh: Remove.
7239 * config/i386aix.mh, config/i386bsd.mh: Remove.
7240 * config/i386linux.mh, config/i386mach3.mh: Remove.
7241 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
7242 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
7243 * config/mipsmach3.mh, config/news-mips.mh: Remove.
7244 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
7245 * config/rs600.mh, config/rs6000lynx.mh: Remove.
7246 * config/solaris2.mh, config/stratus.mh: Remove.
7247 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
7248 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
7249
d6f672b8
ILT
7250Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
7251
7252 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
7253 DT_FINI entry if the appropriate symbol is not in the hash table.
7254
7255 * libelf.h (struct elf_backend_data): Add create_program_headers
7256 and want_hdr_in_seg fields.
7257 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
7258 defined.
7259 (elf_backend_create_program_headers): Likewise.
7260 (elfNN_bed): Initialize create_program_headers and
7261 want_hdr_in_seg.
7262 * elf.c (get_program_header_size): Call create_program_headers
7263 backend routine.
7264 (map_program_segments): Check want_hdr_in_seg backend field. Call
7265 create_program_headers backend routine.
7266
7267 * elf.c (assign_file_positions_except_relocs): Align non allocated
7268 sections when creating an executable.
7269
7270 * elfcode.h (elf_swap_phdr_in): Make non static.
7271 (elf_swap_phdr_out): Make non static.
7272 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
7273 (bfd_elf32_swap_phdr_out): Declare.
7274 (bfd_elf64_swap_phdr_in): Declare.
7275 (bfd_elf64_swap_phdr_out): Declare.
7276
7277 * ecofflink.c (ecoff_collect_shuffle): New static function.
7278 (_bfd_ecoff_get_accumulated_pdr): New function.
7279 (_bfd_ecoff_get_accumulated_sym): New function.
7280 (_bfd_ecoff_get_accumulated_ss): New function.
7281 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
7282 (_bfd_ecoff_get_accumulated_sym): Declare.
7283 (_bfd_ecoff_get_accumulated_ss): Declare.
7284 * libbfd.h: Rebuild.
7285
0cb70568
ILT
7286Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
7287
d6f672b8
ILT
7288 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
7289
0cb70568
ILT
7290 * elflink.h (elf_link_add_object_symbols): Handle indirect and
7291 warning symbols. If any section is named .gnu.warning.XXX, treat
7292 the contents as a warning to be issued if the symbol XXX is
7293 referenced.
7294 (elf_link_output_extsym): For an indirect or warning symbol, just
7295 output the symbol it points to.
7296
7297 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
7298 if bfd_hash_allocate fails, since it will already be set.
7299 (generic_link_hash_newfunc): Likewise.
7300 (archive_hash_newfunc): Likewise.
7301 (hash_entry_bfd): New static function.
7302 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
7303 callback. Allocate a new warning using the hash table newfunc.
7304 Use bfd_hash_replace to update the entry in the hash table, rather
7305 than assuming we can copy the fields with structure assignment.
7306
7307 * hash.c (bfd_hash_replace): New function.
7308 * bfd-in.h (bfd_hash_replace): Declare.
7309 * bfd-in2.h: Rebuild.
7310
f14db880
JSC
7311Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
7312
7313 * config.bfd: Add mips*vr4300-*-elf* target.
7314 * config/mipsbvr4300.mt: Added.
7315
1613e075 7316See file ChangeLog.2
e6d739eb 7317
41126f15
JK
7318\f
7319Local Variables:
c6c7035c 7320mode: change-log
41126f15 7321left-margin: 8
6ec3bb6a
ILT
7322fill-column: 74
7323version-control: never
7324End:
This page took 0.576045 seconds and 4 git commands to generate.