Eli Zaretskii's DOSish file name patches.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2000-05-26 Alan Modra <alan@linuxcare.com.au>
2
3 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
4 bindtextdomain): Replace defines with those from intl/libgettext.h
5 to quieten gcc warnings.
6
7 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
8
9 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
10
11 * archive.c (normalize, bfd_bsd_truncate_arname,
12 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
13 file names with backslashes.
14
15 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
16 before opening it.
17
18 * sysdep.h: Include filenames.h.
19
20 2000-05-26 Alan Modra <alan@linuxcare.com.au>
21
22 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
23
24 2000-05-26 Jakub Jelinek <jakub@redhat.com>
25
26 * elf64-sparc.c (sparc64_elf_relax_section): New.
27 (sparc64_elf_relocate_section): Optimize tail call into branch always
28 if possible.
29 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
30 (elf32_sparc_relax_section): New.
31
32 2000-05-26 Jakub Jelinek <jakub@redhat.com>
33
34 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
35 Remove unusued variables.
36 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
37 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
38 previous fix, so that shared libs really don't influence targets
39 extension mask and memory model.
40
41 2000-05-23 H.J. Lu <hjl@gnu.org>
42
43 * elf64-alpha.c (elf64_alpha_relocate_section): Check
44 h->root.other not h->other.
45 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
46
47 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
48
49 2000-05-23 H.J. Lu <hjl@gnu.org>
50
51 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
52 undefined symbol with the non-default visibility attributes.
53 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
54 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
55 * elf32-i370.c (i370_elf_relocate_section): Likewise.
56 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
57 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
58 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
59 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
60 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
61 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
62 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
63 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
64
65 2000-05-22 Richard Henderson <rth@cygnus.com>
66
67 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
68 PCREL22, PCREL64I. Zero size of special relocs.
69 (elf64_ia64_reloc_type_lookup): Likewise.
70 (USE_BRL, oor_brl, oor_ip): New.
71 (elf64_ia64_relax_section): New.
72 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
73 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
74 (elf64_ia64_relocate_section): Likewise.
75 (bfd_elf64_bfd_relax_section): New.
76 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
77 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
78 * bfd-in2.h, libbfd.h: Regenerate.
79
80 2000-05-22 Nick Clifton <nickc@cygnus.com>
81
82 * configure.in : Add peigen.lo to MIPS PE targets.
83 * configure: Regenerate.
84
85 2000-05-22 Momchil Velikov <velco@fadata.bg>
86
87 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
88 only if it is known for both input and output bfds. Separate
89 error message strings as in some languages, it may be necessary
90 to change more than one place in the string to change between
91 'big' and 'little'.
92
93 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
94 endianess checks, call _bfd_generic_verify_endian_match() instead.
95
96 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
97
98 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
99
100 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
101 endianess before checking bfd flavours.
102
103 2000-05-22 H.J. Lu <hjl@gnu.org>
104
105 * elflink.h (elf_link_output_extsym): Clear the visibility
106 field for symbols not defined locally.
107
108 2000-05-18 Alan Modra <alan@linuxcare.com.au>
109
110 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
111 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
112 (hppa_rebuild_insn): Mask immediate bits here instead.
113 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
114
115 2000-05-18 Momchil Velikov <velco@fadata.bg>
116
117 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
118 relocs for an executable, ensure that they are virtual addresses.
119
120 Thu May 18 10:55:47 2000 Jeffrey A Law (law@cygnus.com)
121
122 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
123
124 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
125 Rick Gorton <gorton@scrugs.lkg.dec.com>
126
127 * elflink.h: Add emitrelocations support: when enabled, relocation
128 information and relocation sections are put into final output
129 executables. If the emitrelocations flag is set, do the following:
130 (elf_bfd_final_link): Emit relocation sections.
131 (elf_link_input_bfd): Compute relocation section contents.
132 (elf_gc_sections): Don't clean relocation sections.
133
134 2000-05-16 Catherine Moore <clm@cygnux.com>
135
136 * som.c (som_decode_symclass): Recognize weak symbols.
137
138 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
139
140 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
141 read idata section only from dataoff.
142 (pe_print_edata): Correctly check for valid eat_member.
143
144 Tue May 16 00:04:11 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
145
146 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
147
148 2000-05-14 Philip Blundell <philb@gnu.org>
149
150 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
151
152 2000-05-12 Alan Modra <alan@linuxcare.com.au>
153
154 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
155
156 * peigen.c (pe_print_idata): Look for .idata section and print
157 info even if data directory has zero entries. Read idata section
158 starting from dataoff, and adjust all data offsets to suit. Cast
159 all bfd_vma vars to unsigned long before passing to fprintf.
160 * peigen.c (pe_print_edata): Similarly, look for .edata section
161 and print info even if data directory has zero entries. Cast
162 all bfd_vma vars to unsigned long before passing to fprintf.
163
164 From Szabolcs Szakacsits <szaka@F-Secure.com>
165 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
166 directory size which may be bogus.
167 * peigen.c (pe_print_edata): Similarly.
168
169 2000-05-09 Alan Modra <alan@linuxcare.com.au>
170
171 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
172 section is empty.
173 (copy_private_bfd_data): Allow for space possibly taken up by elf
174 headers when calculating segment physical address from lma.
175
176 2000-05-08 Alan Modra <alan@linuxcare.com.au>
177
178 * versados.c (versados_scan): Init stringlen and pass_2_done.
179
180 * trad-core.c (trad_unix_core_file_p): Return
181 bfd_error_wrong_format rather than bfd_error_file_truncated.
182
183 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
184 add_data_entry. DataDirectory virtual address is relative.
185 (pe_print_idata): Account for relative DataDirectory virtual
186 addresses. Don't trash datasize inside POWERPC_LE_PE code.
187 (pe_print_edata): Similarly.
188
189 From Szabolcs Szakacsits <szaka@F-Secure.com>
190 * peigen.c (dir_names): Add Delay Import Directory.
191 (pe_print_idata): Always search for bfd section containing
192 idata address rather than looking up section name. Print this
193 section name rather than .idata.
194 (pe_print_edata): Similarly. Also print some fields as %08lx.
195 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
196 Win32Version.
197
198 Fri May 5 20:44:40 2000 Clinton Popetz <cpopetz@cygnus.com>
199
200 * xcoff.h: Rename to xcoff-target.h
201 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
202 * coff-rs6000.c: Ditto.
203 * coff64-rs6000.c: Ditto.
204 * coff-pmac.c: Ditto.
205 * Makefile.in: Regenerate.
206
207 Fri May 5 16:51:03 2000 Clinton Popetz <cpopetz@cygnus.com>
208
209 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
210 Change U802TOC64MAGIC to U803XTOCMAGIC.
211
212 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
213
214 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
215 * bfd-in.h: Prototype bfd_elf_get_arch_size.
216 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
217
218 2000-05-04 Alan Modra <alan@linuxcare.com.au>
219
220 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
221
222 2000-05-03 Martin v. Löwis <loewis@informatik.hu-berlin.de>
223
224 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
225 hidden and internal symbols.
226 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
227 visibility.
228 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
229 assign a PLT or GOT entry to symbols with hidden and
230 internal visibility.
231
232 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
233
234 * bfd/coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
235 the .bss section.
236 * bfd/coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
237
238 2000-05-02 H.J. Lu <hjl@gnu.org>
239
240 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
241 ELFOSABI_SYSV.
242
243 2000-05-02 Alan Modra <alan@linuxcare.com.au>
244
245 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
246 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
247 dependencies.
248 * Makefile.in: Regenerate.
249
250 Mon May 1 16:56:47 2000 Jim Wilson <wilson@cygnus.com>
251
252 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
253 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
254 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
255 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
256 * Makefile.in: Rebuild.
257
258 2000-05-02 Alan Modra <alan@linuxcare.com.au>
259
260 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
261 doesn't work very well.
262
263 * elf-hppa.h (elf_hppa_internal_shdr): Define.
264 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
265 Set hdr->s_type to 1 if ARCH_SIZE == 32.
266 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
267 (elf_hppa_info_to_howto): Likewise.
268 (elf_hppa_info_to_howto_rel): Likewise.
269 (elf_hppa_reloc_type_lookup): Likewise.
270 (elf_hppa_is_local_label_name): Likewise.
271 (elf_hppa_fake_sections): Likewise.
272 (elf_hppa_final_write_processing): Likewise.
273 (elf_hppa_howto_table): Fully initialise all entries.
274 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
275 (elf_hppa_info_to_howto): Likewise.
276 (elf_hppa_info_to_howto_rel): Likewise.
277 (elf_hppa_reloc_type_lookup): Likewise.
278 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
279 elf_hppa_unmark_useless_dynamic_symbols,
280 elf_hppa_remark_useless_dynamic_symbols,
281 elf_hppa_record_segment_addrs, elf_hppa_final_link,
282 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
283 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
284 elf32-hppa.c mess is cleaned up.
285 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
286 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
287 r_field then call hppa_field_adjust inline func with variable
288 r_field arg, instead call hppa_field_adjust with fixed arg.
289 In case R_PARISC_PCREL22F, don't set r_field.
290 (elf_hppa_relocate_insn): Change args and return type to unsigned
291 int. Call re_assemble_* funcs to do the work.
292
293 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
294 sign extending.
295
296 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
297 extending.
298 (sign_extend): Mask first before sign extending.
299 (low_sign_extend): Rewrite without condition expression.
300 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
301 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
302 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
303 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
304 result as function return value rather than through pointer arg.
305 Accept unsigned int args, and return unsigned int.
306 (re_assemble_3): New. Combines function of dis_assemble_3 with
307 re-assembly of opcode and immediate.
308 (re_assemble_12): Likewise.
309 (re_assemble_16): Likewise.
310 (re_assemble_17): Likewise.
311 (re_assemble_21): Likewise.
312 (re_assemble_22): Likewise.
313 (hppa_field_adjust): Rewrite and document, paying attention to
314 size of types and signed/unsigned issues.
315 (get_opcode): Shift before masking.
316 (FDLW): Rename to FLDW.
317 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
318 (hppa_rebuild_insn): Change args and return value to unsigned
319 int. Make use of re_assemble_*. Correct case 11.
320
321 * dep-in.sed: Handle ../opcodes/.
322 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
323 elf64-hppa.h, hppa_stubs.h, xcoff.h.
324 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
325 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
326 elfarm-nabi.lo dependencies outside of auto-dependency area.
327 Regenerate dependencies.
328 * Makefile.in: Regenerate.
329
330 * configure.in (TRAD_HEADER): Test non-null before
331 AC_DEFINE_UNQUOTED.
332 * configure: Regenerate.
333
334 * reloc.c: Fix mis-spelling in comment.
335
336 2000-05-01 Alan Modra <alan@linuxcare.com.au>
337
338 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
339 * vms.c (vms_openr_next_archived_file): Return NULL.
340
341 Fri Apr 28 21:34:44 2000 Clinton Popetz <cpopetz@cygnus.com>
342
343 * coffcode.h Copy changes mistakenly done to libcoff.h in
344 4/24/2000 patch.
345
346 2000-04-29 Andreas Jaeger <aj@suse.de>
347
348 * libbfd-in.h: Correctly check GCC version.
349 * bfd-in.h: Likewise.
350 * libhppa.h: Likewise.
351 * libbfd.h: Regenerate.
352 * bfd-in2.h: Regenerate.
353
354 Fri Apr 28 14:58:37 2000 Clinton Popetz <cpopetz@cygnus.com>
355
356 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
357 coffdu-rs6000.{lo,c}.
358 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
359 on xcoff.h
360 * Makefile.in: Regenerate.
361 * xcoff.h: New file.
362 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
363 * coff-rs6000.c: Move all declarations and defines that are
364 common to the xcoff backends into xcoff.h
365 * coff64-rs6000.c: Ditto,
366
367 Fri Apr 28 08:35:21 2000 Clinton Popetz <cpopetz@cygnus.com>
368
369 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
370 _bfd_coff_force_symnames in strings and
371 _bfd_coff_debug_string_prefix_length to their default values.
372 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
373
374 Fri Apr 28 08:05:12 2000 Clinton Popetz <cpopetz@cygnus.com>
375
376 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
377 _bfd_coff_force_symnames in strings and
378 _bfd_coff_debug_string_prefix_length to their default values.
379
380 2000-04-27 Alan Modra <alan@linuxcare.com.au>
381
382 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
383 Check local_got_refcounts before dereferencing.
384
385 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
386 before deciding we don't need R_PPC_PLT32 relocation.
387 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
388 dereferencing.
389
390 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
391
392 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
393 .plt entries.
394 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
395 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
396 (elf_i386_relocate_section): Allow for .plt to go missing.
397 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
398 can use a relative reloc for got as elf_i386_relocate_section.
399 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
400
401 Wed Apr 26 16:31:28 2000 Clinton Popetz <cpopetz@cygnus.com>
402
403 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
404
405 Mon Apr 24 15:20:35 2000 Clinton Popetz <cpopetz@cygnus.com>
406
407 * Makefile.am (coff64-rs6000.lo): New rule.
408 * Makefile.in: Regenerate.
409 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
410 xcoff_is_local_label_name, xcoff_rtype2howto,
411 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
412 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
413 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
414 (NO_COFF_SYMBOLS): Define.
415 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
416 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
417 internally.
418 (MINUS_ONE): New macro.
419 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
420 relocation.
421 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
422 coff_SWAP_aux_out): Map to the new functions.
423 * coff64-rs6000.c: New file.
424 * libcoff.h (bfd_coff_backend_data): Add new fields
425 _bfd_coff_force_symnames_in_strings and
426 _bfd_coff_debug_string_prefix_length.
427 (bfd_coff_force_symnames_in_strings,
428 bfd_coff_debug_string_prefix_length): New macros for above fields.
429 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
430 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
431 of using coff_swap_sym_in directly.
432 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
433 (coff_set_flags) Set magic for XCOFF64.
434 (coff_compute_section_file_positions): Add symbol name length to
435 string section length if bfd_coff_debug_string_prefix_length is
436 true.
437 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
438 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
439 using coff_swap_lineno_in directly.
440 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
441 and _bfd_coff_debug_string_prefix_length fields.
442 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
443 symbol names into strings table when
444 bfd_coff_force_symnames_in_strings is true.
445 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
446 SET_RELOC_VADDR): New macros.
447 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
448 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
449 code.
450 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
451 changes within RS6000COFF_C specific code.
452 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
453 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
454 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
455 Extend existing hack on target name.
456 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
457 target name.
458 * coff-tic54x.c (ticof): Keep up to date with new fields
459 in bfd_coff_backend_data.
460 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
461 targ_selvecs to include rs6000coff64_vec for rs6000.
462 * configure.in: Add rs6000coff64_vec case.
463 * cpu-powerpc.c: New bfd_arch_info_type.
464
465 Mon Apr 24 02:17:31 2000 Jeffrey A Law (law@cygnus.com)
466
467 * config.bfd: Only disable elf32-hppa vectors, not all of the
468 BSD and OSF configuration support. Provide (disabled) clauses
469 for PA64 support.
470 * configure.in: Add clause for PA64 support.
471 * configure: Rebuilt.
472
473 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
474 (bfd_elf64_hppa_vec): Declare.
475
476 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
477 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
478 (elf64-hppa.lo): Add dependencies.
479 * Makefile.in: Rebuilt.
480
481 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
482
483 Mon Apr 24 02:14:29 2000 Jason Eckhardt <jle@cygnus.com>
484
485 * libhppa.h (dis_assemble_16): New function.
486 (pa_arch): Added pa20w element.
487
488 Mon Apr 24 01:49:03 2000 Ulrich Drepper <drepper@cygnus.com>
489
490 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
491 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
492 bfd_elf64_slurp_reloc_table.
493
494 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
495 definitions to get external names.
496 (elf_write_relocs): Renamed from write_relocs and make global.
497 (elf_slurp_reloc_table): Make global.
498 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
499
500 * archive.c (hpux_uid_gid_encode): New function.
501 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
502 defined and the ID is greater than 99999.
503 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
504 special uid/gid fields into 32 bit values.
505
506 2000-04-21 Matthew Green <mrg@cygnus.com>
507
508 * config.bfd: Add NetBSD/sparc64 support.
509
510 Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
511 David Mosberger <davidm@hpl.hp.com>
512 Timothy Wall <twall@cygnus.com>
513 Jim Wilson <wilson@cygnus.com>
514
515 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
516 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
517 (BFD64_BACKENDS): Add elf64-ia64.lo.
518 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
519 (cpu-ia64.lo, elf64-ia64.lo): New rules.
520 * Makefile.in: Rebuild.
521 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
522 (bfd_ia64_arch): Declare.
523 (bfd_archures_list): Add bfd_ia64_arch.
524 * bfd-in2.h: Rebuild.
525 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
526 * configure: Rebuild.
527 * configure.host: (ia64-*-linux*): New host.
528 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
529 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
530 * elf.c (prep_headers): Add bfd_arch_ia64.
531 * libbfd.h: Rebuild.
532 * reloc.c: Add IA-64 relocations.
533 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
534 Declare.
535 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
536 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
537
538 2000-04-21 Richard Henderson <rth@cygnus.com>
539
540 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
541 contents when performing a partial link.
542 (bfd_elf_d30v_reloc_21): Likewise.
543
544 2000-04-20 H.J. Lu <hjl@gnu.org>
545
546 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
547 patch to symbols defined by a shared object.
548 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
549
550 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
551
552 K&R compiler fixes.
553 * dwarf2.c (concat_filename): Avoid string literal concatenation.
554 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
555
556 Mon Apr 17 19:14:36 2000 David Mosberger <davidm@hpl.hp.com>
557
558 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
559 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
560 (coff-ia64.lo): Add dependency.
561 * Makefile.in: Regenerate.
562 * coff-ia64.c: New file.
563 * efi-app-ia32.c: Ditto.
564 * efi-app-ia64.c: Ditto.
565 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
566 (coff_set_flags): Ditto.
567 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
568 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
569 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
570 * configure: Regenerate.
571 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
572 (PUT_OPTHDR_IMAGE_BASE): Ditto.
573 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
574 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
575 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
576 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
577 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
578 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
579 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
580 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
581 (GET_PDATA_ENTRY): Ditto.
582 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
583 data_start. Use above macros to read fields that are 64 bit wide for
584 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
585 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
586 FileAlignment and SectionAlignment to minimum alignment if they
587 are zero.
588 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
589 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
590 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
591 Use above macros to write fields that are 64 bit wide for
592 COFF_WITH_PEP64.
593 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
594 5*4 otherwise. This should be right for IA-32 and IA-64, but may
595 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
596 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
597 begin address, end address, and unwind info address only. Use
598 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
599 print addresses.
600 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
601 HIGH3ADJ relocation names.
602 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
603 * targets.c: Declare bfd_efi_app_ia32_vec and
604 bfd_efi_app_ia64_vec.
605 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
606 bfd_efi_app_ia64_vec.
607
608 2000-04-17 Timothy Wall <twall@cygnus.com>
609
610 * bfd-in2.h: Add prototypes for tic54x load page access.
611 * bfd-in.h: Regenerate.
612 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
613 in customized _set_arch_mach function.
614 * coffcode.h (coff_set_alignment_hook): Set section load page if
615 the appropriate macro is defined.
616 (write_object_contents): Read section load page.
617
618 2000-04-13 Alan Modra <alan@linuxcare.com.au>
619
620 * elf32-hppa.h: Update copyright date.
621
622 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
623 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
624
625 * elf32-d30v.c (MAX32): Don't use LL suffix.
626 (MIN32): Define in terms of MAX32.
627 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
628
629 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
630 expression.
631
632 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
633
634 2000-04-12 Alan Modra <alan@linuxcare.com.au>
635
636 * dep-in.sed: Match space before file name, not after.
637
638 * Makefile.am: Regenerate dependencies.
639 * Makefile.in: Regenerate.
640
641 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
642 case, allow address wrap-around stupidly removed 2000-03-17. Sign
643 extend without an if statement.
644
645 2000-04-11 Alan Modra <alan@linuxcare.com.au>
646
647 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
648 signed quantites.
649 * elf32-mips.c (gprel16_with_gp): Likewise.
650 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
651 here using -0x40000, not (int)0xfffc0000.
652 (elf32_hppa_size_of_stub): Likewise.
653
654 2000-04-11 Timothy Wall <twall@cygnus.com>
655
656 * coff-tic54x.c: Now builds with all targets.
657 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
658 * Makefile.in: Regenerate.
659 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
660 unitialized variable.
661
662 Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
663
664 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
665 --enable-build-warnings option.
666 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
667 * Makefile.in, configure: Re-generate.
668
669 2000-04-07 Nick Clifton <nickc@cygnus.com>
670
671 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
672 BFD_RELOC_THUMB_PCREL_BLX.
673
674 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
675 R_ARM_XPC25 and R_ARM_THM_PC22.
676
677 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
678 R_ARM_XPC25 and R_ARM_THM_XPC22.
679 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
680 R_ARM_[XPC25|THM_XPC22].
681
682 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
683 elf/arm-oabi.h to elf/arm.h
684
685 * Makefile.am: Fix dependency for elfarm-oabi.c
686 * Makefile.in: Regenerate.
687
688 * bfd-in2.h: Regenerate.
689 * libbfd.h: Regenerate.
690
691 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
692
693 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
694 and restore it on failure. Release newly allocated tdata on
695 failure.
696
697 Fri Apr 7 11:33:47 2000 Jim Wilson <wilson@cygnus.com>
698
699 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
700 (decode_line_info): Set it. Report error if unit->line_offset is
701 equal to or larger than it.
702
703 2000-04-07 Timothy Wall <twall@cygnus.com>
704
705 * targets.c: Added vecs for tic54x.
706 * reloc.c: Added relocs for tic54x.
707 * libbfd.h: Regenerated.
708 * configure: Add TI COFF vecs for tic54x.
709 * configure.in: Ditto.
710 * config.bfd (targ_cpu): Recognize new tic54x target.
711 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
712 * bfd-in2.h: Add tic54x target and relocations.
713 * Makefile.am, Makefile.in: Add tic54x target.
714 * archures.c (bfd_archures_list): Add tic54x target.
715 * coff-tic54x.c: New.
716 * cpu-tic54x.c: New.
717
718 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
719
720 * elfcore.h (elf_core_file_p): call backend_object_p which
721 thereby gets an opportunity to update the arch/machine type.
722
723 2000-04-06 Timothy Wall <twall@cygnus.com>
724
725 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
726 class. Handle SEC_CLINK and SEC_BLOCK flags.
727 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
728 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
729
730 2000-04-06 Nick Clifton <nickc@cygnus.com>
731
732 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
733 EF_INTERWORK if this is an unknown EABI.
734 (elf32_arm_merge_private_bfd_data): Check EABI version
735 numbers. Only check EF_xxx flags if the EABI version number
736 is unknown.
737 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
738 if the EABI version number is unknown.
739 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
740 if the EABI version number is unknown.
741
742 Wed Apr 5 22:04:20 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
743
744 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
745 BFD_RELOC_SH_LOOP_END.
746 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
747 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
748 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
749 (sh_elf_reloc_loop): New function.
750 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
751 any more.
752 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
753 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
754 * bfd-in2.h, libbfd.h: Regenerate.
755
756 2000-04-04 Alan Modra <alan@linuxcare.com.au>
757
758 * po/bfd.pot: Regenerate.
759
760 * Makefile.am: Remove extraneous mkdep comment.
761 (MKDEP): Use gcc -MM rather than mkdep.
762 (DEP): Quote when passing vars to sub-make. Add warning
763 message to end.
764 (DEP1): Rewrite for "gcc -MM".
765 (CLEANFILES): Add DEP2.
766 Update dependencies.
767 * Makefile.in: Regenerate.
768
769 2000-04-03 Kevin Buettner <kevinb@redhat.com>
770
771 * configure.in: Added corefile support for AIX 4.3. In particular,
772 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
773 compiling rs6000-core.c.
774 * configure: Regenerated.
775
776 2000-04-03 H.J. Lu <hjl@gnu.org>
777
778 * cache.c (bfd_open_file): Unlink the output file only if
779 it has non-zero size.
780
781 2000-04-01 Ken Block USG <block@zk3.dec.com>
782
783 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
784 relative relocations for non-loaded sections in shared objects.
785 (elf64_alpha_check_relocs): Similarly.
786
787 Mon Apr 3 13:37:15 2000 Hans-Peter Nilsson <hp@axis.com>
788
789 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
790 BFD_RELOC_16 to switch for extended relocs.
791 (MY_swap_ext_reloc_in): New.
792 (MY_swap_ext_reloc_out): New.
793 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
794 than NAME(aout,swap_ext_reloc_in) for extended relocs.
795 (NAME(aout,squirt_out_relocs)): Similarly use
796 MY_swap_ext_reloc_out.
797 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
798
799 2000-04-03 Kazu Hirata <kazu@hxi.com>
800
801 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
802 the R_PCRWORD_B case.
803
804 2000-03-31 Thomas de Lellis <tdel@wrs.com>
805
806 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
807 on some targets.
808 * ihex.c : Ditto.
809
810 Wed Mar 30 15:28:00 2000 Donald Lindsay <dlindsay@cygnus.com>
811
812 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
813 HOWTO references to bfd_elf_generic_reloc, that have
814 partial_inplace == true, now use the new function. The function
815 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
816 extends its fixes to the R_M32R_{16,24,32} relocs.
817 The new logic in m32r_elf_lo16_reloc() has been removed, and
818 it instead calls the new routine to obtain that functionality.
819
820 2000-03-27 Alan Modra <alan@linuxcare.com.au>
821
822 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
823 elf32_avr_check_relocs, avr_final_link_relocate,
824 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
825 elf32_avr_object_p): Add prototypes.
826 (elf32_avr_gc_mark_hook): Add default for h->root.type.
827 (bfd_elf_avr_final_write_processing): Make static.
828
829 2000-03-27 Denis Chertykov <denisc@overta.ru>
830
831 * cpu-avr.c: New file. BFD support routines for AVR architecture.
832 * archures.c (bfd_architecture): Add AVR architecture.
833 (bfd_archures_list): Add reference to AVR architecture info.
834 * elf.c (prep_headers): Handle bfd_arch_avr.
835 * reloc.c: Add various AVR relocation enums.
836 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
837 list.
838 * Makefile.am: Add support for AVR elf.
839 * configure.in: Likewise.
840 * config.bfd: Likewise.
841 * Makefile.in: Regenerate.
842 * configure: This too.
843 * bfd-in2.h: And this.
844 * libbfd.h: And this.
845
846 2000-03-24 H.J. Lu <hjl@gnu.org>
847
848 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
849 (elf64_alpha_find_reloc_at_ofs): Likewise.
850
851 2000-03-17 Alan Modra <alan@linuxcare.com.au>
852
853 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
854 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
855 allowable range used to be -2**(n-1) to 2**n-1.
856 * reloc.c (_bfd_relocate_contents): Same here. Also replace
857 "boolean overflow" with "bfd_reloc_status_type flag".
858
859 2000-03-14 Doug Evans <dje@casey.transmeta.com>
860
861 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
862
863 2000-03-14 Kazu Hirata <kazu@hxi.com>
864
865 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
866 of shrinks properly, including the last reloc.
867
868 2000-03-13 Kazu Hirata <kazu@hxi.com>
869
870 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
871 check for R_MOVL2.
872
873 2000-03-11 Alan Modra <alan@linuxcare.com.au>
874
875 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
876 a format mismatch rather than an "error" from bfd_read such as
877 bfd_error_file_truncated.
878
879 2000-03-10 Geoff Keating <geoffk@cygnus.com>
880
881 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
882 sign-extension and big-endian compensation for
883 R_MIPS_64 even in ld -r.
884
885 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
886
887 * elf32-mips.c (mips_elf_next_relocation): Rename from
888 mips_elf_next_lo16_relocation, and generalize to look
889 for any relocation type.
890 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
891 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
892 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
893 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
894 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
895 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
896 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
897 (mips_rtype_to_howto): Likewise.
898 (mips_elf_calculate_relocation): Handle new relocs.
899 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
900 are paired. The addend for R_MIPS_GNU_REL16_S2
901 is shifted right two bits.
902
903 2000-03-10 Alan Modra <alan@linuxcare.com.au>
904
905 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
906 comment, and ensure it doesn't happen again.
907 (bfd_install_relocation): Same here.
908 (_bfd_relocate_contents): Don't bother assigning unused signmask
909 shift result. Fix typos in comments.
910 Remove trailing whitespace throughout file.
911
912 2000-03-07 Doug Evans <dje@casey.transmeta.com>
913
914 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
915 * bfd-in2.h: Rebuild.
916
917 2000-03-06 Nick Clifton <nickc@cygnus.com>
918
919 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
920 sym_ptr_ptr fields.
921 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
922 (SIZEOF_ILF_STRINGS): Redefine.
923 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
924 relative reloc, as opposed to a section relative reloc.
925 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
926 not C_LABEL.
927 Add length of symbol's prefix to string pointer.
928 Store a pointer to the symbol in the symbol pointer table.
929 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
930 Initialise the symbol pointer table.
931 Store the hint in the Hint/Name table.
932 Make the jump reloc be symbol realtive, not section relative.
933 Create an import symbol for imported code.
934
935 2000-03-06 Catherine Moore <clm@cygnus.com>
936
937 * elf.c (swap_out_syms): Check for null type_ptr.
938
939 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
940
941 * aout-target.h (MY(write_object_contents)): Remove unused
942 and unusable "#if CHOOSE_RELOC_SIZE".
943 * pc532-mach.c (MY(write_object_contents)): Ditto.
944 * netbsd.h (MY(write_object_contents)): Ditto.
945 * hp300hpux.c (MY(write_object_contents)): Ditto.
946 * freebsd.h (MY(write_object_contents)): Ditto.
947 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
948
949 2000-02-29 H.J. Lu <hjl@gnu.org>
950
951 * peicode.h (jtab): Make it static.
952
953 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
954 defined and COFF_IMAGE_WITH_PE is not defined.
955 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
956 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
957
958 2000-03-01 Nick Clifton <nickc@cygnus.com>
959
960 * coff-arm.c (bfd_arm_process_before_allocation): Make
961 'symndx' signed to prevent compile time warning.
962
963 * coff-mcore.c: Remove unused prototype for pe_object_p.
964
965 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
966 functions that are not used when COFF_IMAGE_WITH_PE is
967 defined.
968 (struct sh_opcode): Change type of 'flags' field to unsigned
969 long so that it can hold the USESAS flag.
970
971 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
972
973 * elf-m10300.c (mn10300_elf_relax_section): Initialise
974 'sym_sec'.
975
976 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
977 parameters.
978 Remove unusued variables and code.
979 (elf_backend_add_symbol_hook): Fix prototype.
980
981 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
982 'srelgot'.
983
984 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
985 'oldinst'.
986
987 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
988 parameters.
989 Remove unusued variables and code.
990 (elf_backend_add_symbol_hook): Fix prototype.
991
992 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
993
994 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
995 to unused function parameter.
996
997 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
998 parameters.
999 Use EMPTY_HOWTO to initialise empty howto slots.
1000 Remove unused variables.
1001
1002 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
1003
1004 2000-03-01 H.J. Lu <hjl@gnu.org>
1005
1006 * aoutx.h (aout_link_input_section_std): Pass "true" to
1007 the undefined_symbol callback.
1008 (aout_link_input_section_ext): Likewise.
1009 * bout.c (get_value): Likewise.
1010 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
1011 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
1012 Likewise.
1013 (alpha_relocate_section): Likewise.
1014 * coff-arm.c (coff_arm_relocate_section): Likewise.
1015 * coff-i960.c (coff_i960_relocate_section): Likewise.
1016 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1017 * coff-mips.c (mips_relocate_section): Likewise.
1018 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1019 * coff-sh.c (sh_relocate_section): Likewise.
1020 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1021 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1022 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
1023 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1024 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
1025 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1026 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1027 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1028 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1029 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1030 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1031 * elf32-v850.c (v850_elf_relocate_section): Likewise.
1032 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
1033 * elflink.h (elf_link_output_extsym): Likewise.
1034 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
1035 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
1036 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
1037
1038 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
1039 undefined_symbol callback when building shared library with
1040 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
1041 "true".
1042 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1043 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1044 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1045 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
1046 (elf32_mips_get_relocated_section_content): Likewise.
1047 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1048 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1049 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1050 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1051
1052 2000-02-28 Nick Clifton <nickc@cygnus.com>
1053
1054 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
1055 * Makefile.in: Regenerate.
1056
1057 * configure.in: Add support for mips and sh pe vectors.
1058 * configure: regenerate.
1059
1060 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
1061 targets.
1062
1063 * targets.c: Add mips and sh pe vectors.
1064
1065 * libpei.h (coff_final_link_postscript): Only define if not
1066 already defined.
1067
1068 * coffcode.h: Add support for WinCE magic numbers.
1069
1070 * peigen.c (pe_print_reloc): Update comment and rearrange
1071 appending of newline character.
1072
1073 * peicode.h: Add support for Image Library Format.
1074 (pe_ILF_vars): Structure containing data used by ILF code.
1075 (pe_ILF_make_a_section): New function. Create a section based
1076 on ILF data.
1077 (pe_ILF_make_a_reloc): New function. Create a reloc based on
1078 ILF data.
1079 (pe_ILF_make_a_symbol): New function. Create a symbol based
1080 on ILF data.
1081 (pe_ILF_save_relocs): New function. Store the relocs created
1082 by pe_ILF_make_a_reloc in a section.
1083 (pe_ILF_build_a_bfd): New function. Create a BFD describing
1084 an ILF object.
1085 (pe_ILF_object_p): New function. Return a bfd_target pointer
1086 for an ILF object.
1087 (pe_bfd_object_p): If an ILF object is detected call
1088 pe_ILF_object_p on it.
1089
1090 * coff-arm.c: Add support for WinCE relocs which are different
1091 from normal ARM COFF relocs.
1092 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
1093
1094 * coff-sh.c: Add support for sh-pe target.
1095 * pe-sh.c: New file. Support code for sh-pe target.
1096 * pei-sh.c: New file. Support code for sh-pe target.
1097
1098 * pe-mips.c: New file. Support code for mips-pe target.
1099 * pei-mips.c: New file. Support code for mips-pe target.
1100
1101 2000-02-27 Jakub Jelinek <jakub@redhat.com>
1102
1103 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
1104 architecture if the object causing the bump is dynamic.
1105 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
1106 and also don't it for memory ordering.
1107 (sparc64_elf_write_relocs): Take src_rela out of the loop.
1108
1109 2000-02-27 Ian Lance Taylor <ian@zembu.com>
1110
1111 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
1112 calling bfd_get_section_size_before_reloc.
1113 (decode_line_info): Likewise.
1114 (_bfd_dwarf2_find_nearest_line): Likewise.
1115
1116 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
1117
1118 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
1119 name of the libtool directory.
1120 * Makefile.in: Rebuild.
1121
1122 Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com)
1123
1124 * som.c (SOM_HOWTO): Define.
1125 (som_hppa_howto_table): Use it.
1126
1127 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
1128
1129 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
1130
1131 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
1132
1133 2000-02-24 Catherine Moore <clm@cygnus.com>
1134
1135 * som.c (som_misc_symbol_info): Add field
1136 secondary_def.
1137 (som_bfd_derive_misc_symbol_info): Initialize
1138 secondary_def.
1139 (som_build_and_write_symbol_table): Keep track
1140 of secondary_def field.
1141 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
1142 if secondary_def field is set.
1143 (som_bfd_ar_write_symbol_stuff): Initialize
1144 secondary_def.
1145
1146 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
1147
1148 * dwarf2.c (read_address): Read 16-bits addresses.
1149 (parse_comp_unit): Accept addr_size == 2.
1150
1151 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
1152
1153 * bfd-in.h: Update copyright date.
1154
1155 2000-02-23 Linas Vepstas <linas@linas.org>
1156
1157 * cpu-i370.c: New file.
1158 * elf32-i370.c: New file.
1159 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
1160 (bfd_i370_arch): New.
1161 (bfd_archures_list): Add bfd_i370_arch.
1162 * elf.c (prep_headers): Add bfd_arch_i370.
1163 * Makefile.am: Add support for IBM 370 elf.
1164 * config.bfd: Likewise.
1165 * configure.in: Likewise.
1166 * libbfd.h (bfd_reloc_code_real_names): Likewise.
1167 * reloc.c (bfd_reloc_code_type): Likewise.
1168 * targets.c: Likewise.
1169
1170 * Makefile.in: Regenerate.
1171 * configure: Regenerate.
1172 * bfd-in2.h: Regenerate.
1173
1174 2000-02-22 Ian Lance Taylor <ian@zembu.com>
1175
1176 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
1177 invalid relocation types, and change them to R_386_NONE.
1178
1179 2000-02-22 H.J. Lu <hjl@gnu.org>
1180
1181 * elflink.h (elf_link_add_object_symbols): If a version symbol is
1182 not defined, don't add a second ELF_VER_CHR.
1183
1184 * elflink.h (elf_bfd_final_link): Call output_extsym for global
1185 symbols converted to local symbols even when stripping all
1186 symbols.
1187 (elf_link_output_extsym): Process global symbols converted to
1188 local symbols even if they are being stripped.
1189
1190 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
1191
1192 * archures.c (bfd_octets_per_byte): Return unsigned int.
1193 (bfd_arch_mach_octets_per_byte): Ditto.
1194 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
1195 comparison warning.
1196 * section.c (bfd_get_section_size_before_reloc): Quell signed
1197 vs. unsigned comparison warning.
1198 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
1199 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
1200 change. What was I thinking?
1201 * bfd-in2.h: Regenerate.
1202
1203 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
1204 (elf_gc_sections): Same here.
1205 (elf_gc_common_finalize_got_offsets): And here.
1206
1207 2000-02-21 Ian Lance Taylor <ian@zembu.com>
1208
1209 ELF HPPA doesn't work at present; remove it until it does.
1210 * config.bfd: Comment out setting targ_defvec to
1211 bfd_elf32_hppa_vec.
1212 * Makefile.am: Rebuild dependencies.
1213 (BFD32_BACKENDS): Remove elf32-hppa.lo.
1214 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
1215 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
1216 * Makefile.in: Rebuild.
1217 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
1218
1219 2000-02-18 Geoff Keating <geoffk@cygnus.com>
1220
1221 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
1222 is no bfd_free(). Revert bfd_free part of previous change.
1223
1224 2000-02-18 Geoff Keating <geoffk@cygnus.com>
1225
1226 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
1227 arrays.
1228 (coff_compute_section_file_positions): Use bfd_free to pair
1229 bfd_malloc.
1230 (coff_write_object_contents): Likewise.
1231
1232 * coff-rs6000.c (xcoff_howto_table_16): New variable.
1233 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
1234
1235 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
1236
1237 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
1238 (xcoff_ar_file_hdr_big): New structure.
1239 (SIZEOF_AR_FILE_HDR_BIG): New macro.
1240 (xcoff_ar_hdr_big): New structure.
1241 (SIZEOF_AR_HDR_BIG): New macro.
1242 (xcoff_big_format_p): New macro.
1243 (xcoff_ardata_big): New macro.
1244 (arch_xhdr_big): New macro.
1245 (xcoff_slurp_armap): Handle large archives.
1246 (xcoff_archive_p): Detect large archives.
1247 (xcoff_read_ar_hdr): Handle large archives.
1248 (xcoff_openr_next_archived_file): Handle large archives.
1249 (xcoff_generic_stat_arch_elt): Handle large archives.
1250 (xcoff_write_armap_old): Rename from xcoff_write_armap.
1251 (xcoff_write_armap_big): New function.
1252 (xcoff_write_armap): New function, dispatch to _old or _big.
1253 (xcoff_write_archive_contents_old): Rename from
1254 xcoff_write_archive_contents.
1255 (xcoff_write_archive_contents_big): New function.
1256 (xcoff_write_archive_contents): New function, dispatch to _old or
1257 _big.
1258
1259 2000-02-18 Richard Henderson <rth@cygnus.com>
1260
1261 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
1262 and hide_symbol members.
1263 (elf_link_hash_copy_indirect): Remove.
1264 (elf_link_hash_hide_symbol): Remove.
1265 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
1266 and elf_backend_hide_symbol.
1267 (_bfd_elf_link_hash_copy_indirect): Declare.
1268 (_bfd_elf_link_hash_hide_symbol): Declare.
1269 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
1270 (_bfd_elf_link_hash_hide_symbol): Likewise.
1271 (_bfd_elf_link_hash_table_init): Don't init killed members.
1272 * elflink.h (elf_link_add_object_symbols): Use the bed function
1273 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
1274 (elf_link_assign_sym_version): Likewise.
1275 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
1276 (elf_backend_hide_symbol): Likewise.
1277 (elfNN_bed): Update for new members.
1278
1279 2000-02-17 Kevin Buettner <kevinb@redhat.com>
1280
1281 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
1282 STACK_END_ADDR): Define for new core file format.
1283 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
1284 for handling the vagaries of the various core file structures used
1285 by AIX over the years.
1286 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
1287 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
1288 core_dumpx structure.
1289
1290 Thu Feb 17 00:04:48 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
1291
1292 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
1293 (bfd_mach_sh3_dsp): Likewise.
1294 (bfd_mach_sh4): Reinstate.
1295 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
1296 * bfd-in2.h: Regenerate.
1297 * coff-sh.c (struct sh_opcode): flags is no longer short.
1298 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
1299 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
1300 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
1301 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
1302 (sh_opcodes): No longer const.
1303 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
1304 (sh_insn_uses_reg): Check for USESAS and USESR8.
1305 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
1306 (_bfd_sh_align_load_span): Return early for SH4.
1307 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
1308 Take into account that field b of a parallel processing insn
1309 could be mistaken for a separate insn.
1310 * cpu-sh.c (arch_info_struct): New array elements for
1311 sh2, sh-dsp and sh3-dsp.
1312 Reinstate element for sh4.
1313 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
1314 (SH4_NEXT): Reinstate.
1315 (SH3_NEXT, SH3E_NEXT): Adjust.
1316 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
1317 * elf32-sh.c (sh_elf_set_private_flags): New function.
1318 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
1319 (sh_elf_merge_private_data): New function.
1320 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
1321 (bfd_elf32_bfd_copy_private_bfd_data): Define.
1322 (bfd_elf32_bfd_merge_private_bfd_data): Change to
1323 sh_elf_merge_private_data.
1324
1325 2000-02-13 Richard Henderson <rth@cygnus.com>
1326
1327 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
1328 hide_symbol members.
1329 (elf_link_hash_copy_indirect): New.
1330 (elf_link_hash_hide_symbol): New.
1331 * elflink.h (elf_link_add_object_symbols): Break out copy from
1332 indirect new new symbol to elf.c.
1333 (elf_link_assign_sym_version): Break out privatization of
1334 non-exported symbol to elf.c.
1335 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
1336 (_bfd_elf_link_hash_hide_symbol): New.
1337 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
1338
1339 2000-02-13 Ian Lance Taylor <ian@zembu.com>
1340
1341 * section.c (_bfd_strip_section_from_output): Add info parameter.
1342 If it passed as non-NULL, use it to check whether any input BFD
1343 has an input section which uses this output section. Change all
1344 callers.
1345 * bfd-in2.h: Rebuild.
1346
1347 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
1348 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
1349 1999-11-29.
1350 * bfd-in2.h: Rebuild.
1351
1352 2000-02-10 Timothy Wall <twall@cygnus.com>
1353
1354 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
1355 allow final modifications of swapped-in symbol.
1356 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
1357 * coffcode.h (coff_write_relocs): Use macro
1358 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
1359 symbol index should be set to -1.
1360
1361 Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
1362
1363 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
1364 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
1365 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
1366 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
1367 sh_insns_uses_or_sets_freg): New functions.
1368 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
1369 * (sh_insns_conflict): Use new functions and new macros to
1370 detect conflicts when two instructions both set same integer registers,
1371 both set same fp register, and both set special register.
1372
1373 2000-02-09 Timothy Wall <twall@cygnus.com>
1374
1375 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
1376 swapping in sections, so that the swapping routines have access to
1377 the arch/mach info.
1378
1379 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
1380
1381 * coff-go32.c: Update comment. Update copyright.
1382
1383 2000-01-27 Thomas de Lellis <tdel@windriver.com>
1384
1385 * syms.c (bfd_decode_symclass)
1386 Two new class characters were added - 'V' and 'v'. The
1387 meaning of 'W' is now restricted to just weak non-object
1388 symbols. This allows differentiation between, for example,
1389 weak functions vs weak objects. nm for example now dumps:
1390 'W' = weak global
1391 'w' = weak unresolved
1392 'V' = weak global object
1393 'v' = weak unresolved object
1394
1395 (bfd_is_undefined_symclass): New function. Return true if the
1396 given symbol class represents and undefined/unresolved symbol.
1397
1398 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
1399 unresolved symbols.
1400
1401 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
1402
1403 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
1404 STT_ARM_16BIT flag set, but it is not attached to a data object
1405 return STT_ARM_16BIT so that it will be treated as code by the
1406 disassembler.
1407
1408 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
1409
1410 * coff-i386.c (i3coff_object_p): Remove prototype.
1411 Update copyright.
1412
1413 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
1414 to name. Update copyright.
1415
1416 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
1417 assignment to avoid warning. Update copyright.
1418
1419 2000-01-24 Robert Lipe (robertl@sco.com)
1420
1421 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
1422 instead of using GNU C extension.
1423
1424 2000-01-21 Nick Clifton <nickc@cygnus.com>
1425
1426 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
1427 amount from a bfd_in_memory structure.
1428 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
1429 structure.
1430
1431 2000-01-14 Nick Clifton <nickc@cygnus.com>
1432
1433 * linker.c (default_indirect_link_order): oops - fix incorrectly
1434 applied patch from Tim Wall.
1435
1436 2000-01-13 Timothy Wall (twall@tiac.net>
1437
1438 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
1439 = scnhsz, filhsz, relsz, aoutsz, etc)
1440
1441 * coffswap.h: Ditto.
1442
1443 2000-01-13 Nick Clifton <nickc@cygnus.com>
1444
1445 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
1446 interwork thumb to arm stub.
1447
1448 2000-01-13 Timothy Wall (twall@tiac.net>
1449
1450 * archures.c (bfd_octets_per_byte): New function: Return
1451 target byte size.
1452 (bfd_arch_mach_octets_per_byte): New function: Return target
1453 byte size.
1454
1455 * section.c: Distinguish between octets and bytes for usage of
1456 _cooked_size, _raw_size, and output_offset. Clarify
1457 description of bfd_set_section_contents.
1458
1459 * bfd-in2.h: Regenerate.
1460
1461 * coffgen.c: Indicate that the offset parameter is in bytes, not
1462 octets.
1463
1464 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
1465 where appropriate to get the octet offset when calling
1466 bfd_set_section_contents.
1467 (bfd_coff_reloc_link_order): Ditto.
1468
1469 * linker.c (bfd_generic_reloc_link_order): Ditto.
1470 (_bfd_default_link_order): Ditto.
1471
1472 * reloc.c (bfd_perform_relocation): Distinguish between octets
1473 and bytes. Use octets when indexing into octet data; use bytes
1474 when calculating target addresses.
1475 (bfd_install_relocation): Ditto.
1476
1477 * srec.c (srec_write_section): Ditto.
1478
1479 2000-01-13 Nick Clifton <nickc@cygnus.com>
1480
1481 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
1482 3 to 2. This allows 4 byte sized sections, which is necessary for
1483 dlltool to build funcitoning DLLs.
1484
1485 2000-01-10 Philip Blundell <pb@futuretv.com>
1486
1487 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
1488 (arm*-*-conix*): New target.
1489
1490 2000-01-10 Egor Duda <deo@logos-m.ru>
1491
1492 * config.bfd: Include elf32_i386 vector to target list for cygwin
1493 and mingw.
1494
1495 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
1496 * configure.in: Test for structure win32_pstatus_t in
1497 <sys/procfs.h>
1498 * configure: Regenerate.
1499
1500 * elf.c (elfcore_grok_win32pstatus): New function: process
1501 win32_pstatus_t notes in elf core file.
1502 (elfcore_grok_note): Detect win32_pstatus notes.
1503
1504 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
1505
1506 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
1507 visibility.
1508 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
1509 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
1510
1511 1999-12-29 Richard Henderson <rth@cygnus.com>
1512
1513 * elflink.h (bfd_elf,size_dynamic_sections): Don't export all
1514 if no dynamic sections created.
1515
1516 1999-12-27 Nick Clifton <nickc@cygnus.com>
1517
1518 * peicode.h (pe_bfd_object_p): Only define for PE format
1519 targets.
1520
1521 1999-12-17 Nick Clifton <nickc@cygnus.com>
1522
1523 * coff-i386.c (i3coff_object_p): Delete.
1524 (i386coff_vec): Replace reference to i3coff_object_p with a
1525 reference to coff_object_p.
1526
1527 * coff-mcore.c (pe_object_p): Delete.
1528
1529 * peicode.h (pe_bfd_object_p): New function: Detect the
1530 presence of a PE format COFF object file. Also detect and
1531 warn about the presence of LINK6 format Image Library Format
1532 object files.
1533
1534 1999-12-16 Nick Clifton <nickc@cygnus.com>
1535
1536 * coff-arm.c (NUM_ELEM): New macro.
1537 (NUM_RELOCS): New macro: The number of known ARM relocs.
1538 (RTYPE2HOWTO): Return NULL if the reloc type is out of range.
1539 (coff_arm_rtype_to_howto): Return NULL if the reloc type is out
1540 of range.
1541 (bfd_arm_process_before_allocation): Produce a warning message if
1542 an out of range symbol index is encountered.
1543
1544 1999-12-14 Nick Clifton <nickc@cygnus.com>
1545
1546 * elflink.h (is_global_symbol_definition): New Function: Return
1547 true iff the symbol is being given a global definition in this
1548 bfd.
1549 (elf_link_is_defined_archive_symbol): Do not bother processing
1550 symbols for an archive element that has already been included
1551 in the link.
1552 Use is_global_symbol_definition().
1553
1554 1999-12-09 Andrew Cagney <cagney@cygnus.com>
1555
1556 * config.bfd: Add support for sparc-*-netbsdelf* and
1557 sparc-*-netbsdaout*.
1558
1559 1999-12-13 Nick Clifton <nickc@cygnus.com>
1560
1561 * elflink.h (elf_link_is_defined_archive_symbol): Check to see
1562 if the symbol is in the common section.
1563
1564 1999-12-10 Nick Clifton <nickc@cygnus.com>
1565
1566 * elflink.h (elf_link_is_defined_archive_symbol): New
1567 function: Decide if a symbol, in an archive map is there
1568 because it is defined in the archive element, or because it is
1569 just another common declaration of it.
1570 (elf_link_add_archive_symbols): Use
1571 elf_link_is_defined_archive_symbol to decide if an archive
1572 element contain a reference to a common symbol should be
1573 linked in or not.
1574
1575 1999-12-10 Nick Clifton <nickc@cygnus.com>
1576
1577 * elflink.h: Revert previous patch.
1578 * targets.c: Revert previous patch.
1579 * libbfd-in2.h: Revert previous patch.
1580 * libbfd.h: Revert previous patch.
1581 * elfxx-target.h: Revert previous patch.
1582 * archive.c: Revert previous patch.
1583 * aout-target.h: Revert previous patch.
1584 * aout-tic30.h: Revert previous patch.
1585 * bfd.c: Revert previous patch.
1586 * coff-alpha.c: Revert previous patch.
1587 * coff-rs6000.c: Revert previous patch.
1588 * elf64-mips.c: Revert previous patch.
1589 * ieee.c: Revert previous patch.
1590 * libecoff.h: Revert previous patch.
1591 * oasys.c: Revert previous patch.
1592 * som.c: Revert previous patch.
1593 * vms.c: Revert previous patch.
1594
1595 1999-12-09 Nick Clifton <nickc@cygnus.com>
1596
1597 * elflink.h (elf_link_add_archive_symbols): Add an archive
1598 element even if contains a symbol which is currently only
1599 considered to be a common.
1600
1601 * targets.c (struct bfd_target): Add new field
1602 _bfd_allow_commons_in_armap.
1603 * bfd-in2.h:Regenerate.
1604
1605 * libbfd-in2.h (_bfd_noarchive_allow_commons_in_armap):
1606 Define.
1607 (_bfd_archive_bsd_allow_commons_in_armap): Define.
1608 * libbfd.h: Regenerate.
1609
1610 * elfxx-target.h: If using COFF archive map, override
1611 definition of allow_commons_in_armap and replace with
1612 bfd_false.
1613
1614 * archive.c (bfd_compute_and_write_armap): Do not place common
1615 symbols into the archive map unless _bfd_allow_commons_in_armap
1616 returns true.
1617
1618 * aout-target.h (MY_allow_commons_in_armap): Define.
1619 * aout-tic30.h (MY_allow_commons_in_armap): Define.
1620 * bfd.c (bfd_allow_commons_in_armap): Define.
1621 * coff-alpha.h (alpha_ecoff_allow_commons_in_armap): Define.
1622 * coff-rs6000.h (xcoff_allow_commons_in_armap): Define.
1623 * elf64-mips.c (bfd_elf64_allow_commons_in_armap): Define.
1624 * ieee.c (ieee_ecoff_allow_commons_in_armap): Define.
1625 * libecoff.h (_bfd_ecoff_allow_commons_in_armap): Define.
1626 * oasys.c (oasys_allow_commons_in_armap): Define.
1627 * som.c (som_allow_commons_in_armap): Define.
1628 * vms.c (vms_allow_commons_in_armap): Define.
1629
1630 1999-12-07 Jim Blandy <jimb@cygnus.com>
1631
1632 Add support for SSE registers in ELF core files.
1633 * elf.c (elfcore_make_note_pseudosection): New function.
1634 (elfcore_grok_prfpreg): Use it.
1635 (elfcore_grok_prxfpreg): New function.
1636 (elfcore_grok_note): Recognize Linux NT_PRXFPREG notes.
1637
1638 1999-12-03 Ian Lance Taylor <ian@zembu.com>
1639
1640 * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16
1641 value by 4 before storing it back in the field. From
1642 Koundinya. K <kk@ddeorg.soft.net>.
1643
1644 Tue Nov 30 22:41:14 1999 Jeffrey A Law (law@cygnus.com)
1645
1646 * archures.c (bfd_mach_am33): Define.
1647 * bfd-in2.h: Rebuilt.
1648 * cpu-m10300.c (bfd_am33_arch): Add to the mn103 architecture list
1649 * elf-m10300.c (mn10300_elf_relax_section): Handle am33 instructions.
1650 (compute_function_info): Handle additional registers saved by
1651 movm on the am33.
1652 (elf_mn10300_mach): Handle E_MN10300_MACH_AM33.
1653 (_bfd_mn10300_elf_final_write_processing): Handle bfd_mach_am33.
1654
1655 1999-11-29 Jim Blandy <jimb@cygnus.com>
1656
1657 * elf.c (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
1658 functions.
1659 * bfd-in2.h (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
1660 declarations.
1661
1662 1999-11-27 Michael Meissner <meissner@cygnus.com>
1663
1664 * reloc.c (BFD_RELOC_ALPHA_USER_LITERAL): New relocation for
1665 internal use within gas for alpha explicit relocations.
1666 (BFD_RELOC_ALPHA_USER_LITUSE_BASE): Ditto.
1667 (BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF): Ditto.
1668 (BFD_RELOC_ALPHA_USER_LITUSE_JSR): Ditto.
1669 (BFD_RELOC_ALPHA_USER_GPDISP): Ditto.
1670 (BFD_RELOC_ALPHA_USER_GPRELHIGH): Ditto.
1671 (BFD_RELOC_ALPHA_USER_GPRELLOW): Ditto.
1672
1673 * elf64-alpha.c (elf64_alpha_reloc_map): Add mappings for
1674 BFD_RELOC_ALPHA_USER_*.
1675
1676 * bfd-in2.h: Regenerate.
1677 * libbfd.h: Regenerate.
1678
1679 1999-11-26 Fred Fish <fnf@cygnus.com>
1680
1681 * elf.c (elfcore_read_notes): Add prototype for static function.
1682 (_bfd_elf_make_section_from_phdr): Renamed from bfd_section_from_phdr.
1683 (bfd_section_from_phdr): Replacement function that calls
1684 _bfd_elf_make_section_from_phdr for generic segment types and
1685 backend fucntion pointed to by elf_backend_section_from_phdr for
1686 backend specific segment types.
1687 (_bfd_elfcore_section_from_phdr): Remove call to elfcore_read_notes,
1688 now called by _bfd_elf_make_section_from_phdr. Note that this func
1689 is now just a stub between the caller and bfd_section_from_phdr.
1690
1691 * elf-bfd.h (struct elf_backend_data): Add new function pointer
1692 elf_backend_section_from_phdr.
1693 (elf_backend_section_from_phdr): Add prototype.
1694
1695 * elfxx-target.h (elf_backend_section_from_phdr): Define default.
1696 (elfNN_bed): Add elf_backend_section_from_phdr.
1697
1698 1999-11-25 Nick Clifton <nickc@cygnus.com>
1699
1700 * coff-arm.c (bfd_arm_get_bfd_for_interworking): Add
1701 SEC_CODE and SEC_READONLY flags to glue sections.
1702
1703 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Add
1704 SEC_CODE and SEC_READONLY flags to glue sections.
1705
1706 1999-11-20 Nick Clifton <nickc@cygnus.com>
1707
1708 * coff-mcore.c (coff_mcore_relocate_section): Fix typo in previous
1709 delta.
1710
1711 1999-11-19 Catherine Moore <clm@cygnus.com>
1712
1713 * elf32-m68k.c (elf_cpu32_plt0_entry): Fix encoding.
1714 (elf_cpu32_plt_entry): Likewise.
1715
1716 1999-11-18 Nick Clifton <nickc@cygnus.com>
1717
1718 * coff-mcore.c (coff_mcore_rtype_to_howto): Special case handling
1719 for RVA relocs.
1720 (coff_mcore_relocate_section): Initialise addend to 0.
1721 Special case processing of RVA reloc.
1722
1723 1999-11-17 Richard Henderson <rth@cygnus.com>
1724
1725 * elf-bfd.h (struct elf_backend_data): Reorder collect and
1726 type_change_ok; add sign_extend_vma.
1727 * elf32-mips.c (elf_backend_sign_extend_vma): Define.
1728 * elfcode.h (elf_swap_symbol_in): Mind be->sign_extend_vma.
1729 (elf_swap_shdr_in, elf_swap_phdr_in): Likewise.
1730 * elfxx-target.h (elf_backend_sign_extend_vma): Default.
1731 (elfNN_bed): Follow struture changes.
1732
1733 1999-11-09 Ian Lance Taylor <ian@zembu.com>
1734
1735 * libbfd.c (bfd_read): Check result of read against desired result
1736 using !=, not <.
1737 (_bfd_generic_get_section_contents): Set bfd_error if the seek is
1738 invalid compared to the section size.
1739
1740 * ieee.c (ieee_slurp_debug): Get the length of the debug
1741 information right if there is no data part.
1742
1743 Tue Nov 2 01:44:41 1999 Jeffrey A Law (law@cygnus.com)
1744
1745 * som.c (som_fixup_formats): Improve handling of R_AUX_UNWIND,
1746 R_LINETAB, R_LINETAB_ESC, and R_COMMENT.
1747
1748 1999-10-28 Ian Lance Taylor <ian@zembu.com>
1749
1750 * elflink.h (elf_bfd_final_link): Make last_local signed.
1751
1752 1999-10-27 Ian Lance Taylor <ian@zembu.com>
1753
1754 * stabs.c (_bfd_link_section_stabs): Make sure .stabstr section
1755 starts with a zero.
1756
1757 Sat Oct 23 17:36:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
1758
1759 * archures.c: Add definitions bfd_mach_d10v, bfd_mach_d10v_ts2 and
1760 bfd_mach_d10v_ts3.
1761 * cpu-d10v.c (d10v_ts3_info, d10v_ts2_info): Add.
1762 * bfd-in2.h: Regenerate.
1763
1764 1999-10-15 Andrew Haley <aph@cygnus.com>
1765
1766 * dwarf1.c (parse_die): Fail to parse a die if its length is zero.
1767
1768 Sun Oct 17 17:19:00 1999 Jeffrey A Law (law@cygnus.com)
1769
1770 * libhppa.h (bfd_hppa_insn2fmt): Change to return an int.
1771
1772 1999-10-08 Ian Lance Taylor <ian@zembu.com>
1773
1774 * elflink.h (elf_merge_symbol): When overriding a weak symbol with
1775 a defined symbol in a shared library, clear the DEF_DYNAMIC flag
1776 too.
1777
1778 Fri Oct 8 13:03:45 1999 Geoffrey Keating <geoffk@cygnus.com>
1779
1780 * elf32-mips.c (mips_elf_calculate_relocation): R_MIPS_LITERAL
1781 relocs also need the GP value.
1782 (_bfd_mips_elf_relocate_section): Handle unpaired LO16 relocs
1783 properly. Handle sign-extension for R_MIPS_64 correctly. Correct
1784 the GP value for R_MIPS_LITERAL relocs too. Handle
1785 R_MIPS_64 relocs properly on big-endian MIPS.
1786 (mips_elf_sign_extend): Behave properly with 'long long'.
1787 (mips_elf_highest): Correct typo.
1788
1789 Mon Oct 4 17:49:45 1999 Nick Clifton <nickc@cygnus.com>
1790
1791 * cpu-m32r.c (arch_info_struct): New static global.
1792 (bfd_m32r_arch): Refer to it.
1793 * elf32-m32r.c (m32r_elf_object_p): Recognize E_M32RX_ARCH.
1794 (m32r_elf_print_private_bfd_data): Ditto.
1795 (m32r_elf_final_write_processing): Handle bfd_mach_m32rx.
1796 * archures.c (bfd_mach_m32rx): Define it.
1797 * bfd-in2.h: Rebuild.
1798
1799 1999-09-28 Fred Fish <fnf@cygnus.com>
1800
1801 * targets.c (cisco_core_vec): Replaced with two new vecs ...
1802 (cisco_core_big_vec): Add new bigendian vec.
1803 (cisco_core_little_vec): Add new little endian vec.
1804
1805 * cisco-core.c (CRASH_INFO): Fixed offset replaced with ...
1806 (crash_info_locs): Add array of possible offsets.
1807 (MASK_ADDR): Mask to apply to crash info offset.
1808 (crashinfo_external): Add textbase, database, bssbase and
1809 turn into a typedef.
1810 (cisco_core_file_validate): Renamed from cisco_core_file_p.
1811 Many small changes to account for additional hardware versions.
1812 Pick a reasonable size for ".reg" section. Add a ".crash"
1813 section to allow access to crashinfo_external struct.
1814 (cisco_core_file_p): New version of this function that
1815 iterates over crash_info_locs, calling cisco_core_file_validate.
1816 (cisco_core_vec): Old big endian only vec replaced with ...
1817 (cisco_core_big_vec): Add big endian version.
1818 (cisco_core_little_vec): Add little endian version.
1819
1820 * configure.in (cisco_core_vec): Split to two new vectors ...
1821 (cisco_core_big_vec): New target vector.
1822 (cisco_core_little_vec): New target vector.
1823 * configure: Regenerate.
1824 * config.bfd (targ): For m68*-*-aout* targ, change cisco_core_vec
1825 to cisco_core_big_vec in targ_selvecs.
1826
1827 1999-09-28 Geoffrey Keating <geoffk@cygnus.com>
1828
1829 * elf32-mips.c (mips_elf_relocate_hi16): Unused, delete.
1830 (mips_elf_relocate_got_local): Unused, delete.
1831 (mips_elf_relocate_global_got): Unused, delete.
1832
1833 1999-09-24 Fred Fish <fnf@cygnus.com>
1834
1835 * elf.c (bfd_section_from_phdr): Add typename variable. Use p_type
1836 to initialize it to something meaningful. Then use it to generate
1837 more useful segment names.
1838
1839 Sun Sep 19 12:16:47 1999 Jeffrey A Law (law@cygnus.com)
1840
1841 * som.c (NO_PCREL_MODES): Define if the system does not define
1842 R_SHORT_PCREL_MODE.
1843 (hppa_som_gen_reloc_type): Handle both short and long pcrel branches.
1844 (som_write_fixups): Eliminate redundant pcrel mode relocs. Handle
1845 R_LONG_PCREL_MODE and R_SHORT_PCREL_MODE
1846 * libhppa.h (dis_assemble_22): New function.
1847 (bfd_hppa_insn2fmt): Handle long branch.
1848
1849 * libhppa.h (bfd_hppa_insn2fmt): Decode and handle formats found
1850 in PA2.0.
1851
1852 1999-09-17 Alan Modra <alan@spri.levels.unisa.edu.au>
1853
1854 * coff-i386.c (coff_i386_reloc_type_lookup): Support BFD_RELOC_16,
1855 BFD_RELOC_16_PCREL, BFD_RELOC_8, BFD_RELOC_8_PCREL relocs.
1856 (reloc_howto_type howto_table): Tidy comments and whitespace.
1857
1858 1999-09-17 Nick Clifton <nickc@cygnus.com>
1859
1860 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Undo
1861 previous delta. Set sec->gc_mark instead.
1862
1863 Thu Sep 16 11:21:13 1999 Catherine Moore <clm@cygnus.com>
1864
1865 * elf32-m68k.c (elf_cpu32_plt0_entry): Use a1 instead of a0.
1866 (elf_cpu32_plt_entry): Likewise.
1867
1868 Thu Sep 16 10:48:17 1999 Jeffrey A Law (law@cygnus.com)
1869
1870 * elf-hppa.h (elf_hppa_final_write_processing): Turn on TRAPNIL.
1871
1872 * elf-hppa.h (elf_hppa_final_link): If unable to find __gp in the
1873 symbol table, then just compute a suitable value (but do not
1874 create a __gp symbol).
1875
1876 * elf-hppa.h (elf_hppa_relocate_section): Allow undefined
1877 symbols when building shared libraries.
1878 (elf_hppa_final_link_relocate): Correct handling of PCREL
1879 relocations against undefined symbols.
1880
1881 1999-09-16 Nick Clifton <nickc@cygnus.com>
1882
1883 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Mark
1884 interworking sections as linker created so that they will not
1885 be removed by garbage collection.
1886
1887 Wed Sep 15 02:31:57 1999 Jeffrey A Law (law@cygnus.com)
1888
1889 * elf-hppa.h (elf_hppa_final_link): Revamp __gp handling.
1890 (elf_hppa_final_link_relocate): Consistently create an absolute
1891 address, then subtract out the value of __gp.
1892
1893 1999-09-14 Michael Meissner <meissner@cygnus.com>
1894
1895 * configure.in (Canonicalization of target names): Remove adding
1896 ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14
1897 generates $ac_config_sub with a ${CONFIG_SHELL} already.
1898 * configure: Regenerate.
1899
1900 1999-09-14 Nick Clifton <nickc@cygnus.com>
1901
1902 * elf32-m32r.c (ELF_MAXPAGESIZE): Change to 0x1 (at request of
1903 Mitsubishi).
1904
1905 Mon Sep 13 20:01:47 1999 Jeffrey A Law (law@cygnus.com)
1906
1907 * elf-hppa.h (elf_hppa_record_segment_addrs): New function.
1908 (elf_hppa_final_link): Initialize text_segment_base and
1909 data_segment_base.
1910 (elf_hppa_final_link_relocate): Handle SEGREL relocations.
1911
1912 * elf-hppa.h (elf_hppa_final_link): Remove unused variables.
1913 (elf_hppa_final_link_relocate): Likewise.
1914 (elf_hppa_relocate_insn): Likewise.
1915 (elf_hppa_relocate_section): Initialize HOWTO.
1916
1917 1999-09-13 Donn Terry <donn@interix.com>
1918
1919 * coffcode.h (styp_to_sec_flags): Further refinement of COMDAT
1920 handling to support both GNU and MS objects.
1921
1922 * coffcode.h (coff_write_object_contents): Don't check reloc_count
1923 when determining whether to set F_RELFLG.
1924
1925 1999-09-13 Philip Blundell <pb@nexus.co.uk>
1926
1927 * elf32-arm.h (elf32_arm_final_link_relocate): Don't range-check
1928 PC24 relocs if the target is an undefined weak symbol.
1929 (arm_add_to_rel): Fix compiler warning.
1930 (elf32_arm_plt0_entry): Correct comments.
1931
1932 1999-09-13 Alan Modra <alan@spri.levels.unisa.edu.au>
1933
1934 * elfcode.h (write_relocs): Check for the_bfd NULL when handling
1935 an absolute symbol in REL relocs.
1936
1937 Sun Sep 12 23:47:58 1999 Jeffrey A Law (law@cygnus.com)
1938
1939 * elf-hppa.h (elf_hppa_final_link_relocate): Handle SECREL32.
1940 Stub SEGREL32. Return an error for any relocation not handled.
1941
1942 1999-09-12 Ian Lance Taylor <ian@zembu.com>
1943
1944 * cofflink.c (coff_link_add_symbols): Look for special MSVC string
1945 constant symbols, and avoid multiple definition errors on them.
1946
1947 1999-09-12 Donn Terry <donn@interix.com>
1948
1949 * libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most
1950 significant bit is set.
1951
1952 1999-09-11 Ian Lance Taylor <ian@zembu.com>
1953
1954 * coff-ppc.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
1955
1956 * elfcode.h (write_relocs): Handle an absolute symbol in REL
1957 relocs as we do for RELA relocs.
1958
1959 1999-09-11 Donn Terry <donn@interix.com>
1960
1961 * libpei.h (_bfd_pei_final_link_postscript): Declare.
1962 (coff_final_link_postscript): Define.
1963 * peigen.c (_bfd_pei_swap_aouthdr_out): Don't set value for data
1964 directory entries here.
1965 (_bfd_pei_final_link_postscript): New function.
1966
1967 * peigen.c (_bfd_pei_swap_scnhdr_out): Remove code which sets
1968 section flags based on the section name.
1969
1970 * peicode.h (coff_swap_scnhdr_in): If COFF_IMAGE_WITH_PE, the
1971 get the overflow of the s_nlnno field from the s_nreloc field.
1972 * peigen.c (_bfd_pei_swap_scnhdr_out): If doing a final link, swap
1973 the s_nlnno overflow of the .text section into the s_nreloc
1974 field.
1975
1976 * peigen.c (add_data_entry): Declare.
1977 (pei_swap_aouthdr_out): Get image size right. Set linker version
1978 more intuitively.
1979 (pei_swap_scnhdr_out): Test for UNINIT section, not .bss.
1980 (pe_print_idata): Code cleanup, print more info, get rid of (now)
1981 extraneous ImageBase.
1982 (pe_print_edata): Likewise.
1983 (pe_print_pdata): Likewise. Print exception entries.
1984 (pe_print_reloc): Likewise. Print MIPS_JMPADDR.
1985 (tbl): Make const, add "UNKNOWN".
1986 (_bfd_pe_print_private_bfd_data_common): Print timestamp.
1987 (_bfd_pe_bfd_copy_private_bfd_data_common): Don't copy deleted
1988 section data directory.
1989 (_bfd_pe_bfd_copy_private_section_data): Copy pe_flags.
1990
1991 * libpei.h (_bfd_pe_bfd_get_symbol_info): Declare.
1992 * peigen.c (_bfd_pe_bfd_get_symbol_info): New function.
1993 * peicode.h (coff_get_symbol_info): Define.
1994
1995 * config.bfd (i[3456]86-*-interix*): Set targ_cflags to
1996 -DSTRICT_PE_FORMAT.
1997 * coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather
1998 than __INTERIX.
1999 (coff_classify_symbol): Re-revert 1999-08-08 patch if
2000 STRICT_PE_FORMAT.
2001
2002 * libpei.h: New file, broken out of peicode.h.
2003 * peigen.c: New file, broken out of peicode.h.
2004 * peicode.h: A bunch of code moved out to libpei.h and peigen.c.
2005 * configure.in: Add peigen.lo to list of files required for each
2006 PE target.
2007 * Makefile.am: Rebuild dependencies.
2008 (BFD32_BACKENDS): Add peigen.lo.
2009 (BFD32_BACKENDS_CFILES): Add peigen.c.
2010 (SOURCE_HFILES): Add libpei.h.
2011 * configure, Makefile.in: Rebuild.
2012
2013 * peicode.h (coff_swap_scnhdr_in): Don't check for a special
2014 section name of _BSS; check IMAGE_SCN_CNT_UNINITIALIZED_DATA
2015 instead. Don't clear the s_paddr field for an uninitialized data
2016 section.
2017
2018 * coffcode.h (coff_mkobject_hook): Set timestamp field in
2019 coff_data_type to f_timdat.
2020 * peicode.h (pe_mkobject_hook): Likewise.
2021
2022 * peicode.h (coff_swap_filehdr_in): Check the NT executable magic
2023 number if COFF_IMAGE_WITH_PE.
2024
2025 * coffcode.h (coff_mkobject_hook): If COFF_WITH_PE, set HAS_DEBUG
2026 to the reverse of IMAGE_FILE_DEBUG_STRIPPED.
2027 (coff_write_object_contents): Set IMAGE_FILE_DEBUG_STRIPPED if
2028 there is no SEC_DEBUGGING section.
2029 * peicode.h (pe_mkobject_hook): Set HAS_DEBUG to the reverse of
2030 IMAGE_FILE_DEBUG_STRIPPED.
2031
2032 * pe-i386.c (COFF_LONG_FILENAMES): Define.
2033 (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
2034 * pei-i386.c (COFF_LONG_FILENAMES): Define.
2035 (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
2036
2037 * coffswap.h (IMAGE_BASE): Don't define.
2038 * pei-arm.c (IMAGE_BASE): Don't define.
2039 * pei-i386.c (IMAGE_BASE): Don't define.
2040 * pei-mcore.c (IMAGE_BASE): Don't define.
2041 * pei-ppc.c (IMAGE_BASE): Don't define.
2042
2043 * cofflink.c (_bfd_coff_link_input_bfd): When writing out a
2044 symbol, switch on the class when determining whether to modify the
2045 value. For PE, don't modify the value of a C_FCN symbol not named
2046 .bf.
2047
2048 * libbfd-in.h (_bfd_abort): Declare.
2049 (abort): Define.
2050 * bfd.c (_bfd_abort): New function.
2051 * libbfd.h: Rebuild.
2052
2053 * coffcode.h (coff_set_alignment_hook): Delete POWERPC_LE_PE
2054 special handling.
2055
2056 * cofflink.c (_bfd_coff_link_input_bfd): If a symbol is stripped,
2057 don't write out the associated line numbers.
2058
2059 * cofflink.c (_bfd_coff_write_global_sym): Handle section symbol
2060 aux entries.
2061
2062 * cofflink.c (coff_link_add_symbols): Don't warn about symbol type
2063 changes when the base type is unknown.
2064
2065 * coffgen.c (coff_print_symbol): Fix printing of aux record for
2066 function symbols.
2067
2068 * syms.c (BSF_DEBUGGING_RELOC): Define.
2069 * coffcode.h (coff_slurp_symbol_table): If PE, set BSF_DEBUGGING
2070 for C_FCN/C_EFCN symbols, and set BSF_DEBUGGING_RELOC for such
2071 symbols named .bf.
2072 * coffgen.c (fixup_symbol_value): Relocate a symbol which has
2073 BSF_DEBUGGING_RELOC set.
2074 * bfd-in2.h: Rebuild.
2075
2076 1999-09-10 Ian Lance Taylor <ian@zembu.com>
2077
2078 * ecoff.c (bfd_debug_section): Update initialization for new
2079 comdat_info field.
2080 (_bfd_ecoff_styp_to_sec_flags): Add section parameter.
2081 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Update declaration.
2082
2083 1999-09-10 H.J. Lu <hjl@gnu.org>
2084
2085 * coff-alpha.c (alpha_ecoff_backend_data): Initialize the new
2086 _bfd_filnmlen field.
2087 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2088
2089 Fri Sep 10 00:35:14 1999 Jeffrey A Law (law@cygnus.com)
2090
2091 * elf-hppa.h (elf_hppa_final_link_relocate): Create .opd entries
2092 for FPTR relocs involving local symbols.
2093
2094 * elf-hppa.h (elf_hppa_final_link_relocate): Get the right
2095 value for the stub address in a call through a stub.
2096 Install the value for a local symbol directly into the DLT
2097 instead of generating a reloc. Correctly handle FPTR64 relocs.
2098
2099 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): New function.
2100 (elf_hppa_remark_useless_dynamic_symbols): Similarly.
2101 (elf_hppa_final_link): Call them.
2102
2103 1999-09-10 Ian Lance Taylor <ian@zembu.com>
2104
2105 * elflink.h (elf_fix_symbol_flags): Move weakdef handling here...
2106 (elf_adjust_dynamic_symbol): ...from here.
2107
2108 Wed Sep 8 17:56:11 1999 Jeffrey A Law (law@cygnus.com)
2109
2110 * elf-hppa.h (elf_hppa_howto_table); There is no DIR64WR, DIR64DR
2111 relocation, remove them. SECREL64->LTOFF16WF.
2112 (elf_hppa_final_link_relocate): Handle LTOFF* relocations. Handle
2113 DIR* relocations.
2114 (elf_hppa_relocate_insn): Similarly.
2115
2116 * elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs.
2117 (elf_hppa_relocate_insn): Similarly.
2118
2119 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and
2120 GPREL* relocations.
2121 (elf_hppa_relocate_insn): Similarly.
2122
2123 * elf-hppa.h (elf_hppa_link_final_relocate): Fix typos.
2124 Handle LTOFF_TP* relocs.
2125 (elf_hppa_relocate_insn): Similarly.
2126
2127 * elf-hppa.h (elf_hppa_final_link_relocate): Handle PCREL* relocs.
2128 Consistently deal with addends. Handle DLTIND14F and DLTREL14F.
2129 (elf_hppa_relocate_insn): Handle PCREL* relocs.
2130
2131 * elf-hppa.h (elf_hppa_final_link_relocate): Handle LT_OFF_FPTR*,
2132 DIR32, DIR64 and FPTR64 relocations.
2133 (elf_hppa_relocate_insn): Similarly.
2134
2135 * elf-hppa.h (elf_hppa_final_link): Set the value of __gp to the
2136 address of the .PARISC.global section.
2137 (elf_hppa_relocate_section): Lookup and pass the PA64 hash
2138 table entry elf_hppa_final_link_relocate. Do not give a warning
2139 for a reloc against an external symbol if it has a PA64 hash
2140 table entry.
2141 (elf_hppa_final_link_relocate): Significantly rework. Handle
2142 DLTIND relocations. Compute the final value of the relocation
2143 before passing the value of elf_hppa_relocate_insn.
2144 (elf_hppa_relocate_insn): Revamp to handle just bit tiwiddling
2145 relocation support. Handle DLTIND relocation requests just like
2146 DLTREL relocation requests. Simplify branch handling.
2147
2148 1999-09-08 Ulrich Drepper <drepper@cygnus.com>
2149
2150 * elf-hppa.h (elf_hppa_relocate_section): Catch problems with
2151 non-allocated section as done in i386 version.
2152 (elf_hppa_final_link_relocate): Uncomment R_PARISC_14F in switch
2153 statement since this is no know relocation.
2154
2155 Tue Sep 7 17:25:12 1999 Jeffrey A Law (law@cygnus.com)
2156
2157 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14F
2158 relocs.
2159 (elf_hppa_relocate_insn): Similarly.
2160
2161 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14WR and
2162 DLTREL14WD relocs.
2163 (elf_hppa_relocate_insn): Similarly.
2164
2165 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14R and
2166 DLTREL21L relocs. Pass the output bfd to elf_hppa_relocate_insn.
2167 Pass the relocate type rather than the insn format to
2168 elf_hppa_relocate_insn.
2169 (elf_hppa_relocate_insn): Make switch dependent on relocation type
2170 rather than the opcode. Handle DLTREL21L and DLTREL14R relocs.
2171
2172 1999-09-07 Ian Lance Taylor <ian@zembu.com>
2173
2174 * coffcode.h (bfd_coff_backend_data): Add _bfd_filnmlen field.
2175 (bfd_coff_filnmlen): Define.
2176 (bfd_coff_std_swap_table): Initialize new field.
2177 * coffgen.c (coff_fix_symbol_name): Use bfd_coff_filnmlen rather
2178 than FILNMLEN.
2179 (coff_write_symbols): Likewise.
2180 (coff_get_normalized_symtab): Likewise.
2181 * coff-sh.c (bfd_coff_small_swap_table): Initialize new field.
2182 * libcoff.h: Rebuild.
2183
2184 1999-09-06 Donn Terry <donn@interix.com>
2185
2186 * coffcode.h (sort_by_secaddr): New static function if
2187 COFF_IMAGE_WITH_PE.
2188 (coff_compute_section_file_positions): If COFF_IMAGE_WITH_PE, sort
2189 sections by VMA when assigning target_index values. Always set
2190 virt_size.
2191
2192 * libcoff-in.h (struct pei_section_tdata): Add pe_flags field.
2193 * coffcode.h (coff_set_alignment_hook) [COFF_WITH_PE version]: Set
2194 pe_flags field.
2195 * libcoff.h: Rebuild.
2196
2197 * coffcode.h (coff_set_custom_section_alignment): Add const to
2198 declaration to match definition.
2199 (coff_write_object_contents): Don't set F_AR32W(R)? if
2200 COFF_WITH_PE.
2201
2202 * coff-i386.c (in_reloc_p): Add declaration.
2203 (i386coff_vec): Simplify initialization of
2204 application_section_flags.
2205
2206 * coffcode.h (sec_to_styp_flags): Write separate COFF_WITH_PE
2207 version. Move COFF_WITH_PE specific code to new version.
2208 (stype_to_sec_flags): Likewise. Add section parameter.
2209 * coffgen.c (make_a_section_from_file): Set target_index before
2210 calling styp_to_sec_flags. Pass section to styp_to_sec_flags.
2211 * libcoff.h: Rebuild.
2212
2213 * syms.c (stt): Add some PE/PEI section names.
2214 (bfd_decode_symclass): Return 'w', not 'U', for a weak undefined
2215 symbol.
2216 (bfd_symbol_info): Check for 'w'.
2217
2218 * section.c (struct bfd_comdat_info): Define.
2219 (asection): Add comdat field.
2220 (STD_SECTION): Initialize comdat field.
2221 (bfd_make_section_anyway): Likewise.
2222 * bfd-in2.h: Rebuild.
2223
2224 1999-09-06 Andreas Schwab <schwab@suse.de>
2225
2226 * elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flag
2227 to version symbols.
2228
2229 1999-09-06 Nick Clifton <nickc@cygnus.com>
2230
2231 * elflink.h (elf_gc_record_vtentry): Use bfd_zmalloc and
2232 bfd_realloc instead of calloc and realloc.
2233
2234 1999-09-04 Steve Chamberlain <sac@pobox.com>
2235
2236 * cpu-pj.c: New file.
2237 * elf32-pj.c: New file.
2238 * config.bfd (pj*): New cpu.
2239 (pj-*-*, pjl-*-*): New targets.
2240 * configure.in (bfd_elf32_pj_vec): New target vector.
2241 (bfd_elf32_pjl_vec): New target vector.
2242 * archures.c (bfd_arch_pj): Define.
2243 * elf.c (prep_headers): Handle bfd_arch_pj.
2244 * reloc.c: Define BFD_RELOC_PJ_* relocations.
2245 * targets.c (bfd_elf32_pj_vec, bfd_elf32_pjl_vec): Declare and add
2246 to target vector list.
2247 * Makefile.am: Rebuild dependencies.
2248 (ALL_MACHINES): Add cpu-pj.lo.
2249 (ALL_MACHINES_CFILES): Add cpu-pj.c.
2250 (BFD32_BACKENDS): Add elf32-pj.lo.
2251 (BFD32_BACKENDS_CFILES): Add elf32-pj.c.
2252 * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
2253
2254 1999-09-04 Ian Lance Taylor <ian@zembu.com>
2255
2256 * elf-bfd.h (ELF_LINK_NON_GOT_REF): Define.
2257 * elflink.h (elf_adjust_dynamic_symbol): Copy REF_REGULAR_NONWEAK
2258 and NON_GOT_REF from weak defined symbol to real symbol.
2259 * elf32-i386.c (elf_i386_check_relocs): Set NON_GOT_REF.
2260 (elf_i386_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't
2261 create a COPY reloc.
2262 * elf32-sparc.c (elf32_sparc_check_relocs): Set NON_GOT_REF.
2263 (elf32_sparc_adjust_dynamic_symbol): If NON_GOT_REF is not set,
2264 don't create a COPY reloc.
2265
2266 1999-09-03 Ian Lance Taylor <ian@zembu.com>
2267
2268 * elflink.h (elf_bfd_final_link): When counting relocations, don't
2269 count those in sections we are not including in the link.
2270
2271 Thu Sep 2 17:41:20 1999 Jeffrey A Law (law@cygnus.com)
2272
2273 * elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINK
2274 field in hpux11 shared libraries.
2275
2276 1999-09-02 Nick Clifton <nickc@cygnus.com>
2277
2278 * elflink.h (elf_gc_record_vtentry): Fix memory leak.
2279
2280 Wed Sep 1 13:34:29 1999 Jeffrey A Law (law@cygnus.com)
2281
2282 * elf-hppa.h (elf_hppa_add_symbol_hook): New function.
2283 (elf_hppa_final_link, elf_hppa_relocate_section): Likewise.
2284 (elf_hppa_final_link_relocate, elf_hppa_relocate_insn): Likewise.
2285
2286 1999-08-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
2287
2288 * elflink.h (record_link_assignment): When possible, keep the
2289 original type of the symbol.
2290
2291 Mon Aug 30 15:26:48 1999 Jeffrey A Law (law@cygnus.com)
2292
2293 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Allow both
2294 R_PARISC_DIR32 and R_PARISC_DIR64 regardless of how the
2295 tools were configured.
2296 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Declare.
2297
2298 1999-08-26 Mark Mitchell <mark@codesourcery.com>
2299
2300 * elf32-mips.c (_bfd_mips_elf_check_relocs): Don't allocate local
2301 GOT entries for GOT16 relocations; they're not required.
2302
2303 1999-08-24 Nick Clifton <nickc@cygnus.com>
2304
2305 From a patch submitted by Roland McGrath <roland@baalperazim.frob.com>
2306
2307 * config.bfd (arm-*-netbsd*): New target.
2308 * configure.in (armnetbsd_vec): New target vector.
2309 * configure: Regenerate
2310 * targets.c (bfd_target_vector): Add &armnetbsd_vec.
2311
2312 * Makefile.am (BFD32_BACKENDS): Add armnetbsd.lo.
2313 (ALL_MACHINES_CFILES): Add armnetbsd.c.
2314 (armnetbsd.lo): New rule with deps.
2315 * Makefile.in: Regenerate.
2316
2317 * armnetbsd.c: New file: Definitions specific to arm-netbsd
2318 target.
2319
2320 Tue Aug 24 00:25:58 1999 Jeffrey A Law (law@cygnus.com)
2321
2322 * som.c (som_slurp_symbol_table): Fix typo in comment.
2323
2324 Fri Aug 20 17:01:23 1999 Jeffrey A Law (law@cygnus.com)
2325
2326 * elf-hppa.h (elf_hppa_fake_sections): Compute section indices
2327 here instead of using elf_section_data...
2328
2329 1999-08-19 Nick Clifton <nickc@cygnus.com>
2330
2331 * coff-mcore.c (mcore_emit_base_file_entry): New function: Emit
2332 relocations into the base file.
2333 (coff_mcore_relocate_section): Call mcore_emit_base_file_entry if
2334 we are building a base file.
2335
2336 1999-08-19 Nick Clifton <nickc@cygnus.com>
2337
2338 * elf32-arm.h (arm_add_to_rel): New function. Add a value to
2339 a REL style reloc.
2340 (elf32_arm_relocate_section): Use arm_add_to_rel to increment
2341 REL relocs when performing a partial relocation.
2342
2343 1999-08-18 Donn Terry <donn@interix.com>
2344
2345 * cofflink.c: Move definitions of N_TMASK, et. al., out of
2346 _bfd_coff_link_input_bfd into top level.
2347
2348 * coff-i386.c (coff_i386_reloc): Handle R_IMAGEBASE.
2349 (RTYPE2HOWTO): Return NULL if reloc type is out of range.
2350 (coff_i386_rtype_to_howto): Likewise.
2351 * coffcode.h (coff_slurp_symbol_table): Change a -2 to N_DEBUG.
2352 Completely ignore symbols which are all zero.
2353 (dummy_reloc16_estimate): Add return 0.
2354 * cofflink.c (_bfd_coff_link_input_bfd): Rename inner scope
2355 variable copy to name_copy to avoid shadowing outer scope
2356 variable.
2357 * libcoff-in.h (coff_data_type): Change raw_syment_count field
2358 from unsigned int to unsigned long. Add timestamp field.
2359 * libcoff.h: Rebuild.
2360
2361 1999-08-17 H.J. Lu <hjl@gnu.org>
2362
2363 * elf32-hppa.c (bfd_elf32_bfd_is_local_label_name): Fix typo in
2364 macro definition.
2365
2366 1999-08-17 Ian Lance Taylor <ian@zembu.com>
2367
2368 * elf32-mips.c (_bfd_mips_elf_add_symbol_hook): Set BSF_DYNAMIC
2369 for special section symbols.
2370 * elflink.h (elf_merge_symbol): If we have no old BFD, check
2371 BSF_DYNAMIC on the section symbol to see whether the old BFD is
2372 dynamic.
2373
2374 1999-08-15 Mark Mitchell <mark@codesourcery.com>
2375
2376 * elf32-mips.c (mips_elf_calculate_relocation): Fix unfortunate
2377 coincidence of variable names between old and new code.
2378
2379 1999-08-12 Nick Clifton <nickc@cygnus.com>
2380
2381 * elf32-arm.h (elf32_arm_to_thumb_stub): Make 'offset' parameter
2382 into a bfd_vma and 'addend' parameter a 'bfd_signed_vma'.
2383 (elf32_thumb_to_arm_stub): Make 'offset' parameter into a bfd_vma
2384 and 'addend' parameter a 'bfd_signed_vma'.
2385 (elf32_arm_final_link_relocate): Do not involve stubs in
2386 R_ARM_THM_PC22 relocs relative to section symbols, they are long
2387 jumps, not function calls.
2388
2389 1999-08-11 Robin Farine <advanc@dial.eunet.ch>
2390
2391 * elf32-arm.h (elf32_arm_final_link_relocate): Check for overflow
2392 in R_ARM_PC24 relocs.
2393
2394 Tue Aug 10 12:48:09 1999 Jeffrey A Law (law@cygnus.com)
2395
2396 * elf-hppa.h (elf_hppa_fake_sections): New function.
2397 * elf32-hppa.c (elf_backend_fake_sections): Define.
2398
2399 * elf-hppa.h (elf_hppa_final_write_processing): Update for
2400 recent changes to the arch_info structure.
2401
2402 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle
2403 R_HPPA_SEGBASE and R_HPPA_SEGREL32.
2404 * cpu-hppa.c (bfd_hppa20w_arch): New entry in architecture info
2405 list.
2406
2407 Tue Aug 10 00:34:29 1999 Mark P. Mitchell <mark@codesourcery.com>
2408 Ralf Baechle <ralf@uni-koblenz.de>
2409
2410 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Always
2411 output DT_MIPS_GOTSYM.
2412 (_bfd_mips_elf_finish_dynamic_sections): Use the same value as
2413 DT_MIPS_SYMTABNO if there are no global GOT symbols.
2414
2415 Tue Aug 10 00:21:08 1999 Mark P. Mitchell <mark@codesourcery.com>
2416
2417 * elf32-mips.c (mips_elf_create_dynamic_relocation): Change
2418 prototype. Handle local symbols. Add commentary.
2419 (mips_elf_calculate_relocation): Adjust accordingly.
2420 (_bfd_mips_elf_check_relocs): Handle local symbols in R_MIPS_32
2421 relocations.
2422
2423 * elflink.h (elf_bfd_final_link): Tweak last change.
2424
2425 1999-08-09 Mark Mitchell <mark@codesourcery.com>
2426
2427 * elflink.h (elf_link_size_reloc_section): Use the counts in the
2428 elf-section data to allocate just the right amount of relocation
2429 space. Don't allocate the hash space twice.
2430 (elf_bfd_final_link): Calculate the amount of space to allocate in
2431 each relocation section.
2432
2433 Mon Aug 9 17:37:30 1999 Jeffrey A Law (law@cygnus.com)
2434
2435 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case 32): When in
2436 64bit mode, generate a section relative relocation for a 32bit
2437 wide relocation.
2438 (elf_hppa_is_local_label_name): New function.
2439 * elf32-hppa.c (elf_hppa_is_local_label_name): Deleted. To be
2440 shared between 32bit and 64bit port.
2441
2442 1999-08-09 Mark Mitchell <mark@codesourcery.com>
2443
2444 * elf32-mips.c (elf_mips_howto_table): Fix src_mask for
2445 R_MIPS_GOT16 and R_MIPS_CALL16.
2446 (mips_elf_got16_entry): Use mips_elf_high to calculate the value
2447 to use when looking for a preexisting GOT entry.
2448
2449 1999-08-09 Jakub Jelinek <jj@ultra.linux.cz>
2450
2451 * elf64-sparc.c (sparc64_elf_relocate_section): Back out part of
2452 the Sep. 4th, 1998 change. glibc 2.0.x dynamic linker had bug,
2453 not binutils.
2454 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2455
2456 1999-08-09 Geoff Keating <geoffk@cygnus.com>
2457
2458 * elflink.h (elf_link_output_extsym): Don't output a weak
2459 reference to an undefined symbol just because it was defined weak
2460 in a shared object.
2461
2462 1999-08-09 Eli Zaretskii <eliz@is.elta.co.il>
2463
2464 * coffgen.c (coff_find_nearest_line): When looking for file, use
2465 last best match rather than first. If address is beyond last line
2466 number record, don't return the last line as the correct value.
2467
2468 1999-08-08 Ian Lance Taylor <ian@zembu.com>
2469
2470 * section.c (SEC_SMALL_DATA): Rename from SEC_SHORT.
2471 * bfd-in2.h: Rebuild.
2472
2473 1999-08-08 Mark Elbrecht <snowball3@bigfoot.com>
2474
2475 * libcoff-in.h (struct coff_section_alignment_entry): Define.
2476 * coffcode.h (coff_set_custom_section_alignment): New static
2477 function.
2478 (coff_section_alignment_table): New static array.
2479 (coff_new_section_hook): Use coff_set_customer_section_alignment.
2480 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
2481 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
2482 * libcoff.h: Rebuild.
2483
2484 1999-08-08 Ian Lance Taylor <ian@zembu.com>
2485
2486 * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
2487 MKDEP.
2488 * Makefile.in: Rebuild.
2489
2490 1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
2491
2492 * section.c (SEC_SHARED): Define.
2493 * coffcode.h (sec_to_styp_flags): Handle SEC_SHARED.
2494 (styp_to_sec_flags): Likewise.
2495 * peicode.h (coff_swap_scnhdr_out): Likewise.
2496 * bfd-in2.h: Rebuild.
2497
2498 1999-08-08 Ian Lance Taylor <ian@zembu.com>
2499
2500 * coffcode.h (coff_classify_symbol): Comment out part of
2501 1999-08-05 change which breaks cygwin DLLs.
2502
2503 * acinclude.m4 (BFD_BINARY_FOPEN): Change -windows to -windows*.
2504 * aclocal.m4, configure: Rebuild.
2505
2506 1999-08-06 Ian Lance Taylor <ian@zembu.com>
2507
2508 * section.c (global_syms): Only initialize union field if
2509 __STDC__.
2510
2511 1999-08-04 Mark Mitchell <mark@codesourcery.com>
2512
2513 * elf32-mips.c (mips_elf_got16_entry): Don't multiply GOT index by
2514 the size of a GOT entry here.
2515 (mips_elf_calculate_relocation): Don't create a local GOT entry
2516 for the symbol in a GOT16 relocation; just for it's high-order bit
2517 (_bfd_mips_elf_relocate_section): Fix thinko.
2518
2519 1999-08-05 Ian Lance Taylor <ian@zembu.com>
2520
2521 Based on patches from Donn Terry <donn@interix.com>:
2522 * coffcode.h (enum coff_symbol_classification): Define.
2523 (bfd_coff_backend_data): Rename _bfd_coff_sym_is_global to
2524 _bfd_coff_classify_symbol. Change return type.
2525 (bfd_coff_classify_symbol): Rename from bfd_coff_sym_is_global.
2526 (coff_slurp_symbol_table): Use coff_classify_symbol.
2527 (coff_classify_symbol): New static function.
2528 (coff_sym_is_global): Never define.
2529 (bfd_coff_std_swap_table): Initialize with coff_classify_symbol.
2530 * cofflink.c (coff_link_check_ar_symbols): Use
2531 bfd_coff_classify_symbol rather than bfd_coff_sym_is_global.
2532 (coff_link_add_symbols): Likewise.
2533 (_bfd_coff_link_input_bfd): Likewise.
2534 * coff-sh.c (bfd_coff_small_swap_table): Initialize with
2535 coff_classify_symbol.
2536 * libcoff.h: Rebuild.
2537
2538 Wed Aug 4 18:08:07 1999 Jeffrey A Law (law@cygnus.com)
2539
2540 * libhppa.h (R_HPPA_LTPSEL, R_HPPA_RTPSEL): New field selectors
2541 (e_ltpsel, e_rtpsel): Similarly.
2542
2543 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle 21bit e_ltpsel
2544 and 14bit ertpsel. Handle 64bit psel.
2545
2546 1999-08-04 Mark Mitchell <mark@codesourcery.com>
2547
2548 * elf32-mips.c (_bfd_mips_elf_relocate_section): Tweak HI16/LO16
2549 handling for REL relocations. And only left-shift R_MIPS26
2550 relocation addends where necessary.
2551
2552 1999-08-03 Mark Mitchell <mark@codesourcery.com>
2553
2554 * elf32-mips.c (mips_elf_next_lo16_addend): Rename to ...
2555 (mips_elf_next_lo16_relocation): Don't compute the addend here.
2556 Just return the relocation found.
2557 (mips_elf_relocate_section): Pull the LO16 addend out of the
2558 section itself when using REL relocations.
2559
2560 * elf32-mips.c (mips_elf_calculate_relocation): Restore
2561 _DYNAMIC_LINK handling and handling of undefined symbols in shared
2562 libraries.
2563
2564 1999-08-03 Ian Lance Taylor <ian@zembu.com>
2565
2566 * elf32-ppc.c (ppc_elf_relocate_section): Don't use the relocation
2567 value of a symbol in a SEC_DEBUGGING section. Warn when doing a
2568 relocation against a symbol in an input section with no output
2569 section. From Daniel Jacobowitz <drow@false.org>.
2570
2571 * coff-stgo32.c (go32_stubbed_coff_object_p): Remove; not used.
2572
2573 * acinclude.m4 (BFD_CC_FOR_BUILD): Change to use conftest, and to
2574 look for generated file correctly.
2575 * aclocal.m4, configure: Rebuild.
2576
2577 1999-08-02 Mark Mitchell <mark@codesourcery.com>
2578
2579 * elf32-mips.c (_bfd_mips_elf_relocate_section): Handle R_MIPS_26
2580 and R_MIPS16_26 relocations correctly when relocating.
2581 (_bfd_mips_elf_check_relocs): Don't assume that R_MIPS_CALL_HI16
2582 and R_MIPS_CALL_LO16 are for global symbols.
2583
2584 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
2585
2586 * elflink.h (elf_bfd_final_link): Copy the whole isym, not just
2587 some fields.
2588 * elf64-sparc.c (sparc64_elf_output_arch_syms): Declare used
2589 variables and initialize them.
2590
2591 1999-08-01 Mark Mitchell <mark@codesourcery.com>
2592
2593 * elf32-mips.c (_bfd_mips_elf_final_link): Handle the case where
2594 there are no global symbols requiring GOT entries.
2595 (_bfd_mips_elf_size_dynamic_sections): Likewise.
2596 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
2597 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
2598
2599 * elf32-mips.c (mips_elf_calculate_relocation): Undefined weak
2600 symbols are considered to have the value zero.
2601 (_bfd_mips_elf_relocate_section): Don't try to perform a
2602 relocation for an undefined symbol.
2603 (_bfd_mips_elf_check_relocs): Allocate locate GOT space for local
2604 GOT16 relocations.
2605
2606 1999-07-30 Jakub Jelinek <jj@ultra.linux.cz>
2607
2608 * elf64-sparc.c (sparc64_elf_build_plt): Cosmetic change - ABI
2609 wants ba,a,pt %xcc instead of %icc.
2610 Emit correct .PLT0-(.PLTN+4) initial value into the pointer slots
2611 of large PLT entries.
2612 (sparc64_elf_plt_ptr_offset): Fix calculation.
2613 (sparc64_elf_finish_dynamic_symbol): Negative value of R_SPARC_JMP_SLOT
2614 addend should be relative to load address, not .plt section start.
2615 (sparc64_elf_size_info): Sparc64 uses 32bit .hash entries.
2616
2617 1999-07-30 Jakub Jelinek <jj@ultra.linux.cz>
2618
2619 * elf-bfd.h (struct elf_backend_data): Add
2620 print_symbol_all and output_arch_syms backend methods.
2621 * elfxx-target.h: Likewise.
2622 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create,
2623 sparc64_elf_add_symbol_hook, sparc64_elf_output_arch_syms,
2624 sparc64_elf_get_symbol_type, sparc64_elf_symbol_processing): New
2625 functions.
2626 (sparc64_elf_size_dynamic_sections): Leave space for STT_REGISTER
2627 symbols in .dynsym, add their names into .dynstr. Put those symbols
2628 into dynlocal.
2629 (sparc64_elf_finish_dynamic_sections): Fix up DT_SPARC_REGISTER
2630 pointers to STT_REGISTER symbols in dynsym section.
2631 (sparc64_elf_print_symbol_all): New function.
2632 * elf.c (bfd_elf_print_symbol): Allow special backend symbol
2633 printing using the print_symbol_all hook.
2634
2635 1999-07-30 Catherine Moore <clm@cygnus.com>
2636
2637 * elf32-arm.h (elf32_arm_check_relocs): Use r_offset for
2638 R_ARM_GNU_VTENTRY.
2639
2640 1999-07-29 Richard Henderson <rth@cygnus.com>
2641
2642 * elf32-mips.c (_bfd_mips_elf_final_link): Only re-sort dynsyms if
2643 dynamic_sections_created.
2644
2645 1999-07-29 Richard Henderson <rth@cygnus.com>
2646
2647 * elf32-mips.c (mips_info_to_howto_rel): Split out switch to ...
2648 (mips_rtype_to_howto): ... new function.
2649 (_bfd_mips_elf_relocate_section): Use it.
2650
2651 1999-07-28 Mark Mitchell <mark@codesourcery.com>
2652
2653 * elf32-mips.c (_bfd_mips_elf_relocate_section): Fix typo.
2654
2655 1999-07-27 Nick Clifton <nickc@cygnus.com>
2656
2657 Patch generated by Bernd Schmidt. <bernds@cygnus.co.uk>
2658
2659 * coff-arm.c (coff_arm_is_local_label_name): Change to strip
2660 out only symbols that start with LOCAL_LABEL_PREFIX followed by 'L'.
2661
2662 1999-07-23 Donn Terry <donn@interix.com>
2663
2664 * libcoff-in.h (coff_link_hash_entry): Add coff_link_hash_flags
2665 field, and define COFF_LINK_HASH_PE_SECTION_SYMBOL.
2666 * cofflink.c (coff_link_add_symbols): If PE, handle section
2667 symbols specially.
2668 * libcoff.h: Rebuild.
2669
2670 * config.bfd (i[3456]86-*-interix*): New target.
2671
2672 1999-07-21 Mark Elbrecht <snowball3@bigfoot.com>
2673
2674 * coffcode.h (styp_to_sec_flags): If COFF_LONG_SECTION_NAMES and
2675 COFF_SUPPORT_GNU_LINKONCE, mark sections whose names begin with
2676 .gnu.linkonce with SEC_LINKONCE and SEC_LINK_DUPLICATES_DISCARD.
2677 * coff-go32.c: (COFF_LONG_SECTION_NAMES): Define.
2678 (COFF_SUPPORT_GNU_LINKONCE): Define.
2679 * coff-stgo32.c: (COFF_LONG_SECTION_NAMES): Define.
2680 (COFF_SUPPORT_GNU_LINKONCE): Define.
2681
2682 1999-07-21 Ian Lance Taylor <ian@zembu.com>
2683
2684 From Mark Elbrecht:
2685 * makefile.dos: Remove; obsolete.
2686 * configure.bat: Remove; obsolete.
2687
2688 1999-07-21 H.J. Lu <hjl@gnu.org>
2689
2690 * config.bfd (i[3456]86-*-vxworks*): Add targ_underscore=yes.
2691
2692 1999-07-21 Philippe De Muyter <phdm@macqel.be>
2693
2694 * cofflink.c (_bfd_coff_generic_relocate_section): Issue an error
2695 message and fail if a symbol index is out of range.
2696
2697 1999-07-21 Ian Lance Taylor <ian@zembu.com>
2698
2699 * elf32-mips.c (mips_elf_calculate_relocation): Get the GP value
2700 when looking at a R_MIPS_GOT16 relocation.
2701
2702 1999-07-20 Nick Clifton <nickc@cygnus.com>
2703
2704 * coff-m88k.c: Use CREATE_BIG_COFF_TARGET_VEC.
2705
2706 Mon Jul 19 14:03:44 1999 Mark P. Mitchell <mark@codesourcery.com>
2707
2708 * elf32-mips.c (_bfd_mips_elf_final_link): Restore setting of GP
2709 removed in previous change.
2710 (_bfd_mips_elf_relocate_section): Adjust GP relative relocations
2711 in relocateable output.
2712
2713 1999-07-19 Ian Lance Taylor <ian@zembu.com>
2714
2715 * coff-m88k.c (m88kbcs_vec): Initialize new field of bfd_target
2716 structure.
2717
2718 * elflink.h (elf_merge_symbol): Do merge symbols from the same BFD
2719 if they appear to be specially created by the linker.
2720
2721 1999-07-19 Nick Clifton <nickc@cygnus.com>
2722
2723 * targets.c (alternative_target): New field in bfd_target
2724 structure.
2725 (bfd_search_for_target): New function: Find a target that
2726 satisifies a search function.
2727 * bfd-in2.h: Regenerate.
2728
2729 * elfxx-target.h: Initialise the alternative_target field of
2730 the bfd_target structures to point to the other target (if
2731 defined).
2732 * nlm-target.h: Initialise the alternative_target field of
2733 the bfd_target structures to point to the other target (if
2734 defined).
2735
2736 * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): New macro.
2737 (CREATE_LITTLE_COFF_TARGET_VEC): New macro.
2738
2739 * aix386-core.c: Initialise new field of bfd_target structure.
2740 * aout-adobe.c: Initialise new field of bfd_target structure.
2741 * aout-arm.c: Initialise new field of bfd_target structure.
2742 * aout-target.h: Initialise new field of bfd_target structure.
2743 * aout-tic30.c: Initialise new field of bfd_target structure.
2744 * binary.c: Initialise new field of bfd_target structure.
2745 * bout.c: Initialise new field of bfd_target structure.
2746 * cisco-core.c: Initialise new field of bfd_target structure.
2747 * coff-a29k.c: Use CREATE_BIG_COFF_TARGET_VEC.
2748 * coff-alpha.c: Initialise new field of bfd_target structure.
2749 * coff-apollo.c: Use CREATE_BIG_COFF_TARGET_VEC.
2750 * coff-arm.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
2751 * coff-h8300.c: Use CREATE_BIG_COFF_TARGET_VEC.
2752 * coff-h8500.c: Use CREATE_BIG_COFF_TARGET_VEC.
2753 * coff-i386.c: Initialise new field of bfd_target structure.
2754 * coff-i860.c: Initialise new field of bfd_target structure.
2755 * coff-i960.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
2756 * coff-m68k.c: Use CREATE_BIG_COFF_TARGET_VEC.
2757 * coff-mcore.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
2758 * coff-mips.c: Initialise new field of bfd_target structure.
2759 * coff-ppc.c: Initialise new field of bfd_target structure.
2760 * coff-rs6000.c: Initialise new field of bfd_target structure.
2761 * coff-sh.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
2762 * coff-sparc.c: Use CREATE_BIG_COFF_TARGET_VEC.
2763 * coff-tic30.c: Initialise new field of bfd_target structure.
2764 * coff-tic80.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
2765 * coff-w65.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
2766 * coff-we32k.c: Use CREATE_BIG_COFF_TARGET_VEC.
2767 * coff-z8k.c: Use CREATE_BIG_COFF_TARGET_VEC.
2768 * hppabsd-core.c: Initialise new field of bfd_target structure.
2769 * hpux-core.c: Initialise new field of bfd_target structure.
2770 * i386msdos.c: Initialise new field of bfd_target structure.
2771 * i386os9k.c: Initialise new field of bfd_target structure.
2772 * ieee.c: Initialise new field of bfd_target structure.
2773 * ihex.c: Initialise new field of bfd_target structure.
2774 * irix-core.c: Initialise new field of bfd_target structure.
2775 * mipsbsd.c: Initialise new field of bfd_target structure.
2776 * netbsd-core.c: Initialise new field of bfd_target structure.
2777 * oasys.c: Initialise new field of bfd_target structure.
2778 * osf-core.c: Initialise new field of bfd_target structure.
2779 * ppcboot.c: Initialise new field of bfd_target structure.
2780 * ptrace-core.c: Initialise new field of bfd_target structure.
2781 * sco5-core.c: Initialise new field of bfd_target structure.
2782 * som.c: Initialise new field of bfd_target structure.
2783 * srec.c: Initialise new field of bfd_target structure.
2784 * tekhex.c: Initialise new field of bfd_target structure.
2785 * trad-core.c: Initialise new field of bfd_target structure.
2786 * versados.c: Initialise new field of bfd_target structure.
2787 * vms.c: Initialise new field of bfd_target structure.
2788
2789 1999-07-19 Andreas Schwab <schwab@suse.de>
2790
2791 * elflink.h (elf_bfd_final_link): Remove unused variables rel_hash
2792 and rel_hdr.
2793
2794 Sat Jul 17 02:28:28 1999 Mark P. Mitchell <mark@codesourcery.com>
2795
2796 * elflink.h (elf_link_adjust_relocs): New function.
2797 (elf_bfd_final_link): Use it.
2798 (elf_link_input_bfd): Deal with the fact that there can be
2799 two relocation sections for a single section.
2800 (elf_reloc_link_order): Likewise.
2801
2802 * elf32-mips.c (_bfd_mips_elf_final_link): Don't set GP for
2803 a relocateable object.
2804 (_bfd_mips_elf_relocate_section): Handle relocateable links.
2805
2806 1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
2807
2808 * elf64-sparc.c (sparc64_elf_info_to_howto): Use ELF64_R_TYPE_ID.
2809 (sparc64_elf_get_reloc_upper_bound,
2810 sparc64_elf_get_dynamic_reloc_upper_bound,
2811 sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
2812 sparc64_elf_canonicalize_dynamic_reloc, sparc64_elf_write_relocs):
2813 New functions.
2814 (sparc64_elf_check_relocs, sparc64_elf_relocate_section): Use
2815 ELF64_R_TYPE_ID/DATA where appropriate.
2816
2817 1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
2818
2819 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Remove
2820 DT_SPARC_PLTFMT.
2821
2822 1999-07-16 Ian Lance Taylor <ian@zembu.com>
2823
2824 * elf32-mips.c (mips_elf_local_relocation_p): New static
2825 function.
2826 (mips_elf_next_lo16_addend): Call bfd_set_error on failure.
2827 (mips_elf_calculate_relocation): Use mips_elf_local_relocation_p.
2828 Always set *require_jalxp.
2829 (mips_elf_stub_section_p): Mark abfd parameter as unused.
2830 (_bfd_mips_elf_relocate_section): Only look for LO16 following
2831 GOT16 if the GOT16 is against a local symbol. Don't return false
2832 for an undefined symbol. If there is an overflow, assert that we
2833 have a name.
2834
2835 1999-07-16 Andreas Schwab <schwab@suse.de>
2836
2837 * elflink.h (elf_link_record_local_dynamic_symbol): Remove unused
2838 variables `link' and `elfsec'.
2839 (elf_bfd_final_link): Remove unused variable `os'.
2840
2841 Thu Jul 15 17:55:31 1999 Mark P. Mitchell <mark@codesourcery.com>
2842
2843 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Don't require
2844 a PT_PHDR program headers.
2845 (_bfd_mips_elf_final_link): Don't assume there are going to be
2846 section symbols when we're not building a shared object.
2847 (_bfd_mips_elf_check_relocs): Make sure we have a GOT when
2848 we need one.
2849
2850 1999-07-15 J.T. Conklin <jtc@redback.com>
2851
2852 * config.bfd (i[3456]86-*-vxworks*): New target.
2853
2854 1999-07-15 Mark Mitchell <mark@codesourcery.com>
2855
2856 * elf32-mips.c (mips_elf_stub_section_p): New function.
2857 (mips_elf_calculate_relocation): Handle MIPS16 stub functions.
2858 (mips_elf_relocate_section): Adjust calling sequence for
2859 mips_elf_calculate_relocation and mips_elf_perform_relocation.
2860 (mips_elf_perform_relocation): Turn `jal' into `jalx' where
2861 required.
2862
2863 1999-07-15 Ian Lance Taylor <ian@zembu.com>
2864
2865 * configure.in: Bump version number to 2.9.5.
2866 * configure: Rebuild.
2867
2868 Thu Jul 15 02:56:15 1999 Jeffrey A Law (law@cygnus.com)
2869
2870 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case R_HPPA): Handle
2871 64bit format.
2872 (_bfd_elf_hppa_gen_reloc_type, case R_GOTOFF): Use base reloc type
2873 to derive final type instead of hardwiring a selection.
2874
2875 1999-07-14 Mark Mitchell <mark@codesourcery.com>
2876
2877 * elf32-mips.c (mips_elf_obtain_contents): Swap 16-bit halves of
2878 things relocated by R_MIPS16_GPREL.
2879 (mips_elf_perform_relocation): Likewise.
2880
2881 Wed Jul 14 15:23:19 1999 Jim Wilson <wilson@cygnus.com>
2882
2883 * elfxx-target.h (elfNN_bed): Add elf_backend_want_dynbss.
2884
2885 1999-07-14 Richard Henderson <rth@cygnus.com>
2886
2887 * elf32-mips.c (struct mips_got_info): Add global_gotno.
2888 (_bfd_mips_elf_size_dynamic_sections): Set it.
2889 (_bfd_mips_elf_final_link): Re-sort; verify the got did not grow.
2890 (mips_elf_sort_hash_table): Set max_non_got_dynindex based off
2891 new argument max_local.
2892
2893 1999-07-14 Mark Mitchell <mark@codesourcery.com>
2894
2895 * elf32-mips.c (mips_elf_obtain_contents): Swap the 16-bit
2896 subwords when handling an R_MIPS16_26 relocation.
2897 (mips_elf_perform_relocation): Don't be paranoid abour right-shift
2898 semantics.
2899
2900 * elf32-mips.c (elf_mips16_gprel_howto): Adjust src_mask and
2901 dst_mask to match reality.
2902 (_bfd_mips_elf_calculate_relocation): Handle R_MIPS16_GPREL.
2903 (mips_elf_obtain_contents): Use bfd_get.
2904 (mips_elf_perform_relocation): Handle R_MIPS16_GPREL.
2905 (mips_elf_relocate_section): Likewise.
2906
2907 1999-07-13 Mark Mitchell <mark@codesourcery.com>
2908
2909 * elf32-mips.c (mips_elf_calculate_relocation): Handle R_MIPS16_26.
2910 (mips_elf_relocate_section): Adjust calling sequence for
2911 mips_elf_perform_relocation.
2912 (mips_elf_perform_relocation): Take additional argument. Handle
2913 R_MIPS16_26. Use bfd_put for convenience.
2914
2915 1999-07-13 Richard Henderson <rth@cygnus.com>
2916
2917 * elf.c (assign_file_positions_for_segments): Thinko last change.
2918 Always overwrite p_flags.
2919
2920 1999-07-13 Richard Henderson <rth@cygnus.com>
2921
2922 * elf-bfd.h (struct elf_backend_data): Add want_dynbss.
2923 * elflink.c (_bfd_elf_create_dynamic_sections): Only create
2924 .dynbss and .rel[a].bss if want_dynbss.
2925 * elfxx-target.h (elf_backend_want_dynbss): Provide default.
2926
2927 1999-07-13 Richard Henderson <rth@cygnus.com>
2928
2929 * elf.c (assign_file_positions_for_segments): Don't overwrite p_flags.
2930
2931 1999-07-13 Richard Henderson <rth@cygnus.com>
2932
2933 * elf-bfd.h (struct elf_link_local_dynamic_entry): New.
2934 (struct elf_link_hash_table): Add dynlocal.
2935 (_bfd_elf_link_lookup_local_dynindx): Prototype.
2936 (_bfd_elf_link_adjust_dynindx): Delete.
2937 (_bfd_elf_link_renumber_dynsyms): Prototype.
2938 (_bfd_elf,link_record_local_dynamic_symbol): Prototype.
2939 * elfcode.h (elf_link_record_local_dynamic_symbol): New alias.
2940 * elflink.c (_bfd_elf_link_adjust_dynindx): Delete.
2941 (_bfd_elf_link_lookup_local_dynindx): New function.
2942 (elf_link_renumber_hash_table_dynsyms): New function.
2943 (_bfd_elf_link_renumber_dynsyms): New function.
2944 * elflink.h (elf_link_record_local_dynamic_symbol): New function.
2945 (struct elf_assign_sym_version_info): Delete removed_dynamic.
2946 (bfd_elf,size_dynamic_sections): Use _bfd_strip_section_from_output
2947 instead of elf_link_remove_section_and_adjust_dynindices.
2948 Remove removed_dynamic code. Use _bfd_elf_link_renumber_dynsyms.
2949 (elf_link_assign_sym_version): Remove removed_dynamic code.
2950 (elf_link_renumber_dynsyms): Delete.
2951 (elf_bfd_final_link): Install section and local symbols into .dynsym.
2952
2953 * elf32-m68k.c (elf_m68k_adjust_dynindx): Delete.
2954 (elf_m68k_size_dynamic_sections): Don't set section dynindicies.
2955 (elf_m68k_finish_dynamic_sections): Don't write section dynsyms.
2956 * elf32-mips.c: Similarly.
2957 * elf32-ppc.c: Similarly.
2958 * elf32-sparc.c: Similarly.
2959 * elf64-alpha.c: Similarly.
2960 * elf64-sparc.c: Similarly.
2961
2962 1999-07-13 Mark Mitchell <mark@codesourcery.com>
2963
2964 * elf32-mips.c (mips_elf_calculate_relocation): Do not complain
2965 when _gp_disp is undefined. Do not check R_MIPS_LO16 for overflow
2966 when the relocation is against _gp_disp.
2967
2968 1999-07-12 Mark Mitchell <mark@codesourcery.com>
2969
2970 * dwarf2.c (read_attribute): Support DW_FORM_ref8.
2971 * elf32-mips.c (mips_elf_link_hash_entry): Change mips_32_relocs
2972 to possibly_dynamic_relocs. Adjust usage throughout code.
2973 (elf_mips_howto_table): Handle R_MIPS_64 correctly.
2974 (elf_mips_ctor64_howto): Likewise.
2975 (mips_elf_calculate_relocation): Handle R_MIPS_64 like R_MIPS_32.
2976 Adjust indentation.
2977 (mips_elf_relocate_section): Handle R_MIPS_64 in 32-bit mode.
2978 (_bfd_mips_elf_check_relocs): Handle R_MIPS_64 like R_MIPS_32.
2979 Use MIPS_ELF_GOT_SIZE to calculate the size of GOT entries.
2980 * elf64-mips.c (elf_backend_may_use_rel_p): Define.
2981
2982 1999-07-12 Ian Lance Taylor <ian@zembu.com>
2983
2984 * Makefile.am: Rebuild dependencies.
2985 * Makefile.in: Rebuild.
2986
2987 * bfd-in.h: Remove tests of COFF_IMAGE_WITH_PE.
2988 * bfd-in2.h: Rebuild.
2989
2990 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
2991 as appropriate. Use EMPTY_HOWTO as appropriate. Fill in
2992 structure initializations. Add casts.
2993 * reloc.c (EMPTY_HOWTO): Define.
2994 * bfd-in2.h: Rebuild.
2995 * coff-h8300.c (h8300_reloc16_extra_cases): Remove useless
2996 comparisons against 0.
2997 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Change
2998 previous_ibfd_e_flags to unsigned long.
2999 * vms.h (struct vms_private_data_struct): Change section_count to
3000 unsigned.
3001 * vms-gsd.c (_bfd_vms_slurp_gsd): Change psect_idx to unsigned.
3002 (_bfd_vms_write_gsd): Change symnum to unsigned.
3003 * vms-hdr.c (_bfd_vms_write_hdr): Change symnum to unsigned.
3004 * vms-tir.c (etir_sta): Change psect to unsigned.
3005 (alloc_section): Change idx to unsigned.
3006 (tir_sta, tir_ctl): Change psect to unsigned.
3007 (_bfd_vms_write_tir): Change len and before to bfd_size_type.
3008 * vms.c (priv_section_count): Change to unsigned.
3009
3010 1999-07-12 Andreas Schwab <schwab@suse.de>
3011
3012 * elf32-m68k.c: Add some ATTRIBUTE_UNUSED.
3013 * m68klinux.c: Likewise.
3014
3015 1999-07-12 Ian Lance Taylor <ian@zembu.com>
3016
3017 * Many files: Changes to avoid gcc warnings: Remove unused local
3018 variables. Add default case to enum switches.
3019 * coff-arm.c (bfd_arm_allocate_interworking_sections): Only
3020 compile if not COFF_IMAGE_WITH_PE.
3021 (record_arm_to_thumb_glue, record_thumb_to_arm_glue): Likewise.
3022 (bfd_arm_get_bfd_for_interworking): Likewise.
3023 (bfd_arm_process_before_allocation): Likewise.
3024 * epoc-pei-arm.c: Don't rename bfd_arm functions.
3025 * pei-arm.c: Likewise.
3026 * elf32-mips.c (mips_elf_link_hash_table_create): Don't declare.
3027 (MIPS_ELF_ADD_DYNAMIC_ENTRY): Correct last change.
3028 (mips_elf_got16_entry): Put parens around & in body of ==.
3029 (mips_elf_calculate_relocation): Correct test for empty string.
3030 * vms-gsd.c: Use _bfd_error_handler rather than fprintf to
3031 stderr.
3032 * vms-misc.c (_bfd_vms_length_hash_symbol): Correct sprintf
3033 format.
3034
3035 1999-07-11 Ian Lance Taylor <ian@zembu.com>
3036
3037 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
3038 as appropriate. Fill in structure initializations. Add variable
3039 initializations. Add casts.
3040 * dwarf1.c (parse_line_table): Change eachLine to unsigned long.
3041 (dwarf1_unit_find_nearest_line): Change i to unsigned long.
3042
3043 * elf.c (bfd_elf_hash): Change parameter from unsigned char * to
3044 char *.
3045 * elf-bfd.h (bfd_elf_hash): Update declaration.
3046 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove casts
3047 when calling bfd_elf_hash.
3048
3049 1999-07-11 Mark Mitchell <mark@codesourcery.com>
3050
3051 * libbfd.c (bfd_put_8): Make it of type `void'.
3052 * bfd-in2.h: Regenerated.
3053 * elf32-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Conditionalize
3054 for 32-bit hosts.
3055 (_bfd_mips_elf_final_link): Likewise.
3056
3057 * elflink.h (elf_link_read_relocs_from_section): Be type-correct.
3058
3059 Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca>
3060
3061 * config.bfd (hppa*-*-linux-gnu*): New target
3062
3063 1999-07-07 Mark Mitchell <mark@codesourcery.com>
3064
3065 * elf-bfd.h (_bfd_mips_elf_section_from_shdr): Constify.
3066 (_bfd_mips_elf_create_dynamic_sections): New function.
3067 (_bfd_mips_elf_add_symbol_hook): Likewise.
3068 (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
3069 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
3070 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
3071 (_bfd_mips_elf_gc_mark_hook): Likewise.
3072 (_bfd_mips_elf_gc_sweep_hook): Likewise.
3073 (_bfd_mips_elf_always_size_sections): Likewise.
3074 (_bfd_mips_elf_size_dynamic_sections): Likewise.
3075 (_bfd_mips_elf_check_relocs): Likewise.
3076 (_bfd_mips_elf_link_hash_table_create): Likewise.
3077 (_bfd_mips_elf_print_private_data): Likewise.
3078 (_bfd_mips_elf_link_output_symbol_hook): Likewise.
3079 (_bfd_mips_elf_final_link): Likewise.
3080 (_bfd_mips_elf_additional_program_headers): Likewise.
3081 (_bfd_mips_elf_modify_segment_map): Likewise.
3082 (_bfd_mips_elf_relocate_section): Likewise.
3083 * elf32-mips.c (mips_elf32_object_p): Move contents into
3084 _bfd_mips_elf_object_p.
3085 (mips_elf_additional_program_headers): Rename to
3086 _bfd_mips_elf_additional_program_headers.
3087 (mips_elf_modify_segment_map): Rename to
3088 _bfd_mips_elf_modify_segment_map.
3089 (elf_mips_abi_name): Change prototype.
3090 (mips_elf32_section_from_shdr): Merge into
3091 _bfd_mips_elf_section_from_shdr.
3092 (mips_elf32_section_processing): Merge into
3093 _bfd_mips_elf_section_processing.
3094 (mips_elf_final_link): Rename to _bfd_mips_elf_final_link. Invoke
3095 the right back-end ELF linker.
3096 (mips_elf_relocate_section): Rename to
3097 _bfd_mips_elf_relocate_section. Clean up. Adjust for 64-bit code.
3098 (mips_elf_link_output_symbol_hook): Rename to
3099 _bfd_mips_elf_link_output_symbol_hook.
3100 (mips_elf_create_dynamic_section): Rename to
3101 _bfd_mips_elf_create_dynamic_section.
3102 (mips_elf_check_relocs): Rename to _bfd_mips_elf_check_relocs.
3103 Adjust for 64-bit code. Use mips_elf_got_section.
3104 (mips_elf_adjust_dynamic_symbol): Rename to
3105 _bfd_mips_elf_adjust_dynamic_symbol. Use
3106 mips_elf_allocate_dynamic_relocations.
3107 (mips_elf_finish_dynamic_symbol): Rename to
3108 _bfd_mips_elf_finish_dynamic_symbol. Use mips_elf_got_section.
3109 Adjust for 64-bit code.
3110 (mips_elf_finish_dynamic_sections): Rename to
3111 _bfd_mips_elf_finish_dynamic_sections. Adjust for 64-bit code.
3112 (mips_elf_always_size_sections): Rename to
3113 _bfd_mips_elf_always_size_sections.
3114 (mips_elf_add_symbol_hook): Rename to
3115 _bfd_mips_elf_add_symbol_hook.
3116 (mips_elf_next_lo16_addend): Constify.
3117 (mips_elf_calculate_relocation): Likewise.
3118 (mips_elf_obtain_contents): Likewise.
3119 (mips_elf_perform_relocation): Likewise.
3120 (mips_elf_create_dynamic_relocation): Likewise.
3121 (mips_elf_allocate_dynamic_relocations): New function.
3122 (MIPS_ELF_REL_DYN_SECTION_NAME): New macro.
3123 (MIPS_ELF_REL_SIZE): Likewise.
3124 (MIPS_ELF_DYN_SIZE): Likewise.
3125 (MIPS_ELF_GOT_SIZE): Likewise.
3126 (MIPS_ELF_SYM_SIZE): Likewise.
3127 (MIPS_ELF_LOG_FILE_ALIGN): Likewise.
3128 (MIPS_ELF_GET_WORD): Likewise.
3129 (MIPS_ELF_PUT_WORD): Likewise.
3130 (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
3131 (STUB_LW): Conditionalize for 64-bit value.
3132 (elf_mips_howto_table): Add R_MIPS_HIGHER and R_MIPS_HIGHEST
3133 entries.
3134 (_bfd_mips_elf_merge_private_bfd_data): Merge e_ident[EI_CLASS].
3135 Check it for inconsistency.
3136 (_bfd_mips_elf_print_private_bfd_data): Print ABI=64 for 64-bit
3137 ABI.
3138 (_bfd_mips_elf_fake_sections): Remove duplicate handling of
3139 .msym.
3140 (mips_elf_global_got_index): Use MIPS_ELF_GOT_SIZE.
3141 (mips_elf_got_offset_from_index): Use misp_elf_got_section.
3142 (mips_elf_create_local_got_entry): Use MIPS_ELF_GOT_SIZE.
3143 (mips_elf_local_got_index): Likewise.
3144 (mips_elf_got_page): Likewise.
3145 (mips_elf_got_info): Likewise.
3146 (mips_elf_create_dynamic_relocation): Handle 32-bit/64-bit split.
3147 (ELF_DYNAMIC_INTERPRETER): Handle 64-bit code.
3148 (mips_elf_create_dynamic_sections): Use MIPS_ELF_LOG_FILE_ALIGN,
3149 instead of constant `2'.
3150 (mips_elf_create_got_section): Tidy. Use MIPS_ELF_GOT_SIZE.
3151 (mips_elf_create_msym_section): Use MIPS_ELF_LOG_FILE_ALIGN.
3152 (mips_elf_size_dynamic_sections): Use
3153 MIPS_ELF_REL_DYN_SECTION_NAME, MIPS_ELF_GOT_SIZE,
3154 MIPS_ELF_ADD_DYNAMIC_ENTRY. Remove #if 0'd code.
3155 Adjust all releveant entries in elf backend table.
3156 * elf64-mips.c (mips_elf64_section_from_shdr): Remove.
3157 (mips_elf64_section_processing): Likewise.
3158 Adjust elf backend entries to use _bfd_mips_elf variants now
3159 publicly available.
3160
3161 * elflink.h (elf_link_create_dynamic_sections): Handle non-standard
3162 hash-entry sizes.
3163 (size_dynamic_sections): Likewise.
3164 (elf_link_output_extsym): Likewise.
3165 * elf.c: (elf_fake_sections): Likewise.
3166 * libbfd.c (bfd_get): New macro.
3167 (bfd_put): Likewise.
3168 * bfd-in2.h: Regenerated.
3169
3170 1999-07-07 Mark Mitchell <mark@codesourcery.com>
3171
3172 * elf-bfd.h (elf_size_info): Add hash_entry_size,
3173 int_rels_per_ext_rel, swap_dyn_out, swap_reloc_in, swap_reloc_out,
3174 wap_reloca_in, and swap_reloca_out.
3175 * elflink.h (elf_link_read_relocs_from_section): Adjust to handle
3176 multiple internal relocations per external relocation.
3177 (link_read_relocs): Likewise.
3178 (elf_bfd_final_link): Likewise.
3179 (elf_link_input_bfd): Likewise.
3180 (elf_gc_mark): Likewise.
3181 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3182 * elfcode.h (elf_swap_dyn_out): Adjust type to match
3183 elf_swap_dyn_in.
3184 (size_info): Add entries for new fields.
3185 * elf64-mips.c (mips_elf64_swap_reloc_out): Enable.
3186 (mips_elf64_be_swap_reloc_in): New function.
3187 (mips_elf64_be_swap_reloc_out): Likewise.
3188 (mips_elf64_be_swap_reloca_in): Likewise.
3189 (mips_elf64_be_swap_reloca_out): Likewise.
3190 (mips_elf64_size_info): Add entries for new fields.
3191
3192 1999-07-07 Ian Lance Taylor <ian@zembu.com>
3193
3194 * elflink.h (elf_bfd_final_link): Assert that section reloc_count
3195 field equals the new rel_count field.
3196 (elf_link_input_bfd): When doing a relocateable link, use the new
3197 rel_count field rather than the reloc_count field.
3198 (elf_reloc_link_order): Likewise.
3199 (elf_finish_pointer_linker_section): Likewise.
3200
3201 Based on patch from H.J. Lu <hjl@gnu.org>:
3202 * elflink.h (elf_merge_symbol): Permit a non-weak definition in a
3203 shared library to override a weak definition in a regular object.
3204
3205 Tue Jul 6 10:23:39 1999 Jeffrey A Law (law@cygnus.com)
3206
3207 * libhppa.h: Revert July 2, 1999 patch.
3208
3209 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): T mode selectors
3210 need to generate DLTIND relocations, not DLTREL relocations.
3211
3212 1999-07-05 Nick Clifton <nickc@cygnus.com>
3213
3214 * coffcode.h (coff_set_arch_mach_hook): Recognise arm 5
3215 architectures.
3216 (coff_set_flags): Recognise arm 5 architectures.
3217
3218 * cpu-arm.c: Add support for strongarm and arm9 cpus.
3219 Add support for armv5 architecture.
3220
3221 * archures.c: Add bfd_mach_arm_5 and bfd_mach_arm_5T.
3222
3223 * reloc.c: Add new, assembler only, ARM reloc:
3224 BFD_RELOC_ARM_ADRL_IMMEDIATE.
3225
3226 * bfd-in2.h: Regenerate.
3227
3228 1999-07-02 Mark Mitchell <mark@codesourcery.com>
3229
3230 * dwarf2.c (parse_comp_unit): Add ABBREV_LENGTH parameter.
3231 (_bfd_dwarf2_find_nearest_line): Add ADDR_SIZE parameter.
3232 * elf.c (_bfd_elf_find_nearest_line): Pass it.
3233 * elf32-arm.h (elf32_arm_find_nearest_line): Likewise.
3234 * elf32-mips.c (ABI_64_P): New macro.
3235 (IRIX_COMPAT): We are IRIX6-compatible if ABI_64_P.
3236 (_bfd_mips_elf_find_nearest_line): Adjust call to
3237 _bfd_dwarf2_find_nearest_line.
3238 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
3239 * libbfd.h: Regenerated.
3240
3241 1999-07-02 Ian Lance Taylor <ian@zembu.com>
3242
3243 * config.bfd: Add * at the end of i[3456]86-*-unixware.
3244
3245 Fri Jul 2 12:21:10 1999 Jeffrey A Law (law@cygnus.com)
3246
3247 * libhppa.h (HPPA_R_ARG_RELOC): Delete.
3248 (HPPA_R_CONSTANT, HPPA_R_ADDEND): Likewise.
3249
3250 1999-07-01 Mark Mitchell <mark@codesourcery.com>
3251
3252 * elf-bfd.h (bfd_elf_section_data): Add rel_count and rel_count2
3253 fields.
3254 (_bfd_elf_init_reloc_shdr): New function.
3255 * elf.c (_bfd_elf_new_section_hook): Use bfd_zalloc, rather than
3256 bfd_alloc followed by memset.
3257 (_bfd_elf_init_reloc_shdr): New function, split out from ...
3258 (elf_fake_sections): Here.
3259 (assign_section_numbers): Assign section numbers for the second
3260 relocation section, if required.
3261 * elflink.h (elf_link_output_relocs): New function.
3262 (elf_link_size_reloc_section): Likewise.
3263 (elf_bfd_final_link): Use elf_link_size_reloc_section.
3264 (elf_link_input_bfd): Use elf_link_output_relocs.
3265
3266 * elf32-mips.c (_bfd_mips_elf_fake_sections): Use
3267 _bfd_elf_init_reloc_shdr to initialize rel_hdr2.
3268
3269 Thu Jul 1 13:58:48 1999 Jeffrey A Law (law@cygnus.com)
3270
3271 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle R_PCREL_CALL
3272 with 22bit format.
3273
3274 1999-06-28 Mark Mitchell <mark@codesourcery.com>
3275
3276 * elf32-mips.c (mips_elf_got_info): Move declaration before
3277 prototypes. Change global_gotsym to be a pointer to a hash entry,
3278 rather than a number index.
3279 (mips_elf_link_hash_entry): Move declaration before prototypes.
3280 (mips_elf_irix6_finish_dynamic_symbol): New function.
3281 (mips_elf_sign_extend): Likewise.
3282 (mips_elf_high): Likewise.
3283 (mips_elf_higher): Likewise.
3284 (mips_elf_highest): Likewise.
3285 (mips_elf_global_got_index): Likewise.
3286 (mips_elf_local_got_index): Likewise.
3287 (mips_elf_got_offset_from_index): Likeiwse.
3288 (mips_elf_record_global_got_symbol): Likewise.
3289 (mips_elf_got_page): Likewise.
3290 (mips_elf_next_lo16_addend): Likewise.
3291 (mips_elf_calculate_relocation): Likewise.
3292 (mips_elf_obtain_contents): Likewise.
3293 (mips_elf_perform_relocation): Likewise.
3294 (mips_elf_assign_gp): Likewise.
3295 (mips_elf_sort_hash_table_f): Likewise.
3296 (mips_elf_sort_hash_table): Likewise.
3297 (mips_elf_got_section): Likewise.
3298 (mips_elf_got_info): Likewise.
3299 (mips_elf_create_local_got_entry): Likewise.
3300 (mips_elf_got16_entry): Likewise.
3301 (mips_elf_create_dynamic_relocation): Likewise.
3302 (elf_mips_howto_table): Add description of R_MIPS_SCN_DISP.
3303 (mips_elf_final_gp): Use mips_elf_assign_gp.
3304 (_bfd_mips_elf_symbol_processing): Don't move SHN_COMMON symbols
3305 into SHN_SCOMMON automatically on IRIX6.
3306 (mips_elf_add_symbol_hook): Likewise.
3307 (mips_elf_relocate_section): Rewrite, using
3308 mips_elf_calculate_relocation and mips_elf_perform_relocation.
3309 (mips_elf_create_dynamic_section): Use MIPS_ELF_STUB_SECTION_NAME.
3310 Don't deal with .rld_map on IRIX6.
3311 (mips_elf_create_got_section): Adjust use of global_gotsym. Set
3312 section flags appropriately for .got.
3313 (mips_elf_check_relocs): Handle IRIX6 relocations making use of
3314 the got. Call mips_elf_record_global_got_symbol and allocate
3315 local got space appropriately.
3316 (mips_elf_size_dynamic_sections): Use bfd_byte *, not unsigned
3317 char *. Rework calculation of GOT size. Sort dynamic symbol
3318 table entries so entries that do not require GOT entries appear at
3319 the beginning. Don't use DT_MIPS_HIPAGENO on IRIX6. Remove dead
3320 code dealing with DT_INIT and DT_FINI. Remove fiddling with
3321 global_gotsym.
3322 (mips_elf_finish_dynamic_symbol): Adjust creation of global GOT
3323 entries.
3324 (mips_elf_finish_dynamic_symbol): Use
3325 mips_elf_irix6_finish_dynamic_symbol.
3326 (mips_elf_finish_dynamic_sections): Correct off-by-one error
3327 setting DT_MIPS_UNREFEXTNO. Adjust setting of DT_MIPS_GOTSYM for
3328 change to global_gotsym. Set DT_MIPS_OPTIONS on IRIX6.
3329
3330 1999-06-30 Ian Lance Taylor <ian@zembu.com>
3331
3332 * elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a
3333 relocateable link. From Ralf Baechle <ralf@uni-koblenz.de>.
3334
3335 1999-06-04 Philip Blundell <philb@gnu.org>
3336
3337 * elf32-arm.h (elf_backend_got_header_size): Define.
3338 (elf_backend_plt_header_size): Likewise.
3339
3340 1999-06-28 Jim Pick <jim@jimpick.com>
3341
3342 * elf32-arm.h (elf32_arm_relocate_section): Mind no_undefined
3343
3344 Tue Jun 29 02:25:03 1999 Jeffrey A Law (law@cygnus.com)
3345
3346 * elf-hppa.c (elf_hppa_howto_table): Use bfd_elf_generic_reloc as
3347 relocation function.
3348 * elf32-hppa.c (hppa_elf_reloc): Kill unused/unwanted function.
3349
3350 1999-06-27 Mark Mitchell <mark@codesourcery.com>
3351
3352 * elf32-mips.c (MIPS_ELF_SRDATA_SECTION_NAME): New macro.
3353 (MIPS_ELF_OPTIONS_SECTION_NAME): Likewise.
3354 (MIPS_ELF_STUB_SECTION_NAME): Likewise.
3355 (_bfd_mips_elf_section_from_shdr): Use them.
3356 (_bfd_mips_elf_fake_sections): Likewise. Add .srdata to the list
3357 of GP-relative sections.
3358 (_bfd_mips_elf_set_section_contents): Use them.
3359 (_bfd_mips_elf_section_processing): Share code between .sdata and
3360 .lit4/.lit8 sections. Set appropriate flags for .srdata.
3361 (mips_elf_additional_program_headers): Add handling for
3362 PT_MIPS_OPTIONS segment on IRIX6.
3363 (mips_elf_modify_segment_map): Likeiwse.
3364 (mips_elf_final_link): Set EF_MIPS_CPIC when required by the ABI.
3365 Include the options sections on IRIX6. Don't look for GP-relative
3366 sections by name; use SHF_MIPS_GPREL instead.
3367 (ELF_DYNAMIC_INTERPRETER): Adjust to use /usr/lib32/libc.so.1 for
3368 the N32 ABI.
3369 (mips_elf_create_dynamic_sections): Don't muck about with section
3370 alignments and such on IRIX6.
3371 (mips_elf_adjust_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
3372 (mips_elf_size_dynamic_sections): Likewise. Adjust to handle the
3373 fact that ELF_DYNAMIC_INTERPRETER is no longer a constant. Use
3374 bfd_zalloc rather than bfd_alloc and memset.
3375 (mips_elf_finish_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
3376 Don't assert the existence of .rld_map on IRIX6.
3377 (mips_elf_finish_dynamic_sections): Use MIPS_ELF_STUB_SECTION_NAME.
3378
3379 * elf32-mips.c (mips_elf_adjust_dynindx): Remove.
3380 (mips_elf_size_dynamic_sections): Use _bfd_elf_link_adjust_dynindx
3381 instead.
3382
3383 1999-06-26 Mark Mitchell <mark@codesourcery.com>
3384
3385 * elf32-mips.c (mips_elf_swap_msym_in): New function.
3386 (mips_elf_swap_msym_out): New function.
3387 (mips_elf_create_msym_section): Likewise.
3388 (MIPS_ELF_MSYM_SECTION_NAME): New macro.
3389 (_bfd_mips_elf_final_write_processing): Set sh_link for .msym.
3390 (_bfd_mips_elf_section_from_shdr): Reject an SHT_MIPS_MSYM
3391 section not named .msym.
3392 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_MSYM_SECTION_NAME, not
3393 .msym directly. Set appropriate attributes for the .msym
3394 section.
3395 (mips_elf_link_hash_entry): Add min_dyn_reloc_index field.
3396 (mips_elf_link_hash_newfunc): Clear it.
3397 (mips_elf_create_dynamic_sections): Create the .msym section
3398 on IRIX6.
3399 (mips_elf_size_dynamic_sections): Allocate space for the
3400 .msym section. Add a DT_MIPS_MSYM entry.
3401 (mips_elf_finish_dynamic_symbol): Write out a .msym entry for
3402 the symbol.
3403 (mips_elf_finish_dynamic_sections): Assign a value for
3404 DT_MIPS_MSYM. Add .msym entries for the section symbols as well.
3405
3406 * elf32-mips.c (irix_compat_t): New enumeration.
3407 (ABI_N32_P): New macro.
3408 (IRIX_COMPAT): Likewise.
3409 (SGI_COMPAT): Implement in terms of IRIX_COMPAT.
3410 (mips_elf_relocate_section): Fix typo.
3411
3412 1999-06-26 Mumit Khan <khan@xraylith.wisc.edu>
3413
3414 * peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections
3415 as writable PE sections.
3416
3417 1999-06-26 David Mosberger <davidm@hpl.hp.com>
3418
3419 * dwarf2.c (struct arange): New type.
3420 (struct comp_unit): Replace LOW and HIGH by member ARANGE.
3421 (arange_add): New function.
3422 (decode_line_info): Keep track of address ranges that a compilation
3423 unit covers.
3424 (comp_unit_contains_address): Return true if address is contained
3425 in _any_ of the address ranges associated with a compilation unit.
3426 (_bfd_dwarf2_find_nearest_line): Call comp_unit_find_nearest_line
3427 on the first comp_unit that contains the address.
3428
3429 1999-06-26 David Mosberger <davidm@hpl.hp.com>
3430
3431 * dwarf2.c (struct dwarf2_debug): Add member dwarf_line_buffer.
3432 (decode_line_info): Add variable STASH and initialize it to point
3433 to the per-bfd dwarf2_debug info. Remove static variable
3434 dwarf_line_buffer and use stash->dwarf_line_buffer in its place.
3435
3436 1999-06-26 Ian Lance Taylor <ian@zembu.com>
3437
3438 * elflink.h (elf_link_output_extsym): It's OK for a -Bsymbolic
3439 shared library to have an undefined symbol.
3440
3441 From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
3442 * elf32-ppc.c (ppc_elf_relocate_section): Fix last patch.
3443
3444 Thu Jun 24 20:59:11 1999 Jeffrey A Law (law@cygnus.com)
3445
3446 * elf-hppa.c (elf_hppa_final_write_processing): New function.
3447 * elf32-hppa.c: Remove everything related to symbol extension
3448 sections & records. Use the common elf_hppa_final_write_processing.
3449
3450 1999-06-22 Mark Mitchell <mark@codesourcery.com>
3451
3452 * elflink.h (size_dynamic_sections): Use user-specified init/fini
3453 functions instead of _init/_fini if requested.
3454
3455 1999-06-23 Ian Lance Taylor <ian@zembu.com>
3456
3457 * elf.c (bfd_section_from_shdr): Avoid crashing on a bogus sh_link
3458 field.
3459
3460 1999-06-22 Ian Lance Taylor <ian@zembu.com>
3461
3462 From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
3463 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set unused dynindx
3464 field to 0, not -1.
3465 (ppc_elf_finish_dynamic_sections): Check for positive section
3466 dynindx field, rather than comparing against -1.
3467 (ppc_elf_relocate_section): Only return false if undefined_symbol
3468 or reloc_overflow fail, not always upon encountering an error.
3469
3470 1999-06-22 Mark Mitchell <mark@codesourcery.com>
3471
3472 * elflink.h (link_read_relocs): Explicitly cast external_relocs to
3473 bfd_byte * before performing pointer arithmetic.
3474
3475 Tue Jun 22 13:06:25 1999 Jeffrey A Law (law@cygnus.com)
3476
3477 * elf-hppa.h: New file. Common stuff for elf32 and elf64 PA
3478 support.
3479 * elf32-hppa.c: Include elf-hppa.h.
3480 (ARCH_SIZE): Define.
3481 (elf_hppa_reloc_type_lookup): Delete. Found in the common code
3482 now.
3483 (elf32_hppa_info_to_howto): Similarly.
3484 (elf_hppa_howto_table): Similarly.
3485 (elf_hppa_reloc_type_lookup): Similarly.
3486 (hppa_elf_gen_reloc_type): Similarly.
3487 * elf32-hppa.h (ELF_HOWTO_TALBE, N_PARISC_RELOCS): Delete.
3488
3489 1999-06-22 Nick Clifton <nickc@cygnus.com>
3490
3491 * elf32-v850.c (v850_elf_final_link_relocate): Catch overflow
3492 handling R_V850_22_PCREL relocation.
3493
3494 1999-06-21 Ian Lance Taylor <ian@zembu.com>
3495
3496 * coff-arm.c (arm_emit_base_file_entry): Explicitly declare return
3497 type.
3498
3499 Sun Jun 20 14:13:57 1999 Richard Henderson <rth@cygnus.com>
3500
3501 * section.c (_bfd_strip_section_from_output): Ignore sections
3502 DISCARDed by the link script.
3503
3504 1999-06-19 Ian Lance Taylor <ian@zembu.com>
3505
3506 * elflink.h (elf_link_remove_section_and_adjust_dynindices):
3507 Remove unused local variable spp.
3508
3509 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't crash if
3510 the entry symbol is not set.
3511
3512 Fri Jun 18 04:24:57 1999 Richard Henderson <rth@cygnus.com>
3513
3514 * elf64-alpha.c (elf64_alpha_relocate_section): Don't adjust
3515 GPDISP or LITUSE in a relocatable link.
3516
3517 Thu Jun 17 21:24:43 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
3518
3519 * dwarf1.c (alloc_dwarf1_unit): Allocate using bfd_zalloc.
3520 * (alloc_dwarf1_func): Likewise.
3521
3522 Wed Jun 16 03:09:57 1999 Jeffrey A Law (law@cygnus.com)
3523
3524 * libhppa.h: Fix various formatting errors.
3525 (assemble_3); Rewrite using CATENATE.
3526 (assemble_17): Fix various bugs.
3527
3528 1999-06-16 Nick Clifton <nickc@cygnus.com>
3529
3530 * elf32-mcore.c (R_MCORE_RAW): Fix definition.
3531
3532 1999-06-15 Richard Henderson <rth@cygnus.com>
3533
3534 * section.c (SEC_SHORT): Define.
3535 * bfd-in2.h: Rebuild.
3536
3537 1999-06-13 Mark Mitchell <mark@codesourcery.com>
3538
3539 * elflink.h (elf_link_remove_section_and_adjust_dynindices):
3540 Remove abfd parameter. Use _bfd_strip_section_from_output.
3541 (bfd_elf_size_dynamic_sections): Adjust callers accordingly.
3542
3543 * elf-bfd.h (_bfd_elf_link_adjust_dynindx): New function.
3544 * elflink.c (_bfd_elf_link_adjust_dynindx): Define it.
3545 * elflink.h (elf_link_remove_section_and_adjust_dynindices): New
3546 function.
3547 (bfd_elf_size_dynamic_sections): Use it.
3548
3549 1999-06-13 Alan Modra <alan@spri.levels.unisa.edu.au>
3550
3551 * elf32-i386.c (elf_howto_table): Change R_386_PC8 from
3552 complain_overflow_bitfield to complain_overflow_signed.
3553
3554 1999-06-13 Mark Mitchell <mark@codesourcery.com>
3555
3556 * elflink.h (elf_link_read_relocs_from_section): New function,
3557 split out from ...
3558 (elf_link_read_relocs): Here. Use it for both relocation
3559 sections.
3560
3561 1999-06-12 Mark Mitchell <mark@codesourcery.com>
3562
3563 * elfcode.h (elf_slurp_reloc_table_from_section): Don't assume
3564 asect->reloc_count is valid.
3565
3566 1999-06-12 Ian Lance Taylor <ian@zembu.com>
3567
3568 * elf32-mips.c (mips_elf32_section_processing): Permit a
3569 SHT_MIPS_REGINFO section to have a size of 0.
3570
3571 1999-06-12 David O'Brien <obrien@freebsd.org>
3572
3573 * config.bfd (alpha*-*-freebsd*): New target.
3574 (i[3456]86-*-freebsd*): Now defaults to ELF.
3575
3576 1999-06-11 Ian Lance Taylor <ian@zembu.com>
3577
3578 * reloc.c (_bfd_relocate_contents): Permit bitfield relocations to
3579 wrap if the relocation covers the high bit of an address.
3580
3581 * dwarf2.c (decode_line_info): Remove unused variable first_time.
3582
3583 1999-06-10 Jakub Jelinek <jj@ultra.linux.cz>
3584
3585 * elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std
3586 instead of R_SPARC_max.
3587 (sparc64_elf_info_to_howto): Likewise.
3588 * elf32_sparc.c (elf32_sparc_relocate_section): Likewise.
3589 (elf32_sparc_info_to_howto): Likewise; handle vtable relocations.
3590
3591 1999-06-07 Richard Henderson <rth@cygnus.com>
3592
3593 * section.c (_bfd_strip_section_from_output): Remove output
3594 sections with no initial link_order.
3595
3596 1999-06-07 Nick Clifton <nickc@cygnus.com>
3597
3598 * elf32-m88k.c (ELF_MAXPAGESIZE): Define.
3599
3600 Mon Jun 7 11:49:43 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3601
3602 * Makefile.am (SOURCE_HFILES): Add missing headers.
3603 * Makefile.in: Regenerated.
3604
3605 1999-06-06 Mark Mitchell <mark@codesourcery.com>
3606
3607 * elf32-mips.c (_bfd_mips_elf_print_private_data): Recognize
3608 the N32 ABI.
3609
3610 1999-06-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
3611
3612 * elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of
3613 range undefweak symbols.
3614 * hash.c: Add missing comma after @xref{}
3615 * linker.c: Likewise.
3616
3617 1999-06-04 Nick Clifton <nickc@cygnus.com>
3618
3619 * elfxx-target.h (ELF_MAXPAGESIZE): Produce an error message
3620 if not defined.
3621 * elf32-gen.c (ELF_MAXPAGESIZE): Define.
3622 * elf32-i860.c (ELF_MAXPAGESIZE): Define.
3623 * elf32-i960.c (ELF_MAXPAGESIZE): Define.
3624 * elf64-gen.c (ELF_MAXPAGESIZE): Define.
3625
3626 1999-06-04 Ian Lance Taylor <ian@zembu.com>
3627
3628 * Makefile.am: Rebuild dependencies.
3629 (BFD32_BACKENDS): Add dwarf1.lo.
3630 (BFD32_BACKENDS_CFILES): Add dwarf1.c.
3631 * Makefile.in: Rebuild.
3632
3633 1999-06-04 Nick Clifton <nickc@cygnus.com>
3634
3635 * Makefile.am: Add epoc-arm-pe target.
3636 * Makefile.in: Regenerate.
3637 * pe-arm.c: Only redefine interworking function names if they have
3638 not already been redefined.
3639 * pei-arm.c: Only redefine interworking function names if they have
3640 not already been redefined.
3641 * epoc-pe-arm.c: Redefine interworking function names to avoid a
3642 name space clash.
3643 * epoc-pei-arm.c: Redefine interworking function names to avoid a
3644 name space clash.
3645
3646 1999-06-03 Nick Clifton <nickc@cygnus.com>
3647
3648 * elfxx-target.h (ELF_MAXPAGESIZE): Default to 0x1000 not 1.
3649
3650 Fri Jun 4 10:05:11 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3651
3652 * elf.c (elf_fake_sections): Undo change of 1999-05-10.
3653
3654 Fri Jun 4 03:10:49 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
3655
3656 * elf32-sh.c (sh_elf_relax_delete_bytes): Fix setting of
3657 start / stop for recalculating of r_addend of R_SH_SWITCH*.
3658
3659 Fri Jun 4 02:53:13 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
3660
3661 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH32
3662 in other text sections.
3663
3664 Fri Jun 4 02:29:34 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
3665
3666 * libbfd.c (_bfd_generic_verify_endian_match): New function.
3667 * libbfd-in.h (_bfd_generic_verify_endian_match): Declare.
3668 * libbfd.h: Regenerate.
3669 * coff-sh.c (sh_merge_private_data): Delete.
3670 (coff_bfd_merge_private_bfd_data): Change to
3671 _bfd_generic_verify_endian_match.
3672 (elf32-sh.c): bfd_elf32_bfd_merge_private_bfd_data: Define.
3673
3674 1999-06-03 Ulrich Drepper <drepper@cygnus.com>
3675
3676 * elf32-arm.h: Fix typo: change ELF_MAXPAGE_SIZE to ELF_MAXPAGESIZE.
3677
3678 1999-06-03 Ian Lance Taylor <ian@zembu.com>
3679
3680 * bfd-in.h (bfd_elf32_arm_allocate_interworking_sections): Correct
3681 prototype.
3682 (bfd_elf32_arm_process_before_allocation): Likewise.
3683 * bfd-in2.h: Rebuild.
3684
3685 1999-06-03 David Mosberger <davidm@hpl.hp.com>
3686
3687 * dwarf2.c (struct line_info): Add member END_SEQUENCE to keep
3688 track of end_sequence markers.
3689 (add_line_info): Add END_SEQUENCE arg.
3690 (decode_line_info): Don't try to infer lo_pc and hi_pc from the
3691 debug-line info---it doesn't work right if a compilation unit
3692 consists of multiple discontiguous code-sequences. It would be
3693 worthwhile to optimize for the common case where a compilation
3694 unit results in a contiguous set of code sequences, but this is
3695 quite tricky to get right for arbitrary DWARF2 files.
3696 (lookup_address_in_line_info_table): Don't use the last line entry
3697 for a compilation unit for anything with an address higher than
3698 this line entry. Also, check for end_sequence markers to
3699 correctly handle discontinuities.
3700 (_bfd_dwarf2_find_nearest_line): When checking previously loaded
3701 compilation units, check all compilation units with each->high==0
3702 just like when reading compilation units.
3703
3704 * dwarf2.c (decode_line_info): Initialize table->files and
3705 table->last_line to NULL to avoid segfaults due to random
3706 values in these members.
3707 (concat_filename): Check for out-of-range file number before
3708 indexing filename table. Segfaults suck.
3709
3710 * dwarf2.c (decode_line_info): Don't truncate address to least
3711 significant 32 bits (breaks 64 bit targets).
3712 (lookup_address_in_function_table): Ditto.
3713 (comp_unit_contains_address): Ditto.
3714
3715 1999-06-02 Mark Mitchell <Mark Mitchell <mark@codesourcery.com>>
3716
3717 * elf32-mips.c (elf_mips_howto_table): Add R_MIPS_JALR.
3718 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
3719 (mips_elf64_howto_table_rela): Likewise.
3720
3721 * elfcode.h (elf_slurp_reloc_table_from_section): New function,
3722 split out from ...
3723 (elf_slurp_reloc_table): Here. Use it to handle the case where a
3724 single section has two associated relocation sections.
3725
3726 1999-06-02 Mark Salter <msalter@cygnus.com>
3727
3728 * coffcode.h (coff_set_alignment_hook): Set lma from s_vaddr if
3729 COFF_WITH_PE defined.
3730
3731 1999-06-02 Nick Clifton <nickc@cygnus.com>
3732
3733 * pe-arm.c: Rename global arm interworking functions to avoid name
3734 collision when all targets BFD is built.
3735 * pei-arm.c: Ditto.
3736
3737 1999-05-31 Mark Mitchell <mark@codesourcery.com>
3738
3739 * elf-bfd.h (elf_backend_data): Remove use_rela_p. Add
3740 may_use_rel_p, may_use_rela_p, default_use_rela_p.
3741 (bfd_elf_section_data): Add use_rela_p.
3742 * elf.c (bfd_section_from_shdr): Set use_rela_p appropriately.
3743 (_bfd_elf_new_section_hook): Likewise.
3744 (elf_fake_sections): Use may_use_rela_p, etc., instead of
3745 use_rela_p.
3746 (_bfd_elf_copy_private_section_data): Copy use_rela_p.
3747 * elfcode.h (write_relocs): Determine whether or not use rela
3748 relocs based on the relocation section header.
3749 * elflink.c (_bfd_elf_create_dynamic_sections): Use default_use_rela_p
3750 instead of use_rela_p.
3751 * elfxx-target.h (elf_backend_may_use_relp): New macro.
3752 (elf_backend_may_use_rela_p): Likewise.
3753 (elf_backend_default_use_rela_p): Likewise.
3754 (elfNN_bed): Use them.
3755
3756 Wed Jun 2 12:38:49 1999 Miodrag Vallat <miodrag@multimania.com>
3757
3758 * hosts/alphalinux.h (TRAD_CORE_EXTRA_SIZE_ALLOWED): Expand to 4096.
3759
3760 Tue Jun 1 17:57:58 1999 Mark P. Mitchell <mitchell@n02.acl.lanl.gov>
3761
3762 * reloc.c (BFD_RELOC_MIPS_SUB): New relocation.
3763 (BFD_RELOC_MIPS_GOT_PAGE): Likewise.
3764 (BFD_RELOC_MIPS_GOT_OFST): Likewise.
3765 (BFD_RELOC_MIPS_GOT_DISP): Likewise.
3766 * bfd-in2.h: Regenerated.
3767 * libbfd.h: Likewise.
3768 * elf32-mips.c (mips_info_to_howto_rela): New function.
3769 (USE_REL): Adjust for new conventions.
3770 (MINUS_ONE): New macro.
3771 (elf_mips_howto_table): Add R_MIPS_SUB.
3772 (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE, MIPS_GOT_OFST,
3773 and MIPS_GOT_DISP.
3774 (mips_elf_final_write_processing): Set sh_link, not sh_info, for a
3775 .MIPS.content section.
3776 (_bfd_mips_elf_fake_sections): Treat all sections that begin
3777 with .MIPS.content as .MIPS.content sections. Set
3778 SHF_MNIPS_NOSTRIP for such section.
3779 (elf_info_to_howto): Define to mips_info_to_howto_rela.
3780 * elf64-mips.c (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE,
3781 MIPS_GOT_OFST, and MIPS_GOT_DISP.
3782
3783 Wed Jun 2 11:51:12 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3784
3785 * vms-misc.c (_bfd_vms_hash_newfunc): Fix use of uninitialized
3786 variable.
3787
3788 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Avoid ambigous
3789 `else'.
3790
3791 1999-05-30 Philip Blundell <philb@gnu.org>
3792
3793 * elf32-arm.h (elf32_arm_relocate_section): Reinstate change of
3794 1993-03-25 (!!). Take into account the bitmasks for the reloc so
3795 the addend does not overflow into the rest of the word.
3796
3797 1999-05-29 Nick Clifton <nickc@cygnus.com>
3798
3799 * bfd-in.h: Amend prototype for
3800 bfd_elf32_arm_process_before_allocation .
3801 * bfd-in.h: Regenerate.
3802
3803 * elfarm-oabi.c (NUM_ELEM): New macro: Compute the number of
3804 elements in a fixed sized array.
3805 (ARM_ELF_ABI_VERSION): Define.
3806 (ARM_ELF_OS_ABI_VERSION): Define.
3807 (R_ARM_THM_ABS5): Fix rightshift and size.
3808 (R_ARM_THM_PC22): Fix size.
3809 (R_ARM_PLT32): Define Howto.
3810 (find_howto): New function: Locate a howto based on a reloc
3811 number.
3812 (elf32_arm_info_to_howto): Use find_howto if necessary.
3813 (elf32_arm_reloc_map): Change type of field bfd_reloc_val to
3814 bfd_reloc_code_real_type.
3815 (elf32_arm_reloc_map[]): Add entries for BFD_RELOC_VTABLE_INHERIT
3816 and BFD_RELOC_VTABLE_ENTRY.
3817 (elf32_arm_reloc_type_lookup): Use find_howto if necessary.
3818
3819 * elfarm-nabi.c (NUM_ELEM): New macro: Compute the number of
3820 elements in a fixed sized array.
3821 (ARM_ELF_ABI_VERSION): Define.
3822 (ARM_ELF_OS_ABI_VERSION): Define.
3823 (R_ARM_THM_ABS5): Fix rightshift and size.
3824 (R_ARM_THM_PC22): Fix size.
3825 (elf32_arm_info_to_howto_rel): Rename to elf32_arm_info_to_howto.
3826 (elf32_arm_reloc_map): Change type of field bfd_reloc_val to
3827 bfd_reloc_code_real_type.
3828
3829 * elf32-arm.h (struct elf32_arm_link_hash_table): Add new field:
3830 no_pipeline_knowledge.
3831 (elf32_arm_link_hash_create): Initialise new field to zero.
3832 (bfd_elf32_arm_process_before_allocation): Add new paraemter:
3833 no_pipeline_knowledge. Use this parameter to initialise the field
3834 in the globals data structure.
3835 (elf32_arm_final_link_relocate): Only add in pipeline offset if
3836 no_pipeline_knowledge is false and the binary is from an old
3837 toolchain.
3838 (elf32_arm_merge_private_data): Generate an error if an attempt is
3839 made to linl together big endian and little endian code.
3840 (elf32_arm_post_process_headers): New function: Initialise the
3841 EI_OSABI and EI_ABIVERSION fields of the newly created ELF program
3842 header.
3843 (elf_backend_post_process_headers): Define.
3844
3845 1999-05-28 Nick Clifton <nickc@cygnus.com>
3846
3847 * elf-bfd.h (struct elf_backend_data): Add new field:
3848 elf_backend_post_process_headers.
3849
3850 * elfxx-target.h (elf_backend_post_process_headers): Define to
3851 NULL if not already defined.
3852 (elfNN_bed): Initialise elf_backend_post_process_headers field.
3853
3854 * elf.c (prep_headers): Set the EI_OSABI and EI_ABIVERSION fields
3855 to zero.
3856 (_bfd_elf_compute_section_file_positions): Call
3857 elf_backend_post_process_headers if defined.
3858
3859 1999-05-28 Ian Lance Taylor <ian@zembu.com>
3860
3861 * configure.in: Check whether getuid and getgid exist.
3862 * archive.c: Define getuid and getgid as macros if HAVE_GETUID or
3863 HAVE_GETGID are not defined, respectively.
3864 (bfd_write_armap): Don't special case on _WIN32 for getuid and
3865 getgid.
3866 * configure.host: Set ac_cv_func_get{ug}id for *-*-windows*.
3867 * configure, config.in: Rebuild.
3868
3869 1999-05-28 Martin Dorey <mdorey@madge.com>
3870
3871 * elf32-i960.c: New file.
3872 * elf.c (prep_headers): Handle bfd_arch_i960.
3873 * targets.c (bfd_target_vector): Add &bfd_elf32_i960_vec.
3874 * config.bfd (i960-*-elf*): New target.
3875 * configure.in (bfd_elf32_i960_vec): New target vector.
3876 * Makefile.am (BFD32_BACKENDS): Add elf32-i960.lo.
3877 (BFD32_BACKENDS_CFILES): Add elf32-i960.c.
3878 * Makefile.in, aclocal.m4, configure: Rebuild.
3879
3880 1999-05-27 Nick Clifton <nickc@cygnus.com>
3881
3882 * elfarm-oabi.c (elf32_arm_howto_table): Add entry for
3883 R_ARM_PLT32.
3884 (find_howto): New function: Find entries in the
3885 elf32_arm_howto_table.
3886 (elf32_arm_info_to_howto): Use find_howto if the entry cannot be
3887 computed simply.
3888 (elf32_arm_reloc_type_lookup): Add lookup for
3889 BFD_RELOC_ARM_PLT32.
3890
3891 1999-05-25 Philip Blundell <pb@nexus.co.uk>
3892
3893 * bfd/elf32-arm.h (elf32_arm_link_hash_newfunc): New function.
3894 (elf32_arm_link_hash_table_create): Use above function as the
3895 constructor for hash table entries.
3896 (elf32_arm_relocate_section): Avoid crash when there is no output
3897 section.
3898 (elf32_arm_final_link_relocate): New parameter h.
3899 (elf32_arm_relocate_section): Pass symbol hash entry to above
3900 routine.
3901 (elf32_arm_gc_sweep_hook, elf32_arm_check relocs): Correct
3902 comments.
3903
3904 1999-05-25 Catherine Moore <clm@cygnus.com>
3905
3906 * coff-arm.c (coff_arm_relocate_section): Don't emit
3907 base file entries for pc-relative values.
3908
3909 1999-05-25 DJ Delorie <dj@cygnus.com>
3910
3911 * peicode.h (coff_swap_sym_in): When we create the actual section
3912 to reflect the not-there section C_SECTION symbols refer to,
3913 change the symbol class to C_STAT as the section is now really
3914 there.
3915
3916 1999-05-24 Philip Blundell <pb@nexus.co.uk>
3917
3918 * elf32-arm.h (elf32_arm_relocate_section): Undo change of
3919 1999-03-25.
3920
3921 Mon May 17 13:35:35 1999 Stan Cox <scox@cygnus.com>
3922
3923 * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed
3924 F_PIC_INT to F_PIC.
3925 * coffcode.h (coff_set_arch_mach_hook): Added F_ARM_2a, and
3926 F_ARM_3M labels. Changed F_PIC_INT to F_PIC.
3927
3928 1999-05-16 Nick Clifton <nickc@cygnus.com>
3929
3930 * coff-mcore.c (in_reloc_p): Reinstate.
3931
3932 1999-05-15 Nick Clifton <nickc@cygnus.com>
3933
3934 * reloc.c (BFD_RELOC_MCORE_RVA): Define.
3935 * bfd-in2.h: Regenerate.
3936 * coff-mcore.c (in_reloc_p): Remove defintion.
3937 (mcore_coff_howto): Add IMAGE_REL_MCORE_RVA.
3938 (mcore_coff_reloc_type_lookup): Map BFD_RELOC_RVA to
3939 IMAGE_REL_MCORE_RVA.
3940 (coff_mcore_rtype_to_howto): Add special processing for
3941 IMAGE_REL_MCORE_RVA.
3942 (coff_mcore_relocate_section): Add support for
3943 IMAGE_REL_MCORE_RVA.
3944 * elf32-mcore (mcore_elf_howto_): Add R_MCORE_RELATIVE.
3945 (mcore_elf_reloc_type_lookup): Map BFD_RELOC_RVA to
3946 R_MCORE_RELATIVE.
3947 (mcore_elf_relocate_section): Delete redundant case labels.
3948
3949 Fri May 14 10:59:55 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3950
3951 * elf32-arm.h (elf32_arm_relocate_section): Fix operator
3952 precedence between bit-and and comparison.
3953
3954 Thu May 13 09:45:23 1999 Joel Sherrill (joel@OARcorp.com)
3955
3956 * config.bfd (i[3456]86*-*-rtems*, m68k*-*-rtems*): Added to
3957 list of target formats (targ_selvecs).
3958 (i[3456]86*-*-rtemself*, mips*el-*-rtems*): New targets.
3959 (powerpcle*-*rtems*, sh-*-rtemself*): New targets.
3960
3961 1999-05-10 DJ Delorie <dj@cygnus.com>
3962
3963 * ecoff.c (_bfd_ecoff_write_armap): give the symtab element a
3964 reasonable mode until "ar x" is smart enough to skip it (fixes
3965 gcc/libgcc.a builds on mips-ecoff targets
3966
3967 * coffcode.h (styp_to_sec_flags): Explain how COMDATs are supposed
3968 to work. Hack to support MS import libraries, which use different
3969 COMDAT types than GNU.
3970 (coff_slurp_symbol_table): C_SECTION symbols are local; they refer
3971 to implied zero-length sections (see peicode below)
3972 * coffgen.c (coff_get_normalized_symtab): Properly read long MS
3973 filename symbols, which use one *or more* auxents.
3974 * coffswap.h (coff_swap_aux_in): ditto
3975 * peicode.h (coff_swap_sym_in): Build the implied zero-length
3976 sections
3977
3978 Tue May 11 15:51:58 1999 Jeffrey A Law (law@cygnus.com)
3979
3980 * elf32-v850.c (v850_elf_howto_table): Make partial_inplace false
3981 for all relocations.
3982
3983 1999-05-10 Catherine Moore <clm@cygnus.com>
3984
3985 * bfd-in.h (bfd_arm_allocate_interworking_sections): Static
3986 if COFF_IMAGE_WITH_PE.
3987 (bfd_arm_process_before_allocation): Likewise.
3988 (bfd_arm_get_bfd_for_interworking): Likewise.
3989 * coff-arm.c: Likewise.
3990 * bfd-in2.h: Regenerate.
3991 * configure.in (armpe_little_vec): Remove coff-arm.lo.
3992 (armpe_big_vec): Likewise.
3993 * configure: Rebuild.
3994
3995 1999-05-10 Nick Clifton <nickc@cygnus.com>
3996
3997 * elf.c (elf_fake_sections): Check for .rel. as start of rel
3998 section, not just .rel. Same for .rela.
3999
4000 1999-05-07 Nick Clifton <nickc@cygnus.com>
4001
4002 * coff-mcore.c (coff_mcore_relocate_section): Replace assert about
4003 endianism with an error message.
4004
4005 Thu May 6 17:09:09 1999 Fred Fish <fnf@be.com>
4006
4007 * dwarf2.c (read_abbrevs): Change cast of dwarf_abbrev_buffer
4008 assignment from "unsigned char *" to "char *".
4009 (decode_line_info): Likewise for dwarf_line_buffer assignment.
4010
4011 1999-05-05 Catherine Moore <clm@cygnus.com>
4012
4013 * coff-arm.c (coff_arm_relocate_section): Add one to
4014 address of ARM_RVA32 thumb functions.
4015
4016 1999-05-05 Catherine Moore <clm@cygnus.com>
4017
4018 * elf32-m68k.c (elf32_m68k_set_private_flags): New.
4019 (elf32_m68k_copy_private_bfd_data): New.
4020 (elf32_m68k_merge_private_bfd_data): New.
4021 (elf32_m68k_print_private_bfd_data): New.
4022 (CPU32_FLAG): Define.
4023 (PLT_CPU32_ENTRY_SIZE): Define.
4024 (elf_cpu32_plt0_entry): Declare.
4025 (elf_cpu32_plt_entry): Declare.
4026 (elf_m68k_adjust_dynamic_symbol): Generate cpu32 plt entries.
4027 (elf_m68k_finish_dynamic_symbol): Likewise.
4028 (elf_m68k_finish_dynamic_sections): Likewise.
4029 (elf_backend_plt_header_size): Remove definition.
4030 (bfd_elf32_bfd_copy_private_bfd_data): Define.
4031 (bfd_elf32_bfd_merge_private_bfd_data): Define.
4032 (bfd_elf32_bfd_set_private_flags): Define.
4033 (bfd_elf32_bfd_print_private_bfd_data): Define.
4034
4035 Mon May 3 09:24:49 1999 Jeffrey A Law (law@cygnus.com)
4036
4037 * som.c (som_fixup_formats): Fix comments for R_SHORT_PCREL_MODE
4038 and R_LONG_PCREL_MODE.
4039
4040 1999-04-29 Nick Clifton <nickc@cygnus.com>
4041
4042 * coff-mcore.c (coff_mcore_relocate_section): Fix typos.
4043
4044 Fri Apr 28 16:36:19 1999 Stan Cox <scox@cygnus.com>
4045
4046 * elf32-sh.c (sh_elf_relocate_section): Include relocation addend
4047 in relocation calculation.
4048
4049 1999-04-26 Tom Tromey <tromey@cygnus.com>
4050
4051 * aclocal.m4, configure: Updated for new version of libtool.
4052
4053 1999-04-21 Nick Clifton <nickc@cygnus.com>
4054
4055 * coff-mcore.c: Add support for mcore relocs.
4056
4057 1999-04-20 Gavin Romig-Koch <gavin@cygnus.com>
4058
4059 * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): Scrap the
4060 incorrect use EF_MIPS_xxBITPTRS.
4061
4062 1999-04-18 Ian Lance Taylor <ian@zembu.com>
4063
4064 * elf64-alpha.c (elf64_alpha_relax_section): Remove unused local
4065 variable insn.
4066
4067 * bfd-in2.h: Rebuild.
4068 * libbfd.h: Rebuild.
4069
4070 Sat Apr 17 20:55:15 1999 Catherine Moore <clm@cygnus.com>
4071
4072 * coff-arm.c (coff_arm_rtype_to_howto): Remove ARM26D transform.
4073 (coff_arm_relocate_section): Add ARM26D transform. Only
4074 change to ARM26D for relocateable links.
4075
4076 1999-04-16 Gavin Romig-Koch <gavin@cygnus.com>
4077
4078 * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): New.
4079 (bfd_elf32_bfd_print_private_bfd_data): New.
4080
4081 1999-04-15 Doug Evans <devans@casey.cygnus.com>
4082
4083 * elf32-arm.h (elf32_arm_final_link_relocate): For R_ARM_THM_ABS5,
4084 refetch addend if USE_REL, add many comments regarding current state.
4085 For R_ARM_THM_PC22, refetch addend if USE_REL, simplify.
4086 * elfarm-nabi.c (elf32_arm_howto_table): For R_ARM_THM_ABS5, fix
4087 size and rightshift. For R_ARM_THM_PC22, fix bitsize.
4088 * elfarm-oabi.c (elf32_arm_howto_table): Ditto.
4089
4090 Wed Apr 14 14:33:08 1999 Richard Henderson <rth@cygnus.com>
4091
4092 * elf32-mips.c (_bfd_mips_elf_read_ecoff_info): Zero `debug'.
4093 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Likewise.
4094
4095 1999-04-13 David Mosberger <davidm@hpl.hp.com>
4096
4097 * dwarf2.c (decode_line_info): Don't truncate address to least
4098 significant 32 bits (breaks 64 bit targets).
4099 (lookup_address_in_function_table): Ditto.
4100 (comp_unit_contains_address): Ditto.
4101
4102 Tue Apr 13 21:27:19 1999 Catherine Moore <clm@cygnus.com>
4103
4104 * coff-arm.c (arm_emit_base_file_entry): New routine.
4105 (A2T3_OFFSET): Define.
4106 (T2A3_OFFSET): Define.
4107 (coff_arm_relocate_section): Emit base file entries for interworking
4108 stubs.
4109
4110 1999-04-13 Philip Blundell <philb@gnu.org>
4111
4112 * elfarm-nabi.c (elf32_arm_howto_table): Add dummy entries for
4113 relocs 17 through 19.
4114
4115 Sun Apr 11 01:25:17 1999 Richard Henderson <rth@cygnus.com>
4116
4117 * elfcode.h: Remove fnmatch.h.
4118 * elflink.h (elf_link_assign_sym_version): Call back to ld
4119 instead of calling fnmatch.
4120
4121 * config.bfd (i?86-*-beoself): Include pe vecs.
4122
4123 Sun Apr 11 01:14:06 1999 Richard Henderson <rth@cygnus.com>
4124
4125 * elf32-i386.c (elf_i386_finish_dynamic_sections): Allow .plt
4126 to go missing.
4127
4128 1999-04-10 Richard Henderson <rth@cygnus.com>
4129
4130 * elf32-i386.c (elf_i386_relocate_section): Mind no_undefined
4131 when trying to resolve dynamic symbol references.
4132 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4133 * elf32-mips.c (mips_elf_relocate_section): Likewise.
4134 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4135 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4136 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4137 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4138 * elflink.h (elf_link_output_extsym): Likewise.
4139
4140 Sat Apr 10 15:12:09 1999 Richard Henderson <rth@cygnus.com>
4141
4142 * section.c (_bfd_strip_section_from_output): New function moved from
4143 * elf64-alpha.c (elf64_alpha_strip_section_from_output): ... here.
4144 * elf32-i386.c (elf_i386_size_dynamic_sections): Use it.
4145 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
4146 * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
4147 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
4148 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
4149 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
4150 * bfd-in2.h: Update.
4151
4152 1999-04-09 Ian Lance Taylor <ian@zembu.com>
4153
4154 * elf64-sparc.c: Fix incorrect calls to bfd_check_overflow.
4155
4156 1999-04-08 Nick Clifton <nickc@cygnus.com>
4157
4158 * coff-mcore.c: New File: Support for mcore-pe targets.
4159 * cpu-mcore.c: New File: Support for mcore targets.
4160 * elf32-mcore.c: New File: Support for mcore-elf target.
4161 * pe-mcore.c: New File: Definitions for mcore-pe target.
4162 * pei-mcore.c: New File: Definitions for mcore-pei target.
4163 * Makefile.am: Add support for MCore targets.
4164 * Makefile.in: Regenerate.
4165 * config.bfd: Add support for MCore targets.
4166 * configure.in: Add support for MCore targets.
4167 * configure: Regenerate.
4168 * archures.c: Add support for MCore architecture.
4169 * bfd-in2.h: Regenerate.
4170 * coffcode.h: Add support for mcore-pe targets.
4171 * elf.c: Add support for mcore-elf target.
4172 * reloc.c: Add support for MCore relocs.
4173 * targets.c: Add support for MCore targets.
4174
4175 1999-04-07 Nick Clifton <nickc@cygnus.com>
4176
4177 * elfarm-nabi.c (elf32_arm_howto_table): Add entries for
4178 R_ARM_XPC25 and R_ARM_THM_XPC22.
4179 (elf32_arm_reloc_map): Remove redundant entries.
4180
4181 1999-04-06 Ian Lance Taylor <ian@zembu.com>
4182
4183 * sysdep.h (LC_MESSAGES): Never define.
4184
4185 1999-04-06 Chris Torek <torek@bsdi.com>
4186
4187 * reloc.c (bfd_check_overflow): Add addrsize parameter. Change
4188 all callers. Rewrite completely.
4189 (_bfd_relocate_contents): Rewrite overflow checking.
4190 * bfd-in2.h: Rebuild.
4191
4192 1999-04-05 Ian Lance Taylor <ian@zembu.com>
4193
4194 From Gabriel Paubert <paubert@iram.es>:
4195 * elf32-ppc.c (ppc_elf_howto_raw): Set R_PPC_GOT16_LO,
4196 R_PPC_PLT16_LO and R_PPC_SECTOFF_LO to be complain_overflow_dont.
4197 Set R_PPC_PLT16_HA, R_PPC_SECTOFF_HA and R_PPC_EMB_NADDR16_HA to
4198 have a rightshift of 16 and use ppc_elf_addr16_ha_reloc.
4199 * ppcboot.c (ppcboot_vec): Use little endian routines for
4200 headers.
4201
4202 * elf.c (elfcore_strndup): Only define if it will be used.
4203 * elf32-ppc.c (ppc_elf_relax_section): Remove unused locals irel
4204 and irelend.
4205 (ppc_elf_check_relocs): Remove unused local i.
4206 (ppc_elf_gc_mark_hook): Add default case to switch.
4207
4208 From Bernd Nitzler <nitzler@kagcpd01.ag01.kodak.COM>:
4209 * srec.c (srec_scan): Accept \r in symbol definitions.
4210 (srec_object_p): Set HAS_SYMS if we saw any symbols.
4211 (symbolsrec_object_p): Likewise.
4212
4213 1999-04-04 Don Bowman <don@pixsci.com>
4214
4215 * config.bfd: Add mips*el-*-vxworks* and mips*-*-vxworks*.
4216
4217 1999-04-04 Ian Lance Taylor <ian@zembu.com>
4218
4219 * dwarf1.c (parse_line_table): Remove unused locals last_pc and
4220 last_line.
4221 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Declare.
4222 * elf32-i386.c (elf_i386_gc_mark_hook): Add default case to
4223 switch.
4224 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove unused
4225 local i.
4226 * syms.c (_bfd_stab_section_find_nearest_line): Remove unused
4227 local val.
4228
4229 1999-03-31 Nick Clifton <nickc@cygnus.com>
4230
4231 * config.bfd: Add support for arm-epoc-pe target.
4232 * configure.in: Add support for arm-epoc-pe target.
4233 * configure: Regenerate.
4234 * targets.c: Add support for arm-epoc-pe target.
4235 * coff-arm.c: Allow header files to override definition of
4236 TARGET_UNDERSCORE and USER_LABEL_PREFIX.
4237 * pe-arm.h: Allow previous header files to override definition of
4238 TARGET_LITTLE_SYM and TARGET_BIG_SYM.
4239 * pei-arm.h: Allow previous header files to override definition of
4240 TARGET_LITTLE_SYM and TARGET_BIG_SYM.
4241 * epoc-pe-arm.c: New file. Support arm-epoc-pe target.
4242 * epoc-pei-arm.c: New file. Support arm-epoc-pei target.
4243
4244 1999-03-30 Nick Clifton <nickc@cygnus.com>
4245
4246 * elf.c (elf_map_symbols): Handle the case where section
4247 symbols are generated for content-less sections which are
4248 not mapped to the output file.
4249
4250 * linker.c: Replace direct references to fields in BFD structure
4251 with accessor macros.
4252
4253 * elflink.h: Replace direct references to fields in BFD structure
4254 with accessor macros.
4255
4256 1999-03-25 Philip Blundell <pb@nexus.co.uk>
4257
4258 * config.bfd: Eliminate redundancy in checks for Linux/ARM.
4259
4260 * elf32-arm.h (elf32_arm_relocate_section): Take the rightshift into
4261 account when adjusting section symbols during a partial link.
4262
4263 1999-03-24 Nick Clifton <nickc@cygnus.com>
4264
4265 * coff-sparc.c (struct coff_reloc_map): Change type of field
4266 'bfd_reloc_val' to bfd_reloc_code_real_type.
4267 * elf-m10200.c (struct mn10200_reloc_map): Ditto.
4268 * elf-m10300.c (struct mn10300_reloc_map): Ditto.
4269 * elf32-arc.c (struct arc_reloc_map): Ditto.
4270 * elf32-d10v.c (struct d10v_reloc_map): Ditto.
4271 * elf32-d30v.c (struct d30v_reloc_map): Ditto.
4272 * elf32-fr30.c (struct fr30_reloc_map): Ditto.
4273 * elf32-m32r.c (struct m32r_reloc_map): Ditto.
4274 * elf32-sh.c (struct elf_reloc_map): Ditto.
4275 * elf32-sparc.c (struct elf_reloc_map): Ditto.
4276 * elf32-v850.c (struct v850_reloc_map): Ditto.
4277 * elf64-sparc.c (struct elf_reloc_map): Ditto.
4278 * elfarm-nabi.c (struct elf32_arm_reloc_map): Ditto.
4279 * elfarm-oabi.c (struct elf32_arm_reloc_map): Ditto.
4280
4281 1999-03-17 Martin Hunt <hunt@cygnus.com>
4282
4283 * syms.c (_bfd_stab_section_find_nearest_line): Changed this
4284 function so source-level assembly works. If multiple N_SOs
4285 are seen without and N_FUNs, create an indextable entry with
4286 a NULL function name.
4287
4288 1999-03-16 Gavin Romig-Koch <gavin@cygnus.com>
4289
4290 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data) Allow merging
4291 of certian similar cpus.
4292
4293 1999-03-16 Gavin Romig-Koch <gavin@cygnus.com>
4294
4295 * elf32-mips.c (_bfd_mips_elf_final_write_processing):
4296 Add the 5000. Change the architecture for the 5400 to mips4.
4297 (elf_mips_mach): Add r5000.
4298
4299 1999-03-11 Doug Evans <devans@casey.cygnus.com>
4300
4301 * cpu-i960.c (scan_i960_mach): Recognize i960:ka_sa and i960:kb_sb.
4302
4303 1999-03-11 Nick Clifton <nickc@cygnus.com>
4304
4305 * binary.c (binary_set_section_contents): Generate warning about
4306 huge file offsets for any section that will occupy file space, not
4307 just those that are loadable.
4308
4309 1999-02-24 Jim Blandy <jimb@zwingli.cygnus.com>
4310
4311 * libbfd.h: Regenerate after Nick Clifton's Feb 17 changes.
4312
4313 1999-02-22 Jim Lemke <jlemke@cygnus.com>
4314
4315 * elf32-ppc.c: Add ppc_elf_relax_section() for the ld option mpc860c0.
4316
4317 Mon Feb 22 18:26:51 1999 Ian Lance Taylor <ian@cygnus.com>
4318
4319 * elf-bfd.h (ELF_LINK_HASH_REF_REGULAR_NONWEAK): Define.
4320 * elflink.h: Revert all changes since Feb 16. Instead:
4321 (elf_link_add_object_symbols): Set REF_REGULAR_NONWEAK flag if
4322 appropriate. Copy it to version symbols.
4323 (elf_fix_symbol_flags): Set REF_REGULAR_NONWEAK for non ELF
4324 symbols if appropriate.
4325 (elf_adjust_dynamic_symbol): Set REF_REGULAR_NONWEAK for weakdef
4326 symbol if appropriate.
4327 (elf_link_output_extsym): If symbol is marked as undefined, and
4328 has no nonweak references, mark it as weak undefined.
4329
4330 Fri Feb 19 16:01:12 1999 Ian Lance Taylor <ian@cygnus.com>
4331
4332 * elflink.h (elf_merge_symbol): When overriding a dynamic
4333 definition with a weak undefined symbol, set NEEDS_PLT if it is a
4334 function.
4335 (elf_link_add_object_symbols): Don't copy the other field if we
4336 are overridding.
4337
4338 Thu Feb 18 18:07:43 1999 Ian Lance Taylor <ian@cygnus.com>
4339
4340 * elflink.h (elf_merge_symbol): Do not merge any symbol from a
4341 shared object with a weak undefined symbol.
4342
4343 1999-02-18 Nick Clifton <nickc@cygnus.com>
4344
4345 * elfarm-nabi.c: Set partial_inplace back to false.
4346
4347 1999-02-17 Nick Clifton <nickc@cygnus.com>
4348
4349 * coff-arm.c (TARGET_UNDERSCORE): Re-enable.
4350 (USER_LABEL_PREFIX): Set to "_".
4351
4352 The following patches are from: Scott Bambrough
4353 <scottb@corelcomputer.com>
4354
4355 * libaout.h (M_ARM6_NETBSD): Set to 143.
4356
4357 * reloc.c: Add ARM PIC relocs: BFD_RELOC_ARM_GOT12,
4358 BFD_RELOC_ARM_GOT32, BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_COPY,
4359 BFD_RELOC_ARM_GLOB_DAT, BFD_RELOC_ARM_PLT32,
4360 BFD_RELOC_ARM_RELATIVE, BFD_RELOC_ARM_GOTOFF, BFD_RELOC_ARM_GOTPC.
4361 * bfd-in2.h: Regenerate.
4362
4363 * elfarm-nabi.c (elf32_arm_howto_table): Set partial_inplace to
4364 'true' as REL relocs are now being used. Add new PIC relocs:
4365 R_ARM_COPY, R_ARM_GLOB_DAT, R_ARM_JUMP_SLOT, R_ARM_RELATIVE,
4366 R_ARM_GOTOFF, R_ARM_GOTPC, R_ARM_GOT32, R_ARM_PLT32.
4367
4368 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Check byte order
4369 of targets.
4370 (elf32_arm_final_link_relocate): Change parameters so that entire
4371 reloc is passed. Add support for PIC relocs.
4372 (elf32_arm_relocate_section): Pass entire reloc to
4373 elf32_arm_final_link_relocate.
4374 (elf32_arm_check_relocs): Handle new PIC relocs.
4375 (elf32_arm_adjust_dynamic_symbol): New function.
4376 (elf32_arm_size_dynamic_sections): New function.
4377 (elf32_arm_discard_copies): New function.
4378 (elf32_arm_finish_dynamic_symbol): New function.
4379 (elf32_arm_finish_dynamic_sections): New function.
4380 (ELF_MAXPAGE_SIZE): Define.
4381 (bfd_elf32_bfd_reloc_type_lookup): Define.
4382 (elf_backend_relocate_section): Define.
4383 (elf_backend_adjust_dynamic_symbol): Define.
4384 (elf_backend_create_dynamic_sections): Define.
4385 (elf_backend_finish_dynamic_symbol): Define.
4386 (elf_backend_finish_dynamic_sections): Define.
4387 (elf_backend_size_dynamic_sections): Define.
4388 (elf_backend_plt_readonly): Define.
4389 (elf_backend_want_got_plt): Define.
4390 (elf_backend_want_plt_sym): Define.
4391
4392 Wed Feb 17 12:02:26 1999 Stan Cox <scox@cygnus.com>
4393
4394 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Make reginfo
4395 sections SEC_LINK_ONCE and SEC_LINK_DUPLICATES_SAME_SIZE.
4396 (_bfd_mips_elf_fake_sections): Likewise.
4397
4398 Wed Feb 17 12:07:23 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4399
4400 * elfarm-oabi.c (bfd_elf32_arm_allocate_interworking_sections,
4401 bfd_elf32_arm_get_bfd_for_interworking,
4402 bfd_elf32_arm_process_before_allocation): Define to avoid clash
4403 with elfarm-nabi.c.
4404
4405 * elf32-arm.h: Don't declare elf32_arm_info_to_howto.
4406 (elf32_thumb_to_arm_stub, elf32_arm_to_thumb_stub,
4407 elf32_arm_find_nearest_line): Make them static.
4408
4409 Tue Feb 16 22:44:37 1999 Ian Lance Taylor <ian@cygnus.com>
4410
4411 * elflink.h (elf_merge_symbol): Add pflags parameter. Change all
4412 callers. Do not merge a definition from a shared object with a
4413 weak undefined symbol.
4414 (elf_link_add_object_symbols): Do not change the symbol type or
4415 size if the old symbol overrides the new one.
4416
4417 1999-02-08 Nick Clifton <nickc@cygnus.com>
4418
4419 * config.bfd: Add support for strongarm target.
4420
4421 Mon Feb 8 11:18:14 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4422
4423 * elf32-m68k.c (reloc_map): Use the correct types for the struct
4424 fields instead of unsigned char.
4425
4426 Fri Feb 5 00:22:36 1999 Ian Lance Taylor <ian@cygnus.com>
4427
4428 * Makefile.am: Rebuild dependencies.
4429 * Makefile.in: Rebuild.
4430
4431 Thu Feb 4 22:30:13 1999 Ian Lance Taylor <ian@cygnus.com>
4432
4433 * configure.in: Change AC_PREREQ to 2.13. Remove AM_CYGWIN32.
4434 Change AM_EXEEXT to AC_EXEEXT and AM_PROG_INSTALL to
4435 AC_PROG_INSTALL. Add comments to uses of AC_DEFINE.
4436 * acinclude.m4: Add comments to uses of AC_DEFINE.
4437 * acconfig.h: Remove.
4438 * configure: Rebuild with current autoconf/automake.
4439 * aclocal.m4: Likewise.
4440 * config.in: Likewise.
4441 * Makefile.in: Likewise.
4442
4443 1999-02-04 DJ Delorie <dj@cygnus.com>
4444
4445 * libbfd.c (real_read): don't call fread for zero bytes. This
4446 covers up a bug (or misuse of bfd) that's exposed by Solaris.
4447
4448 Thu Feb 4 12:38:10 1999 Stan Cox <scox@cygnus.com>
4449
4450 * elf32-mips.c (mips_elf_relocate_section): Insure that the target
4451 of a jump is in the current 256 MB region.
4452
4453 Thu Feb 4 12:15:38 1999 Ian Lance Taylor <ian@cygnus.com>
4454
4455 * format.c (bfd_check_format_matches): Change last patch to only
4456 take effect for the binary target.
4457
4458 Wed Feb 3 19:40:12 1999 Ian Lance Taylor <ian@cygnus.com>
4459
4460 * elf32-i386.c (elf_i386_reloc_type_lookup): Add BFD_RELOC_CTOR.
4461
4462 Wed Feb 3 15:02:44 1999 Catherine Moore <clm@cygnus.com>
4463
4464 * elf32-fr30.c (fr30_elf_check_relocs): New routine.
4465
4466 Tue Feb 2 21:38:28 1999 Ian Lance Taylor <ian@cygnus.com>
4467
4468 * format.c (bfd_check_format_matches): If the target was
4469 previously specified, don't check other targets when checking for
4470 an archive file.
4471
4472 Tue Feb 2 18:16:43 1999 Catherine Moore <clm@cygnus.com>
4473
4474 * elf32-arm.h (elf32_arm_reloc_map): Removed.
4475 (elf32_arm_reloc_type_lookup): Removed
4476 * elfarm-nabi.c (elf32_arm_reloc_map): New.
4477 (elf32_arm_reloc_type_lookup): New.
4478 * elfarm-oabi.c (elf32_arm_reloc_map): New.
4479 (elf32_arm_reloc_type_lookup): New.
4480
4481 Mon Feb 1 19:49:21 1999 Catherine Moore <clm@cygnus.com>
4482
4483 * elfarm-nabi.c: Renamed from elf32-arm-newabi.c.
4484 * elfarm-oabi.c: Renamed from elf32-arm-oldabi.c
4485 * Makefile.am: Use new files.
4486 * Makefile.in: Regenerate.
4487 * configure.in: Use new files.
4488 * configure: Regenerate.
4489
4490 1999-02-01 Nick Clifton <nickc@cygnus.com>
4491
4492 * elf32-fr30.c (fr30_elf_gc_mark_hook): New function.
4493 (fr30_elf_gc_sweep_hook): New function.
4494 (elf_backend_can_gc_sections): Define.
4495
4496 Mon Feb 1 12:21:47 1999 Catherine Moore <clm@cygnus.com>
4497
4498 * targets.c (bfd_target_vector): Add bfd_elf32_littlearm_oabi_vec
4499 and bfd_elf32_bigarm_oabi_vec.
4500
4501 Mon Feb 1 11:46:31 1999 Catherine Moore <clm@cygnus.com>
4502
4503 * Makefile.am (elf32-arm-oldabi.lo): New.
4504 (elf32-arm-newabi.lo): New.
4505 * Makefile.in: Regenerate.
4506 * config.bfd (thumb-*-elf): Remove definition of targ_underscore.
4507 (arm-*-elf): Likewise.
4508 (arm-*-oabi): New.
4509 (thumb-*-oabi): New.
4510 * configure: Regenerate.
4511 * configure.in (bfd_elf32_littlearm_oabi_vec): New.
4512 (bfd_elf32_bigarm_oabi_vec): New.
4513 * elf32-arm-newabi.c: New.
4514 * elf32-arm-oldabi.c: New.
4515 * elf32-arm.c: Removed.
4516 * elf32-arm.h: New.
4517
4518 Mon Feb 1 11:52:12 1999 Frank Ch. Eigler <fche@cygnus.com>
4519
4520 * binary.c (binary_set_section_contents): Omit warnings for
4521 unloadable sections.
4522
4523 1999-01-31 Michael Meissner <meissner@cygnus.com>
4524
4525 * config.bfd (powerpc{,le}-*-vxworks*): Add aliases to
4526 powerpc{,le}-*-eabi.
4527
4528 1999-01-29 Nick Clifton <nickc@cygnus.com>
4529
4530 * dwarf2.c (read_unsigned_leb128): Remove unused variables.
4531 * dwarf2.c (read_signed_leb128): Remove unused variables.
4532
4533 Fri Jan 29 00:47:21 1999 H.J. Lu <hjl@gnu.org>
4534
4535 * elf.c (assign_file_positions_for_segments): Only adjust
4536 p_align when needed.
4537
4538 Thu Jan 28 20:05:22 1999 Ian Lance Taylor <ian@cygnus.com>
4539
4540 * binary.c (binary_set_section_contents): Don't return early for a
4541 non-loadable section, in case the first section is non-loadable.
4542 Don't set the low lma for a SEC_NEVER_LOAD section. From Maciej
4543 W. Rozycki <macro@ds2.pg.gda.pl>.
4544
4545 1999-01-28 Nick Clifton <nickc@cygnus.com>
4546
4547 * elf32-fr30.c (fr30_reloc_map): Add R_FR30_GNU_VTINHERIT and
4548 R_FR30_GNU_VTENTRY relocs.
4549
4550 Thu Jan 28 11:08:16 1999 Catherine Moore <clm@cygnus.com>
4551
4552 * elflink.h (elf_link_output_sym): Zero syms which are
4553 part of sections which have been excluded.
4554
4555 Wed Jan 27 13:35:35 1999 Stan Cox <scox@cygnus.com>
4556
4557 * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed F_PIC
4558 to F_PIC_INT.
4559 * coffcode.h (coff_set_arch_mach_hook): Removed F_ARM_2a and
4560 F_ARM_3M labels. Changed F_PIC to F_PIC_INT.
4561
4562 1999-01-27 Nick Clifton <nickc@cygnus.com>
4563
4564 * elf32-fr30.c (fr30_elf_howto_table): Fix name of R_FR30_48
4565 relocation.
4566 (fr30_final_link_relocate): Use computed value as result of
4567 relocation.
4568
4569 1999-01-26 Frank Ch. Eigler <fche@cygnus.com>
4570
4571 * binary.c (binary_set_section_contents): Emit warning for
4572 huge file offsets due to widely-dispersed section LMAs.
4573
4574 Mon Jan 18 03:35:35 1999 Ian Lance Taylor <ian@cygnus.com>
4575
4576 * elf.c (assign_file_positions_for_segments): If not D_PAGED,
4577 align first section to largest section alignment, not first
4578 section alignment.
4579
4580 1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com)
4581
4582 * configure.in: Require autoconf 2.12.1 or higher.
4583
4584 Tue Dec 22 15:21:41 1998 Catherine Moore <clm@cygnus.com>
4585
4586 * archures.c (bfd_mach_i386_i386_intel_syntax): Define.
4587 * bfd-in2.h: Likewise.
4588 * cpu-i386.c (bfd_i386_arch_intel_syntax): New.
4589
4590 1998-12-16 Gavin Romig-Koch <gavin@cygnus.com>
4591
4592 * archures.c,bfd-in2.h (bfd_mach_mips4111): New.
4593 * cpu-mips.c: Add support for and independent 4111.
4594 * elf32-mips.c (elf_mips_mach): E_MIPS_MACH_4111 -> bfd_mach_mips4111.
4595 (_bfd_mips_elf_final_write_processing):
4596 bfd_mach_mips4111 -> E_MIPS_ARCH_3 | E_MIPS_MACH_4111.
4597
4598 1998-12-15 Gavin Romig-Koch <gavin@cygnus.com>
4599
4600 * elf32-mips.c (elf_mips_abi_name): New.
4601 (_bfd_mips_elf_merge_private_bfd_data): Compare EF_MIPS_ABI flags.
4602
4603 1998-12-12 Gavin Romig-Koch <gavin@cygnus.com>
4604
4605 * elf32-mips.c (_bfd_mips_elf_final_write_processing):
4606 Handle bfd_mach_mips4300.
4607
4608 1998-12-11 Ulrich Drepper <drepper@cygnus.com>
4609
4610 * elf32-i386.c: Remove leaked development code from patch
4611 1998-12-10 by Richard Henderson.
4612
4613 1998-12-10 Richard Henderson <rth@cygnus.com>
4614
4615 * elf32-i386.c (elf_i386_relocate_section): Don't fail relocations
4616 in debug sections for symbol defined externally.
4617
4618 Thu Dec 10 10:58:38 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4619
4620 * targets.c (bfd_target_vector): Remove duplicate entry for
4621 tekhex_vec.
4622
4623 1998-12-09 Nick Clifton <nickc@cygnus.com>
4624
4625 * elf32-fr30.c (fr30_elf_howto_table): Set src_mask fields to 0
4626 since we are using RELAs.
4627
4628 Tue Dec 8 22:15:48 1998 Ian Lance Taylor <ian@cygnus.com>
4629
4630 SCO Open Server Release 5 core file support, from Jouke Numan
4631 <jnuman@hiscom.nl>:
4632 * sco5-core.c: New file.
4633 * configure.in (i[3456]86-*-sco3.2v5*): Use sco5-core.lo.
4634 (sco5-core.lo): Define SCO5_CORE in COREFLAG.
4635 * Makefile.am: Rebuild dependencies.
4636 (OPTIONAL_BACKENDS): Add sco5-core.lo.
4637 (OPTIONAL_BACKENDS_CFILES): Add sco5-core.c.
4638 * bfd.c (struct _bfd): Add sco5_core_data field to tdata.
4639 * targets.c (sco5_core_vec): Add to target list if SCO5_CORE.
4640 * bfd-in2.h, configure, Makefile.in: Rebuild.
4641
4642 Tue Dec 8 19:38:42 1998 Mark Klein <mklein@dis.com>
4643
4644 * config.bfd (hppa*-*-mpeix*): New target.
4645 * configure.in: Add AC_HEADER_DIRENT.
4646 (hppa*-*-mpeix*): New target.
4647 * configure.host (hppa*-*-mpeix*): New host.
4648 * hpux-core.c: Check HOST_HPPAMPEIX. Use HAVE_DIRENT_H and
4649 friends rather than just including <sys/dir.h>.
4650 * som.h (struct som_symbol): Add hppa_priv_level and apto
4651 tc_data. Change all users.
4652 (struct somdata): Add comp_unit field.
4653 (obj_som_compilation_unit): Define.
4654 (bfd_som_attach_compilation_unix): Declare.
4655 * som.c: Check HOST_HPPAMPEIX.
4656 (struct som_misc_symbol_info): Add new field priv_level.
4657 (som_object_setup): Add current_offset parameter. Change all
4658 callers.
4659 (setup_sections): Likewise.
4660 (som_object_p): For EXECLIBMAGIC, read the lst header.
4661 (som_write_symbol_strings): Add compilation_unit parameter.
4662 Change all callers.
4663 (som_finish_writing): Write out compilation_unit.
4664 (som_bfd_derive_misc_symbol_info): Set priv_level.
4665 (som_build_and_write_symbol_table): Set xleast field to 3.
4666 (som_slurp_symbol_table): Set symbol priv_level.
4667 (bfd_som_attach_compilation_unit): New function.
4668 (som_bfd_ar_write_symbol_stuff): Set xleast field to 3. Set
4669 priv_level into symbol_value.
4670 * configure, config.in: Rebuild.
4671
4672 Tue Dec 8 16:21:35 1998 Ian Lance Taylor <ian@cygnus.com>
4673
4674 * hpux-core.c (hpux_core_core_file_p): Change call to nonexistent
4675 warning function to call _bfd_error_handler instead.
4676
4677 * libbfd.c (COERCE32): Cast through unsigned long and long to
4678 avoid bug in old version of gcc.
4679
4680 * elf64-alpha.c (elf64_alpha_additional_program_headers): Remove.
4681 (elf_backend_additional_program_headers): Don't define.
4682
4683 1998-12-08 Nick Clifton <nickc@cygnus.com>
4684
4685 * elf32-fr30.c (fr30_final_link_relocate): Fix PC relative
4686 relocations to include offset of 2 included in the insns, and the
4687 offset of the relocs within the section.
4688
4689 Wed Dec 2 15:03:59 1998 David Taylor <taylor@texas.cygnus.com>
4690
4691 The following changes were made by David Taylor
4692 <taylor@texas.cygnus.com>, Edith Epstein
4693 <eepstein@sophia.cygnus.com>, Jim Blandy
4694 <jimb@zwingli.cygnus.com>, and Elena Zannoni
4695 <ezannoni@kwikemart.cygnus.com> as part of the project to merge in
4696 changes originally made by HP; HP did not create ChangeLog
4697 entries.
4698
4699 * aclocal.m4, configure, Makefile.in: Rebuilt using latest
4700 automake macro library.
4701
4702 * hpux-core.c (hpux_core_core_file_p): this function now
4703 understands HPUX 10.30 thread info. Yes, the thread stacks can be
4704 found in the corefile! Also, in hpux_core_core_file_p, if we
4705 encounter a section with an unknown type, don't punt. Instead,
4706 just skip it. Also, count the number of sections of known type
4707 that we encounter. If we encounter at least one good one, then
4708 we'll declare that the file is a core file. If we encounter any
4709 unknown ones but some known ones, then we'll issue a warning (but
4710 still declare it to be a core file). Also, correctly decide when a
4711 file is not a core.
4712 (PROC_INFO_HAS_THREAD_ID): define if CORE_ANON_SHMEM defined.
4713 (CORE_ANON_SHMEM): define if not defined.
4714 (hpux_core_struct): add members lwpid and user_tid.
4715 (core_kernel_thread_id, core_user_thread_id): new macros.
4716 (make_bfd_asection): use bfd_alloc to allocate room for a copy of
4717 the name before storing it in the bfd.
4718 (hpux_core_core_file_p): handle threads.
4719
4720 * libhppa.h (GET_FIELD): protect against redefinition.
4721 (HPPA_WIDE): define.
4722 (GET_FIELD): define.
4723 (GET_BIT): define.
4724 (MASK): define.
4725 (CATENATE): define.
4726 (ELEVEN): define.
4727 (sign_extend): redefine.
4728 (assemble_6): define.
4729 (assemble_12): rewrite.
4730 (assemble_16): define.
4731 (assemble_16a): define.
4732 (assemble_17): rewrite.
4733 (assemble_22): define.
4734
4735 1998-12-07 Nick Clifton <nickc@cygnus.com>
4736
4737 * elf32-fr30.c (fr30_final_link_relocate): Using signed
4738 relocations for signed values.
4739
4740 Sun Dec 6 16:30:33 1998 Ian Lance Taylor <ian@cygnus.com>
4741
4742 * mipsbsd.c (MY(set_arch_mach)): Make static.
4743 * aoutx.h (NAME(aout,machine_type)): For bfd_arch_mips, use
4744 bfd_mach_mips* macros rather than simple numbers.
4745
4746 COFF weak symbol support, based on patches from Mark Elbrecht
4747 <snowball3@usa.net>:
4748 * coffcode.h (coff_slurp_symbol_table): Handle C_WEAKEXT.
4749 * coffgen.c (coff_renumber_symbols): Handle weak symbols.
4750 (coff_write_alien_symbol): Likewise.
4751 * cofflink.c (coff_link_check_ar_symbols): Likewise.
4752 (coff_link_add_symbols): Likewise.
4753 (_bfd_coff_link_input_bfd): Likewise.
4754 (_bfd_coff_write_global_sym): Likewise.
4755
4756 * elf.c (copy_private_bfd_data): Always initialize the
4757 includes_phdrs field.
4758
4759 * elflink.h (elf_fix_symbol_flags): Check for case where a non-ELF
4760 file defines a symbol first mentioned in an ELF file.
4761
4762 * bfd-in.h: Always define BFD_HOST_64_BIT and BFD_HOST_U_64_BIT if
4763 possible, rather than only if BFD64.
4764 * elflink.h (compute_bucket_count): Just check BFD_HOST_U_64_BIT,
4765 not __GNUC__.
4766 * bfd-in2.h: Rebuild.
4767
4768 * srec.c (srec_set_section_contents): Correct test to avoid
4769 switching to 4 byte addresses after seeing a second section which
4770 requires 3 byte addresses. From Joel Schantz
4771 <joel.schantz@argosys.boeing.com>.
4772
4773 * config.bfd (m68*-*-gnu*): New target. From Aymeric Vincent
4774 <aymeric.vincent@emi.u-bordeaux.fr>.
4775
4776 1998-12-04 Jim Blandy <jimb@zwingli.cygnus.com>
4777
4778 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Fix logic to
4779 decide whether the output file is -mrelocatable-lib,
4780 -mrelocatable, or neither. (gdb.base/nodebug.exp)
4781
4782 1998-12-03 Nick Clifton <nickc@cygnus.com>
4783
4784 * elf32-fr30.c: Add support for R_FR30_48 reloc.
4785 * reloc.c: Add BFD_RELOC_FR30_48 relocation.
4786 * bfd-in2.h: Regenerate.
4787 * libbfd.h: Regenerate
4788
4789 Wed Dec 2 00:58:37 1998 Ian Lance Taylor <ian@cygnus.com>
4790
4791 * elflink.h (elf_adjust_dynamic_symbol): Warn on an attempt to
4792 link against a dynamic symbol with no type or size.
4793
4794 1998-12-01 Ulrich Drepper <drepper@cygnus.com>
4795
4796 * elf32-i386.c (i386_check_relocs) [R_386_32]: Don't emit
4797 relocation for section which does not get loaded.
4798 (elf_i386_relocate_section) [R_386_32]: Likewise.
4799
4800 Tue Dec 1 11:33:33 1998 Jim Wilson <wilson@cygnus.com>
4801
4802 * coff-h8300.c (h8300_bfd_link_add_symbols): Make reloc_size,
4803 reloc_count and i long instead of unsigned long. Handle error
4804 return from bfd_canonicalize_reloc.
4805
4806 1998-12-01 Nick Clifton <nickc@cygnus.com>
4807
4808 * elf32-v850.c (v850_elf_relocate_section): Detect the absence of
4809 a hash table.
4810
4811 Mon Nov 30 15:28:09 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
4812
4813 * elf32-sh.c (elf/sh.h): Include.
4814 sh_reloc_type: Delete. Changed all references to elf_sh_reloc_type.
4815 (sh_elf_howto_tab): Add HOWTO for R_SH_SWITCH8.
4816 (sh_reloc_map): Map BFD_RELOC_8_PCREL to R_SH_SWITCH8.
4817 (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
4818 * Makefile.in: Add dependency of elf32-sh.lo on $(INCDIR)/elf/sh.h.
4819
4820 Fri Nov 27 17:51:38 1998 Geoff Keating <geoffk@ozemail.com.au>
4821
4822 * elflink.h (compute_bucket_count): Don't allow minsize==0, it
4823 causes division by zero later on.
4824
4825 Thu Nov 26 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
4826
4827 * elf32-fr30.c (fr30_elf_pc9_reloc,fr30_elf_pc12_reloc): Not
4828 needed.
4829
4830 1998-11-25 DJ Delorie <dj@cygnus.com>
4831
4832 * coff-i386.c (i3coff_object_p): Remove hack. Use new emulation
4833 hook now.
4834
4835 Tue Nov 24 10:25:27 1998 Nick Clifton <nickc@cygnus.com>
4836
4837 * elf32-fr30.c (fr30_elf_relocate_section): Call
4838 fr30_final_link_relocate.
4839 (fr30_final_link_relocate): New function: Handle I20 and I32
4840 relocs.
4841 (fr30_elf_i32_reloc): New function: Handle I32 relocs.
4842 (fr30_elf_pc9_reloc): New function: Handle 9_PCREL relocs.
4843 (fr30_elf_pc12_reloc): New function: Handle 12_PCREL relocs.
4844
4845 * elf32-v850.c (v850_elf_relocate_section): Reset hi16s reloc
4846 chain to empty.
4847
4848 The following changes are based on a patch submitted by Gianluca
4849 Moro <glctr@abc.it>:
4850
4851 (v850_elf_perform_relocation): Only update a hi16s reloc if it has
4852 not already been updated.
4853 (find_remembered_hi16s_reloc): New parameter 'already_found'
4854 returns state of remembered hi16s reloc.
4855 (remember_hi16s_reloc): Set 'found' field to false.
4856 (hi16s_location): Add 'found' field.
4857
4858 1998-11-23 DJ Delorie <dj@cygnus.com>
4859
4860 * coff-i386.c (bfd_pe_dll_not_recognized_hack): the linker wants
4861 to see .DLL files as unrecognized.
4862 (i3coff_object_p): Sorry, had to hack it to not recognize these
4863 files (pei-i386) on request.
4864
4865 1998-11-23 DJ Delorie <dj@cygnus.com>
4866
4867 * opncls.c (bfd_make_readable): need more cleanup for symbols and
4868 relents. Call bfd_check_format to reinitialize.
4869
4870 Fri Nov 20 14:21:36 1998 Nick Clifton <nickc@cygnus.com>
4871
4872 * elf32-fr30.c (fr30_elf_relocate_section): Remove spurious
4873 warnings.
4874
4875 Thu Nov 19 14:42:15 1998 Geoffrey Noer <noer@cygnus.com>
4876
4877 * aclocal.m4: regenerate
4878 * configure: regenerate
4879
4880 Tue Nov 17 20:23:35 1998 Richard Henderson <rth@cygnus.com>
4881
4882 * elf-bfd.h (struct elf_link_hash_entry): Add vtable_entries_size.
4883 * elf.c (_bfd_elf_link_hash_newfunc): Clear it.
4884 * elflink.h (elf_gc_propagate_vtable_entries_used): Copy it, and
4885 respect it as an upper bound on what memory to reference.
4886 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4887 (elf_gc_record_vtentry): Handle as-yet undefined vtables. Set and
4888 update vtable_entries_size appropriately.
4889
4890 Tue Nov 17 15:28:31 1998 Nick Clifton <nickc@cygnus.com>
4891
4892 * elf32-fr30.c (fr30_reloc_type_lookup): Used integers to hold
4893 reloc number.
4894
4895 Mon Nov 16 22:19:21 1998 DJ Delorie <dj@cygnus.com>
4896
4897 * archive.c (bfd_ar_hdr_from_filesystem): support BFD_IN_MEMORY
4898 bfds; they have no "file" so we fake it.
4899 * bfd-in2.h: add bfd_make_writable and bfd_make_readable (regen)
4900 * libbfd.c (bfd_write): Allow writing to BFD_IN_MEMORY bfds by
4901 resizing the memory buffer.
4902 * opncls.c (bfd_make_writable): New function; lets you write a
4903 bfd_create'd bfd to an in-memory buffer.
4904 (bfd_make_readable): New function; lets you read back that buffer
4905 as if it were from bfd_openr. Used to build generated archive
4906 members (winsup's ld's dlltool)
4907
4908 Mon Nov 16 19:15:19 1998 Dave Brolley <brolley@cygnus.com>
4909
4910 * po/bfd.pot: Regenerated.
4911
4912 Mon Nov 16 10:57:06 1998 Nick Clifton <nickc@cygnus.com>
4913
4914 * elf32-v850.c (hi16s_location): Replaced fixed size array with
4915 linked list.
4916
4917 Sun Nov 15 20:28:25 1998 Richard Henderson <rth@cygnus.com>
4918
4919 * elf64-alpha.c (elf64_alpha_relax_section): Search for the proper
4920 element of the gotentry list for local symbols too.
4921 (elf64_alpha_relocate_section): Unify local and global handling.
4922 Assert that gotent->use_count > 0.
4923
4924 Sat Nov 14 15:16:01 1998 Ian Lance Taylor <ian@cygnus.com>
4925
4926 * configure.in (vms_alpha_vec): Rename from evax_alpha_vec, and
4927 update for file name changes of July 2, 1998.
4928 (vms_vax_vec): New.
4929 * configure: Rebuild.
4930
4931 Thu Nov 12 19:19:54 1998 Dave Brolley <brolley@cygnus.com>
4932
4933 * po/bfd.pot: Regenerated.
4934
4935 Tue Nov 10 16:17:06 1998 Geoffrey Noer <noer@cygnus.com>
4936
4937 * acinclude.m4, config.bfd: detect cygwin* instead of cygwin32*.
4938 * aclocal.m4, configure: regenerate
4939
4940 Tue Nov 10 15:13:59 1998 Nick Clifton <nickc@cygnus.com>
4941
4942 * elf.c (prep_headers): Add support for bfd_arch_fr30.
4943
4944 Tue Nov 10 13:37:36 1998 Felix Lee <flee@cygnus.com>
4945
4946 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE,
4947 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): didn't define macro when value
4948 was cached.
4949 * aclocal.m4, configure: regenerated.
4950
4951 Tue Nov 10 14:31:01 1998 Catherine Moore <clm@cygnus.com>
4952
4953 * elf32-d10v.c (reloc_type): Add R_D10V_GNU_VTINHERIT and
4954 R_D10V_GNU_VTENTRY relocs.
4955 (elf_d10v_howto_table): Likewise.
4956 (d10v_reloc_map d10v_reloc_map): Likewise.
4957 (elf32_d10v_gc_mark_hook): New.
4958 (elf32_d10v_gc_sweep_hook): New.
4959 (elf32_d10v_check_relocs): New.
4960 (elf32_d10v_relocate_section): New.
4961 (elf_backend_relocate_section): Define.
4962 (elf_backend_can_gc_sections): Define.
4963
4964 Sat Nov 7 18:07:51 1998 Peter Schauer <peter.schauer@regent.e-technik.tu-muenchen.de>
4965
4966 * Makefile.am (BFD32_BACKENDS): Move vms files here...
4967 (BFD64_BACKENDS): ...from here.
4968 (BFD32_BACKENDS_CFILES): Move vms files here...
4969 (BFD64_BACKENDS_CFILES): ...from here.
4970 * Makefile.in: Rebuild.
4971
4972 Wed Nov 4 15:58:48 1998 Nick Clifton <nickc@cygnus.com>
4973
4974 * Makefile.am: Add FR30 target.
4975 * Makefile.in: Add FR30 target.
4976 * archures.c: Add support for FR30.
4977 * config.bfd: Add support for FR30.
4978 * configure.in: Add support for FR30.
4979 * reloc.c: Add support for FR30 relocations.
4980 * targets.c: Add support for FR30 relocations.
4981 * bfd-in2.h: Regenerate.
4982 * configure: Regenerate.
4983 * libbfd.h: Regenerate.
4984 * cpu-fr30.c: New file.
4985 * elf32-fr30.c: New file.
4986
4987 Mon Nov 2 14:59:33 1998 Geoffrey Noer <noer@cygnus.com>
4988
4989 * configure.in: detect cygwin* instead of cygwin32*
4990 * configure: regenerate
4991
4992 Sun Nov 1 19:32:28 1998 Jeffrey A Law (law@cygnus.com)
4993
4994 * elf-m10300.c (mn10300_elf_relax_section): Do not use alloca,
4995 use bfd_malloc and free instead and check return value from bfd_malloc.
4996
4997 Sun Nov 1 16:20:35 1998 Ian Lance Taylor <ian@cygnus.com>
4998
4999 * libbfd-in.h (_bfd_dwarf1_find_nearest_line): Declare.
5000 * libbfd.h: Rebuild.
5001
5002 * elf32-mips.c (mips_elf_dynsym_sec_names): Comment out.
5003 (SIZEOF_MIPS_DYNSYM_SECNAMES): Likewise.
5004 (MIPS_TEXT_DYNSYM_SECN): Likewise.
5005 (_bfd_mips_elf_fake_sections): Don't set sh_info field of a .hash
5006 section.
5007 (struct mips_elf_link_hash_table): Remove dynsym_sec_strindex
5008 field.
5009 (mips_elf_link_hash_table_create): Don't initialize
5010 dynsym_sec_strindex.
5011 (mips_elf_gc_mark_hook): Add default case to avoid warning.
5012 (mips_elf_size_dynamic_sections): Generate a section symbol for
5013 every output section.
5014 (mips_elf_finish_dynamic_sections): Count all sections for
5015 DT_MIPS_UNREFEXTNO.
5016 (mips_elf_finish_dynamic_sections): Use dynamic symbols for all
5017 output sections.
5018
5019 Sun Nov 1 12:46:53 1998 Geoff Keating <geoffk@ozemail.com.au>
5020
5021 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Allocate two slots
5022 for later PLT entries in large PLTs.
5023 (ppc_elf_finish_dynamic_symbol): Allow for the extra slots.
5024
5025 Sat Oct 31 20:10:09 1998 Jeffrey A Law (law@cygnus.com)
5026
5027 * elf32-ppc.c (ppc_elf_reload_section): Fix typo.
5028
5029 1998-10-26 15:58 Ulrich Drepper <drepper@cygnus.com>
5030
5031 * elf-bfd.h (struct elf_link_hash_entry): Add new field elf_hash_value.
5032 * elflink.h (elf_collect_hash_codes): New function. This function is
5033 called for each exported symbol and we compute the ELF hash value for
5034 it.
5035 (compute_bucket_value): New function. It is called from
5036 size_dynamic_sections to determine the hash table size. When we are
5037 optimizing a better, but slower, algorithm is used.
5038 (size_dynamic_sections): Call compute_bucket_value.
5039
5040 * elf.c (bfd_elf_hash): Optimize the hash function a bit.
5041
5042 Mon Oct 19 20:03:21 1998 Catherine Moore <clm@cygnus.com>
5043
5044 * elf32-sh.c: Add HOWTO entries for R_SH_GNU_VTINHERIT and
5045 R_SH_GNU_VTENTRY.
5046 (sh_elf_gc_mark_hook): New.
5047 (sh_elf_gc_sweep_hook): New.
5048 (sh_elf_check_relocs): New.
5049 (elf_backend_can_gc_sections): Define.
5050
5051 Mon Oct 19 16:57:05 1998 Felix Lee <flee@cygnus.com>
5052
5053 * acinclude.m4: undo previous gettext change
5054 * aclocal.m4: rebuild with right version of aclocal.
5055
5056 Mon Oct 19 01:47:21 1998 Felix Lee <flee@cygnus.com>
5057
5058 * acinclude.m4, aclocal.m4: move gettext-related fragments from
5059 aclocal.m4 to acinclude.m4, so they don't get lost.
5060
5061 * elfcore.h: rewrite for better corefile support.
5062 * elf.c (elfcore_*): new functions.
5063 * elf-bfd.h (elf_obj_tdata): new structure members.
5064 * acconfig.h, acinclude.m4, configure.in: add feature-tests for
5065 flavor of procfs.
5066 * aclocal.m4, config.in, configure, Makefile.in: regenerated.
5067
5068 Fri Oct 16 14:07:45 1998 Catherine Moore <clm@cygnus.com>
5069
5070 * elf32-m32r.c: Add HOWTO entries for R_M32R_GNU_VTINHERIT
5071 and R_M32R_GNU_VTENTRY.
5072 (elf_backend_can_gc_sections): Define.
5073 (m32r_elf_check_relocs): New.
5074 (m32r_elf_gc_mark_hook): New.
5075 (m32r_elf_gc_sweep_hook): New.
5076 (m32r_elf_relocate_section): Handle VT relocs.
5077
5078 Mon Oct 12 14:18:40 1998 Nick Clifton <nickc@cygnus.com>
5079
5080 * coff-arm.c (arm_relocate_section): Remove redundant test.
5081
5082 * bfd-in2.h (struct reloc_howto_struct): Improve comment to make
5083 cleat that the 'bitsize' field is the size of the bitfield AFTER
5084 relocation not before.
5085
5086 * elf32-m32r.c (R_M32R_18_PCREL): Fix size of bitfield.
5087
5088 * coff-mips.c (mips_relocate_hi): Cope with missing refhi or reflo
5089 relocs.
5090
5091 Tue Oct 6 09:20:44 1998 Catherine Moore <clm@cygnus.com>
5092
5093 * elf32-sparc.c: Add HOWTO entries for R_SPARC_GNU_VTINHERIT and
5094 R_SPARC_GNU_VTENTRY.
5095 (elf32_sparc_check_relocs): Handle them.
5096 (elf32_sparc_reloc_type_lookup): Likewise.
5097 (elf32_sparc_relocate_section): Likewise.
5098 (elf32_sparc_gc_mark_hook): New.
5099 (elf32_sparc_gc_sweep_hook): New.
5100
5101 Mon Oct 5 14:55:30 1998 Jeffrey A Law (law@cygnus.com)
5102
5103 * som.c (som_finish_writing): Perform some sanity checks when
5104 writing an executable or shared library.
5105
5106 Mon Oct 5 12:02:31 1998 Gavin Romig-Koch <gavin@cygnus.com>
5107
5108 * dwarf1.c : New file. Adds _bfd_dwarf1_find_nearest_line.
5109 * configure.in (elf): Add dwarf1.lo.
5110 * elf_bfd.h (elf_ob_tdata): Add dwarf1_find_line_info.
5111 * elf.c (_bfd_elf_find_nearest_line): Add call to
5112 _bfd_dwarf1_find_nearest_line.
5113 * elf32-mips.c (_bfd_mips_elf_find_nearest_line):
5114 Add call to _bfd_dwarf1_find_nearest_line.
5115 * configure: Rebuilt.
5116
5117 Mon Oct 5 10:06:22 1998 Catherine Moore <clm@cygnus.com>
5118
5119 * elflink.h (elf_gc_sections): Do not allow garbage
5120 collection if dynamic sections have been created.
5121
5122 Mon Oct 5 09:07:37 1998 Catherine Moore <clm@cygnus.com>
5123
5124 * elf32-v850.c: Add HOWTO entries for R_V850_GNU_VTINHERIT and
5125 R_V850_GNU_VTENTRY.
5126 (v850_elf_check_relocs): Handle VTINHERIT and VTENTRY relocs.
5127 (v850_elf_perform_relocation): Likewise.
5128 (v850_elf_final_link_relocate): Likewise.
5129 (v850_elf_relocate_section): Likewise.
5130 (v850_elf_gc_sweep_hook): New routine.
5131 (v850_elf_gc_mark_hook): New routine.
5132 (elf_backend_can_gc_sections): Define.
5133
5134 Mon Oct 5 09:04:25 1998 Catherine Moore <clm@cygnus.com>
5135
5136 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Don't assume
5137 that dynobj exists.
5138
5139 Sun Oct 4 23:29:34 1998 David Edelsohn <edelsohn@mhpcc.edu>
5140
5141 * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
5142 Declare size as bfd_size_type.
5143 (rs6000coff_get_section_contents): Declare count as bfd_size_type.
5144
5145 Sun Oct 4 20:38:29 1998 Jeffrey A Law (law@cygnus.com)
5146
5147 * cpu-hppa.c (bfd_hppa20_arch): Define. Link it into the bfd_hppa_arch
5148 structure.
5149 * som.c (CPU_PA_RISC2_0): Define.
5150 (_PA_RISC2_0_ID): Likewise.
5151 (som_finish_writing): Use CPU_PA_RISC2_0 for the system_id as needed.
5152
5153 Sun Oct 4 21:19:09 1998 Ian Lance Taylor <ian@cygnus.com>
5154
5155 * elflink.h (elf_link_add_object_symbols): When a versioned symbol
5156 has a base which is already defined, only add the referenced
5157 symbol to the dynamic symbol table if it is defined or referenced
5158 by a regular file.
5159
5160 * elf32-i386.c (elf_i386_info_to_howto_rel): Handle vtable relocs
5161 correctly.
5162
5163 1998-09-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5164
5165 * elflink.h (elf_link_add_object_symbols): Undo last change.
5166
5167 Wed Sep 23 16:09:31 1998 Richard Henderson <rth@cygnus.com>
5168
5169 * elflink.h (elf_link_add_object_symbols): Don't record a dynamic
5170 symbol for the indirect alias to a versioned symbol.
5171
5172 Mon Sep 21 12:15:22 1998 Catherine Moore <clm@cygnus.com>
5173
5174 * elf32-i386.c (elf32_i386_vtinherit_howto): New.
5175 (elf32_i386_vtentry_howto): New.
5176 (elf_i386_reloc_type_lookup): Return elf32_i386_vtentry_howto
5177 or elf32_i386_vtinherit_howto on lookup.
5178
5179 Sun Sep 20 00:48:07 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5180
5181 * elf32-m68k.c: Include "elf/m68k.h". Remove definition of enum
5182 reloc_type. Rename R_68K__max to R_68K_max.
5183 (howto_table): Use _bfd_elf_rel_vtable_reloc_fn for a VTENTRY
5184 reloc.
5185
5186 Sun Sep 20 00:09:25 1998 Chris Torek <torek@bsdi.com>
5187
5188 * libbfd.c (bfd_getb32): Rewrite expression to get better code.
5189 (bfd_getl32, bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
5190
5191 * libbfd.c (bfd_log2): Cast to bfd_vma before shifting, not
5192 after.
5193
5194 Sat Sep 19 22:42:23 1998 Doug Rabson <dfr@nlsystems.com>
5195
5196 * elflink.h (elf_link_add_object_symbols): Ensure that the warning
5197 message has a null byte terminator.
5198
5199 Fri Sep 18 14:35:29 1998 Nick Clifton <nickc@cygnus.com>
5200
5201 * elf32-v850.c (v850_elf_perform_relocation): Ignore contents of
5202 word subject to R_V850_32 relocation.
5203
5204 Thu Sep 17 17:20:36 1998 Nick Clifton <nickc@cygnus.com>
5205
5206 * dwarf2.c: Add comment describing problem computing line numbers
5207 for undefined symbols at link time.
5208
5209 Thu Sep 17 16:03:28 1998 Richard Henderson <rth@cygnus.com>
5210
5211 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
5212 transform a defweak into a plt entry.
5213 (elf64_alpha_calc_dynrel_sizes): Allow room for secondary
5214 plt entry references to receive a RELATIVE reloc.
5215 (elf64_alpha_finish_dynamic_symbol): Fill them in.
5216 (elf64_alpha_relocate_section): Assert we don't overrun
5217 the allocated relocation space.
5218
5219 Wed Sep 16 18:03:13 1998 Nick Clifton <nickc@cygnus.com>
5220
5221 * elf.c (swap_out_syms): Always treat section symbols as
5222 special, even if they are attached to a common section.
5223
5224 Wed Sep 16 10:34:13 1998 Nick Clifton <nickc@cygnus.com>
5225
5226 * elf32-v850.c (v850_elf_symbol_processing): Move symbols in
5227 sections with v850 common section attributes into named v850
5228 common sections.
5229 (v850_elf_add_symbol_hook): Move symbols in sections with v850
5230 common section attributes into named v850 common sections.
5231
5232 Wed Sep 16 11:26:49 CDT 1998 Catherine Moore <clm@cygnus.com>
5233
5234 * elf32-arm.c (elf32_arm_gc_mark_hook): Remove print
5235 statement.
5236
5237 1998-09-15 Geoff Keating <geoffk@ozemail.com.au>
5238
5239 * elf32-ppc.c (ppc_elf_relocate_section): Reverse output_offset
5240 part of Vladimir's change of 1998-08-19. Make a R_PPC_SDAREL16
5241 reloc to the wrong section a warning, not an error. .dynsbss
5242 is not an output section, so there is no need to check for it.
5243
5244 Tue Sep 15 12:40:05 1998 Catherine Moore <clm@cygnus.com>
5245
5246 * elf-bfd.h: Add argument to elf_backend_get_symbol_type.
5247
5248 Tue Sep 15 08:34:40 1998 Catherine Moore <clm@cygnus.com>
5249
5250 * elf.c (swap_out_syms): Pass type to elf_backend_get_symbol_type.
5251 * elf32-arm.c: Add HOWTO entries for R_ARM_GNU_VTINHERIT and
5252 R_ARM_GNU_VTENTRY.
5253 (elf32_arm_gc_mark_hook): New.
5254 (elf32_arm_gc_sweep_hook): New.
5255 (elf32_arm_check_relocs): New.
5256 (elf32_arm_final_link_relocate): Handle VTINHERIT and VTENTRY
5257 relocations.
5258 (elf32_arm_relocate_section): Handle VTINHERIT and VTENTRY
5259 relocations.
5260
5261 1998-09-10 Geoff Keating <geoffk@ozemail.com.au>
5262
5263 * elf32-ppc.c (ppc_elf_relocate_section): If dynobj is NULL,
5264 assume there is no PLT or GOT.
5265
5266 Wed Sep 9 14:24:12 1998 Nick Clifton <nickc@cygnus.com>
5267
5268 * elf32-arm.c (elf32_arm_find_nearest_line): New function: just
5269 like _elf_bfd_find_nearest_line() except that STT_ARM_TFUNC is
5270 also accepted as a function symbol type.
5271
5272 Mon Sep 7 13:24:03 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
5273
5274 * rs6000-core.c (_LONG_LONG): Define for AIX 4.x only.
5275
5276 Sat Sep 5 20:40:18 1998 Ian Lance Taylor <ian@cygnus.com>
5277
5278 * libbfd-in.h (_bfd_nolink_bfd_gc_sections): Correct definition to
5279 match definition of _bfd_gc_sections field.
5280 * libbfd.h: Rebuild.
5281
5282 Fri Sep 4 13:54:23 1998 David Miller <davem@dm.cobaltmicro.com>
5283
5284 * elf32-sparc.c (elf32_sparc_relocate_section): Properly adjust
5285 the addend of a dynamic relocation referencing a section.
5286 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5287 (sparc64_elf_finish_dynamic_symbol): Fix the PLT relocation offset.
5288
5289 Thu Sep 3 17:28:50 1998 Richard Henderson <rth@cygnus.com>
5290
5291 * elflink.h (bfd_elfNN_size_dynamic_sections): Verify that the
5292 bed has a size_dynamic_sections routine before trying to use it.
5293
5294 Mon Aug 31 14:49:22 1998 Richard Henderson <rth@cygnus.com>
5295
5296 * elf32-mips.c (elf_mips_gnu_vtentry_howto): Use
5297 _bfd_elf_rel_vtable_reloc_fn.
5298
5299 Mon Aug 31 10:23:40 1998 Catherine Moore <clm@cygnus.com>
5300
5301 * Makefile.am: Add elf32-arm.c.
5302 * Makefile.in: Rebuild.
5303 * elf-bfd.h: Add elf_backend_get_symbol_type.
5304 * elf.c (swap_out_syms): If defined, call
5305 elf_backend_get_symbol_type.
5306 * elf32-arm.c: Define elf_backend_get_symbol_type.
5307 (elf32_arm_get_symbol-type): New routine.
5308 (record_thumb_to_arm_glue): Change to use STT_ARM_TFUNC.
5309 (bfd_elf32_arm_process_before_allocation): Change to
5310 check for STT_ARM_TFUNC.
5311 (elf32_arm_final_link_relocate): Likewise.
5312 * elfxx-target.h: Add elf_backend_get_symbol_type.
5313
5314 Fri Aug 28 19:44:07 1998 Richard Henderson <rth@cygnus.com>
5315
5316 * archures.c (bfd_mach_alpha_ev[456]): New.
5317 * cpu-alpha.c: Rework to match these types.
5318 * bfd-in2.h: Rebuild.
5319
5320 Fri Aug 28 19:38:53 1998 Richard Henderson <rth@cygnus.com>
5321
5322 * elf-bfd.h (_bfd_elf_rel_vtable_reloc_fn): Declare.
5323 * elf.c (_bfd_elf_rel_vtable_reloc_fn): New.
5324
5325 * elf32-i386.c (elf_howto_table): Add vtable relocs.
5326 (elf_i386_reloc_type_lookup): Recognize them.
5327 (elf_i386_check_relocs): Pass them off to generic code.
5328 (elf_i386_relocate_section): Ignore them.
5329 (elf_i386_gc_mark_hook, elf_i386_gc_sweep_hook): New.
5330 (elf_backend_can_gc_sections): True.
5331
5332 Thu Aug 20 15:03:45 1998 Nick Clifton <nickc@cygnus.com>
5333
5334 * elf32-arm.c (elf32_thumb_to_arm_stub): Check sym_sec is not NULL
5335 before looking at owner field.
5336 (elf32_arm_to_thumb_stub): Ditto.
5337 (elf32_arm_relocate_section): Compute name before calling
5338 elf32_arm_final_link_relocate().
5339
5340 Thu Aug 20 11:30:17 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
5341
5342 * elf.c: comment and formatting cleanups.
5343 * elfcore.h: ditto.
5344
5345 Wed Aug 19 15:43:26 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
5346
5347 * elfcode.h (elf_object_p): Reject files of header type ET_CORE
5348 (core files are treated differently than object files).
5349 * elf-bfd.h (_bfd_elf_write_corefile_contents,
5350 bfd_elf_mkcorefile): declare.
5351 * elfxx-target.h (_bfd_elf_write_corefile_contents,
5352 bfd_elf_mkcorefile): add to bfd_target vector.
5353 * elfcore.h (elf_core_file_p): save the program header table,
5354 and set the bfd architecture from the elf file header.
5355 * elf.c (bfd_elf_mkcorefile): new function.
5356 (_bfd_elf_write_corefile_contents): new function.
5357 (assign_file_positions_for_segments): add cases for handling
5358 PT_NOTE segments. (assign_file_positions_except_relocs):
5359 core files should be handled the same as exec files.
5360 (prep_headers): identify core files as type ET_CORE.
5361 (copy_private_bfd_data): identify the sections belonging to
5362 the PT_NOTE segment.
5363
5364 * elf32-sparc.c (elf32_sparc_final_write_processing):
5365 add break statement to default case.
5366
5367 1998-08-19 Vladimir N. Makarov <vmakarov@cygnus.com>
5368
5369 * elf32-ppc.c (ppc_elf_relocate_section): Check that output
5370 section (not input) will be in sections ".sbss", ".sbss2",
5371 ".sdata", and ".sdata" for R_PPC_SDAREL16, R_PPC_EMB_SDA2REL,
5372 R_PPC_EMB_SDA21, R_PPC_EMB_RELSDA. In all these cases also ignore
5373 output_offset for correct evaluation of addend.
5374
5375 Tue Aug 18 11:48:12 1998 Catherine Moore <clm@cygnus.com>
5376
5377 * elf32-arm.c: Add prefix bfd_ to elf32_arm_get_bfd_for_interworking,
5378 elf32_arm_allocate_interworking_sections and
5379 elf32_arm_process_before_allocation.
5380
5381 Tue Aug 18 11:46:00 1998 Nick Clifton <nickc@cygnus.com>
5382
5383 * bfd-in.h: Ammend prototype for
5384 elf32_arm_process_before_allocation to remove surplus third
5385 argument.
5386
5387 * bfd-in2.h: Regenerate.
5388
5389 Sat Aug 15 20:55:08 1998 Richard Henderson <rth@cygnus.com>
5390
5391 * elf64-alpha.c (elf64_alpha_relax_section): Handle indirect symbols.
5392
5393 Fri Aug 14 09:12:28 1998 Stan Cox <scox@cygnus.com>
5394
5395 * aoutx.h (aout_link_input_section_ext): Use the relocation already
5396 calculated for RELOC_SPARC_REV32 case.
5397
5398 Thu Aug 13 14:02:02 1998 Catherine Moore <clm@cygnus.com>
5399
5400 * bfd-in.h: Add prototypes for elf32_arm_get_bfd_for_interworking,
5401 elf32_arm_allocate_interworking_sections and
5402 elf32_arm_process_before_allocation.
5403 * bfd-in2.h: Regenerated.
5404 * elf32-arm.c Define elf32_arm_link_hash_table.
5405 (insert_thumb_branch): New routine.
5406 (find_thumb_glue): New routine.
5407 (find_arm_glue): New routine.
5408 (record_arm_to_thumb_glue): New routine.
5409 (record_thumb_to_arm_glue): New routine.
5410 (elf32_arm_link_hash_table_create): New routine.
5411 (elf32_arm_get_bfd_for_interworking): New routine.
5412 (elf32_arm_allocate_interworking_sections) New routine.
5413 (elf32_arm_process_before_allocation) New routine.
5414 (elf32_thumb_to_arm_stub): New routine.
5415 (elf32_arm_to_thumb_stub): New routine.
5416 (elf32_print_private_bfd_data): Fix typo.
5417 (elf32_arm_final_link_relocate): Add argument sym_sec.
5418 Check for branches to thumb symbols in case R_ARM_PC24.
5419 Check for branches to arm symbols in case R_ARM_THM_PC22.
5420 (elf32_arm_relocate_section): Pass symbol section to
5421 elf32_arm_final_link_relocate.
5422
5423 Wed Aug 12 19:00:39 1998 Geoff Keating <geoffk@ozemail.com.au>
5424
5425 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Generate PLT
5426 entries unless the symbol is defined in the executable; in
5427 particular, undefined weak symbols get a PLT entry.
5428
5429 Wed Aug 12 14:48:33 1998 Ian Lance Taylor <ian@cygnus.com>
5430
5431 * libaout.h: Remove nested comment to avoid warning.
5432
5433 Wed Aug 12 08:10:11 1998 Catherine Moore <clm@cygnus.com>
5434
5435 * elf32-arm.c (elf32_arm_final_link_relocate): Rework
5436 R_ARM_PC24 relocation.
5437
5438 Tue Aug 11 14:42:26 1998 Catherine Moore <clm@cygnus.com>
5439
5440 * elf32-arm.c (elf32_arm_final_link_relocate): Remove unused
5441 argument is_local. Add argument sym_flags. Check sym_flags
5442 in R_ARM_ABS32 case. Include addend for R_ARM_THM_PC22 case.
5443 (elf32_arm_relocate_section): Don't pass local sym and pass
5444 sym_flags to elf32_arm_final_link_relocate.
5445
5446 Mon Aug 10 20:38:39 1998 Richard Henderson <rth@cygnus.com>
5447
5448 * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Correct last change
5449 to not count too few relocs for dynamicly linked executables.
5450
5451 Mon Aug 10 15:35:34 1998 Richard Henderson <rth@cygnus.com>
5452
5453 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Never consider
5454 symbols without a dynamic index dynamic. Consider all weak
5455 symbols dynamic.
5456 (elf64_alpha_strip_section_from_output): Don't assume 1-1
5457 correspondance between input and output sections.
5458
5459 Mon Aug 10 15:31:39 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5460
5461 * elflink.h (elf_gc_common_finalize_got_offsets): For backends
5462 that use a .got.plt section start the got offset at zero.
5463
5464 Mon Aug 10 17:31:21 1998 Ian Lance Taylor <ian@cygnus.com>
5465
5466 * ieee.c (ieee_write_processor): Correct the processor ID written
5467 out for bfd_arch_m68k, accommodating change of March 25.
5468
5469 Sun Aug 9 20:55:44 1998 Catherine Moore <clm@cygnus.com>
5470
5471 * elf32-arm.c (elf32_arm_final_link_relocate): Rework
5472 R_ARM_THM_RPC22 relocations.
5473
5474 Sat Aug 8 15:15:30 1998 Richard Henderson <rth@cygnus.com>
5475
5476 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Undef weak symbols
5477 are always dynamic.
5478 (elf64_alpha_calc_dynrel_sizes): Allow enough room for RELATIVE
5479 .got relocs in -Bsymbolic shared objects.
5480
5481 Wed Aug 5 15:48:08 1998 Nick Clifton <nickc@cygnus.com>
5482
5483 * elf32-arm.c: Add private flags to ELF header.
5484 (elf32_arm_print_private_bfd_data): New Function.
5485 (elf32_arm_set_private_flags): New Function.
5486 (elf32_arm_copy_private_flags): New Function.
5487 (elf32_arm_merge_private_bfd_data): New Function.
5488
5489 Mon Aug 3 17:10:15 1998 Ian Lance Taylor <ian@cygnus.com>
5490
5491 * elf32-sparc.c (elf32_sparc_check_relocs): Permit WPLT30 against
5492 a local symbol.
5493 (elf32_sparc_relocate_section): Likewise.
5494
5495 Sun Aug 2 03:19:23 1998 Richard Henderson <rth@cygnus.com>
5496
5497 * elf32-ppc.c (ppc_elf_check_relocs): Init sgot to NULL. Create the
5498 .got if any relocation referrs to _GLOBAL_OFFSET_TABLE_.
5499 (ppc_elf_relocate_section): Pull sgot and splt search to the start
5500 of the function. Recognize no .plt as static linking.
5501
5502 1998-08-01 Ulrich Drepper <drepper@cygnus.com>
5503
5504 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Don't pass
5505 ".liblist" string through gettext.
5506
5507 Fri Jul 31 16:38:14 1998 Catherine Moore <clm@cygnus.com>
5508
5509 * Makefile.am: Add support for elf32-arm.lo.
5510 * Makefile.in: Rebuild.
5511 * config.bfd (arm-*-elf): Define targ_defvec and targ_selvecs.
5512 (thumb-*-elf): Define targ_defvec and targ_selvecs.
5513 * configure.in: Handle bfd_elf32_littlearm_vec and bfd_elf32_bigarm_vec.
5514 * configure: Regenerate.
5515 * elf.c: (prep_headers): Support arch_type of EM_ARM.
5516 * targets.c: Support new targets bfd_elf32_bigarm_vec and
5517 bfd_target bfd_elf32_littlearm_vec.
5518 * elf32-arm.c: New file.
5519
5520 Tue Jun 28 19:05:28 1998 Stan Cox <scox@cygnus.com>
5521
5522 * libaout.h (M_SPARCLITE_LE): New machine.
5523 * sunos.c (MACHTYPE_OK): Add machine M_SPARCLITE_LE.
5524 * aoutf1.h (sunos_set_arch_mach): Add machine M_SPARCLITE_LE.
5525 (sunos_write_object_contents): Add machine bfd_mach_sparc_sparclite_le
5526 * aoutx.h (howto_table_ext): Add relocation R_SPARC_REV32.
5527 (NAME(aout,machine_type)) Add machine bfd_mach_sparc_sparclite_le
5528 (aout_link_input_section_ext): Add RELOC_SPARC_REV32 support.
5529 * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map,
5530 elf32_sparc_relocate_section): Rename R_SPARC_32LE to be R_SPARC_REV32
5531 * libbfd.h (bfd_reloc_code_real_names): Rename BFD_RELOC_SPARC_32LE to
5532 be BFD_RELOC_SPARC_REV32.
5533 * reloc.c: Ditto.
5534 * config.bfd (sparc86x-*-aout): New
5535
5536 Fri Jul 24 13:54:19 1998 Nick Clifton <nickc@cygnus.com>
5537
5538 * linker.c (_bfd_generic_final_link): Allocate NULL symbol before
5539 actually mapping the output sections.
5540
5541 Fri Jul 24 11:24:29 1998 Jeffrey A Law (law@cygnus.com)
5542
5543
5544 * elf-m10300.c (mn10300_elf_howto): Add R_MN10300_24 entry.
5545 (mn10300_elf_reloc_map): Similarly.
5546 (mn10300_elf_final_link_relocate): Handle R_MN10300_24.
5547
5548 Fri Jul 24 12:36:04 1998 Ian Lance Taylor <ian@cygnus.com>
5549
5550 * elf32-mips.c (elf_mips_howto_table): Add reloc types used on
5551 Irix 6.
5552 (bfd_elf32_bfd_reloc_type_lookup): Add default case.
5553 * elf64-mips.c: Replace all uses of mips_elf64_reloc_type with
5554 elf_mips_reloc_type defined in elf/mips.h.
5555
5556 1998-07-24 Ulrich Drepper <drepper@cygnus.com>
5557
5558 * elf64-mips.c: Remove reloc_type definition completely. It's now
5559 in elf/mips.h.
5560
5561 Thu Jul 23 13:33:19 1998 Doug Evans <devans@canuck.cygnus.com>
5562
5563 * elf64-mips.c (mips_elf64_reloc_type): #if 0 out more relocations
5564 as they are defined in elf/mips.h now.
5565
5566 Thu Jul 23 11:29:43 1998 Jeffrey A Law (law@cygnus.com)
5567
5568
5569 * Re-add lost change:
5570 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field
5571 "movm_stack_size".
5572 (mn10300_elf_relax_section): Include stack space for register saves
5573 in the imm8 field of a "call" instruction.
5574 (compute_function_info): Determine how much stack is allocated by
5575 the movm instruction. Fix typo.
5576 (elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size.
5577
5578 Thu Jul 23 11:38:05 1998 Ian Lance Taylor <ian@cygnus.com>
5579
5580 * elf32-sparc.c (elf_backend_got_header_size): Define as 4.
5581 * elf64-sparc.c (elf_backend_got_header_size): Define as 8.
5582
5583 1998-07-22 Ulrich Drepper <drepper@cygnus.com>
5584
5585 * elf32-ppc.c: Change use of pp_reloc_type to elf_ppc_reloc_type.
5586
5587 Wed Jul 22 16:27:18 1998 Nick Clifton <nickc@cygnus.com>
5588
5589 * elf32-hppa.h: Let ELF header define the enum containing the
5590 external reloc numbers.
5591 * elf32-i386.h: Likewise.
5592
5593 1998-07-22 14:57 Ulrich Drepper <drepper@cygnus.com>
5594
5595 * elf-m10300.c: Let ELF header now define the macros to get the enum.
5596 * elf32-mips.c: Likewise.
5597 * elf32-ppc.c: Likewise.
5598
5599 Wed Jul 22 13:53:52 1998 Nick Clifton <nickc@cygnus.com>
5600
5601 * bfd-in2.h: Change type of 'class' parameter to 'unsigned int' in
5602 bfd_coff_set_symbol_class(), in order to avoid K&R compatability
5603 prblems.
5604 * bfd-in.h: Regenerate.
5605 * coffgen.c (bfd_coff_set_symbol_class): Change type of 'class'
5606 parameter to 'unsigned int' to avoid K&R compatability problems.
5607
5608 Wed Jul 22 16:43:24 1998 Ian Lance Taylor <ian@cygnus.com>
5609
5610 * ieee.c (ieee_find_nearest_line): Change filename_ptr and
5611 functionname_ptr to be const. Change line_ptr to be unsigned.
5612
5613 * coffcode.h (coff_link_output_has_begun): Simplify handling when
5614 macro is not defined. Change second parameter from bfd_link_info
5615 to coff_final_link_info. Add prototype.
5616 (coff_final_link_postscript): Simplify handling when macro is not
5617 defined. Add prototype.
5618
5619 1998-07-22 13:08 Ulrich Drepper <drepper@cygnus.com>
5620
5621 * elf-mn10300.c: Before include system specific ELF header define
5622 START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS.
5623 * elf32-mips.c: Likewise.
5624 * elf32-ppc.c: Likewise.
5625
5626 Wed Jul 22 13:46:51 1998 Ian Lance Taylor <ian@cygnus.com>
5627
5628 * elf64-mips.c (mips_elf64_reloc_type): Copy Ulrich's elf32-mips.c
5629 temporary patch over to elf64-mips.c as well.
5630
5631 1998-07-21 Ulrich Drepper <drepper@cygnus.com>
5632
5633 * elf32-mips.c (reloc_type): Temporarily disable definition of
5634 standard relocation since they are now defined in elf/mips.h.
5635
5636 Tue Jul 21 09:47:00 1998 Catherine Moore <clm@cygnus.com>
5637
5638 * elf-m10200.c (mn10200_elf_final_link_relocate):
5639 Modify range test for case R_MN10200_8.
5640
5641 * elf-m10300.c (mn10300_elf_final_link_relocate):
5642 Modify range test for case R_MN10300_8.
5643
5644 Mon Jul 20 18:50:54 1998 Richard Henderson <rth@cygnus.com>
5645
5646 * elf-bfd.h (struct elf_backend_data): Add got_ & plt_header_size.
5647 * elf32-i386.c (elf_backend_got_header_size): Define.
5648 (elf_backend_plt_header_size): Define.
5649 * elf32-m68k.c, elf32-mips.c, elf32-ppc.c: Likewise.
5650 * elf32-sparc.c, elf64-alpha.c, elf64-sparc.c: Likewise.
5651 * elfxx-target.h: Provide a default of zero.
5652 * elflink.c (_bfd_elf_create_got_section): Use got_header_size.
5653 * elflink.h (elf_gc_common_finalize_got_offsets): Likewise.
5654
5655 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't remove a PLT
5656 entry from an executable, even if the plt refcount goes to 0.
5657
5658 Mon Jul 20 12:47:26 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5659
5660 * aoutx.h (NAME(aout,find_nearest_line)): Also remember the
5661 directory name at the line number.
5662
5663 * elf.c (_bfd_elf_find_nearest_line): Also consider symbols
5664 with an unspecified type.
5665
5666 Wed Jul 15 11:20:01 1998 Ian Lance Taylor <ian@cygnus.com>
5667
5668 * sunos.c: Add undef of valid to avoid problem on SunOS.
5669
5670 Tue Jul 14 15:30:59 1998 Richard Henderson <rth@cygnus.com>
5671
5672 * config.bfd (i?86-pc-beos{pe,elf,}*): Recognize.
5673
5674 Tue Jul 14 11:22:21 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5675
5676 * elf32-m68k.c (elf_m68k_check_relocs): Also reference count
5677 R_68K_PCxx and R_68K_xx relocations. Make sure that
5678 ELF_LINK_HASH_NEEDS_PLT is always set for a PLT reloc reference.
5679 (elf_m68k_gc_sweep_hook): Also reference count R_68K_PCxx and
5680 R_68K_xx relocations.
5681 (elf_m68k_adjust_dynamic_symbol): Reset the plt offset of a symbol
5682 that has no plt entry.
5683 (elf_m68k_relocate_section): Ignore the plt offset in a static
5684 link.
5685 * elflink.h (elf_adjust_dynamic_symbol): Reset the plt offset for
5686 an ignored symbol.
5687 (elf_gc_common_finalize_got_offsets): Set the got offsets also in
5688 a static link.
5689
5690 * elf32-m68k.c (R_68K_GNU_VTINHERIT, R_68K_GNU_VTENTRY): New reloc
5691 types.
5692 (howto_table, reloc_map): Add entries for them.
5693 (elf_m68k_check_relocs): Handle them. Implement reference
5694 counting for got and plt entries.
5695 (elf_m68k_gc_mark_hook, elf_m68k_gc_sweep_hook): New functions.
5696 (elf_m68k_adjust_dynamic_symbol): Handle unreferenced plt
5697 symbols.
5698 (rtype_to_howto_rel, elf_info_to_howto_rel): Delete.
5699 (elf_m68k_relocate_section): Handle the new reloc types.
5700 (bfd_elf32_bfd_final_link, elf_backend_gc_mark_hook,
5701 elf_backend_gc_sweep_hook, elf_backend_can_gc_sections): Define.
5702 * elflink.h (elf_link_add_object_symbols): When creating an
5703 indirect reference for symbol versioning also copy the plt
5704 offset.
5705 (elf_fix_symbol_flags): When clearing the ELF_LINK_HASH_NEEDS_PLT
5706 flag also reset the plt offset.
5707 (elf_link_assign_sym_version): Likewise.
5708 (elf_gc_common_finalize_got_offsets): Increment the got offset by
5709 the size of the entry in bytes.
5710 (elf_gc_allocate_got_offsets): Likewise.
5711
5712 Tue Jul 14 11:18:14 1998 Ian Lance Taylor <ian@cygnus.com>
5713
5714 * elflink.h (elf_gc_sections): Return true rather than falling off
5715 the bottom.
5716
5717 * coffgen.c (bfd_coff_set_symbol_class): Call bfd_alloc, not
5718 xmalloc.
5719
5720 Mon Jul 13 11:06:31 1998 Nick Clifton <nickc@cygnus.com>
5721
5722 * coff-arm.c: Supress definition of TARGET_UNDERSCORE and add a
5723 comment describing when it should be enabled.
5724 Changed definition of USER_LABEL_PREFIX to "", to fall into line
5725 with GCC sources.
5726
5727 Mon Jul 13 13:06:54 1998 Ian Lance Taylor <ian@cygnus.com>
5728
5729 * ieee.c (ieee_slurp_external_symbols): Handle call optimization
5730 information ATN records.
5731
5732 Fri Jul 10 16:31:06 1998 Ian Lance Taylor <ian@cygnus.com>
5733
5734 * ieee.c (ieee_slurp_external_symbols): Select an appropriate
5735 section for an absolute symbol in a fully linked file. Based on
5736 patch from Christian Holland <CHolland@de.lucent.com>.
5737
5738 Wed Jul 8 11:29:56 1998 Manfred Hollstein <manfred@s-direktnet.de>
5739
5740 * coff-m88k.c (m88k_special_reloc): Don't lose the information
5741 that a symbol is undefined.
5742
5743 Tue Jul 7 21:47:02 1998 Jeffrey A Law (law@cygnus.com)
5744
5745 * som.c (som_bfd_gc_sections): Define.
5746
5747 Mon Jul 6 11:35:50 1998 Nick Clifton <nickc@cygnus.com>
5748
5749 * coff-arm.c (aoutarm_std_reloc_howto): Do not complain about
5750 overflows in ARM_26D patches, since they have already been
5751 implmented. Patch submitted by Dr. R.J. Black <rjb@dcs.gla.ac.uk>
5752
5753 Sat Jul 4 12:25:36 1998 Ian Lance Taylor <ian@cygnus.com>
5754
5755 * coffcode.h (coff_write_object_contents): If we have any long
5756 section names, call coff_write_symbols even if there are no
5757 symbols.
5758
5759 Fri Jul 3 13:11:35 1998 Ian Lance Taylor <ian@cygnus.com>
5760
5761 * elf.c (copy_private_bfd_data): Only set phdr_included once for a
5762 PT_LOAD segment, rather than only setting it once for the entire
5763 file.
5764
5765 * elf.c (_bfd_elf_make_section_from_shdr): When setting the LMA,
5766 rather than ignoring every phdr with a p_paddr of 0, ignore all
5767 the phdrs if they all have a p_paddr of 0.
5768
5769 * stabs.c (_bfd_write_stab_strings): Check whether the .stabstr
5770 section was discarded from the link.
5771
5772 Fri Jul 3 14:39:05 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
5773
5774 * coff-sh.c (sh_insn_uses_freg): Ignore lowest bit of register number.
5775
5776 Fri Jul 3 14:35:48 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
5777
5778 * coff-sh.c (sh_insns_conflict): Load of fpscr conflicts with
5779 floating point operations.
5780
5781 Thu Jul 2 18:37:25 1998 Ian Lance Taylor <ian@cygnus.com>
5782
5783 * cofflink.c (_bfd_coff_link_input_bfd): Skip undefined global
5784 function symbols.
5785
5786 Thu Jul 2 14:59:42 1998 Klaus Kaempf <kkaempf@rmi.de>
5787
5788 Merge of vax/vms (read-only) support
5789 * configure.com: Support Vax target.
5790 * makefile.vms: Support Vax target.
5791 * vms.h: Renamed from evax.h, merged vax/vms (read-only) support.
5792 * vms.c: Renamed from evax-alpha.c, merged vax/vms (read-only)
5793 support.
5794 * vms-hdr.c: Renamed from evax-emh.c, merged vax/vms (read-only)
5795 support.
5796 * vms-gsd.c: Renamed from evax-egsd.c, merged vax/vms (read-only)
5797 support.
5798 * vms-tir.c: Renamed from evax-etir.c, merged vax/vms (read-only)
5799 support.
5800 * vms-misc.c: Renamed from evax-misc.c, merged vax/vms (read-only)
5801 support.
5802 * libbfd.c (real_read): Use unbuffered read on VMS/Vax.
5803 * targets.c (bfd_target_ovax_flavour): New flavour.
5804 (vms_alpha_vec): Renamed from evax_alpha_vec.
5805 (vms_vax_vec): New.
5806 (target_vector): Update accordingly.
5807 * config.bfd (alpha*-*-*vms*): Use vms_alpha_vec, not
5808 evax_alpha_vec.
5809 (vax*-*-*vms*): New target.
5810 * Makefile.am: Update for renamed files. Rebuild dependencies.
5811 * bfd-in2.h: Rebuild.
5812 * configure.in, Makefile.in, aclocal.m4: Rebuild.
5813
5814 Thu Jul 2 13:31:55 1998 Ian Lance Taylor <ian@cygnus.com>
5815
5816 Based on patch from Matt Semersky <matts@scd.hp.com>:
5817 * linker.c (_bfd_generic_final_link): Force a trailing NULL
5818 pointer on abfd->outsymbols.
5819 (generic_add_output_symbol): Handle NULL sym parameter.
5820
5821 Wed Jul 1 17:05:53 1998 Nick Clifton <nickc@cygnus.com>
5822
5823 * elf.c (copy_private_bfd_data): Add support for changing VMA or
5824 LMA of sections.
5825
5826 Wed Jul 1 16:58:50 1998 Ian Lance Taylor <ian@cygnus.com>
5827
5828 * coff-sh.c (sh_relax_delete_bytes): Correct address comparisons
5829 when handling 32 bit immediate relocs.
5830 * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
5831
5832 Tue Jun 30 09:55:03 1998 Jeffrey A Law (law@cygnus.com)
5833
5834 * section.c (STD_SECTION): Account for recently added gc_mark
5835 field in struct asection.
5836
5837 * elf-m10300.c (bfd_mn10300_elf_merge_private_bfd_data): New function.
5838 (bfd_elf32_bfd_merge_private_bfd_data): Define.
5839
5840 Thu Jun 25 18:31:41 1998 Richard Henderson <rth@cygnus.com>
5841
5842 ELF Section-level Garbage Collection:
5843 * bfd.c (bfd_gc_sections): New.
5844 * aout-adobe.c: Hook to default implementation.
5845 * aout-target.h, aout-tic30.c, binary.c, bout.c: Likewise.
5846 * coff-alpha.c, coff-mips.c, coff-rs6000.c, coffcode.h: Likewise.
5847 * evax-alpha.c, i386msdos.c, i386os9k.c, ieee.c: Likewise.
5848 * ihex.c, nlm-target.h, oasys.c, ppcboot.c, srec.c: Likewise.
5849 * tekhex.c, versados.c: Likewise.
5850 * libbfd-in.h (_bfd_nolink_bfd_gc_sections): New.
5851 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_gc_sections.
5852
5853 * reloc.c (BFD_RELOC_VTABLE_INHERIT, BFD_RELOC_VTABLE_ENTRY): New.
5854 (bfd_generic_gc_sections): New.
5855 * section.c (SEC_KEEP): New.
5856 (asection): Add gc_mark member.
5857
5858 * elfcode.h (elf_gc*): New name remappings.
5859 * elflink.h (elf_link_input_bfd): Don't set contents on stabs
5860 sections to be excluded.
5861 (elf_gc_mark, elf_gc_sweep, elf_gc_sweep_symbol): New.
5862 (elf_gc_propogate_vtable_entries_used): New.
5863 (elf_gc_smash_unused_vtentry_relocs): New.
5864 (elf_gc_sections, elf_gc_record_vtinherit, elf_gc_record_vtentry): New.
5865 (elf_gc_common_finalize_got_offsets): New.
5866 (elf_gc_allocate_got_offsets, elf_gc_common_final_link): New.
5867 * elfxx-target.h: Add and default gc hooks.
5868
5869 * elf-bfd.h (struct elf_link_hash_entry): Swap got_offset/plt_offset
5870 for unions.
5871 (struct elf_obj_tdata): Likewise for local_got_offsets.
5872 * elf.c, elf-i386.c, elf32-m68k.c, elf32-mips.c: Update all uses.
5873 * elf32-ppc.c, elf32-sparc.c, elf64-alpha.c: Likewise.
5874 * elf64-sparc.c, elflink.h: Likewise.
5875
5876 * elf-bfd.h (struct elf_link_hash_entry): Add vtable members.
5877 (ELF_LINK_HASH_MARK): Define.
5878 (struct elf_backend_data): Add GC hooks.
5879 * elf.c (_bfd_elf_link_hash_newfunc): Zero vtable members.
5880
5881 * elf-m10300.c (mn10300_elf_check_relocs): New.
5882 (mn10300_elf_gc_mark_hook): New.
5883 (R_MN10300_GNU_VTINHERIT, R_MN10300_GNU_VTENTRY): New.
5884 (elf_mn10300_howto, mn10300_reloc_map): Handle them.
5885 (mn10300_elf_final_link_relocate): Likewise.
5886 (mn10300_elf_relocate_section): Likewise.
5887 (elf_backend_can_gc_sections): Define.
5888 * elf32-mips.c (R_MIPS_GNU_VTINHERIT, R_MIPS_GNU_VTENTRY): New.
5889 (elf_mips_gnu_vtinherit_howto, elf_mips_gnu_vtentry_howto): New.
5890 (bfd_elf32_bfd_reloc_type_lookup): Handle them.
5891 (mips_info_to_howto_rel): Likewise.
5892 (mips_elf_relocate_section): Likewise.
5893 (mips_elf_check_relocs): Likewise.
5894 (mips_elf_gc_mark_hook, mips_elf_gc_sweep_hook): New.
5895 (elf_backend_can_gc_sections): Define.
5896 * elf32-ppc.c (R_PPC_GNU_VTINHERIT, R_PPC_GNU_VTENTRY): New.
5897 (ppc_elf_howto_raw): Handle them.
5898 (ppc_elf_reloc_type_lookup): Likewise.
5899 (ppc_elf_relocate_section): Likewise.
5900 (ppc_elf_check_relocs): Reference count .got and .plt entries.
5901 Handle new vtable relocs.
5902 (ppc_elf_adjust_dynamic_symbol): Recognize unused .plt entries.
5903 (ppc_elf_gc_mark_hook, ppc_elf_gc_sweep_hook): New.
5904 (elf_backend_can_gc_sections): Define.
5905
5906 Fri Jun 26 10:48:23 1998 Jeffrey A Law (law@cygnus.com)
5907
5908 * archures.c (bfd_mach_mn10300): Define.
5909 * elf-m10300.c: Include elf/mn10300.h
5910 (elf_mn10300_mach): New function.
5911 (_bfd_mn10300_elf_final_write_processing): Likewise.
5912 (_bfd_mn10300_elf_object_p): Likewise.
5913 (elf_backendfinal_write_processing): Define.
5914 (elf_backend_object_p): Likewise.
5915
5916 Thu Jun 25 18:31:08 1998 Nick Clifton <nickc@cygnus.com>
5917
5918 * elf32-v850.c (v850_elf_perform_relocation): Fix HI16_S
5919 relocation.
5920
5921 Wed Jun 24 17:17:57 1998 Ian Lance Taylor <ian@cygnus.com>
5922
5923 * elflink.h (elf_bfd_final_link): Loop over input_bfds using the
5924 link_next field, not the next field.
5925
5926 Sun Jun 21 19:38:39 1998 Ian Lance Taylor <ian@cygnus.com>
5927
5928 * elf.c (map_sections_to_segments): Check the section address
5929 against the phdr size both with and without a modulo of
5930 maxpagesize.
5931
5932 Fri Jun 19 17:08:18 1998 Ian Lance Taylor <ian@cygnus.com>
5933
5934 * elf32-mips.c (mips_elf_size_dynamic_sections): Only strip a
5935 linker created empty input section if the output section has the
5936 same name.
5937
5938 * elflink.h (elf_link_output_extsym): Print an error message if
5939 _bfd_elf_section_from_bfd_section fails.
5940
5941 * elf.c (_bfd_elf_section_from_bfd_section): Call bfd_set_error on
5942 failure.
5943
5944 Tue Jun 16 11:55:55 1998 Ian Lance Taylor <ian@cygnus.com>
5945
5946 * elf.c (copy_private_bfd_data): Improve handling of Solaris
5947 native linker output. Avoid putting an empty section in more than
5948 one segment.
5949
5950 Fri Jun 12 13:30:17 1998 Tom Tromey <tromey@cygnus.com>
5951
5952 * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
5953 ($(PACKAGE).pot): Unconditionally depend on POTFILES.
5954
5955 Fri Jun 12 13:34:02 1998 Doug Evans <devans@canuck.cygnus.com>
5956
5957 * elf.c (swap_out_syms): New arg relocatable_p.
5958 Don't add section VMA to symbols for relocatable output.
5959 (_bfd_elf_compute_section_file_positions): Update call to
5960 swap_out_syms.
5961
5962 Mon Jun 8 15:20:57 1998 Nick Clifton <nickc@cygnus.com>
5963
5964 * elf32-v850.c (v850_elf_perform_relocation): Make comparisons
5965 against 'addend' be signed rather than unsigned.
5966
5967 Sat Jun 6 00:31:21 1998 Nick Clifton <nickc@cygnus.com>
5968
5969 * elf32-m32r.c: Add prototyps for static functions.
5970
5971 * coff-arm.c: Add prototypes for static functions.
5972
5973 Fri Jun 5 17:21:51 1998 Nick Clifton <nickc@cygnus.com>
5974
5975 * elf.c (elf_sort_sections): Sort by LMA first then VMA, since the
5976 LMA is used to order sections in a segment.
5977
5978 * elf32-v850.c: Add prototypes for static functions.
5979 Change type of addend parameter to bfd_vma in various functions.
5980
5981 Fri Jun 5 18:09:58 1998 Ian Lance Taylor <ian@cygnus.com>
5982
5983 * aoutx.h (howto_table_ext): Change RELOC_BASE13 to use
5984 complain_overflow_signed instead of complain_overflow_bitfield.
5985
5986 Fri Jun 5 15:11:11 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5987
5988 * elf.c (elf_map_symbols): Don't add section VMA to symbol value
5989 when comparing against 0.
5990
5991 Wed Jun 3 17:52:49 1998 Ian Lance Taylor <ian@cygnus.com>
5992
5993 * Makefile.am (config.status): New target.
5994 * Makefile.in: Rebuild.
5995
5996 Wed Jun 3 12:18:24 1998 Stan Cox <scox@equinox.cygnus.com>
5997
5998 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Give an
5999 error if previous object endianness doesn't match current object.
6000
6001 Tue Jun 2 17:50:59 1998 Nick Clifton <nickc@cygnus.com>
6002
6003 * elf32-v850.c (v850_elf_print_private_bfd_data): Call
6004 _bfd_elf_print_private)bfd_data ().
6005
6006 Tue Jun 2 15:29:35 1998 Ian Lance Taylor <ian@cygnus.com>
6007
6008 * elflink.h (elf_merge_symbol): Don't always set type_change_ok
6009 and size_change_ok.
6010 (elf_link_add_object_symbols): Set type_change_ok and
6011 size_change_ok before calling elf_merge_symbol.
6012
6013 * elf32-mips.c (mips_elf_relocate_section): If we issue an
6014 undefined symbol error, don't also issue an overflow error.
6015
6016 Tue Jun 2 13:51:00 1998 Geoff Keating <geoffk@ozemail.com.au>
6017
6018 * elf32-ppc.c (ppc_elf_relocate_section): The target of an
6019 R_PPC_LOCAL24PC relocation should be local; if not, print an error
6020 message instead of crashing.
6021
6022 Mon Jun 1 18:23:12 1998 Yuli Barcohen <yuli.barcohen@telrad.co.il>
6023
6024 * archures.c (bfd_mach_cpu32): Define.
6025 (bfd_default_scan): Add case for 68060. Fix 68332 case to use
6026 bfd_mach_cpu32.
6027 * cpu-m68k.c (arch_info_struct): Add m68k:cpu32.
6028 * ieee.c: Include <ctype.h>.
6029 (ieee_object_p): Parse out process ID string to make it more
6030 likely to be acceptable for bfd_scan_arch.
6031 * bfd-in2.h: Rebuild.
6032
6033 Mon Jun 1 11:12:02 1998 Nick Clifton <nickc@cygnus.com>
6034
6035 * elf32-m32r.c (m32r_elf_print_private_bfd_data): Also call
6036 _bfd_elf_print_private_bfd_data() so that the program header will
6037 be displayed.
6038
6039 Mon Jun 1 12:14:28 1998 Ian Lance Taylor <ian@cygnus.com>
6040
6041 * peicode.h (coff_swap_sym_in): Check for C_SECTION rather than
6042 0x68. Reindent. Add some comments.
6043
6044 Fri May 29 09:58:08 1998 Nick Clifton <nickc@cygnus.com>
6045
6046 * elf.c (copy_private_bfd_data): Adjust physical address of
6047 segment in output BFD to contain LMAs of its sections.
6048
6049 Tue May 26 19:37:47 1998 Stan Cox <scox@equinox.cygnus.com>
6050
6051 * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map,
6052 elf32_sparc_relocate_section): Added R_SPARC_32LE for little
6053 endian data 32 bit relocations.
6054 (elf32_sparc_merge_private_bfd_data): Check if linking little
6055 endian objects with big endian objects.
6056 (elf32_sparc_object_p): Set bfd_mach_sparc_sparclite_le.
6057 (elf32_sparc_final_write_processing): Set EF_SPARC_LEDATA in e_flags.
6058 * libbfd.h (bfd_reloc_code_real_names): Added BFD_RELOC_SPARC_32LE.
6059 * reloc.c: Same.
6060 * cpu-sparc.c (arch_info_struct): Added sparc:sparclite_le
6061 * archures.c (bfd_mach_sparc_sparclite_le): New.
6062 * bfd-in2.h (BFD_RELOC_SPARC_32LE, bfd_mach_sparc_sparclite_le): New.
6063
6064 Thu May 21 16:59:28 1998 Nick Clifton <nickc@cygnus.com>
6065
6066 * peicode.h (add_data_entry): Fix precedence of operators in if ()
6067 statement.
6068
6069 Tue May 19 18:41:19 1998 Ian Lance Taylor <ian@cygnus.com>
6070
6071 * bfd-in.h: Move over patch to bfd-in2.h.
6072
6073 * reloc.c (bfd_check_overflow): Add casts before shifts which may
6074 not fit in 32 bits.
6075 (_bfd_relocate_contents): Likewise.
6076
6077 Mon May 18 14:44:15 1998 Nick Clifton <nickc@cygnus.com>
6078
6079 * peicode.h (add_data_entry): If the section has no private data
6080 then do not create a Data Dictionary entry for it.
6081
6082 Mon May 18 00:09:28 1998 Richard Henderson <rth@cygnus.com>
6083
6084 * elf64-alpha.c (elf64_alpha_relax_section): Set again on changes.
6085 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots,
6086 elf64_alpha_size_got_sections): Rewrite, handling multiple got
6087 subsections during relaxation more correctly.
6088
6089 Thu May 14 14:22:58 1998 Nick Clifton <nickc@cygnus.com>
6090
6091 * bfd-in2.h: Add new prototype: bfd_coff_set_symbol_class ().
6092 Add extra argument to bfd_arm_process_before_allocation ().
6093 * bfd-in.h: Reflect changes made in bfd-in2.h.
6094 * coffgen.c (bfd_coff_set_symbol_class): New function. Set the
6095 coff class of a BFD symbol.
6096 * coff-arm.c: Add support for interworking between Thumb code and
6097 non-interworking aware ARM code.
6098
6099 Sun May 10 22:33:59 1998 Jeffrey A Law (law@cygnus.com)
6100
6101 * po/Make-in (install-info): New target.
6102
6103 Thu May 7 17:40:56 1998 Ian Lance Taylor <ian@cygnus.com>
6104
6105 * filemode.c: Remove; not used.
6106
6107 If sysdep.h includes a header file, don't include it again:
6108 * aix386-core.c: Don't include <stdio.h>, <stddef.h>, or
6109 <errno.h>.
6110 * aoutx.h: Don't include <string.h>. Use "sysdep.h" rather than
6111 <sysdep.h>.
6112 * archive.c: Don't include <string.h> or <errno.h>.
6113 * evax-alpha.c; Don't include <stdio.h>.
6114 * evax-egsd.c: Likewise.
6115 * evax-etir.c: Likewise.
6116 * evax-misc.c: Likewise.
6117 * evax-emh.c: Likewise. Also, don't include <sys/types.h>.
6118 * hppabsd-core.c: Don't include <stdio.h>, <sys/types.h>, or
6119 <errno.h>.
6120 * hpux-core.c: Likewise.
6121 * netbsd-core.c: Likewise.
6122 * som.c: Likewise.
6123 * libbfd.c: Don't include <sys/types.h>.
6124 * nlmcode.h: Don't include <string.h>.
6125 * osf-core.c: Don't include <string.h> or <stdio.h>.
6126 * ptrace-core.c: Don't include <stdio.h>, <sys/types.h>,
6127 <errno.h>, or <unistd.h>.
6128 * trad-core.c: Don't include <stdio.h> or <sys/types.h>.
6129
6130 Thu May 7 13:12:50 1998 Klaus Kaempf <kkaempf@progis.de>
6131
6132 * configure.com: If the version number can not be found in
6133 configure.in, set it to "unknown" rather than "2.8.1".
6134
6135 Wed May 6 09:46:05 1998 Gavin Koch <gavin@cygnus.com>
6136
6137 * elf32-mips.c (elf_mips_mach): New.
6138 (_bfd_mips_elf_object_p): Use elf_mips_mach.
6139 (_bfd_mips_elf_final_write_processing): Use the names
6140 of machines, rather than the numbers. Set both the ARCH
6141 and MACH in e_flags. Handle a few more specific machines.
6142 (_bfd_mips_elf_merge_private_bfd_data): Merge both
6143 EF_MIPS_ARCH and EF_MIPS_MACH.
6144
6145 Tue May 5 21:01:53 1998 Richard Henderson <rth@cygnus.com>
6146
6147 * syms.c (bfd_is_local_label): Revert last change.
6148 * srec.c (srec_write_symbols): Discard debugging symbols.
6149
6150 Tue May 5 23:36:06 1998 Ian Lance Taylor <ian@cygnus.com>
6151
6152 * som.c: Include <ctype.h>.
6153 * som.h: Don't include sysdep.h.
6154
6155 Tue May 5 18:29:24 1998 Tom Tromey <tromey@cygnus.com>
6156
6157 * libbfd.h: Rebuilt.
6158 * libbfd-in.h: Removed gettext includes and defines.
6159 * sysdep.h: Moved gettext-related includes and defines here.
6160
6161 Tue May 5 16:47:54 1998 Richard Henderson <rth@cygnus.com>
6162
6163 * srec.c (srec_write_symbols): Use bfd_is_local_label rather than
6164 an ad-hoc test. Kill bogus #if 0 code.
6165 * syms.c (bfd_is_local_label): Consider BSF_DEBUGGING symbols local.
6166
6167 Mon May 4 16:10:33 1998 Ian Lance Taylor <ian@cygnus.com>
6168
6169 * sunos.c (sunos_check_dynamic_reloc): Don't use the PLT address
6170 when generating a normal executable for a symbol defined in a
6171 regular file. When copying a reloc into the output file, adjust
6172 the addend for a PC relative reloc against a global symbol.
6173
6174 Mon May 4 10:08:18 1998 Tom Tromey <tromey@cygnus.com>
6175
6176 * libbfd.h: Rebuilt.
6177 * libbfd-in.h (_): Define as dgettext.
6178
6179 Mon May 4 11:02:23 1998 Ian Lance Taylor <ian@cygnus.com>
6180
6181 * coff-arm.c (coff_arm_relocate_section): Cast to bfd_signed_vma,
6182 not signed.
6183 * peicode.h (pe_saved_coff_bfd_print_private_bfd_data): Use PARAMS
6184 when declaring parameter types.
6185 (pe_saved_coff_bfd_copy_private_bfd_data): Likewise.
6186
6187 Wed Apr 29 15:35:03 1998 Ian Lance Taylor <ian@cygnus.com>
6188
6189 * config.bfd: If we include any ELF targets in targ_defvec and/or
6190 targ_selvecs, then add the generic ELF targets to targ_selvecs.
6191 * elf32-gen.c (dummy): New static const variable.
6192 (elf_generic_info_to_howto): New static function.
6193 (elf_generic_info_to_howto_rel): New static function.
6194 (elf_info_to_howto): Define as elf_generic_info_to_howto.
6195 (elf_info_to_howto_rel): Define as elf_generic_info_to_howto_rel.
6196 * elf64-gen.c: Same changes as elf32-gen.c.
6197 * elfcode.h (elf_object_p): For the generic target, ignore a
6198 failure of bfd_default_set_arch_mach. Fix indentation a bit.
6199
6200 Tue Apr 28 20:05:52 1998 Ian Lance Taylor <ian@cygnus.com>
6201
6202 * configure.in (WIN32LIBADD): Add -lintl on cygwin32.
6203 * configure: Rebuild.
6204
6205 Tue Apr 28 12:16:57 1998 Jason Molenda (crash@bugshack.cygnus.com)
6206
6207 * config.bfd: Update OSR5/Unixware patterns.
6208
6209 Mon Apr 27 18:02:24 1998 Richard Henderson <rth@cygnus.com>
6210
6211 * elf.c (assign_file_positions_for_segments): Allow for holes
6212 between sections added by a link script.
6213
6214 Mon Apr 27 11:49:55 1998 Ian Lance Taylor <ian@cygnus.com>
6215
6216 * configure.in: Change version number to 2.9.4
6217 * configure: Rebuild.
6218
6219 Based on patch from H.J. Lu <hjl@gnu.org>:
6220 * elf.c (bfd_elf_get_bfd_needed_list): New function.
6221 * bfd-in.h (bfd_elf_get_bfd_needed_list): Declare.
6222 * bfd-in2.h: Rebuild.
6223
6224 Sat Apr 25 20:07:53 1998 Richard Henderson <rth@cygnus.com>
6225
6226 * elf64-alpha.c (struct alpha_relax_info): Replace elfsym with other.
6227 Change all users.
6228
6229 Sat Apr 25 18:29:07 1998 Richard Henderson <rth@cygnus.com>
6230
6231 * elf64-alpha.c (struct alpha_relax_info): Add tsec & elfsym members.
6232 (elf64_alpha_relax_section): Fill them in.
6233 (elf64_alpha_relax_opt_call): Implement more than a stub.
6234 (elf64_alpha_add_symbol_hook): Don't set SEC_LOAD or default
6235 alignment on .scommon.
6236 (elf64_alpha_merge_gots): Merge use counts as well.
6237
6238 Sat Apr 25 14:07:29 1998 Richard Henderson <rth@cygnus.com>
6239
6240 * elf64-alpha.c (elf64_alpha_relax_section): Use the proper section
6241 for calculating a local symbol's address.
6242 (elf64_alpha_calc_got_offsets): Skip entries with 0 use count.
6243 Set the .got's cooked size as well as the raw size.
6244
6245 Fri Apr 24 09:16:00 1998 Nick Clifton <nickc@cygnus.com>
6246
6247 * elf32-v850.c (v850_elf_print_private_bfd_data): Add
6248 internationalisation of printed information.
6249
6250 * coff-arm.c (coff_arm_print_private_bfd_data): Add
6251 internationalisation of printed information.
6252
6253 Fri Apr 24 12:09:18 1998 Ian Lance Taylor <ian@cygnus.com>
6254
6255 * syms.c (struct indexentry): Change directory_name, file_name,
6256 and function_name fields to char *.
6257 (struct stab_find_info): Change cached_file_name field to char *.
6258
6259 Thu Apr 23 08:13:04 1998 Nick Clifton <nickc@cygnus.com>
6260
6261 * peicode.h (dir_names): Add missing N_() macros to dir_names array.
6262
6263 Wed Apr 22 13:06:15 1998 Tom Tromey <tromey@cygnus.com>
6264
6265 * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
6266
6267 Wed Apr 22 17:48:48 1998 Ian Lance Taylor <ian@cygnus.com>
6268
6269 * Makefile.am (install-data-local): Make $(includedir).
6270 * Makefile.in: Rebuild.
6271
6272 Wed Apr 22 13:06:15 1998 Tom Tromey <tromey@cygnus.com>
6273
6274 * libbfd-in.h: Use `gettext' and not `dgettext' for now.
6275
6276 Wed Apr 22 12:53:40 1998 Ian Lance Taylor <ian@cygnus.com>
6277
6278 * Makefile.am (INCLUDES): Add -I$(srcdir)/../intl -I../intl.
6279 * Makefile.in: Rebuild.
6280
6281 * bfd-in2.h: Rebuild for Nick's changes.
6282
6283 Tue Apr 21 23:11:51 1998 Richard Henderson <rth@cygnus.com>
6284
6285 * archive.c (_bfd_generic_read_ar_hdr_mag): Fix lossage in last
6286 change wrt length == max_namelen.
6287
6288 Tue Apr 21 21:19:36 1998 Tom Tromey <tromey@scribbles.cygnus.com>
6289
6290 * Many files: Added gettext invocations around user-visible
6291 strings.
6292 * libbfd-in.h: Added gettext includes and defines.
6293 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
6294 HAVE_LC_MESSAGES): Define.
6295 * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and
6296 po/Makefile.
6297 * Makefile.am (SUBDIRS): Added po.
6298 (POTFILES): New macro.
6299 (po/POTFILES.in): New target.
6300 (SOURCE_HFILES): New macro.
6301 (HFILES): Use it.
6302 * po/Make-in, po/POTFILES.in, po/bfd.pot: New files.
6303
6304 Tue Apr 21 13:38:18 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
6305
6306 * elfcore.h (bfd_prstatus): Copy core_prstatus from the first
6307 NT_PRSTATUS note section encountered, it contains the status of
6308 the currently executing thread when the core file was written.
6309
6310 Tue Apr 21 10:00:12 1998 Nick Clifton <nickc@cygnus.com>
6311
6312 * libcoff.h: Add extra parameter to
6313 bfd_coff_link_output_has_begun overrideable function.
6314 * cofflink.c: Pass extra parameter to
6315 bfd_coff_link_output_has_begun function.
6316 * bfd-in.h: Add prototypes for exported ARM interworking
6317 functions.
6318 * peicode.h: ARM specific code reorganised to conform to BFD
6319 coding conventions.
6320 * coffcode.h: ARM specific code reorganised to conform to BFD
6321 coding conventions.
6322 * coff-arm.c: Code reorganised to conform to the BFD coding
6323 conventions. Global variables have been moved into an ARM
6324 specific hash table structure and a new function:
6325 bfd_arm_get_bfd_for_interworking() has been created which is
6326 called from the linker scripts.
6327
6328 Tue Apr 21 00:11:51 1998 Richard Henderson <rth@cygnus.com>
6329
6330 * archive.c (_bfd_generic_read_ar_hdr_mag): Simplify end-of-name test.
6331
6332 * elf64-alpha.c (elf64_alpha_find_reloc_at_ofs): Renamed from
6333 elf64_alpha_relax_find_reloc_ofs. Changed all callers.
6334 (elf64_alpha_add_symbol_hook): Put small commons in .scommon not .sbss.
6335 (elf64_alpha_size_got_sections): Don't merge .got sections twice.
6336
6337 Sat Apr 18 01:21:04 1998 Stan Cox <scox@cygnus.com>
6338
6339 * config.bfd: Added sparc86x support.
6340
6341 Fri Apr 17 22:29:04 1998 Ian Lance Taylor <ian@cygnus.com>
6342
6343 * elf32-mips.c (mips_elf_relocate_section): Do not complain about
6344 an out of range pc-relative jump/call to an undefined weak symbol.
6345
6346 Thu Apr 16 13:49:00 1998 Richard Henderson <rth@cygnus.com>
6347
6348 * elf64-alpha.c (elf64_alpha_do_reloc_gpdisp): Do all gpdisp
6349 comparisons signed.
6350
6351 Thu Apr 16 11:43:33 1998 Ian Lance Taylor <ian@cygnus.com>
6352
6353 * archive.c (bfd_generic_archive_p): If a slurp subroutine returns
6354 an error other than bfd_error_system_call, set the error to
6355 bfd_error_wrong_format.
6356
6357 * targets.c (bfd_target_vector) [SELECT_VECS not defined]: Add
6358 bfd_elf32_powerpcle_vec.
6359
6360 * elf.c (copy_private_bfd_data): If all the p_paddr fields in the
6361 program segments are zero, don't set p_paddr_valid.
6362
6363 Wed Apr 15 22:15:16 1998 Richard Henderson <rth@cygnus.com>
6364
6365 * elf64-alpha.c: Initial implementation of relaxation --
6366 (struct alpha_elf_link_hash_entry): Add use_count member.
6367 (elf64_alpha_check_relocs): Initialize and increment it.
6368 (elf64_alpha_can_merge_gots): Check it when considering merging.
6369 (elf64_alpha_merge_gots): Drop entries with zero use.
6370 (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
6371 (elf64_alpha_always_size_sections): Split out got sizing ...
6372 (elf64_alpha_size_got_sections): ... here. New function.
6373 (elf64_alpha_relax_find_reloc_ofs): New function.
6374 (elf64_alpha_relax_with_lituse): Likewise.
6375 (elf64_alpha_relax_without_lituse): Likewise.
6376 (elf64_alpha_relax_opt_call): Likewise.
6377 (elf64_alpha_relax_section): Likewise.
6378 (elf64_alpha_add_symbol_hook): Likewise.
6379 (elf64_alpha_howto_table): Implement GPRELHIGH/LOW & IMMED_GP_16.
6380 (elf64_alpha_relocate_section): Likewise.
6381 (bfd_elf64_bfd_relax_section): Define.
6382 (elf_backend_add_symbol_hook): Likewise.
6383
6384 Wed Apr 15 16:08:46 1998 Richard Henderson <rth@cygnus.com>
6385
6386 * elf.c (prep_headers): Use new EM_SPARCV9 symbol.
6387 * elf64-sparc.c (ELF_MACHINE_CODE): Likewise.
6388 (ELF_MACHINE_ALT1): New. Set to EM_OLD_SPARC64.
6389
6390 Wed Apr 15 11:34:33 1998 Ian Lance Taylor <ian@cygnus.com>
6391
6392 * configure.in: Add -lkernel32 to WIN32LIBADD on cygwin32.
6393 * configure: Rebuild.
6394
6395 Mon Apr 13 16:46:27 1998 Ian Lance Taylor <ian@cygnus.com>
6396
6397 * Makefile.am (libbfd_la_LIBADD): Add @WIN32LIBADD@.
6398 (libbfd_la_LDFLAGS): Add @WIN32LDFLAGS@.
6399 * configure.in: Define and substitute WIN32LDFLAGS and
6400 WIN32LIBADD.
6401 * aclocal.m4: Rebuild with new libtool.
6402 * configure, Makefile.in: Rebuild.
6403
6404 Fri Apr 10 13:44:27 1998 Ian Lance Taylor <ian@cygnus.com>
6405
6406 * coffcode.h (coff_write_object_contents): Move a PE COMDAT symbol
6407 before any other symbols in the same section.
6408
6409 Wed Apr 8 14:50:23 1998 Michael Meissner <meissner@cygnus.com>
6410
6411 * config.bfd (powerpc*-*-*): Remove PowerPC NT support from ELF
6412 systems.
6413
6414 Tue Apr 7 16:25:31 1998 Gavin Romig-Koch <gavin@cygnus.com>
6415
6416 * dwarf2.c (comp_unit): Move it earlier in the source. Add
6417 addr_size.
6418 (read_address): Replace 'bdf*' argument with 'comp_unit*' argument.
6419 Use addr_size for address size, rather than sizeof(bfd_vma).
6420 (read_attribute): Replace bdf* argument with 'comp_unit*' argument.
6421 Fix call to read_address.
6422 (decode_line_info): Replace bdf* argument with 'comp_unit*' argument.
6423 Scrap other unneeded arguments. Fix call to read_address.
6424 (scan_unit_for_functions): Fix call to read_attribute.
6425 (parse_comp_unit): We now handle more values for addr_size.
6426 Set addr_size in unit. Fix call to read_attribute and
6427 decode_line_info.
6428
6429 Tue Apr 7 15:44:47 1998 Gavin Romig-Koch <gavin@cygnus.com>
6430
6431 * dwarf2.c (parse_comp_unit): Drop use of unit->name when it is null.
6432
6433 Tue Apr 7 12:35:18 1998 Ian Lance Taylor <ian@cygnus.com>
6434
6435 * archures.c (bfd_default_scan): Add m68k cases back to default
6436 switch, reverting patch of March 25, since IEEE support depends
6437 upon them.
6438
6439 Mon Apr 6 14:06:40 1998 Ian Lance Taylor <ian@cygnus.com>
6440
6441 * Makefile.am (diststuff): New target.
6442 * Makefile.in: Rebuild.
6443
6444 Sun Apr 5 16:21:44 1998 Jeffrey A Law (law@cygnus.com)
6445
6446 * som.c (som_bfd_ar_write_symbol_stuff): Fix computation of
6447 som_offset when we have an extended name table.
6448
6449 Sun Apr 5 16:04:39 1998 H.J. Lu <hjl@gnu.org>
6450
6451 * Makefile.am (stamp-lib): Check that .libs/libbfd.a exists before
6452 trying to copy it.
6453 * Makefile.in: Rebuild.
6454
6455 Fri Apr 3 11:09:42 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6456
6457 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Generate section
6458 symbols when creating a shared library.
6459 (elf_m68k_adjust_dynindx): New function, used by above code.
6460 (elf_m68k_finish_dynamic_sections): Initialize the section
6461 symbols.
6462 (elf_m68k_relocate_section): Change abort to BFD_ASSERT.
6463
6464 Wed Apr 1 16:04:02 1998 Nick Clifton <nickc@cygnus.com>
6465
6466 * coff-arm.c (in_reloc_p): Use ARM_RVA32 in place of constant
6467 value 11.
6468
6469 Wed Apr 1 13:36:58 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6470
6471 * elf32-m68k.c (elf_m68k_relocate_section, case R_68K_PLT*O): Fix
6472 assertion.
6473
6474 Tue Mar 31 00:12:12 1998 Jeffrey A Law (law@cygnus.com)
6475
6476 * elf-m10300.c (mn10300_elf_relax_section): Correctly handle
6477 absolute symbols.
6478
6479 Mon Mar 30 12:46:15 1998 Ian Lance Taylor <ian@cygnus.com>
6480
6481 * configure.in: Set version to 2.9.1.
6482 * configure: Rebuild.
6483
6484 * Branched binutils 2.9.
6485
6486 Mon Mar 30 12:20:50 1998 Brent Baccala <baccala@freesoft.org>
6487
6488 * syms.c (ENABLE_CACHING): Define.
6489 (struct indexentry): Define.
6490 (struct stab_cache): Remove.
6491 (cmpindexentry): New static function.
6492 (struct stab_find_info): Add new fields: indextable,
6493 indextablesize, cached_indexentry, cached_offset, cached_stab, and
6494 cached_file_name. Remove fields: file_cache, function_cache, and
6495 line_cache.
6496 (_bfd_stab_section_find_nearest_line): Rewrite to build a sorted
6497 index table and search it.
6498
6499 Mon Mar 30 10:39:34 1998 Ian Lance Taylor <ian@cygnus.com>
6500
6501 * elf.c (_bfd_elf_copy_private_section_data): Call
6502 copy_private_bfd_data once we've seen the last SEC_ALLOC section.
6503
6504 * cpu-mips.c: Remove trailing comma at end of enumeration list.
6505
6506 Sat Mar 28 16:33:02 1998 Ian Lance Taylor <ian@cygnus.com>
6507
6508 * coff-arm.c: Define all globally visible variables and functions
6509 only when COFF_WITH_PE is not defined.
6510 * configure.in (armpe_little_vec, armpe_big_vec): Add
6511 coff-arm.lo.
6512 * configure: Rebuild.
6513
6514 Fri Mar 27 16:06:02 1998 Ian Lance Taylor <ian@cygnus.com>
6515
6516 Fix some gcc -Wall warnings:
6517 * aout-arm.c (MY(fix_pcrel_26)): Add casts to avoid warnings.
6518 * archive.c (_bfd_generic_read_ar_hdr_mag): Likewise.
6519 * archures.c (bfd_default_scan): Likewise.
6520 * bfd.c (bfd_scan_vma): Likewise.
6521 * binary.c (mangle_name): Likewise
6522 * coff-arm.c (aoutarm_fix_pcrel_26): Likewise.
6523 * coff-sh.c (sh_relocate_section): Likewise.
6524 * coff-stgo32.c (create_go32_stub): Likewise.
6525 * coffcode.h (coff_slurp_line_table): Likewise.
6526 * ecoff.c (_bfd_ecoff_write_armap): Likewise.
6527 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
6528 (assign_file_positions_for_segments): Likewise.
6529 * elf32-mips.c (mips_elf_relocate_section): Likewise.
6530 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
6531 * oasys.c (oasys_write_sections): Likewise.
6532 * ppcboot.c (ppcboot_object_p): Likewise.
6533 (mangle_name): Likewise.
6534 * riscix.c (riscix_fix_pcrel_26): Likewise.
6535 * srec.c (srec_scan): Likewise.
6536 * stabs.c (_bfd_write_section_stabs): Likewise.
6537 * sunos.c (sunos_add_dynamic_symbols): Likewise.
6538 * aout-ns32k.c (_bfd_ns32k_relocate_contents): Add default case to
6539 switch. Declare parameters for function pointers.
6540 * archures.c (bfd_default_scan): Add braces to avoid ambiguous if
6541 warning.
6542 * elf.c (elf_sort_sections): Likewise.
6543 * coff-arm.c (coff_thumb_pcrel_common): Initialize relocation.
6544 Add default cases to switches.
6545 (coff_arm_relocate_section): Remove unused local variables.
6546 Always set rstat.
6547 (coff_arm_bfd_set_private_flags): Change flag variable to type
6548 flagword.
6549 * coff-mips.c (mips_relocate_section): Initialize use_lo.
6550 * coff-ppc.c (ppc_record_toc_entry): Change i to unsigned int.
6551 (dump_toc): Change cat to const, and initialize it.
6552 * coff-sh.c (sh_relax_delete_bytes): Initialize start and voff.
6553 * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
6554 (sh_elf_relocate_section): Initialize r_symndx.
6555 * coffcode.h (coff_compute_section_file_positions): Only declare
6556 old_sofar if ALIGN_SECTIONS_IN_FILE.
6557 (coff_write_object_contents): Initialize csym.
6558 * coffgen.c (coff_pointerize_aux): Make type and class unsigned.
6559 * cpu-ns32k.c (_bfd_ns32k_get_displacement): Add default case to
6560 switch.
6561 * dwarf2.c: Include libiberty.h.
6562 (read_2_signed_bytes, read_4_signed_bytes): Comment out.
6563 (decode_line_info): Remove unused local variables.
6564 * elf32-m32r.c (m32r_elf_sda16_reloc): Likewise.
6565 (m32r_elf_relocate_section): Likewise.
6566 * elf32-v850.c (v850_elf_store_addend_in_insn): Likewise.
6567 (v850_elf_reloc): Likewise.
6568 * elf-bfd.h (elf_linker_section_t): Make alignment unsigned.
6569 (struct elf_obj_tdata): Make cverdefs and cverrefs unsigned.
6570 * elf.c (assign_file_positions_for_segments): Always set adjust.
6571 * elf32-d30v.c (bfd_elf_d30v_reloc): Initialize tmp_addr. Fully
6572 parenthesize expression.
6573 * elf32-m32r.c (m32r_elf_relocate_section): Always initialize h.
6574 (m32r_elf_object_p): Return a value.
6575 (m32r_elf_print_private_bfd_data): Change fprintf format string.
6576 * elf32-mips.c (mips_elf_final_link): Initialize last.
6577 (mips_elf_finish_dynamic_sections): Initialize last and dindx.
6578 * elf32-v850.c (v850_elf_object_p): Return a value.
6579 (v850_elf_print_private_bfd_data): Change fprintf format string.
6580 * elfcode.h (elf_slurp_symbol_table): Change symcount and i to
6581 unsigned long.
6582 * elflink.h (elf_link_add_object_symbols): Change vernum to
6583 unsigned int, and initialize it. Change fprintf format string.
6584 (NAME(bfd_elf,size_dynamic_sections)): Cast -1 to bfd_size_type
6585 when setting or comparing to soname_indx.
6586 (elf_create_pointer_linker_section): Change num_symbols to
6587 unsigned int.
6588 * libcoff-in.h (coff_data_type): Change flags to flagword.
6589 * peicode.h (pe_print_idata): Initialize idx. Change j to
6590 bfd_size_type. Initialize hint_member. Remove useless test to
6591 time_stamp.
6592 (pe_print_edata): Change num_functions and num_names in struct
6593 EDT_type to unsigned long. Remove cast. Change fprintf format
6594 string.
6595 * ppcboot.c (ppcboot_object_p): Change i to size_t.
6596 * reloc.c (bfd_get_reloc_size): Change return type to unsigned
6597 int.
6598 * reloc16.c (bfd_coff_reloc16_relax_section): Change shrinks to
6599 int *. Update uses. Change j to long.
6600 * bfd-in2.h, libcoff.h: Rebuild.
6601
6602 Fri Mar 27 10:10:46 1998 Catherine Moore <clm@cygnus.com>
6603
6604 * elf32-v850.c Remove definition of USE_REL.
6605 (v850_elf_info_to_howto_rela): New function.
6606 (v850_elf_perform_relocation): Renamed from
6607 v850_elf_store_addend_in_insn. Removed replace argument.
6608 (v850_elf_reloc): store the relocation in the addend field instead
6609 of the insn.
6610 (v850_elf_final_link_relocate): Now calls
6611 v850_elf_perform_relocation.
6612 (v850_elf_relocate_section): Remove code to generate REL
6613 relocations.
6614
6615 Thu Mar 26 13:32:17 1998 Ian Lance Taylor <ian@cygnus.com>
6616
6617 * coffcode.h (coff_new_section_hook): Set the type and storage
6618 class in the native symbol information allocated for a new section
6619 symbol.
6620
6621 Thu Mar 26 10:13:41 1998 Nick Clifton <nickc@cygnus.com>
6622
6623 * peicode.h: Chain together calls to
6624 coff_bfd_copy_private_bfd_data and
6625 coff_bfd_print_private_bfd_data.
6626
6627 * coff-arm.c: Add prototypes for
6628 coff_arm_bfd_print_private_bfd_data and
6629 coff_arm_bfd_copy_private_bfd_data.
6630
6631 Wed Mar 25 15:45:55 1998 Nick Clifton <nickc@cygnus.com>
6632
6633 * coffcode.h (coff_mkobject_hook): Set private falgs even for a PE
6634 build.
6635
6636 * peicode.h: Call arm-coff private data functions after handling
6637 pe private data.
6638
6639 * coff-arm.c: Turn statics into globals so that they can be shared
6640 both pe and pei backends.
6641
6642 Wed Mar 25 15:19:38 1998 Ian Lance Taylor <ian@cygnus.com>
6643
6644 * aoutf1.h (sunos_set_arch_mach): Use bfd_mach_m68* rather than
6645 plain numbers.
6646 (sunos_write_object_contents): Likewise.
6647 * aoutx.h (NAME(aout,machine_type)): Likewise.
6648 * coffcode.h (coff_set_arch_mach_hook): Likewise.
6649
6650 Wed Mar 25 13:59:24 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6651
6652 * archures.c (bfd_mach_m68*): Add definitions for various m68k
6653 variants.
6654 (bfd_default_scan): Remove m68k special cases.
6655 * bfd-in2.h: Rebuild.
6656 * mipsbsd.c (MY(write_object_contents)): Use bfd_mach_m68* rather
6657 than plain numbers.
6658 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
6659 * cpu-m68k.c (arch_info_struct): Likewise. Add entry for
6660 m68k:68000.
6661 (bfd_m68k_arch): Set mach field to zero to signal no explicit
6662 selection, change printable_name to just "m68k" and make that the
6663 default instead of m68k:68020.
6664
6665 * aout-tic30.c (NAME): Define this to avoid multiple definitions
6666 from aoutx.h.
6667 (MY_get_section_contents): Define as aout_32_get_section_contents
6668 rather than NAME(aout,get_section_contents).
6669
6670 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Fix cast.
6671
6672 * evax-alpha.c (evax_set_arch_mach): Only accept bfd_arch_alpha
6673 and call bfd_default_set_arch_mach to do the real work.
6674
6675 Wed Mar 25 10:41:35 1998 Richard Henderson <rth@cygnus.com>
6676
6677 * bout.c (BALX): Include return register g14 as part of the insn.
6678 (BALX_MASK): New.
6679 (calljx_callback): Use it.
6680
6681 Wed Mar 25 11:19:28 1998 Ian Lance Taylor <ian@cygnus.com>
6682
6683 * libbfd-in.h (BFD_ALIGN): Cast this parameter to bfd_vma.
6684 * libbfd.h: Rebuild.
6685
6686 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Change
6687 byte_count to unsigned int.
6688 (mn10300_elf_relax_section): Initialize internal_relocs. Remove
6689 unused local variables.
6690
6691 * evax-alpha.c (evax_close_and_cleanup): Remove unused local
6692 variables er and er1.
6693
6694 * cpu-v850.c: Include <ctype.h>.
6695 (scan): Case isdigit argument to unsigned char.
6696
6697 From Yan Meroth <YAN.MEROTH@st.com>:
6698 * ihex.c (ihex_scan): Add extbase variable so that getting an
6699 extended linear address record does not ignore any previous
6700 extended address.
6701 (ihex_write_object_contents): When writing out an extended linear
6702 address record, zero out any previous extended address.
6703
6704 Tue Mar 24 16:09:43 1998 Manfred Hollstein <manfred@s-direktnet.de>
6705
6706 * ieee.c (do_one): Check section before dereferencing it.
6707 (ieee_canonicalize_reloc): Likewise with src->relent.sym_ptr_ptr.
6708 (ieee_generic_stat_arch_elt): Likewise with abfd->my_archive.
6709
6710 Mon Mar 23 18:51:47 1998 Joel Sherrill <joel@OARcorp.com>
6711
6712 * config.bfd: (sh*-*-rtems*): Switched from ELF to COFF.
6713
6714 Mon Mar 23 14:23:36 1998 Nick Clifton <nickc@cygnus.com>
6715
6716 * coff-arm.c: Add interworking functions to pe backends.
6717
6718 Fri Mar 20 18:47:20 1998 Ian Lance Taylor <ian@cygnus.com>
6719
6720 * configure.in: Use AM_DISABLE_SHARED.
6721 * aclocal.m4, configure: Rebuild with libtool 1.2.
6722
6723 Fri Mar 20 11:25:41 1998 Nick Clifton <nickc@cygnus.com>
6724
6725 * coff-arm.c (coff_arm_relocate_section): Better error messages
6726 when interowrking conflucts occur. Courtesy of Jonathan Walton
6727 and Tony Thompson.
6728 (aoutarm_std_reloc_howto): Fixed bitsize fields of rightshifted
6729 relocations. Patch courtesy of Jonathan Walton and Tony
6730 Thompson.
6731
6732 Fri Mar 20 02:26:43 1998 Richard Henderson <rth@cygnus.com>
6733
6734 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Revert
6735 part of Feb 22 change controling when to override the existing
6736 symbol with the .plt entry.
6737
6738 Wed Mar 18 09:26:25 1998 Nick Clifton <nickc@cygnus.com>
6739
6740 * config.bfd (targ_cpu): Add thumb-pe target.
6741
6742 * coffcode.h (OTHER_GLOBAL_CLASS): Support thumb external
6743 functions in PE build.
6744
6745 Sun Mar 8 23:37:26 1998 Stan Cox <scox@equinox.cygnus.com>
6746
6747 * config.bfd (sparclite-*-elf*): Added.
6748
6749 Mon Feb 23 19:31:19 1998 Ian Lance Taylor <ian@cygnus.com>
6750
6751 * configure.in: Add elf.lo to elf shell variable.
6752 * Makefile.am (BFD_LIBS): Remove elf.lo.
6753 (BFD_LIBS_CFILES): Remove elf.c.
6754 (BFD32_BACKENDS): Add elf.lo.
6755 (BFD32_BACKENDS_CFILES): Add elf.c.
6756 * configure, Makefile.in: Rebuild.
6757
6758 1998-02-23 15:53 Richard Henderson <rth@cygnus.com>
6759
6760 * elf32-i386.c (elf_i386_relocate_section): A pc-relative
6761 relocation against a non-local symbol should not have a dynamic
6762 relocation.
6763
6764 Mon Feb 23 16:17:08 1998 Ian Lance Taylor <ian@cygnus.com>
6765
6766 * peicode.h (coff_swap_filehdr_in): Don't set BFD flag HAS_SYMS in
6767 COFF filehdr flags.
6768 (pe_print_private_bfd_data): Print PE flags. From Mikey
6769 <jeffdb@netzone.com>.
6770
6771 Sun Feb 22 20:39:00 1998 Richard Henderson <rth@cygnus.com>
6772
6773 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Don't create
6774 a plt entry when we can determine that we authoritatively define
6775 the symbol.
6776
6777 Sun Feb 22 20:33:05 1998 Richard Henderson <rth@cygnus.com>
6778
6779 * configure.in (COREFILE selection): Remove sparc-*-linux*. They
6780 don't actually use trad-core, but a SunOS-style core file handled
6781 by gdb directly.
6782 * hosts/sparclinux.h: Remove.
6783
6784 Wed Feb 18 15:31:06 1998 Ian Lance Taylor <ian@cygnus.com>
6785
6786 * peicode.h (pe_print_idata): If there is no .idata section, look
6787 for the import tables in some other section. Make the initial
6788 label line up better with the data. Print the import address
6789 table even if there is no import name table. If the import
6790 address table holds actual addresses, print them.
6791
6792 Tue Feb 17 12:58:34 1998 Ian Lance Taylor <ian@cygnus.com>
6793
6794 * libbfd.c (bfd_seek): If fseek fails, save errno around call to
6795 bfd_tell. If errno is EINVAL, set bfd_error_file_truncated, not
6796 bfd_error_system_call.
6797
6798 Fri Feb 13 13:11:33 1998 Ian Lance Taylor <ian@cygnus.com>
6799
6800 * Makefile.am (AUTOMAKE_OPTIONS): Define.
6801 * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
6802
6803 From H.J. Lu <hjl@gnu.org>:
6804 * Makefile.am (libbfd_la_LDFLAGS): Define.
6805 * Makefile.in: Rebuild.
6806
6807 Thu Feb 12 17:31:11 1998 Ian Lance Taylor <ian@cygnus.com>
6808
6809 NetBSD patches from Gordon W. Ross <gwr@mc.com>:
6810 * netbsd.h (MACHTYPE_OK): Define.
6811 (MY(write_object_contents)): Use DEFAULT_ARCH and DEFAULT_MID when
6812 calling N_SET_MACHTYPE, rather than having a switch.
6813 * libaout.h (enum machine_type): Add M_PMAX_NETBSD, M_VAX_NETBSD,
6814 and M_ALPHA_NETBSD.
6815 * i386netbsd.c (MACHTYPE_OK): Don't define.
6816 (DEFAULT_MID): Define.
6817 * m68k4knetbsd.c (SEGMENT_SIZE): Don't define.
6818 (MACHTYPE_OK): Don't define.
6819 (DEFAULT_MID): Define.
6820 * m68knetbsd.c: (MACHTYPE_OK): Don't define.
6821 (DEFAULT_MID): Define.
6822 * ns32knetbsd.c (MACHTYPE_OK): Don't define.
6823 (DEFAULT_MID): Define.
6824 * sparcnetbsd.c (MACHTYPE_OK): Don't define.
6825 (DEFAULT_MID): Define.
6826
6827 NetBSD patches from Gordon W. Ross <gwr@mc.com>:
6828 * vaxnetbsd.c: New file.
6829 * netbsd-core.c: Clean up. Remove unused macros. Use netbsd
6830 rather than netbsd_core.
6831 * targets.c (vaxnetbsd_vec): Declare.
6832 (bfd_target_vector): Add vaxnetbsd_vec. If NETBSD_CORE is
6833 defined, add netbsd_core_vec.
6834 * configure.in: Set COREFILE for alpha*-*-netbsd* and
6835 powerpc-*-netbsd* to netbsd-core.lo. If COREFILE is
6836 netbsd-core.lo, set COREFLAG to -DNETBSD_CORE.
6837 * config.bfd (alpha*-*-netbsd*): New target.
6838 * Makefile.am: Rebuild dependencies.
6839 (BFD32_BACKENDS): Add vaxnetbsd.lo.
6840 (BFD32_BACKENDS_CFILES): Add vaxnetbsd.c.
6841 * configure, Makefile.in: Rebuild.
6842
6843 * configure.host: Remove the old shared library build stuff. We
6844 now use libtool instead.
6845
6846 Wed Feb 11 17:13:09 1998 Richard Henderson <rth@cygnus.com>
6847
6848 * tekhex.c (tekhex_write_object_contents): Call tekhex_init.
6849
6850 Tue Feb 10 19:23:28 1998 H.J. Lu <hjl@gnu.org>
6851
6852 * configure.in: Take stab-syms.lo out of sparclinux_vec list.
6853 * configure: Rebuild.
6854
6855 Tue Feb 10 15:16:38 1998 Nick Clifton <nickc@cygnus.com>
6856 * elf32-v850.c (remember_hi16s_reloc): New function.
6857 (find_remembered_hi16s_reloc): New function.
6858 (v850_elf_store_addend_in_insn): Use the above new functions to
6859 match up HI6S relocs with LO16 relocs.
6860
6861 Tue Feb 10 15:01:39 1998 Ian Lance Taylor <ian@cygnus.com>
6862
6863 * configure.in: Change -linux* to -linux-gnu*.
6864 * config.bfd, configure.host: Likewise.
6865 * configure: Rebuild.
6866
6867 Mon Feb 9 19:40:59 1998 Nick Clifton <nickc@cygnus.com>
6868
6869 * elf32-v850.c (v850_elf_store_addend_in_insn): Fix another
6870 LO16/HI16S bug and improve comments about what is going on.
6871
6872 Sat Feb 7 15:27:03 1998 Ian Lance Taylor <ian@cygnus.com>
6873
6874 * configure, aclocal.m4: Rebuild with new libtool.
6875
6876 Fri Feb 6 14:48:20 1998 Nick Clifton <nickc@cygnus.com>
6877
6878 * elf32-v850.c (v850_elf_merge_private_bfd_data): Do not complain
6879 when merging v850 code into v850e/v850ea code. Do not initialise
6880 output flags if the input is the default architecture.
6881
6882 Fri Feb 6 11:50:22 1998 Jeffrey A Law (law@cygnus.com)
6883
6884 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): For BFD_RELOC_CTOR
6885 get the size from bfd_arch_bits_per_address instead of directly
6886 from the isa.
6887
6888 Thu Feb 5 14:21:34 1998 Michael Meissner <meissner@cygnus.com>
6889
6890 * libbfd-in.h (BFD_ALIGN): If rounding up would cause the address
6891 to wrap, just return all 1's bits instead.
6892 * libbfd.h: Regenerate.
6893
6894 Thu Feb 5 11:51:05 1998 Ian Lance Taylor <ian@cygnus.com>
6895
6896 * coff-i386.c (coff_pe_i386_relocate_section): New static function
6897 if COFF_WITH_PE.
6898 (coff_relocate_section): If COFF_WITH_PE, define as
6899 coff_pe_i386_relocate_section.
6900 * coffcode.h (coff_write_object_contents): If COFF_IMAGE_WITH_PE,
6901 skip empty sections, to match coff_write_object_contents.
6902
6903 * elf64-mips.c (mips_elf64_swap_reloca_out): Swap out r_addend,
6904 rather than swapping out r_offset twice. From Luke Deller
6905 <luked@cse.unsw.edu.au>.
6906
6907 Wed Feb 4 19:11:28 1998 Ian Lance Taylor <ian@cygnus.com>
6908
6909 * configure.in: Set libtool_enable_shared rather than
6910 libtool_shared. Remove diversion hack.
6911 * configure, Makefile.in, doc/Makefile.in, aclocal.m4: Rebuild
6912 with new libtool.
6913
6914 Wed Feb 4 16:10:21 1998 Brent Baccala <baccala@freesoft.org>
6915
6916 * syms.c (struct stab_cache): Define.
6917 (struct stab_find_info): Remove cached_offset, cached_stab,
6918 cached_str, and cached_stroff fields. Add file_cache,
6919 function_cache, and line_cache fields.
6920 (_bfd_stab_section_find_nearest_line): Use extensive caching to
6921 speed up searches.
6922
6923 Wed Feb 4 13:34:22 1998 Ian Lance Taylor <ian@cygnus.com>
6924
6925 * peicode.h (pe_print_idata): Check for import of ordinal rather
6926 than name.
6927 (pe_print_edata): If there is no .edata section, look for the
6928 export data in some other section.
6929
6930 Mon Feb 2 20:05:42 1998 Jason Molenda (crash@bugshack.cygnus.com)
6931
6932 * configure.in: Change version to 2.8.4.
6933 * configure: Regenerated.
6934
6935 Mon Feb 2 17:39:39 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
6936
6937 Add tms320c30 support:
6938 * cpu-tic30.c: New file.
6939 * aout-tic30.c: New file.
6940 * coff-tic30.c: New file.
6941 * archures.c (bfd_arch_tic30): Define.
6942 (bfd_tic30_arch): Declare.
6943 (bfd_archures_list): Add bfd_tic30_arch.
6944 * targets.c (bfd_target_vector): Add tic30_aout_vec and
6945 tic30_coff_vec.
6946 * reloc.c (BFD_RELOC_TIC30_LDP): Define.
6947 * coffcode.h (coff_set_arch_mach_hook): Add tic30 case.
6948 (coff_set_flags): Likewise.
6949 * config.bfd (tic30-*-*aout*, tic30-*-*coff*): New targets.
6950 * configure.in (tic30_aout_vec, tic30_coff_vec): New vectors.
6951 * Makefile.am: Rebuild dependencies.
6952 (ALL_MACHINES): Add cpu-tic30.lo.
6953 (ALL_MACHINES_CFILES): Add cpu-tic30.c.
6954 (BFD32_BACKENDS): Add aout-tic30.lo and coff-tic30.lo.
6955 (BFD32_BACKENDS_CFILES): Add aout-tic30.c and coff-tic30.c.
6956 * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
6957
6958 Mon Feb 2 12:25:12 1998 Nick Clifton <nickc@cygnus.com>
6959
6960 * elf32-v850.c (v850_elf_store_addend_in_insn): Allow HI16_S reloc
6961 to lag behind LO16 reloc by a couple of instructions.
6962
6963 Mon Feb 2 14:09:46 1998 Ian Lance Taylor <ian@cygnus.com>
6964
6965 * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force
6966 make to reexamine the file timestamp.
6967 ($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise.
6968
6969 * elf64-alpha.c (ELF_MAXPAGESIZE): Change to 0x10000 from
6970 0x100000.
6971
6972 Fri Jan 30 19:07:07 1998 Geoff Keating <geoffk@ozemail.com.au>
6973
6974 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New procedure
6975 to create .dynsbss and .rela.sbss sections.
6976 (ppc_elf_adjust_dynamic_symbol): Put space for small data to be
6977 copied from dynamic objects into .sbss.
6978 (ppc_elf_size_dynamic_sections): Strip .rela.sbss if we don't
6979 use it. Correct typo of .rela.sdata2.
6980 (ppc_elf_finish_dynamic_symbol): Generate reloc to where we
6981 put the data, which may now be in .sbss.
6982 (ppc_elf_relocate_section): A SDAREL16 reloc can be in dynsbss.
6983 (elf_backend_create_dynamic_sections): Define as
6984 ppc_elf_create_dynamic_sections.
6985
6986 * elf32-ppc.c (ppc_elf_check_relocs): Don't emit R_PPC_REL* relocs
6987 against _GLOBAL_OFFSET_TABLE_.
6988 (ppc_elf_relocate_section): Don't emit R_PPC_REL32 relocs in
6989 shared libraries which refer to local symbols. Make sure that the
6990 test for allocating space for a reloc in a shared object is the
6991 same as the test for emitting a reloc.
6992
6993 Thu Jan 29 15:55:35 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
6994
6995 * config.bfd (i[3456]-*-mingw32*): New target.
6996 * acinclude.m4 (BFD_BINARY_OPEN): Check for mingw32.
6997 * aclocal.m4, configure: Rebuild.
6998
6999 Wed Jan 28 13:41:26 1998 Ian Lance Taylor <ian@cygnus.com>
7000
7001 * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we
7002 have a bfd_object.
7003
7004 Tue Jan 27 21:43:55 1998 Richard Henderson <rth@cygnus.com>
7005
7006 Sparc v9 ABI compliant PLT:
7007 * elf64-sparc.c (PLT_HEADER_SIZE): V9 ABI uses 4 entries.
7008 (plt_templates, sparc64_elf_build_plt_entry): Delete.
7009 (LARGE_PLT_THRESHOLD): New define.
7010 (GOT_RESERVED_ENTRIES): V9 ABI only uses 1.
7011 (sparc64_elf_build_plt): New function.
7012 (sparc64_elf_plt_entry_offset): Likewise.
7013 (sparc64_elf_plt_ptr_offset): Likewise.
7014 (sparc64_elf_adjust_dynamic_symbol): Change h->plt_offset to
7015 contain the index for convenience. Skip the initial entries
7016 in .rela.plt.
7017 (sparc64_elf_size_dynamic_sections): Zero the allocated contents
7018 memory for the benefit of .rela.plt.
7019 (sparc64_elf_relocate_section): Call sparc64_elf_plt_entry_offset.
7020 (sparc64_elf_finish_dynamic_symbol): Kill template stuff. Use
7021 sparc64_elf_plt_entry_offset & sparc64_elf_plt_ptr_offset for reloc.
7022 (sparc64_elf_finish_dynamic_sections): DT_PLTGOT points to .plt.
7023 Call sparc64_elf_build_plt.
7024 (elf_backend_want_got_plt): No.
7025 (elf_backend_plt_readonly): No.
7026 (elf_backend_plt_alignment): 8.
7027
7028 * elf.c (_bfd_elf_close_and_cleanup): New function; free the shstrtab.
7029 * elf-bfd.h (_bfd_elf_close_and_cleanup): Declare it.
7030 * elfxx-target.h (bfd_elfNN_close_and_cleanup): Arrange for it
7031 to be called.
7032
7033 Tue Jan 27 21:45:15 1998 Jeffrey A Law (law@cygnus.com)
7034
7035 * archures.c (bfd_mach_mips*): Add definitions for various MIPS
7036 processors.
7037 * cpu-mips.c (arch_info_struct): Add mips variants.
7038 * bfd-in2.h: Rebuilt.
7039
7040 Tue Jan 27 15:06:04 1998 Nick Clifton <nickc@cygnus.com>
7041
7042 * coff-arm.c (coff_arm_relocate_section): Preserve the contents of
7043 t2a3_b_insn.
7044
7045 Tue Jan 27 12:47:27 1998 Robert Lipe <robertl@dgii.com>
7046
7047 * config.bfd (i[3456]86-sco3.2v5*): ELF now the default.
7048 (i[3456]86sco3.2v5*coff): New target.
7049
7050 Mon Jan 26 15:41:30 1998 Ian Lance Taylor <ian@cygnus.com>
7051
7052 * bfd-in2.h: Rebuild with changes to chew--tab expansion.
7053
7054 Thu Jan 22 21:26:48 1998 Richard Henderson <rth@cygnus.com>
7055
7056 * bfd.c (bfd_get_error_handler): Add orthogonal function.
7057 * bfd-in2.h: Regenerate.
7058
7059 Thu Jan 22 21:13:39 1998 Richard Henderson <rth@cygnus.com>
7060
7061 * tekhex.c (tekhex_write_object_contents): Check for no symbols.
7062
7063 Wed Jan 21 21:19:03 1998 Ian Lance Taylor <ian@cygnus.com>
7064
7065 * coff-i386.c (coff_i386_rtype_to_howto): If COFF_WITH_PE, don't
7066 adjust addend for an output common symbol (from Jimmy Blair
7067 <jimmyb@wrs.com>). If COFF_WITH_PE, adjust addend for PC relative
7068 defined symbol to counteract adjustment made in generic relocation
7069 code.
7070
7071 * dwarf2.c: Include sysdep.h, not stdio.h and stdlib.h.
7072
7073 Wed Jan 21 21:16:06 1998 Manfred Hollstein <manfred@s-direktnet.de>
7074
7075 * coff-m88k.c (GET_SCNDHR_NRELOC): Fix typo in macro name.
7076 (GET_SCNDHR_NLNNO): Likewise.
7077
7078 Mon Jan 19 12:49:52 1998 Ian Lance Taylor <ian@cygnus.com>
7079
7080 * cpu-sh.c (arch_info_struct): Correct next field of sh3e.
7081
7082 Wed Jan 14 17:23:27 1998 Nick Clifton <nickc@cygnus.com>
7083
7084 * elf32-m32r.c: Add macros to handle NOP insertion.
7085
7086 Wed Jan 14 16:15:22 1998 Richard Henderson <rth@cygnus.com>
7087
7088 * xcofflink.c (xcoff_mark_symbol): Don't mark the absolute section.
7089 (xcoff_mark): Likewise.
7090 (xcoff_build_ldsyms): Mark absolute symbols.
7091
7092 Wed Jan 14 16:03:11 1998 Richard Henderson <rth@cygnus.com>
7093
7094 * bout.c (b_out_write_object_contents): Sort symbols before output
7095 to keep {CALL,BAL}NAME symbols adjacent.
7096 (b_out_symbol_cmp): New function.
7097
7098 For older changes see ChangeLog-9697
7099 \f
7100 Local Variables:
7101 mode: change-log
7102 left-margin: 8
7103 fill-column: 74
7104 version-control: never
7105 End:
This page took 0.182324 seconds and 4 git commands to generate.