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