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