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