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