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