]> Git Repo - binutils.git/blob - bfd/ChangeLog
For sections containing uninitialised data, only set their size to s_paddr
[binutils.git] / bfd / ChangeLog
1 2001-07-05  Nick Clifton  <[email protected]>
2
3         * peicode.h (coff_swap_scnhdr_in): For sections containing
4         uninitialised data, only set their size to s_paddr if this does
5         not reset their size to zero.  MS's latest compilers will set
6         s_paddr to zero.
7
8 2001-07-04  H.J. Lu  <[email protected]>
9
10         * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
11         Handle bfd_mach_mips4400, bfd_mach_mips4600 and
12         bfd_mach_mips5000.
13
14 2001-07-03  Mark Elbrecht  <[email protected]>
15
16         * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
17
18         * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
19         sections being discarded.
20
21 2001-06-30  Alan Modra  <[email protected]>
22
23         * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
24         instead of _bfd_elfcore_section_from_phdr.
25         * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
26         * elf.c (_bfd_elfcore_section_from_phdr): Remove.
27         (_bfd_elfcore_make_pseudosection): Expedite tail-call.
28         (elfcore_grok_prstatus): Likewise.
29         (elfcore_grok_lwpstatus): Likewise.
30         (bfd_get_elf_phdr_upper_bound): Likewise.
31         (elfcore_make_note_pseudosection): Formatting.
32         (_bfd_elfcore_strndup): Formatting.
33         * elf32-mips.c (mips_elf_sym_is_global): Formatting.
34         (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
35
36 2001-06-29  Daniel Jacobowitz  <[email protected]>
37
38         * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
39         and _bfd_elfcore_strndup.
40         (struct elf_backend_data): Add elf_backend_grok_prstatus
41         and elf_backend_grok_psinfo.
42         * elf.c (_bfd_elfcore_make_pseudosection): New function.
43         (elfcore_grok_prstatus): Use it.
44         (elfcore_make_note_pseudosection): Likewise.
45         (elfcore_strndup):  Rename to...
46         (_bfd_elfcore_strndup): Here, and make global.
47         (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
48         (elfcore_grok_note): Call elf_backend_grok_prstatus
49         and elf_backend_grok_psinfo if available.
50         * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
51         (_bfd_elf32_mips_grok_psinfo): New function.
52         (elf_backend_grok_prstatus): Define.
53         (elf_backend_grok_psinfo): Define.
54         * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
55         (elf_backend_grok_psinfo): Likewise.
56         (elfNN_bed): Include elf_backend_grok_prstatus and
57         elf_backend_grok_psinfo.
58
59 2001-06-29  H.J. Lu  <[email protected]>
60
61         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
62         hplink->sgot is NULL before filling GOT. Checck if hplink->splt
63         is NULL before filling PLT.
64
65 2001-06-29  Alan Modra  <[email protected]>
66
67         * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
68
69 2001-06-27  Alan Modra  <[email protected]>
70
71         * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
72         here..
73         (elf32_hppa_adjust_dynamic_symbol): ..nor here..
74         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
75         after gc has run.
76
77         * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
78         (IS_ABSOLUTE_RELOC): Define.
79         (elf32_hppa_link_hash_entry): Always include reloc_entries field.
80         (hppa_link_hash_newfunc): Always init it.
81         (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
82         create COPY relocs only when the reloc is in a read-only section.
83         Instead, allocate space for a dynamic reloc to reference the
84         library symbol directly.  Keep track of space we allocate using
85         relocs_entries.
86         (hppa_discard_copies): Delete, and move code to..
87         (allocate_plt_and_got): ..here.  Rename to
88         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
89         relocs for non-shared link.
90         (elf32_hppa_size_dynamic_sections): Update calls to above.
91         (elf32_hppa_relocate_section): Write out the dynamic relocs used
92         in lieu of COPY relocs.
93
94         * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
95         here..
96         (elf_i386_adjust_dynamic_symbol): ..nor here..
97         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
98         after gc has run.
99         (elf_i386_size_dynamic_sections): Fix a comment.
100         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
101         involved in writing reloc out.
102
103 2001-06-25  Alan Modra  <[email protected]>
104
105         * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
106         Ensure syms are dynamic if we might be emitting a reloc.
107         (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
108         for undefweak or undefined syms..
109         (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
110
111         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
112         relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
113         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
114         redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
115
116 2001-06-24  H.J. Lu  <[email protected]>
117
118         * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
119         strncasecmp/strcasecmp instead of strncmp/strcmp.
120
121 2001-06-23  H.J. Lu  <[email protected]>
122
123         * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
124         Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
125         in the regular object file and treat the weak definition as
126         the normal one.
127
128 2001-06-23  Alan Modra  <[email protected]>
129
130         * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
131         unresolved_reloc test to exclude cases where we use "relocation"
132         before setting it to point into the .got.  Reinstate fudge for
133         unresolved relocs in debugging sections.
134
135         * elf32-i386.c (elf_i386_relocate_section): Replace ugly
136         complicated tests for unresolvable relocs with a simple direct
137         scheme using "unresolved_reloc" var.
138
139         * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
140         elf_i386_dyn_relocs.  Update comment.
141         (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
142         dyn_relocs.
143         (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
144         others to aborts.
145         (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
146         abort.
147         (elf_i386_size_dynamic_sections): Likewise.
148         (elf_i386_finish_dynamic_symbol): Likewise.
149         (elf_i386_finish_dynamic_sections): Likewise.
150         (elf_i386_relocate_section): Likewise.  Tidy R_386_GOT32 and error
151         handling code.
152
153         Avoid creating COPY relocs if possible.
154         * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
155         which .got created.  Mark symbols used by R_386_32 and R_386_PC32
156         relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
157         reloc is in a read-only section.  Instead, allocate space for a
158         dynamic reloc to reference the library symbol directly.  Keep
159         track of space we allocate using pcrel_relocs_copied.
160         (discard_copies): Delete, and move code to ..
161         (allocate_plt_and_got): ..here.  Rename to
162         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
163         relocs for non-shared link.
164         (elf_i386_size_dynamic_sections): Update calls to above functions.
165         (elf_i386_relocate_section): Write out the dynamic relocs.  Add
166         more ugly logic to avoid "unresolvable relocation" error.  Use
167         htab shortcut in place of elf_hash_table macro.
168         (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
169         not always be created now.
170
171 2001-06-20  Bo Thorsen  <[email protected]>
172
173         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
174         shared libraries.
175
176 2001-06-18  Thiemo Seufer <[email protected]>
177
178         * configure.host (mips64-*-linux): Reformat.
179
180 2001-06-21  Alan Modra  <[email protected]>
181
182         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
183         allocate local .got space.  Use shortcuts from hash table for .got
184         and .plt rather than comparing section names.
185         (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
186         adjusting index into local_got_refcounts to document what we are
187         really doing.
188         (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
189         Tidy .got and .plt error checking.
190
191 2001-06-20  Catherine Moore  <[email protected]>
192
193         * elf-bfd.h (struct elf_backend_data):
194         elf_backend_emit_relocs: New field: Function for emitting
195         relocs.
196         elf_backend_count_relocs: New field: Function for determining
197         the number of relocs to be emitted.
198         * elfxx-target.h: Provide default (NULL) values for
199         elf_backend_emit_relocs and elf_backend_count_relocs.
200         * elflink.h (elf_link_size_reloc_section): Make the hash table
201         big enough to hold the relocs counted by either reloc_count or
202         o->reloc_count.
203         (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
204         should be emitted, either because of a command line option
205         stored in the info structure or because the target provides a
206         special reloc emitting function.
207         If the target provides a reloc counting function use it,
208         unless performing a relocatable link or emitting all relocs.
209         Also set the SEC_RELOC flag on any output section which will
210         contain relocs.
211         (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
212         should be emitted, either because of a command line option
213         stored in the info structure or because the target provides a
214         special reloc emitting function.
215         If the target provides a reloc emitting function, use it,
216         unless performing a relocatable link or emitting all relocs.
217
218 2001-06-20  H.J. Lu  <[email protected]>
219
220         * elf32-i386.c (elf_i386_size_dynamic_sections): Always
221         allocate local .got space.
222
223 2001-06-19  Andreas Jaeger  <[email protected]>
224
225         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
226         dynamic symbols.
227
228 2001-06-18  Hans-Peter Nilsson  <[email protected]>
229
230         * elflink.h (struct elf_assign_sym_version_info): Remove member
231         export_dynamic.  All users changed to use info member.
232         NAME(bfd_elf,size_dynamic_sections)): Remove parameter
233         export_dynamic, instead use member in parameter info.
234         * bfd-in.h (bfd_elf32_size_dynamic_sections,
235         bfd_elf64_size_dynamic_sections): Update prototype.
236         * bfd-in2.h: Regenerate.
237
238 2001-06-18  H.J. Lu  <[email protected]>
239
240         * elflink.h (elf_info_failed): Add a new field, verdefs.
241         (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
242         elf_export_symbol.
243         (elf_export_symbol): Check eif->verdefs to decide if a symbol
244         should be exported.
245
246 2001-06-17  H.J. Lu  <[email protected]>
247
248         * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
249         readonly_reloc, to record if a relocation in the .rel.dyn
250         section is against a read-only section.
251         (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
252         field to false.
253         (_bfd_mips_elf_check_relocs): Record if there is a relocation
254         in the .rel.dyn section against a read-only section by setting
255         DF_TEXTREL or readonly_reloc.
256         (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
257         it is true.
258         (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
259         there is a relocation in the .rel.dyn section against a
260         read-only section.
261         (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
262         DF_TEXTREL is set.
263
264 2001-06-12  Nick Clifton  <[email protected]>
265
266         * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
267         function.  Move flagword result into parameter list.  Remove
268         comment about setting bfd_error_handler to intercept failure
269         results.
270         * coffgen.c (make_a_section_from_file): Examine result of
271         calling bfd_coff_styp_to_sec_flags and pass a failure back to
272         caller.
273         * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
274         function.  Move flagword result into parameter list.
275         * libcoff.h: Regenerate.
276         * libecoff.h: Regenerate.
277
278 2001-06-13  Nick Clifton  <[email protected]>
279
280         * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
281         section is going to follow it.
282
283 2001-06-12  Catherine Moore  <[email protected]>
284
285         * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
286         with the file_align entry from elf_backend_data.
287         (elf_gc_smash_unused_vtentry_relocs): Likewise.
288         (elf_gc_record_vtentry): Likewise.
289
290 2001-06-10  Alan Modra  <[email protected]>
291
292         * elflink.h: Whitespace changes.
293         (elf_link_read_relocs_from_section): Use "unsigned int" iterator
294         rather than "unsigned char".
295         (elf_link_output_relocs): Likewise.
296         (elf_link_input_bfd): Likewise.
297         (elf_reloc_link_order): LIkewise.
298         * elf.c: s/CONST/const/.  Whitespace changes.
299         * elf32-mips.c: Formatting fix.
300
301         * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
302         * Makefile.in: Regenerate.
303         * po/Make-in: Remove trailing tab.
304
305 2001-06-09  Philip Blundell  <[email protected]>
306
307         * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
308         change.
309         (elf32_arm_plt_entry): Likewise.
310
311 2001-06-08  H.J. Lu  <[email protected]>
312
313         * elf.c (swap_out_syms): Keep names for global section symbols.
314
315 2001-06-07  H.J. Lu  <[email protected]>
316
317         * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
318         MIPS-based machines need it.
319
320 2001-06-07  H.J. Lu  <[email protected]>
321
322         * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
323         for SGI only.
324
325         * config.bfd: Remove ecoff from Linux/mips.
326
327 2001-06-07  Andreas Jaeger  <[email protected]>
328
329         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
330         assertion.
331         (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
332         alignment of 8 for .rela sections; handle further relocations.
333
334 2001-06-06  Christian Groessler <[email protected]>
335
336         * coff-z8k.c: Fix formatting.
337         Fix howtos: howto->size was always 1.
338
339 2001-06-05  Thiemo Seufer  <[email protected]>
340
341         * configure.host (mips64*-*-linux*): Define.
342
343 2001-06-05  Alan Modra  <[email protected]>
344
345         * elf32-i386.c (elf_i386_discard_copies): Rename to
346         discard_copies, and use elf_link_hash_entry arg rather than
347         elf_i386_link_hash_entry.
348         (elf_i386_link_hash_traverse): Delete.
349         (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
350         Tidy sizing of dynamic sections.
351         (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
352         possible .plt entries.
353         (elf_i386_gc_sweep_hook): Likewise.
354         (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
355         everything with plt.refcount <= 0.
356
357         * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
358         .relgot space here.
359         (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
360         (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
361         .rel.plt here..
362         (allocate_plt_and_got): ..instead do it all here.  New function.
363         (elf_i386_size_dynamic_sections): Allocate local .got space and
364         call allocate_plt_and_got.  No need to zap .relgot if not dynamic.
365         (bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
366         rather than gc variety).
367         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
368         (elf_i386_relocate_section): Use it here and correct handling of
369         R_386_GOT32.  Provide section and offset for "unresolvable
370         relocation" error message.
371         (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
372
373         * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
374         sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
375         (elf_i386_link_hash_table_create): Init them.
376         (create_got_section): New function.
377         (elf_i386_create_dynamic_sections): New function.
378         (elf_backend_create_dynamic_sections): Set to above.
379         (elf_i386_check_relocs): Use shortcuts from hash table rather than
380         calling bfd_get_section_by_name.
381         (elf_i386_gc_sweep_hook): Likewise.
382         (elf_i386_adjust_dynamic_symbol): Likewise.
383         (elf_i386_size_dynamic_sections): Likewise.
384         (elf_i386_relocate_section): Likewise.
385         (elf_i386_finish_dynamic_sections): Likewise.
386
387         * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
388
389 2001-06-02  H.J. Lu  <[email protected]>
390
391         * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
392         and ELFOSABI_HPUX.
393         * elf64-hppa.c (elf64_hppa_object_p): Likewise.
394
395 2001-06-02  H.J. Lu  <[email protected]>
396
397         * aout-cris.c (MACHTYPE_OK): New. Defined.
398
399 2001-06-02  Hans-Peter Nilsson  <[email protected]>
400
401         * section.c (_bfd_strip_section_from_output): Handle NULL
402         output_section.
403
404 2001-06-02  H.J. Lu  <[email protected]>
405
406         * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
407         rs6000coff64_vec only if BFD64 is defined.
408         (powerpc64-*-aix*): Enable only if BFD64 is defined.
409
410 2001-06-02  H.J. Lu  <[email protected]>
411
412         * coff-ia64.c (ia64coff_object_p): Rewrite with
413         external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
414
415 2001-06-01  Andreas Jaeger  <[email protected]>
416
417         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
418         relocation, small reformatting.
419
420 2001-05-29  Andreas Jaeger  <[email protected]>
421
422         * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
423         (elf64_x86_64_relocate_section): Likewise.
424
425 2001-05-30  Alan Modra  <[email protected]>
426
427         * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
428         millicode.  Don't allocate .got and .rela.got space here..
429         (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
430         (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
431         .rela.plt here..
432         (hppa_handle_PIC_calls): ..nor here..
433         (allocate_plt_and_got): ..instead do it all here.  New function.
434         (elf32_hppa_size_dynamic_sections): Allocate local .got space and
435         call allocate_plt_and_got.  No need to zap .got if not dynamic.
436         (elf32_hppa_final_link): Call regular bfd_final_link instead of
437         gc_common_final_link.
438         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
439         (elf32_hppa_relocate_section): Use it here.
440         (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
441         dynamic_sections_created.
442         (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
443
444 2001-05-28  Andreas Jaeger  <[email protected]>
445
446         * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
447         generic version since we want a hashsize of 4.
448         (elf_backend_size_info): Likewise.
449
450 2001-05-28  Thiemo Seufer  <[email protected]>
451
452         * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
453         a zeroing loop.
454         (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
455         (elf_link_input_bfd): Likewise.
456         (elf_reloc_link_order): Likewise.
457         (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
458         relocations correctly.
459
460 2001-05-28  Nicolas Pitre <[email protected]>
461
462         * elf32-arm.h: fix PLT generation for big endian ARM
463
464 2001-05-28  Alan Modra  <[email protected]>
465
466         * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
467         for symbols forced local that need plabels.
468         (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
469         .plt.rela for local syms if non-shared.
470         (hppa_build_one_stub): Mask lsb of plt.offset.
471         (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
472         (clobber_millicode_symbols): Correct comment.
473         (elf32_hppa_relocate_section): Likewise.
474         (elf32_hppa_finish_dynamic_symbol): Likewise.
475
476 2001-05-28  Jeff Sturm  <[email protected]>
477
478         * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
479         * bfd-in2.h: Regenerate.
480         * libbfd.h: Regenerate.
481         * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
482         and BFD_RELOC_SPARC_UA64 mapping
483         * elf64-sparc.c: Likewise.
484
485 2001-05-25  H.J. Lu  <[email protected]>
486
487         * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
488         (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
489         (coff-rs6000.lo): Remove the old dependency.
490         * Makefile.in: Rebuild.
491
492         * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
493         coff-rs6000.lo.
494
495 2001-05-25  H.J. Lu  <[email protected]>
496
497         * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
498         rs6000coff_core_file_matches_executable_p,
499         rs6000coff_core_file_failing_command and
500         rs6000coff_core_file_failing_signal only if AIX_CORE is
501         defined.
502         (pmac_xcoff_vec): Likewise.
503         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
504
505 2001-05-25  Timothy Wall  <[email protected]>
506
507         * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
508         for __GLOB_DATA_PTR on AIX5.  Clean up some relocation bugs.
509
510 2001-05-25  H.J. Lu  <[email protected]>
511
512         * bfd-in2.h: Regenerated.
513         * libcoff.h: Likewise.
514
515 2001-05-25  Alan Modra  <[email protected]>
516
517         * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
518         undefined millicode syms in shared libs.
519         (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
520         (elf32_hppa_check_relocs): Likewise.
521         (elf32_hppa_adjust_dynamic_symbol): Likewise.
522         (elf32_hppa_size_dynamic_sections): Likewise.
523         (elf32_hppa_relocate_section): Likewise.
524         (elf32_hppa_finish_dynamic_symbol): Likewise.
525         (elf32_hppa_finish_dynamic_sections): Likewise.
526
527 2001-05-24  Tom Rix <[email protected]>
528
529         * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
530         xcoff-target.h not used to define rs6000 or ppc bfd.
531         * Makefile.in same
532
533         * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
534         to 64 bit.
535
536         * coff-rs6000.c : Many changes for 64 bit support.  Move common
537         32/64 code to xcofflink.c.  Explictly define the rs6000coff_vec
538         and pmac_xcoff_vec
539
540         * coff64-rs6000.c : Many changes for 64 bit support.  64 bit
541         linker now supported.  Explictly define the rs6000coff64_vec.
542
543         * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
544         (coff_print_aux) same
545         (coff_write_object_contents) same
546         (coff_slurp_line_table) same
547
548         * coffgen.c : (coff_fix_symbol_name) formatting
549         (coff_mangle_symbols) xcoff 64 bit support
550         (coff_write_symbol) same
551         (coff_write_alien_symbol) same
552         (coff_write_native_symbol) same
553         (coff_write_symbols) same
554         (coff_get_symbol_info) same
555         (bfd_coff_get_syment) same
556         (coff_print_symbol) same
557
558         * config.bfd : add powerpc64-*-aix* target
559
560         * libcoff-in.h : formatting
561
562         * libcoff.h : move xcoff extern declarations to libxcoff.h
563
564         * libxcoff.h : New file
565
566         * xcofflink.c : Many changes for xcoff64 support.  Move common
567         structures to include/coff/xcoff.h.  Move specific structure to
568         backends coff-rs6000.c and coff64-rs6000.c.   Use new backend
569         functions, defined in libxcoff.h, to isolate 32/64 dependencies.
570
571         (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
572         aix4.2+ -binitfini.
573
574         (xcoff_build_ldsyms) : handle special __rtinit symbol.
575
576 2001-05-23  Alexandre Oliva  <[email protected]>
577
578         * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
579         s/ENTIRES/ENTRIES/.
580
581 2001-05-23  Thiemo Seufer <[email protected]>
582
583         * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
584         * libbfd.h: Regenerate.
585         * bfd-in2.h: Regenerate.
586
587         * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
588         * archures.c (bfd_mach_mips12000): Define.
589         * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
590         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
591         support.
592         (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
593         * bfd-in2.h: Regenerate.
594         * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
595
596 2001-05-23  kaz Kojima  <[email protected]>
597
598         * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
599         elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
600         elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
601         that is used by GCC.
602
603 2001-05-23  Nick Clifton  <[email protected]>
604
605         * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
606         of entries in a structured section.
607         * elf.c: Use new macro.
608         * elf32-i386.c: Use new macro.
609         * elf32-mips.c: Use new macro.
610         * elf64-alpha.c: Use new macro.
611         * elf64-sparc.c: Use new macro.
612         * elfcode.h: Use new macro.
613         * elflink.h: Use new macro.
614
615 2001-05-23  Nick Clifton  <[email protected]>
616
617         * bfdint.texi: Replace -oformat with --oformat.
618
619 2001-05-21  Andreas Jaeger  <[email protected]>
620
621         * dwarf2.c (decode_line_info): Fix error message.
622         (read_abbrevs): Fix test for offset as suggested by Alan Modra and
623         adjust error message.
624
625 2001-05-18  H.J. Lu  <[email protected]>
626
627         * elflink.h (elf_link_add_object_symbols): Revert the last
628         change.
629
630 2001-05-17  Alan Modra  <[email protected]>
631
632         * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
633         ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
634         (hppa_build_one_stub): Add an assert to check plt.offset.
635
636 2001-05-17  H.J. Lu  <[email protected]>
637
638         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
639         version definition to basename of the output filename.
640
641 2001-05-17  H.J. Lu  <[email protected]>
642
643         * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
644         basename of the bfd filename.
645
646 2001-05-16  Alan Modra  <[email protected]>
647
648         * section.c (asection): Add linker_has_input field.
649         (STD_SECTION): Adjust initialization to suit.
650         * ecoff.c (bfd_debug_section): Likewise.
651         * bfd-in2.h: Regenerate.
652
653 2001-05-15  Alexandre Oliva  <[email protected]>
654
655         * elf-m10300.c (mn10300_elf_relax_section): Don't relax
656         negative 32-bit operands to 16 operands when the operand is
657         going to be zero-extended by the modified opcode.
658
659 2001-05-12  Peter Targett  <[email protected]>
660
661         * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
662         name for 'arc5' core versions.
663         (bfd_arc_arch): Make bfd_mach_arc_6 default.
664
665         * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
666         architecture.
667         (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
668
669 2001-05-11  Jakub Jelinek  <[email protected]>
670
671         * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
672         sections as well.
673         (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
674         to .gnu.linkonce.t.FOO text section.
675
676 2001-05-11  Jakub Jelinek  <[email protected]>
677
678         * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
679         fields, change sec into secinfo.
680         (struct sec_merge_info): Add chain, remove last fields.
681         (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
682         (sec_merge_hash_lookup): If lookup could not use a string only
683         because it has bad alignment, mark the old string for deletion.
684         (sec_merge_add): Add secinfo argument. Don't compute entry's
685         position, instead record the section.
686         (sec_merge_emit): Update for the sec into secinfo change in
687         struct sec_merge_hash_entry.
688         (_bfd_merge_section): Only record the section for merging, defer
689         putting strings into the hash table.
690         (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
691         _bfd_merge_sections): New functions.
692         (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
693         changes.
694         * libbfd-in.h (_bfd_merge_sections): Add prototype.
695         (_bfd_nolink_bfd_merge_sections): Define.
696         * libbfd.h: Likewise.
697         (bfd_generic_merge_sections): Add prototype.
698         * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
699         (struct bfd_target): Likewise.
700         * bfd.c (bfd_merge_sections): Define.
701         * bfd-in2.h: Rebuilt.
702         * elf.c (_bfd_elf_merge_sections): New function.
703         * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
704         * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
705         * reloc.c (bfd_generic_merge_sections): New function.
706         * vms.c (vms_bfd_merge_sections): New function.
707         * aout-adobe.c (aout_32_bfd_merge_sections): Define.
708         * aout-target.h (MY_bfd_merge_sections): Define.
709         * aout-tic30.c (MY_bfd_merge_sections): Define.
710         * binary.c (binary_bfd_merge_sections): Define.
711         * bout.c (b_out_bfd_merge_sections): Define.
712         * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
713         * coffcode.c (coff_bfd_merge_sections): Define.
714         * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
715         * i386msdos.c (msdos_bfd_merge_sections): Define.
716         * i386os9k.c (os9k_bfd_merge_sections): Define.
717         * ieee.c (ieee_bfd_merge_sections): Define.
718         * ihex.c (ihex_bfd_merge_sections): Define.
719         * nlm-target.h (nlm_bfd_merge_sections): Define.
720         * oasys.c (oasys_bfd_merge_sections): Define.
721         * ppcboot.c (ppcboot_bfd_merge_sections): Define.
722         * som.c (som_bfd_merge_sections): Define.
723         * srec.c (srec_bfd_merge_sections): Define.
724         * tekhex.c (tekhex_bfd_merge_sections): Define.
725         * versados.c (versados_bfd_merge_sections): Define.
726         * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
727
728 2001-05-11  Nick Clifton  <[email protected]>
729
730         * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
731         to be unsigned long, in order to match its use.
732
733 2001-05-10  H.J. Lu  <[email protected]>
734
735         * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
736         indirect symbols.
737
738 2001-05-09  H.J. Lu  <[email protected]>
739
740         * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
741         versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
742         Remove the unused veriable `dynver'.
743
744 2001-05-08  Ian Lance Taylor  <[email protected]>
745
746         * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
747         NULL or is not COFF.
748         (coff_i386_rtype_to_howto): Don't dump core if output section
749         owner is not COFF.
750
751 2001-05-07  Thiemo Seufer <[email protected]>
752
753         * ecoff.c (bfd_debug_section): Fix initialization.
754         * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
755         is always a positive integer. Cast away sign mismatch.
756         * elf32-mips.c: Fix misleading comment and typo.
757         (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
758         correct data type.
759         * elflink.c: Fix typo.
760         (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
761         * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
762
763 2001-05-04  Richard Henderson  <[email protected]>
764
765         * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
766
767 2001-05-04  Nick Clifton  <[email protected]>
768
769         * elf32-arm.h (elf32_arm_final_link_relocate): Set
770         EF_ARM_HASENTRY if the start address is set.
771
772 2001-05-03  Nick Clifton  <[email protected]>
773
774         * targets.c (_bfd_target_vector_entries): Compute value based on
775         the size of the _bfd_target_vector and not bfd_target_vector.
776
777 2001-05-03  H.J. Lu  <[email protected]>
778
779         * elfcode.h: Include "libiberty.h".
780
781         * elflink.h (elf_link_add_object_symbols): Set
782         elf_dt_name (abfd) to basename of the bfd filename.
783         (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
784         of the bfd filename.
785
786 2001-05-03  Andreas Jaeger  <[email protected]>
787
788         * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
789         (elf_generic_info_to_howto_rel): Likewise.
790         * coff-alpha.c (reloc_nil): Likewise.
791         (alpha_ecoff_bad_format_hook): Likewise.
792         (alpha_adjust_reloc_out): Likewise.
793         (alpha_bfd_reloc_type_lookup): Likewise.
794         (alpha_convert_external_reloc): Likewise.
795         * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
796         (elf64_alpha_reloc_bad): Likewise.
797         (elf64_alpha_reloc_gpdisp): Likewise.
798         (elf64_alpha_bfd_reloc_type_lookup): Likewise.
799         (elf64_alpha_info_to_howto): Likewise.
800         (elf64_alpha_add_symbol_hook): Likewise.
801         (elf64_alpha_create_got_section): Likewise.
802         (elf64_alpha_is_local_label_name): Likewise.
803         (elf64_alpha_merge_ind_symbols): Likewise.
804         * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
805         (mips_elf64_get_reloc_upper_bound): Likewise.
806         * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
807         (nlm_alpha_get_public_offset): Likewise.
808
809 2001-05-02  Johan Rydberg  <[email protected]>
810
811         * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
812         about overflow in R_OPENRISC_LO_16_IN_INSN and
813         R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
814
815 2001-04-30  H.J. Lu  <[email protected]>
816
817         * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
818         only for ELF_LINK_FORCED_LOCAL.
819         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
820         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
821         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
822
823         * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
824         if the symbol has hidden or internal visibility.
825
826 2001-04-30  Alan Modra  <[email protected]>
827
828         * elf32-hppa.c (final_link_relocate): Branch to .+8 for
829         calls to undefined weak symbols.
830
831 2001-04-30  Andreas Jaeger  <[email protected]>, Andreas Schwab <[email protected]>
832
833         * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
834         R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
835
836 2001-04-27  Andreas Jaeger  <[email protected]>
837
838         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
839         out handled entries.
840         (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
841         (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
842         (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
843         GOT32.
844
845 2001-04-27  Sean McNeil <[email protected]>
846
847         * config.bfd: Add arm-vxworks target.
848         * coff-arm (coff_arm_relocate_section): Add in symbol value to
849         addend (fro VXworks targets).
850
851 2001-04-26  H.J. Lu  <[email protected]>
852
853         * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
854         valid.
855
856 2001-04-25  Frank Ch. Eigler  <[email protected]>
857
858         * bfd-in.h (bfd_cache_close): Declare newly exported function.
859         * bfd-in2.h: Regenerated.
860
861 2001-04-24  Jakub Jelinek  <[email protected]>
862
863         * merge.c (struct sec_merge_hash_entry): Add alignment field.
864         (struct sec_merge_hash): Remove alignment_power.
865         (sec_merge_hash_newfunc): Clear alignment.
866         (sec_merge_hash_lookup): Pass alignment as argument.
867         Use hashp->root.next, not hashp->next to walk the hash chain.
868         If a string already in the hashtable does not have required
869         alignment, create a new hashtable entry.
870         (sec_merge_init): Remove alignment_power argument.
871         (sec_merge_add): Add alignment argument.
872         (sec_merge_emit): Alignment is now a per-entity thing, not per
873         section.
874         (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
875         for proper alignment.
876         Pass alignment information to sec_merge_add.
877
878 2001-04-24  Christian Groessler  <[email protected]>
879
880         * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
881         and R_REL16 reloc types; accept odd values for R_REL16 type
882
883 2001-04-24  Johan Rydberg  <[email protected]>
884
885         * cpu-openrisc.c: New file.
886         * elf32-openrisc.c: Likewise.
887
888         * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
889         (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
890         (BFD32_BACKENDS): Add elf32-openrisc.lo.
891         (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
892         (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
893         * Makefile.in: Regenerated.
894         * config.bfd: (openrisc-*-elf): New target.
895         * configure.in (bfd_elf32_openrisc_vec): New vector.
896         * configure: Regenerated.
897         * libbfd.h: Regenerated.
898         * bfd-in2.h: Regenerated.
899         * reloc.c: Add OpenRISC relocations.
900         * targets.c (bfd_elf32_openrisc_vec): Declare.
901         (bfd_target_vect): Add bfd_elf32_openrisc_vec.
902         * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
903         (bfd_openrisc_arch): Declare.
904         (bfd_archures_list): Add bfd_openrisc_arch.
905         * elf.c (prep_headers): Add bfd_arch_openrisc.
906
907 2001-04-23  Bo Thorsen  <[email protected]>
908
909         * elf64-x86-64.c: Add c++ vtable hack.
910         Small whitespace and comment changes.
911
912 2001-04-19  Andreas Jaeger  <[email protected]>
913
914         * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
915         (elf64_x86_64_plt_entry): Likewise.
916         (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
917         (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
918
919 2001-04-17  Hans-Peter Nilsson  <[email protected]>
920
921         * elf32-cris.c: Tweak comments related to dynamic linking.
922         (cris_elf_relocate_section): When not creating shared object, fill
923         in the .got table for any symbol not in the dynamic symbol table.
924         (elf_cris_finish_dynamic_symbol): When not creating shared object,
925         only emit a .got.rela reloc if the symbol is in the dynamic symbol
926         table.
927         (cris_elf_check_relocs): Use variable r_type in all places rather
928         than the original expression.  Add default case in switch for
929         reloc types.
930         (elf_cris_size_dynamic_sections): Iterate over
931         elf_cris_discard_excess_program_dynamics when not creating shared
932         library.
933         (elf_cris_discard_excess_dso_dynamics): Renamed from
934         elf_cris_discard_copies.  Correct typo, s/Rel/Rela/.
935         (elf_cris_discard_excess_program_dynamics): New.
936
937 2001-04-14  Mark Elbrecht  <[email protected]>
938
939         * coffcode.h (coff_write_object_contents): Use
940         bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
941
942 2001-04-14  H.J. Lu  <[email protected]>
943
944         * bfd-in2.h: Regenerate.
945
946 2001-04-14  Jakub Jelinek <[email protected]>
947
948         * section.c (STD_SECTION): Add entsize.
949
950 2001-04-13  H.J. Lu  <[email protected]>
951
952         * section.c (SEC_MERGE): Define new flag for merging.
953         (SEC_STRINGS): Likewise.
954         (entsize): New field.
955
956 2001-04-13  Roger Sayle  <[email protected]>
957
958         * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
959         flag on pe-i386 targets.
960
961 2001-04-13  Jakub Jelinek  <[email protected]>
962
963         * libbfd-in.h (_bfd_merge_section): New.
964         (_bfd_write_merged_section): New.
965         (_bfd_merged_section_offset): New.
966         * libbfd.h: Rebuilt.
967         * linker.c (_bfd_generic_link_output_symbols): Handle
968         discard_sec_merge.
969         * aoutx.h (aout_link_write_symbols): Likewise.
970         * pdp11.c (aout_link_write_symbols): Likewise.
971         * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
972         (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
973         sections.
974         (elf_link_sec_merge_syms): New.
975         (elf_link_input_bfd): Call _bfd_merged_section_offset
976         and _bfd_write_merged_section.
977         Handle discard_sec_merge.
978         * elf-bfd.h (struct elf_link_hash_table): Add merge_info
979         field.
980         (struct bfd_elf_section_data): Likewise.
981         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
982         SEC_STRINGS section flags and entsize from their ELF counterparts.
983         (_bfd_elf_link_hash_table_init): Initialize merge_info.
984         (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
985         from their BFD counterparts.
986         * merge.c: New file.
987         * Makefile.am: Add strtab.lo.
988         * Makefile.in: Rebuilt.
989
990 2001-04-09  Hans-Peter Nilsson  <[email protected]>
991
992         * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
993         only hide symbols marked STV_INTERNAL or STV_HIDDEN.
994
995 2001-04-05  Steven J. Hill  <[email protected]>
996
997         * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
998         endian MIPS ELF target.
999         * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
1000         MIPS ELF target.
1001
1002         * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
1003         64bit big endian MIPS ELF target.
1004         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
1005         endian MIPS ELF target.
1006         * configure: Regenerated.
1007
1008         * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
1009         little endian targets.
1010         (mips_elf_sym_is_global): Handle traditional targets.
1011
1012         * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
1013         64bit big endian MIPS ELF target.
1014         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
1015         endian MIPS ELF target.
1016
1017         * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
1018         and bfd_elf64_tradlittlemips_vec.
1019
1020 2001-04-05  David Mosberger  <[email protected]>
1021
1022         * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
1023         ordinary "progbits" section.
1024
1025 2001-04-04  Alan Modra  <[email protected]>
1026
1027         * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
1028         when -Bsymbolic causes a symbol to no longer need a .plt entry.
1029
1030 2001-04-03  David Mosberger  <[email protected]>
1031
1032         * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
1033
1034 2001-03-30  H.J. Lu  <[email protected]>
1035
1036         * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
1037         (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
1038
1039 2001-03-26  H.J. Lu  <[email protected]>
1040
1041         * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
1042         if there are any relocations for generic ELF.
1043         (bfd_elf32_bfd_link_add_symbols): Defined to
1044         elf32_generic_link_add_symbols.
1045         * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
1046         if there are any relocations for generic ELF.
1047         (bfd_elf64_bfd_link_add_symbols): Defined to
1048         elf64_generic_link_add_symbols.
1049
1050 2001-03-23  Nick Clifton  <[email protected]>
1051
1052         * Makefile.am (BUILD_CFILES): New variable: List of C source
1053         files created in build directory.
1054         (BUILD_HFILES): New variable: List of header files created in
1055         build directory.
1056         (POTFILES): Delete.
1057         (po/POTFILES.in): Replace rule with empty entry.
1058         (po/SRC-POTFILES.in): New rule: Create a list of source files
1059         in the source directory.
1060         (po/BLD-POTFILES.in): New rule: Create a list of source files
1061         in the build directory.
1062         (MOSTLYCLEAN): Do not delete source files created in build
1063         directory.
1064         * Makefile.in: Regenerate.
1065         * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
1066         into po/Makefile.
1067         * configure: Regenerate.
1068
1069         * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
1070         and BLD_POTFILES.
1071         Add .. to the search path when building bfd.pot.
1072         Delete POTFILES when performing distclean.
1073         Add comment describing why distclean is broken in maintainer mode.
1074         * po/POTFILES.in: Delete.
1075         * po/SRC-POTFILES.in: New file.
1076         * po/BLD-POTFILES.in: New file.
1077         * po/bfd.pot: Regenerate.
1078
1079 2001-03-22  Hans-Peter Nilsson  <[email protected]>
1080
1081         * elf32-cris.c: Shlib and PIC support.  PCREL tweaks.
1082         (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
1083         elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
1084         elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
1085         elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
1086         elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
1087         functions.
1088         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
1089         R_CRIS_32_PCREL>: Correct comments.  Set pcrel_offset to false.
1090         <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
1091         R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
1092         R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
1093         New HOWTO members for new relocs.
1094         (cris_reloc_map): Map new relocs.
1095         (ELF_DYNAMIC_INTERPRETER): Define.
1096         (PLT_ENTRY_SIZE): Define.
1097         (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
1098         elf_cris_pic_plt_entry): New, PLT templates.
1099         (struct elf_cris_pcrel_relocs_copied, struct
1100         elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
1101         (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
1102         (cris_final_link_relocate): Check that 16-bit GOT relocs have
1103         positive values.  Adjust PCREL relocs to be relative to location
1104         after relocation.
1105         (cris_elf_relocate_section): Handle relocations to dynamic
1106         objects.  Handle new relocations.  Call error handler when seeing
1107         non-PIC relocation for read-only sections while generating shared
1108         object.
1109         (cris_elf_check_relocs): Set reference counts for GOT and PLT
1110         entries.
1111         (bfd_elf32_bfd_link_hash_table_create,
1112         elf_backend_adjust_dynamic_symbol,
1113         elf_backend_size_dynamic_sections,
1114         elf_backend_finish_dynamic_symbol,
1115         elf_backend_finish_dynamic_sections,
1116         elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
1117         elf_backend_hide_symbol, elf_backend_want_got_plt,
1118         elf_backend_plt_readonly, elf_backend_want_plt_sym,
1119         elf_backend_got_header_size, elf_backend_plt_header_size):
1120         Define.
1121
1122         * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
1123         BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
1124         BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
1125         BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
1126         BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
1127         BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
1128         * bfd-in2.h, libbfd.h: Regenerate.
1129
1130 2001-03-21  Diego Novillo  <[email protected]>
1131
1132         (_bfd_mips_elf_relocate_section): Give a better error message when
1133         a relocation is not recognized.
1134
1135 2001-03-21  Alan Modra  <[email protected]>
1136
1137         * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
1138         non-NULL before attempting to dereference.
1139
1140 2001-03-20  H.J. Lu  <[email protected]>
1141
1142         * configure.in: Remove the redundent AC_ARG_PROGRAM.
1143         * configure: Rebuild.
1144
1145 2001-03-20  Andreas Schwab  <[email protected]>
1146
1147         * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
1148         relocation value when resolving a reference from a debugging
1149         section.
1150
1151 2001-03-16  Scott Thomason  <[email protected]>
1152
1153         * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
1154         (xcoff64_swap_sym_out): Fix syntax errors.
1155
1156 2001-03-16  Richard Sandiford  <[email protected]>
1157
1158         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
1159
1160 2001-03-15  Alan Modra  <[email protected]>
1161
1162         * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
1163         (hppa_link_hash_newfunc): Init it.
1164         (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
1165         section appears to be non-PIC.
1166         (final_link_relocate): Likewise.
1167         (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
1168         possible candidate function, and set pic_call for those that will
1169         only have a .plt entry for the PIC call stub.
1170         (hppa_handle_PIC_calls): Set maybe_pic_call.
1171
1172 2001-03-12  DJ Delorie  <[email protected]>
1173
1174         * elf32-sh.c (sh_elf_relocate_section): Only relocation
1175         R_SH_DIR8WP* relocs if they're against external symbols, else
1176         they're just for relaxing.  Validate the reloc values.
1177
1178 2001-03-12  Stefan Geuken <[email protected]>
1179
1180         * binary.c (bfd_external_binary_architecture): Declare.
1181         (binary_object_p): If bfd_external_binary_architecture is defined,
1182         set the architecture to this string.
1183
1184 2001-03-11  Philip Blundell  <[email protected]>
1185
1186         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
1187         entries that could serve as a definition for a weak symbol.
1188
1189 2001-03-08  Nick Clifton  <[email protected]>
1190
1191         * Most files: Update copyright notices using Perl script created
1192         by Kevin Buettner <[email protected]>.
1193
1194 2001-03-07  Nick Clifton  <[email protected]>
1195
1196         * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
1197         prior patch on ! defined OLD_ARM_ABI.
1198
1199 2001-03-07  Andreas Jaeger  <[email protected]>
1200
1201         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
1202         some relocation values.
1203
1204 2001-03-06  Nick Clifton  <[email protected]>
1205
1206         * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
1207         of offset in BLX(1) instruction.
1208         * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
1209         offset in BLX(1) instruction.
1210         Fix formatting.
1211
1212 2001-03-06  Nick Clifton  <[email protected]>
1213
1214         * coff-arm.c (coff_arm_reloc_type_lookup): Add
1215         BFD_RELOC_THUMB_PCREL_BLX.
1216
1217 2001-03-06  Igor Shevlyakov  <[email protected]>
1218
1219         * archures.c (bfd_default_scan): Add Coldfire CPUs.
1220         * bfd-in2.h: Regenerate.
1221         * cpu-m68k.c: Add Coldfire CPUs for arch table.
1222         * ieee.c (ieee_write_processor): Set proper id for
1223         Coldfire CPUs.
1224
1225 2001-03-01  D.J. Barrow <[email protected],[email protected]>
1226
1227         * configure.in: Add s390 target.
1228         * configure: Regenerate.
1229
1230 2001-02-28  Andreas Jaeger  <[email protected]>
1231
1232         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
1233         to addend.
1234
1235 2001-02-28  Philip Blundell  <[email protected]>
1236
1237         * elf32-arm.h: Update mentions of renamed EF_xx constants.
1238         (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
1239
1240 2001-02-27  H.J. Lu  <[email protected]>
1241
1242         * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
1243         abfd->tdata.aout_data == NULL.
1244
1245 2001-02-27  Alan Modra  <[email protected]>
1246
1247         * elf32-hppa.c: Correct field selector in stub comments.
1248         (clobber_millicode_symbols): Formatting fix.
1249
1250         * configure.in: Bump version to 2.11.90.
1251         * configure: Regenerate.
1252         * Makefile.am (CFILES): Rename to SOURCE_CFILES.
1253         (CFILES): $SOURCE_CFILES + generated C files.
1254         (POTFILES): Include $HFILES not $SOURCE_HFILES.
1255         Run "make dep-am"
1256         * Makefile.in: Regenerate.
1257         * doc/Makefile.in: This too.
1258
1259 2001-02-26  Timothy Wall  <[email protected]>
1260
1261         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
1262         comments.
1263
1264 2001-02-26  Nick Clifton <[email protected]>
1265
1266         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
1267         up, replacing multiple if statements with a switch.
1268         (handle_COMDAT): New function.
1269
1270 2001-02-26  H.J. Lu  <[email protected]>
1271
1272         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
1273         a warning for section flags we do not handle instead of
1274         aborting.
1275
1276 2001-02-26  Andreas Jaeger  <[email protected]>
1277
1278         * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
1279
1280 2001-02-22  Timothy Wall  <[email protected]>
1281
1282         * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
1283         * configure.in: Add objects for elf64_ia64_aix vectors.
1284         * configure: Regenerated.
1285         * configure.host: Recognize ia64-*-aix*.
1286         * elfxx-ia64.c: Add hooks for ELF64 on AIX5.  Define new vectors
1287         for AIX.  AIX5 requires most relocations to be dynamic (*all*
1288         binaries are somewhat similar to shared libraries).
1289         * targets.c: Add elf64_ia64_aix vectors.
1290
1291 2001-02-21  David Mosberger  <[email protected]>
1292
1293         * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
1294         C8 said "1" instead of "8".  Clarify error string for IMM22:
1295         "signed integer" instead of just "integer".
1296
1297 2001-02-20  Andreas Jaeger  <[email protected]>
1298
1299         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
1300         PLT entries that could serve as a definition for a weak symbol.
1301
1302 2001-02-19  Jakub Jelinek  <[email protected]>
1303
1304         * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
1305         entries that could serve as a definition for a weak symbol.
1306         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
1307
1308 2001-02-18  David O'Brien  <obrien@FreeBSD>
1309
1310         * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
1311         FreeBSD/i386-CURRENT differently until I can figure out the needed
1312         corefile changes.
1313         * configure: Regenerate.
1314         * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
1315         FreeBSD/PowerPC, and FreeBSD/sparc64.
1316
1317 2001-02-18  lars brinkhoff  <[email protected]>
1318
1319         * Makefile.am: Add PDP-11 a.out target.
1320         * config.bfd: Likewise.
1321         * configure.in: Likewise.
1322         * targets.c: Likewise.
1323         * archures.c: Likewise.
1324         * bfd-in2.h: Likewise.  Add PDP-11 relocations.
1325         * libbfd.h: Add PDP-11 relocations.
1326         * reloc.c: Likewise.
1327         * cpu-pdp11.c: New file.
1328         * pdp11.c: New file.
1329
1330         * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
1331         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
1332         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
1333         (PUT_WORD) [ARCH_SIZE==16]: Likewise.
1334         (GET_MAGIC): New macro.
1335         (PUT_MAGIC): Likewise.
1336         * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
1337
1338 2001-02-18  Jim Kingdon  <[email protected]>
1339
1340         * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
1341         multiarch needs it).
1342
1343 2001-02-18  H.J. Lu  <[email protected]>
1344
1345         * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
1346         index.
1347
1348 2001-02-18  Kazu Hirata  <[email protected]>
1349
1350         * vms-misc.c: Fix formatting.
1351
1352 2001-02-16  Kazu Hirata  <[email protected]>
1353
1354         * vms.c: Fix formatting.
1355
1356 2001-02-14  H.J. Lu  <[email protected]>
1357
1358         * elf.c (elf_find_function): New function.
1359         (_bfd_elf_find_nearest_line): Call elf_find_function () to find
1360         the file name and function name.
1361
1362 2001-02-14  Nick Clifton  <[email protected]>
1363
1364         * ecoff.c (bfd_debug_section): Update to initialise new fields in
1365         asection structure.
1366
1367         * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
1368         (BFD64_BACKENDS): Add pepigen.c
1369         Add rules to create peigen.c and pepigen.c from peXXigen.c.
1370
1371         * Makefile.in: Regenerate.
1372         * configure:  Regenerate.
1373         * po/POTFILES.in: Regenerate.
1374         * po/bfd.pot: Regenerate.
1375
1376 2001-02-14  H.J. Lu  <[email protected]>
1377
1378         * libcoff-in.h (pe_tdata): Add members target_subsystem and
1379         force_minimum_alignment.
1380
1381 2001-02-14  Bo Thorsen  <[email protected]>
1382
1383         * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
1384         (elf64_86_64_size_info): Struct added to fix a problem
1385         with the hashtable string entries.
1386         (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
1387         (elf64_x86_64_size_dynamic_sections): A FIXME removed.
1388         (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
1389         remove the FIXME for this.
1390         (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
1391         section. Also removed the FIXME for it.
1392         (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
1393         (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
1394         (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
1395
1396 2001-02-13  Richard Henderson  <[email protected]>
1397
1398         * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
1399         and not user provided.
1400
1401 2001-02-13  Kazu Hirata  <[email protected]>
1402
1403         * vms.c (vms_print_symbol): Remove unreachable code.
1404
1405         * rs6000-core.c: Fix formatting.
1406
1407 2001-02-13  David Mosberger  <[email protected]>
1408
1409         * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
1410         as _bfd_XXi_only_swap_filehdr_out.
1411         (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
1412         pe->force_minimum_alignment to TRUE.
1413         (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
1414         PEI_TARGET_SUBSYSTEM.
1415         (pe_print_private_bfd_data): Call
1416         _bfd_XX_print_private_bfd_data_common() instead of
1417         _bfd_pe_print_private_bfd_data_common().
1418         (pe_bfd_copy_private_bfd_data): Call
1419         _bfd_XX_bfd_copy_private_bfd_data_common() instead of
1420         _bfd_pe_bfd_copy_private_bfd_data_common().
1421         (coff_bfd_copy_private_section_data): Define as
1422         _bfd_XX_bfd_copy_private_section_data instead of
1423         _bfd_pe_bfd_copy_private_section_data.
1424         (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
1425         of a _bfd_pe_get_symbol_info.
1426
1427         * peigen.c: Delete.
1428
1429         * peXXigen.c: Renamed from peigen.c.
1430         (COFF_WITH_XX): Define this macro (will get expanded into
1431         COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
1432         compiled as peigen.c or pepigen.c.
1433         [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
1434         define the canonical PEP structures and definitions.
1435         (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
1436         effect, enforce minimum file and section alignments.  If
1437         extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
1438         pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
1439         so, by default, this is a no-op).
1440
1441         * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
1442         (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
1443         _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
1444         _bfd_pefoo if it's not defined.  Use these macros to define
1445         coff swap macros.
1446
1447         * libcoff.h (pe_tdata): Add members target_subsystem and
1448         force_minimum_alignment.
1449
1450         * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
1451         COFF_WITH_pep.
1452         (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
1453
1454         * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
1455         peigen.lo.
1456
1457         * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
1458         (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
1459         PEPAOUTHDR.
1460
1461         * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
1462         (BFD64_BACKENDS_CFILES): Mention pepigen.c
1463         (peigen.c): Add rule to generate from peXXigen.c.
1464         (pepigen.c): Ditto.
1465         (pepigen.lo): List dependencies for pepigen.lo.
1466
1467 2001-02-13  Alan Modra  <[email protected]>
1468
1469         * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$.  If
1470         $global$ referenced but not defined, set its value here.
1471
1472 2001-02-09  Bo Thorsen  <[email protected]>
1473
1474         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
1475         alignment to 3.
1476         (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
1477         and relocation.
1478         (elf64_x86_64_relocate_section): Fix formatting.
1479         (elf64_x86_64_relocate_section): Fix addend for relocation of
1480         R_X86_64_(8|16|32|PC8|PC16|PC32).
1481
1482 2001-02-12  Jan Hubicka  <[email protected]>
1483
1484         * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
1485
1486 2001-02-11  H.J. Lu  <[email protected]>
1487
1488         * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
1489         alignment.
1490
1491 2001-02-11  Maciej W. Rozycki  <[email protected]>
1492
1493         * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
1494         from 2000-10-13.  Do not add the symbol's value for R_MIPS_REL32
1495         relocations against dynsym symbols.
1496
1497         * elf32-mips.c (elf_mips_howto_table): Fix the comment on
1498         the R_MIPS_26 relocation.
1499         (mips_elf_calculate_relocation): Use (p + 4) instead of p for
1500         the R_MIPS_26 relocation.
1501         (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
1502         relocation.
1503         * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
1504         the R_MIPS_26 relocation.
1505         (mips_elf64_howto_table_rela): Likewise.
1506
1507         * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
1508         member to mark symbols that have non-CALL relocations against
1509         them.
1510         (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
1511         (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
1512         R_MIPS_GOT16.
1513         (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
1514         non-CALL relocation against it is encountered.
1515         (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
1516         (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
1517         no_fn_stub is not set.
1518
1519         * elf32-mips.c (mips_elf_output_extsym): Get the output section
1520         information from the real symbol for indirect ones.
1521         Check no_fn_stub to find out if a symbol has a function stub
1522         indeed.
1523
1524 2001-02-11  Michael Sokolov  <[email protected]>
1525
1526         * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
1527         * Makefile.in: Regenerate.
1528
1529 2001-02-09  David Mosberger  <[email protected]>
1530
1531         * elfxx-ia64.c (is_unwind_section_name): New function.  Returns
1532         true if section name is an unwind table section name.
1533         (elfNN_ia64_additional_program_headers): Count each unwind section
1534         separately.
1535         (elfNN_ia64_modify_segment_map): Install one unwind program header
1536         for each unwind separate section.  Note: normally the linker
1537         script merges the unwind sections that go into a single segment,
1538         so this still generates at most one unwind program header per
1539         segment.
1540
1541         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
1542         name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
1543         (elfNN_ia64_fake_sections): Mark sections with names that start
1544         with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
1545         unwind section.
1546
1547         * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
1548         Use it to make sh_info in unwind section point to the text section
1549         it applies to.
1550
1551 2001-02-09  Martin Schwidefsky  <[email protected]>
1552
1553         * Makefile.am: Add linux target for S/390.
1554         * archures.c: Likewise.
1555         * bfd-in2.h: Likewise.
1556         * config.bfd: Likewise.
1557         * configure.in: Likewise.
1558         * elf.c: Likewise.
1559         * libbfd.h: Likewise.
1560         * targets.c: Likewise.
1561         * cpu-s390.c: New file.
1562         * elf32-s390.c: New file.
1563         * elf64-s390.c: New file.
1564
1565 2001-02-09  Nick Clifton  <[email protected]>
1566
1567         * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
1568         ImageBase.  This has already been done by coff_swap_hdr_in.
1569
1570 2001-02-09  Jakub Jelinek  <[email protected]>
1571
1572         * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
1573
1574 2001-02-09  Jakub Jelinek  <[email protected]>
1575
1576         * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
1577         (sparc64_elf_relocate_section): Likewise.
1578
1579 2001-02-09  Mark Kettenis  <[email protected]>
1580
1581         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
1582         similar to R_SPARC_32.
1583         * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
1584
1585 2001-02-08  H.J. Lu  <[email protected]>
1586
1587         * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
1588         relocation entries for weak definitions when building DSO with
1589         -Bsymbolic.
1590
1591 2001-02-08  Richard Henderson  <[email protected]>
1592
1593         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
1594         before visibility.  Locally defined protected symbols are not
1595         dynamic.
1596
1597 2001-02-08  Geoffrey Keating  <[email protected]>
1598
1599         * config.bfd: Enable coff64 for rs6000-*.  Patch from
1600         <[email protected]>.
1601
1602 2001-02-07  Mark Elbrecht  <[email protected]>
1603
1604         * coffgen.c (coff_find_nearest_line): If stabs info is successfully
1605         found, do not attempt to find dwarf2 info before returning.
1606
1607 2001-02-07  Jakub Jelinek  <[email protected]>
1608
1609         * elflink.h (is_global_symbol_definition): Rename to
1610         is_global_data_symbol_definition and have it reject function
1611         symbols.
1612         (elf_link_is_defined_archive_symbol): Use renamed function.
1613
1614 2001-02-07  Todd Vierling  <[email protected]>
1615
1616         * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
1617         * libbfd.h (bfd_target_vector): Likewise.
1618         * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
1619         make static; create pointer reference named bfd_target_vector.
1620         (_bfd_target_vector_entries): Calculate this based on the array
1621         typed _bfd_target_vector.
1622
1623 2001-02-06  H.J. Lu  <[email protected]>
1624
1625         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
1626         internal symbols are not dynamic.
1627         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1628
1629 2001-02-06  Nick Clifton  <[email protected]>
1630
1631         * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
1632         that it will not be pulled into the list of files that make up
1633         po/POTFILES.in.
1634         * Makefile.in: Regenerate.
1635         * po/bfd.pot:  Regenerate.
1636
1637 2001-02-06  H.J. Lu  <[email protected]>
1638
1639         * peicode.h (coff_swap_filehdr_in): Remove the e_magic
1640         checking.
1641         (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
1642         external_PEI_IMAGE_hdr.
1643
1644 2001-02-06  Kazu Hirata  <[email protected]>
1645
1646         * elf-m10200.c: Fix formatting.
1647
1648 2001-02-04  Nick Clifton  <[email protected]>
1649
1650         * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
1651         rel, it will be handled later on.
1652
1653 2001-02-02  Fred Fish  <[email protected]>
1654
1655         * Makefile.in: Fix typo.
1656
1657 2001-02-01  Kazu Hirata  <[email protected]>
1658
1659         * elf-m10300.c: Fix formatting.
1660
1661 2001-01-30  Alan Modra  <[email protected]>
1662
1663         * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
1664         (elf_backend_get_symbol_type): Define.
1665         (elf64_hppa_object_p): Set architecture and machine from elf
1666         header flags.
1667
1668 2001-01-30  Curtis L. Janssen  <[email protected]>
1669
1670         * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
1671         before mdebug.
1672
1673 2001-01-26  Richard Henderson  <[email protected]>
1674
1675         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
1676         for non-default visibility.
1677         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
1678         delete ugly macro and replace with pretty function.
1679
1680 2001-01-25  Mark Elbrecht  <[email protected]>
1681
1682         * coff-go32.c: Update copyright.
1683         * coff-stgo32.c: Likewise.
1684         * coff-go32.c (COFF_LONG_FILENAMES): Define.
1685         * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
1686         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
1687         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
1688
1689 2001-01-25  Kazu Hirata  <[email protected]>
1690
1691         * bfd-in2.h: Rebuild.
1692         * libbfd.h: Likewise.
1693
1694 2001-01-23  H.J. Lu  <[email protected]>
1695
1696         * bfd-in2.h: Rebuild.
1697
1698 2001-01-23  H.J. Lu  <[email protected]>
1699
1700         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
1701         is NULL or PRIV(vms_rec) is outside of the buffer.
1702
1703 2001-01-23  Kazu Hirata  <[email protected]>
1704
1705         * coff64-rs6000.c: Fix formatting.
1706         * coff-arm.c: Likewise.
1707         * coffgen.c: Likewise.
1708         * cofflink.c: Likewise.
1709         * coff-mcore.c: Likewise.
1710         * coff-mips.c: Likewise.
1711         * coff-pmac.c: Likewise.
1712         * coff-ppc.c: Likewise.
1713         * coff-rs6000.c: Likewise.
1714         * elf32.c: Likewise.
1715         * elf32-fr30.c: Likewise.
1716         * elf32-i370.c: Likewise.
1717         * elf32-i860.c: Likewise.
1718         * elf32-m32r.c: Likewise.
1719         * elf32-m68k.c: Likewise.
1720         * elf32-mcore.c: Likewise.
1721         * elf32-ppc.c: Likewise.
1722         * elf32-sh.c: Likewise.
1723         * elf32-v850.c: Likewise.
1724         * elf64-alpha.c: Likewise.
1725         * elf64-sparc.c: Likewise.
1726         * elflink.c: Likewise.
1727         * elflink.h: Likewise.
1728         * elf-m10200.c: Likewise.
1729         * elf-m10300.c: Likewise.
1730         * elfxx-ia64.c: Likewise.
1731
1732         * aoutx.h: Fix formatting.
1733         * bfd.c: Likewise.
1734         * bfd-in2.h: Likewise.
1735         * bfd-in.h: Likewise.
1736         * cpu-i386.c: Likewise.
1737         * cpu-m68hc11.c: Likewise.
1738         * dwarf2.c: Likewise.
1739         * elf64-x86-64.c: Likewise.
1740         * format.c: Likewise.
1741         * freebsd.h: Likewise.
1742         * hash.c: Likewise.
1743         * hp300hpux.c: Likewise.
1744         * hppabsd-core.c: Likewise.
1745         * hpux-core.c: Likewise.
1746
1747 2001-01-22  Bo Thorsen  <[email protected]>
1748
1749         * elf64-x86-64.c: Added PIC support for X86-64.
1750         (elf64_x86_64_link_hash_newfunc): Function added.
1751         (elf64_x86_64_link_hash_table_create): Likewise.
1752         (elf64_x86_64_check_relocs): Likewise.
1753         (elf64_x86_64_gc_mark_hook): Likewise.
1754         (elf64_x86_64_gc_sweep_hook): Likewise.
1755         (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1756         (elf64_x86_64_size_dynamic_sections): Likewise.
1757         (elf64_x86_64_discard_copies): Likewise.
1758         (elf64_x86_64_finish_dynamic_symbol): Likewise.
1759         (elf64_x86_64_finish_dynamic_sections): Likewise.
1760         (elf64_x86_64_relocate_section): Add relocation of PIC sections.
1761
1762 2001-01-21  Maciej W. Rozycki  <[email protected]>
1763
1764         * Makefile.am (install-data-local): Make use of $(DESTDIR).
1765         * Makefile.in: Regenerate.
1766
1767 2001-01-21  Kazu Hirata  <[email protected]>
1768
1769         * coff-a29k.c: Fix formatting.
1770
1771 2001-01-19  H.J. Lu  <[email protected]>
1772
1773         * elf32-i386.c (elf_i386_check_relocs): Report files with bad
1774         relocation section names.
1775         (elf_i386_relocate_section): Report files with bad relocation
1776         section names and return false.
1777
1778 2001-01-17  Bo Thorsen  <[email protected]>
1779
1780         * targets.c: Alphabetize list of xvecs.
1781
1782 2001-01-14  Alan Modra  <[email protected]>
1783
1784         * config.bfd: Add linux target variant for elfxx-hppa.
1785         * configure.in: Recognize bfd_elf32_hppa_linux_vec and
1786         bfd_elf64_hppa_linux_vec.
1787         * configure: Regenerate.
1788         * elf64-hppa.c: Include elf64-target.h again to support linux
1789         target variant.
1790         (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
1791         * elf32-hppa.c: Include elf32-target.h again to support linux
1792         target variant.
1793         (elf32_hppa_post_process_headers): New function.
1794         (elf_backend_post_process_headers): Define.
1795         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
1796         bfd_elf32_hppa_linux_vec.
1797
1798         * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
1799         and data_segment_base fields.
1800         (elf32_hppa_link_hash_table_create ): Init them.
1801         (elf32_hppa_check_relocs): Update comments.
1802         (hppa_record_segment_addr): New function.
1803         (elf32_hppa_relocate_section): Call it.
1804         (final_link_relocate): Handle R_PARISC_SEGREL32.
1805         (elf32_hppa_final_link): New function.
1806         (bfd_elf32_bfd_final_link): Define to call it.
1807         (hppa_unwind_entry_compare): New function.
1808         * cache.c (bfd_open_file): Create files in write+read mode.
1809
1810         * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
1811         SEGREL32 and numerous other relocs.  Change duplicate
1812         R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
1813
1814         * opncls.c (bfd_fdopenr): Add parens like the comment says around
1815         O_ACCMODE.
1816
1817         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
1818         .plt entries for DT_INIT and DT_FINI.
1819         (elf32_hppa_finish_dynamic_sections): Remove special handling of
1820         DT_INIT and DT_FINI.
1821
1822         * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
1823         offsets for stub .plt access if wide mode.  Check offset in range.
1824
1825 2001-01-13  Nick Clifton  <[email protected]>
1826
1827         * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
1828         line.
1829
1830         * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
1831         line.
1832
1833 2001-01-12  Alan Modra  <[email protected]>
1834
1835         * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
1836         * configure: Regenerate.
1837
1838 2001-01-11  Peter Targett  <[email protected]>
1839
1840         * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
1841         bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
1842         * cpu-arc.c (arch_info_struct): Add entries for variants.
1843         (bfd_arc_arch) Set default to bfd_mach_arc_5.
1844         (arc_get_mach) Don't assume machine names prefixed arc- before
1845         testing.
1846         * elf32-arc.c (arc_elf_object_p): Set machine number based on new
1847         selections.
1848         (arc_elf_final_write_processing) Likewise.
1849         (ELF_MACHINE_CODE) Use EM_ARC.
1850
1851 2001-01-10  Nick Clifton  <[email protected]>
1852
1853         * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
1854
1855 2001-01-07  Philip Blundell  <[email protected]>
1856
1857         * README: Replace `[email protected]' with
1858         `[email protected]'.
1859
1860 2001-01-04  Kazu Hirata  <[email protected]>
1861
1862         * som.c: Fix formatting.
1863
1864 2001-01-03  Kazu Hirata  <[email protected]>
1865
1866         * ecoffswap.h: Fix formatting.
1867         * elf-bfd.h: Likewise.
1868         * elfarm-nabi.c: Likewise.
1869         * elfarm-oabi.c: Likewise.
1870         * elfcode.h: Likewise.
1871         * elfcore.h: Likewise.
1872         * elflink.c: Likewise.
1873         * elflink.h: Likewise.
1874         * elfxx-ia64.c: Likewise.
1875         * elfxx-target.h: Likewise.
1876         * libbfd.c: Likewise
1877         * linker.c: Likewise.
1878         * lynx-core.c: Likewise.
1879
1880 2001-01-02  Kazu Hirata  <[email protected]>
1881
1882         * pc532-mach.c: Fix formatting.
1883         * pe-arm.c: Likewise.
1884         * pe-i386.c: Likewise.
1885         * pe-mips.c: Likewise.
1886         * pe-ppc.c: Likewise.
1887         * pe-sh.c: Likewise.
1888         * pei-mips.c: Likewise.
1889         * pei-sh.c: Likewise.
1890         * peicode.h: Likewise.
1891         * ppcboot.c: Likewise.
1892         * ptrace-core.c: Likewise.
1893
1894 2001-01-01  Kazu Hirata  <[email protected]>
1895
1896         * reloc.c: Fix formatting.
1897         * riscix.c: Likewise.
1898         * rs6000-core.c: Likewise.
1899         * xcoff-target.h: Likewise.
1900
1901 2000-12-29  Hans-Peter Nilsson  <[email protected]>
1902
1903         * elfcode.h (elf_object_p): Also restore the bfd mach field on
1904         error, by calling bfd_default_set_arch_mach with incoming
1905         values.
1906
1907 2000-12-26  Kazu Hirata  <[email protected]>
1908
1909         * vaxnetbsd.c: Fix formatting.
1910         * versados.c: Likewise.
1911         * vms-gsd.c: Likewise.
1912         * vms-hdr.c: Likewise.
1913         * vms-misc.c: Likewise.
1914
1915 2000-12-25  Alexandre Oliva  <[email protected]>
1916
1917         * archive.c (coff_write_armap): Don't write more than symbol_count
1918         `archive_member_file_ptr's.
1919
1920 2000-12-25  Kazu Hirata  <[email protected]>
1921
1922         * vms-tir.c: Fix formatting.
1923
1924 2000-12-23  Kazu Hirata  <[email protected]>
1925
1926         * vms.c: Fix formatting.
1927         * vms.h: Likewise.
1928
1929 2000-12-21  Santeri Paavolainen <[email protected]>
1930
1931         * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
1932
1933         * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
1934
1935         * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
1936         arithmetic.
1937
1938         * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
1939
1940         * coffcode.h (styp_to_sec_flags): Add empty statement after label.
1941
1942 2000-12-21  Richard Sandiford  <[email protected]>
1943
1944         * libbfd.c (bfd_get_bits): Added
1945         (bfd_put_bits): Likewise
1946         * bfd-in.h: Declared the above.
1947         * bfd-in2.h: Regenerated.
1948
1949 2000-12-20  Kazu Hirata  <[email protected]>
1950
1951         * targets.c: Fix formatting.
1952         * tekhex.c: Likewise.
1953         * trad-core.c: Likewise.
1954
1955 2000-12-19  Kazu Hirata  <[email protected]>
1956
1957         * sco5-core.c: Fix formatting.
1958         * section.c: Likewise.
1959         * sparclinux.c: Likewise.
1960         * sparclynx.c: Likewise.
1961         * sparcnetbsd.c: Likewise.
1962         * srec.c: Likewise.
1963         * stabs.c: Likewise.
1964         * stab-syms.c: Likewise.
1965         * sunos.c: Likewise.
1966         * syms.c: Likewise.
1967         * sysdep.h: Likewise.
1968
1969 2000-12-18  Nick Clifton  <[email protected]>
1970
1971         * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
1972         defined.
1973         * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
1974         * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
1975
1976 2000-12-18  Nick Clifton  <[email protected]>
1977
1978         * vms-misc.c (_bfd_vms_get_record): Add default case to
1979         file_format switch.
1980
1981 2000-12-15  Miloslav Trmac <[email protected]>
1982
1983         * elfcore.h (elf_core_file_p): Move to the start of the program
1984         headers before attempting to read them.
1985
1986 2000-12-14  Kazu Hirata  <[email protected]>
1987
1988         * peigen.c: Fix formatting.
1989         * som.c: Likewise.
1990         * som.h: Likewise.
1991
1992 2000-12-13  Kazu Hirata  <[email protected]>
1993
1994         * peigen.c: Fix formatting.
1995
1996 2000-12-12  Jim Wilson  <[email protected]>
1997
1998         *  elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
1999
2000 2000-12-08  Mark Salter  <[email protected]>
2001
2002         * binary.c (binary_set_section_contents): Ignore sections
2003         with zero size.
2004
2005 2000-12-12  Kazu Hirata  <[email protected]>
2006
2007         * m68klinux.c: Fix formatting.
2008         * m68knetbsd.c: Likewise.
2009         * mipsbsd.c: Likewise.
2010         * netbsd-core.c: Likewise.
2011         * netbsd.h: Likewise.
2012         * newsos3.c: Likewise.
2013         * nlm32-alpha.c: Likewise.
2014         * nlm32-i386.c: Likewise.
2015         * nlm32-ppc.c: Likewise.
2016         * nlm32-sparc.c: Likewise.
2017         * nlmcode.h: Likewise.
2018         * nlmswap.h: Likewise.
2019         * nlm-target.h: Likewise.
2020         * ns32knetbsd.c: Likewise.
2021
2022 2000-12-10  Fred Fish  <[email protected]>
2023
2024         * elflink.h (elf_link_output_extsym): Don't complain about undefined
2025         symbols in shared objects if allow_shlib_undefined is true.
2026
2027 2000-12-12  Nick Clifton  <[email protected]>
2028
2029         * cpu-sh.c: Fix formattng.
2030         * elf.c: Fix formattng.
2031         * elf32-mips.c: Fix formattng.
2032         * elf32-sh.c: Fix formattng.
2033         * elf64-alpha.c: Fix formattng.
2034
2035 2000-12-09  Nick Clifton  <[email protected]>
2036
2037         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
2038         dwarf2_find_line_info as last parameter to invocation of
2039         _bfd_dwarf2_find_nearest_line.
2040         * elf32-arm.h (elf32_arm_find_nearest_line): Pass
2041         dwarf2_find_line_info as last parameter to invocation of
2042         _bfd_dwarf2_find_nearest_line.
2043
2044 2000-12-08  Mark Elbrecht  <[email protected]>
2045
2046         * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
2047         (BFD_LIBS): ...to here.
2048         (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
2049         (BFD_LIBS_CFILES): ...to here.
2050         * Makefile.in: Regenerate.
2051         * configure.in: Remove dwarf.lo from the elf shell variable.
2052         * configure: Regenerate.
2053         * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
2054         * libcoff.h: Regenerate.
2055         * coffgen.c (coff_find_nearest_line): Call
2056         _bfd_dwarf2_find_nearest_line.
2057         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
2058         accordingly.
2059         (read_abbrevs): Likewise
2060         (decode_line_info): Likewise.
2061         (parse_comp_unit): Likewise.
2062         (comp_unit_find_nearest_line): Likewise.
2063         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
2064         * libbfd.h: Regenerate.
2065         * elf.c (_bfd_elf_find_nearest_line): Update call.
2066         * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
2067         * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
2068         * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
2069         (sec_to_styp_flags): Use them. Handle DWARF2 sections.
2070         (styp_to_sec_flags): Handle DWARF2 sections.
2071         * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
2072         to _bfd_find_nearest_line.
2073         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
2074         call to _bfd_find_nearest_line.
2075
2076 2000-12-08  Kazu Hirata  <[email protected]>
2077
2078         * coffgen.c: Fix formatting.
2079         * elf-m10300.c: Likewise.
2080         * elf32-i386.c: Likewise.
2081         * elf32-i960.c: Likewise.
2082         * elf32-m68k.c: Likewise.
2083         * elf32-mcore.c: Likewise.
2084         * elf32-ppc.c: Likewise.
2085         * elf32-sh.c: Likewise.
2086         * elf32-sparc.c: Likewise.
2087         * elf32-v850.c: Likewise.
2088         * elf64-alpha.c: Likewise.
2089         * elf64-hppa.c: Likewise.
2090         * elf64-mips.c: Likewise.
2091         * elf64-sparc.c: Likewise.
2092
2093 2000-12-07  Kazu Hirata  <[email protected]>
2094
2095         * elf32-ppc.c: Fix formatting.
2096         * elf64-x86-64.c: Likewise.
2097
2098 2000-12-06  Ulf Carlsson  <[email protected]>
2099
2100         From  Ralf Baechle  <[email protected]>
2101
2102         * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
2103         BFDs containing no sections or empty .text, .data or .bss sections
2104         to be merged, regardless of their flags.
2105
2106 2000-12-06  Kazu Hirata  <[email protected]>
2107
2108         * elf32-m32r.c: Fix formatting.
2109         * elf32-m68hc11.c: Likewise.
2110         * elf32-m68hc12.c: Likewise.
2111         * elf32-m68k.c: Likewise.
2112         * elf32-mcore.c: Likewise.
2113         * elf32-pj.c: Likewise.
2114         * elf32-ppc.c: Likewise.
2115
2116 2000-12-05  Kazu Hirata  <[email protected]>
2117
2118         * elf32-fr30.c: Fix formatting.
2119         * elf32-hppa.c: Likewise.
2120         * elf32-i370.c: Likewise.
2121         * elf32-i386.c: Likewise.
2122         * elf32-i860.c: Likewise.
2123         * elf32-i960.c: Likewise.
2124
2125 2000-12-03  Kazu Hirata  <[email protected]>
2126
2127         * elf32-arm.h: Fix formatting.
2128         * elf32-avr.c: Likewise.
2129         * elf32-cris.c: Likewise.
2130         * elf32-d10v.c: Likewise.
2131         * elf32-d30v.c: Likewise.
2132         * elf-hppa.h: Likewise.
2133         * elf-m10200.c: Likewise.
2134         * elf-m10300.c: Likewise.
2135
2136 2000-12-01  Chris Demetriou  <[email protected]>
2137
2138         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
2139         bfd_mach_mips32_4k.  Update FIXME comment.
2140         * archures.c (bfd_mach_mips32): New constant.
2141         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
2142         the latter, renumber it.
2143         * bfd-in2.h (bfd_mach_mips32): New constant.
2144         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
2145         the latter, renumber it.
2146         * cpu-mips.c (I_mips32): New constant.
2147         (I_mips4K, I_mips32_4k): Rename the former to the latter.
2148         (arch_info_struct): Add bfd_mach_mips32 entry, replace
2149         bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
2150         * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
2151         (elf_mips_mach): Likewise.  Also, replace E_MIPS_MACH_MIPS32
2152         with E_MIPS_MACH_MIPS32_4K.
2153         (_bfd_mips_elf_final_write_processing): Replace
2154         bfd_mach_mips4K with bfd_mach_mips32_4k case, add
2155         bfd_mach_mips32 case.
2156         (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
2157         comparison with support for MIPS32.
2158         (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
2159         MIPS32.
2160
2161         * aoutx.h (NAME(aout,machine_type)): Add cases for
2162         bfd_mach_mips5 and bfd_mach_mips64.
2163         * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
2164         * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
2165         * cpu_mips.c (I_mips5, I_mips64): New definitions.
2166         (arch_info_struct): Add entries for bfd_mach_mips5 and
2167         bfd_mach_mips64.
2168         * elf32-mips.c (elf_mips_isa, elf_mips_mach,
2169         _bfd_mips_elf_print_private_bfd_data): Add cases for
2170         E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
2171         (_bfd_mips_elf_final_write_processing): Add cases for
2172         bfd_mach_mips5 and bfd_mach_mips64.
2173
2174         * aoutx.h (NAME(aout,machine_type)): Add a
2175         bfd_mach_mips_sb1 case.
2176         * archures.c (bfd_mach_mips_sb1): New constant.
2177         * bfd-in2.h (bfd_mach_mips_sb1): New constant.
2178         * cpu-mips.c (I_sb1): New constant.
2179         (arch_info_struct): Add entry for bfd_mach_mips_sb1.
2180         * elf32-mips.c (elf_mips_mach): Add case for
2181         E_MIPS_MACH_SB1.
2182         (_bfd_mips_elf_final_write_processing): Add case for
2183         bfd_mach_mips_sb1.
2184
2185 2000-12-01  Joel Sherrill <[email protected]>
2186
2187         * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
2188         (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
2189         (sparc*-*-rtems*): Switched from a.out to ELF.
2190
2191 2000-11-30  Jan Hubicka  <[email protected]>
2192
2193         * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
2194         BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
2195         (elf64-x86-64.lo): Add dependencies.
2196         * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
2197         bfd_mach_x86_64_intel_syntax.
2198         * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
2199         * config.bfd (x86_64): Add.
2200         * configure.in: Add support for bfd_elf64_x86_64_vec.
2201         * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
2202         (bfd_i386_arch, i8086_ar): Link in.
2203         * elf64-x86-64.c: New file.
2204         * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
2205         * targets.c (bfd_elf64_x86_64_vec): Add.
2206         (bfd_target_vect): Add bfd_elf64_x86_64_vec.
2207
2208 2000-11-30  Kazu Hirata  <[email protected]>
2209
2210         * xcofflink.c: Fix formatting.
2211
2212 2000-11-28  Kazu Hirata  <[email protected]>
2213
2214         * aoutx.h: Fix formatting.
2215         * bfd-in.h: Likewise.
2216         * bfd-in2.h: Likewise.
2217         * cache.c: Likewise.
2218         * cisco-core.c: Likewise.
2219         * coff64-rs6000.c: Likewise.
2220         * coffcode.h: Likewise.
2221         * coffswap.h: Likewise.
2222         * corefile.c: Likewise.
2223         * elf32-mips.c: Likewise.
2224
2225 2000-11-27  Kazu Hirata  <[email protected]>
2226
2227         * aout-adobe.c: Fix formatting.
2228         * coff64-rs6000.c: Likewise.
2229         * coffgen.c: Likewise.
2230         * cofflink.c: Likewise.
2231
2232 2000-11-27  Philip Blundell  <[email protected]>
2233
2234         * libcoff-in.h (coff_tdata): Add `strings_written' flag.
2235         (obj_coff_strings_written): New accessor macro for above.
2236         * libcoff.h: Regenerate.
2237         * cofflink.c (_bfd_coff_final_link): Say that we wrote the
2238         strings.
2239         * coffcode.h (coff_write_object_contents): No need to write out
2240         the string table if it's already been done.
2241
2242 2000-11-22  Philip Blundell  <[email protected]>
2243
2244         * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
2245         weak undefined symbols.
2246
2247 2000-11-24  Nick Clifton  <[email protected]>
2248
2249         * archures.c (bfd_mach_arm_5TE): Define.
2250         (bfd_mach_arm+XScale): Define.
2251         * bfd-in2.h: Regenerate.
2252
2253         * coff-arm.c (coff_arm_reloc_type_lookup): Accept
2254         BFD_RELOC_ARM_PCREL_BLX.
2255
2256         * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
2257         XScale machine numbers.
2258
2259         * config.bfd (xscale-elf): Add target.
2260         (xscale-coff): Add target.
2261
2262         * cpu-arm.c: Add xscale machine name.
2263         Add v5t, v5te and XScale machine numbers.
2264
2265 2000-11-23  Kazu Hirata  <[email protected]>
2266
2267         * aix386-core.c: Fix formatting.
2268
2269 2000-11-22  Jim Wilson  <[email protected]>
2270
2271         * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
2272         (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
2273         * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
2274         (ins_imms_scaled): Initialize sign_bit at function entry.
2275         (elf64_ia64_operands): Add missing initializers.
2276         * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
2277         elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
2278         elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
2279         elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
2280         elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
2281         parameters.
2282         (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
2283         and free_extsyms at function entry.
2284         (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
2285         (elfNN_ia64_create_dynamic_sections): Delete unused local h.
2286         (get_got): Delete unused local srel.
2287         (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
2288         (elfNN_ia64_relocate_section): Delete unused local dynindx.
2289
2290 2000-11-21  Kazu Hirata  <[email protected]>
2291
2292         * coff-a29k.c: Fix formatting.
2293         * coff-h8500.c: Likewise.
2294         * coff-i960.c: Likewise.
2295         * coff-ppc.c: Likewise.
2296         * coff-rs6000.c: Likewise.
2297         * coff-stgo32.c: Likewise.
2298         * coff-tic54x.c: Likewise.
2299         * coff-w65.c: Likewise.
2300         * cpu-h8500.c: Likewise.
2301         * cpu-hppa.c: Likewise.
2302         * cpu-ns32k.c: Likewise.
2303         * ecoff.c: Likewise.
2304         * ecofflink.c: Likewise.
2305
2306 2000-11-21  Nick Clifton  <[email protected]>
2307
2308         * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
2309         remove possibility of infinite loop.
2310
2311 2000-11-20  Kazu Hirata  <[email protected]>
2312
2313         * aix386-core.c: Fix formatting.
2314         * aout-adobe.c: Likewise.
2315         * aout-arm.c: Likewise.
2316         * aout-encap.c: Likewise.
2317         * aout-ns32k.c: Likewise.
2318         * aout-target.h: Likewise.
2319         * aout-tic30.c: Likewise.
2320         * aoutf1.h: Likewise.
2321         * aoutx.h: Likewise.
2322         * archive.c: Likewise.
2323         * bfd-in.h: Likewise.
2324         * bfd-in2.h: Likewise.
2325         * bfd.c: Likewise.
2326         * bout.c: Likewise.
2327
2328 2000-11-17  H.J. Lu  <[email protected]>
2329
2330         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
2331         pltoff entries for DT_INIT and DT_FINI.
2332         (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
2333         (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
2334         entries.
2335
2336 2000-11-16  Richard Henderson  <[email protected]>
2337
2338         * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
2339         (allocate_dynrel_entries): Likewise.
2340         (elfNN_ia64_relocate_section): Likewise.  Set REL addends correctly.
2341         (set_pltoff_entry): Likewise.
2342         (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
2343         (elfNN_ia64_reloc_type_lookup): Likewise.
2344         (elfNN_ia64_install_value): Likewise.
2345         (elfNN_ia64_relocate_section): Likewise.
2346         * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
2347         (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
2348
2349 2000-11-16  Kazu Hirata  <[email protected]>
2350
2351         * cpu-a29k.c: Fix formatting.
2352         * cpu-alpha.c: Likewise.
2353         * cpu-arm.c: Likewise.
2354         * cpu-avr.c: Likewise.
2355         * cpu-d10v.c: Likewise.
2356         * cpu-h8500.c: Likewise.
2357         * cpu-hppa.c: Likewise.
2358         * cpu-i370.c: Likewise.
2359         * cpu-i386.c: Likewise.
2360         * cpu-i960.c: Likewise.
2361         * cpu-ia64-opc.c: Likewise.
2362         * cpu-ia64.c: Likewise.
2363         * cpu-m32r.c: Likewise.
2364         * cpu-m68hc11.c: Likewise.
2365         * cpu-m68hc12.c: Likewise.
2366         * cpu-m68k.c: Likewise.
2367         * cpu-m88k.c: Likewise.
2368         * cpu-mips.c: Likewise.
2369         * cpu-ns32k.c: Likewise.
2370         * cpu-pj.c: Likewise.
2371         * cpu-powerpc.c: Likewise.
2372         * cpu-sh.c: Likewise.
2373         * cpu-sparc.c: Likewise.
2374         * cpu-tic54x.c: Likewise.
2375         * cpu-v850.c: Likewise.
2376         * cpu-vax.c: Likewise.
2377         * cpu-w65.c: Likewise.
2378         * cpu-we32k.c: Likewise.
2379         * cpu-z8k.c: Likewise.
2380         * dwarf1.c: Likewise.
2381         * dwarf2.c: Likewise.
2382
2383 2000-11-15  Kazu Hirata  <[email protected]>
2384
2385         * coff-arm.c: Fix formatting.
2386         * coff-ppc.c: Likewise.
2387         * coff-rs6000.c: Likewise.
2388         * coff-sh.c: Likewise.
2389         * coff-sparc.c: Likewise.
2390         * coff-tic30.c: Likewise.
2391         * coff-tic54x.c: Likewise.
2392         * coff-tic80.c: Likewise.
2393         * coff-w65.c: Likewise.
2394         * coff-we32k.c: Likewise.
2395         * coff-z8k.c: Likewise.
2396
2397 2000-11-15  Richard Henderson  <[email protected]>
2398
2399         * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
2400         section with the same ALLOC|LOAD flags as the source section.
2401
2402 2000-11-14  Jakub Jelinek  <[email protected]>
2403
2404         * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
2405         by STO_ALPHA constants.
2406
2407 2000-11-14  Kazu Hirata  <[email protected]>
2408
2409         * coff-pmac.c: Fix formatting.
2410         * coff-ppc.c: Likewise.
2411
2412 2000-11-13  H.J. Lu  <[email protected]>
2413
2414         * elflink.h (elf_link_add_object_symbols): Also add indirect
2415         symbols for common symbols with the default version.
2416
2417 2000-11-09  Philip Blundell  <[email protected]>
2418
2419         * section.c (STD_SECTION): Set gc_mark flag.
2420
2421 2000-11-11  Kazu Hirata  <[email protected]>
2422
2423         * coff-i960.c: Likewise.
2424         * coff-m68k.c: Likewise.
2425         * coff-m88k.c: Likewise.
2426         * coff-mcore.c: Likewise.
2427         * coff-mips.c: Likewise.
2428
2429 2000-11-11  Bernd Schmidt  <[email protected]>
2430
2431         * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
2432
2433 2000-11-10  Kazu Hirata  <[email protected]>
2434
2435         * coff-h8300.c: Fix formatting.
2436         * coff-h8500.c: Likewise.
2437         * coff-i386.c: Likewise.
2438         * coff-i860.c: Likewise.
2439         * coff-i960.c: Likewise.
2440         * coff-ia64.c: Likewise.
2441
2442 2000-11-09  Kazu Hirata  <[email protected]>
2443
2444         * archive.c: Fix formatting.
2445         * archures.c: Likewise.
2446
2447 2000-11-07  Richard Henderson  <[email protected]>
2448
2449         * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
2450         Set it before bfd_elf64_bfd_final_link call.  Use it after the call.
2451         * section.c (bfd_set_section_contents): Call memcpy if
2452         section->contents set and location not equal to contents plus offset.
2453
2454 2000-11-08  Kazu Hirata  <[email protected]>
2455
2456         * bfd-in.h: Fix formatting.
2457         * bfd-in2.h: Likewise.
2458         * bfd.c: Likewise.
2459         * binary.c: Likewise.
2460         * bout.c: Likewise.
2461         * coff-a29k.c: Likewise.
2462         * coff-alpha.c: Likewise.
2463         * coff-apollo.c: Likewise.
2464         * coff-aux.c: Likewise.
2465
2466 2000-11-07  Kazu Hirata  <[email protected]>
2467
2468         * aix386-core.c: Fix formatting.
2469         * aoutf1.h: Likewise.
2470         * aoutx.h: Likewise.
2471         * archures.c: Likewise.
2472         * armnetbsd.c: Likewise.
2473
2474 2000-11-07  Alan Modra  <[email protected]>
2475
2476         * coff-h8300.c (special): Adjust reloc address.
2477
2478 2000-11-06  Steve Ellcey <[email protected]>
2479
2480         * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
2481         to differentiate elf32 and elf64 on ia64.
2482         * bfd-in2.h: Regenerate.
2483         * config.bfd: Add target for "ia64*-*-hpux*".
2484         * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
2485         * configure: Regenerate.
2486         * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
2487         * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
2488
2489         * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
2490         from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
2491         * Makefile.in: Regnerate.
2492         * elf64-ia64.c: Deleted.
2493         * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
2494
2495 2000-11-06  Kazu Hirata  <[email protected]>
2496
2497         * aout-adobe.c: Fix formatting.
2498         * aout-arm.c: Likewise.
2499         * aout-cris.c: Likewise.
2500         * aout-encap.c: Likewise.
2501         * aout-ns32k.c: Likewise.
2502         * aout-target.h: Likewise.
2503         * aout-tic30.c: Likewise.
2504
2505 2000-11-05  Philip Blundell  <[email protected]>
2506
2507         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
2508         BFDs containing no sections to be merged, regardless of their flags.
2509
2510 2000-11-04  Philip Blundell  <[email protected]>
2511
2512         * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
2513         if a relocation for an undefined symbol also results in an
2514         overflow.
2515
2516 2000-11-06  Christopher Faylor <[email protected]>
2517
2518         * config.bfd: Add support for Sun Chorus.
2519
2520 2000-11-05  David O'Brien  <[email protected]>
2521
2522         * configure.in: Recognize alpha-*-freebsd*.
2523         * configure: Regenerate.
2524
2525 2000-11-02  Luciano Gemme <[email protected]>
2526
2527         * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
2528         (Chunk): New global variable set by a parameter in objcopy.c.
2529         (S3Forced): New global variable set by a parameter in
2530         objcopy.c.
2531         (srec_set_section_contents): If S3Forced is true, always generate
2532         S3 records.
2533         (srec_write_section): Use 'Chunk' to limit maximum length of S
2534         records.
2535
2536 2000-11-02  Per Lundberg  <[email protected]>
2537
2538         * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
2539         * Makefile.in: Regenerate.
2540         * bfd-in2.h: Regenerate.
2541         * po/bfd.pot: Regenerate.
2542
2543 2000-10-31  Philip Blundell  <[email protected]>
2544
2545         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
2546         EF_SOFT_FLOAT if it is defined.
2547
2548 2000-10-27  Philip Blundell  <[email protected]>
2549
2550         * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
2551         attempts to mix PIC code with non-PIC, just mark the output as
2552         being position dependent.
2553         (elf32_arm_merge_private_bfd_data): Likewise.  Print an error
2554         message for EF_SOFT_FLOAT mismatches.  Display diagnostics for
2555         all mismatches, not just the first one.
2556
2557 2000-10-25  Chris Demetriou  <[email protected]>
2558
2559         * ieee.c (ieee_archive_p): Plug one of many possible
2560         memory leaks in error handling.
2561
2562 2000-10-20  Jakub Jelinek  <[email protected]>
2563
2564         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
2565         elf32_sparc_object_p, elf32_sparc_final_write_processing):
2566         Support v8plusb.
2567         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
2568         sparc64_elf_object_p): Support v9b.
2569         * archures.c: Declare v8plusb and v9b machines.
2570         * bfd-in2.h: Ditto.
2571         * cpu-sparc.c: Ditto.
2572
2573 2000-10-16  Geoffrey Keating  <[email protected]>
2574
2575         * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
2576         of a GOT reloc.
2577
2578         * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
2579         (SYMBOL_CALLS_LOCAL): New macro.
2580         (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
2581         (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
2582         (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
2583         (ppc_elf_relocate_section): Use flag variable to determine
2584         whether the relocation refers to a local symbol.
2585         Test whether a PLTREL24 reloc will produce a reloc by looking
2586         to see whether a PLT entry was made.
2587
2588 2000-10-14  Geoffrey Keating  <[email protected]>
2589
2590         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
2591         entries that could serve as a definition for a weak symbol.
2592
2593 2000-10-13  Ulf Carlsson  <[email protected]>
2594
2595         From  Ralf Baechle  <[email protected]>
2596
2597         * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
2598         local_p.  Add symbol value only for non-R_MIPS_REL32 relocations
2599         against local symbols.
2600         (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
2601
2602 2000-10-12  Alan Modra  <[email protected]>
2603
2604         * section.c (struct sec): Add kept_section.
2605         (struct bfd_comdat_info): Remove sec, we can use above.
2606         (STD_SECTION): Add initializer.
2607         (bfd_make_section_anyway): Init here too.
2608
2609         * bfd-in2.h: Regenerate.
2610
2611         * elflink.h (elf_link_add_object_symbols): Remove unnecessary
2612         zeroing of `flags'.
2613         (elf_link_input_bfd): Set all asection->symbol->value's here, and
2614         fudge values for discarded link-once section symbols.
2615
2616         * elf64-hppa.c: Include alloca-conf.h
2617
2618 2000-10-11  Alan Modra  <[email protected]>
2619
2620         * elf.c (swap_out_syms): Revert 2000-10-07 changes.
2621
2622         * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
2623
2624 2000-10-10  Alan Modra  <[email protected]>
2625
2626         * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
2627
2628 2000-10-10  Tom Rix <[email protected]>
2629
2630         * section.c (bfd_make_section_anyway): Release newsect ptr when
2631         newsect->symbol fails to alloc.  Use bfd_release instead of free.
2632
2633 2000-10-09  Richard Henderson  <[email protected]
2634
2635         * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
2636         (elf64_ia64_unwind_entry_compare): New.
2637         (elf64_ia64_final_link): Sort the .IA_64.unwind section.
2638
2639 2000-10-07  Alan Modra  <[email protected]>
2640
2641         * elflink.h (size_dynamic_sections): Don't create various tags if
2642         .dynstr is excluded from the link.  Don't set first dynsym entry
2643         if dynsymcount is zero.
2644         (elf_bfd_final_link): Don't try to swap out dynamic syms if
2645         .dynsym excluded from the link.  Don't try to write any dynamic
2646         sections excluded from the link.
2647
2648         * elf.c (swap_out_syms): Handle global section symbols.
2649
2650 2000-10-05  DJ Delorie  <[email protected]>
2651
2652         * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
2653         * coffcode.h (coff_set_alignment_hook): read extended reloc count
2654         (coff_write_relocs): write extended reloc count
2655         (coff_write_object_contents): account for extended relocs
2656
2657 2000-10-05  Jim Wilson  <[email protected]>
2658
2659         * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
2660         field.
2661         * elf.c (_bfd_elf_make_section_from_shdr): Call the
2662         elf_backend_section_flags function.
2663         * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
2664         code.
2665         (elf64_ia64_section_flags): New function containing flag conversion
2666         code.
2667         (elf_backend_section_flags): Define to elf64_ia64_section_flags.
2668         * elfxx-target.h (elf_backend_section_flags): Define.
2669         (elfNN_bed): Initialize elf_backend_section_flags field.
2670
2671 2000-10-02  Alan Modra  <[email protected]>
2672
2673         * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
2674         _bfd_elf32_gc_record_vtable.  Correct a comment.
2675
2676 2000-10-01  Ulf Carlsson  <[email protected]>
2677
2678         From  Ralf Baechle  <[email protected]>
2679
2680         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
2681         produces binaries with got[1] = 0x80000001 to differenciate them
2682         for the dynamic linker from the broken binaries produced by old
2683         versions.
2684
2685 2000-09-30  Petr Sorfa <[email protected]>
2686
2687         * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
2688         (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
2689         * configure.in: Add check for pxstatus_t and lwpxstatus_t.
2690         * configure: Regenerate.
2691
2692 2000-09-27  Hans-Peter Nilsson  <[email protected]>
2693
2694         Define two bfd_targets for absence and presence of leading
2695         underscore on symbols.  Make sure to only link same kind.
2696         * elf32-cris.c (cris_elf_object_p,
2697         cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
2698         cris_elf_merge_private_bfd_data): New.
2699         (elf_backend_object_p, elf_backend_final_write_processing,
2700         bfd_elf32_bfd_print_private_bfd_data,
2701         bfd_elf32_bfd_merge_private_bfd_data): Define.
2702         <Target vector definition>: Include elf32-target.h twice with
2703         different macro settings:
2704         (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
2705         bfd_elf32_us_cris_vec.
2706         (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
2707         (elf_symbol_leading_char): First as 0, then '_'.
2708         (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
2709         * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
2710         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
2711         * configure: Regenerate.
2712         * targets.c: Declare bfd_elf32_us_cris_vec.
2713         * po/bfd.pot: Regenerate.
2714
2715 2000-09-29  Momchil Velikov  <[email protected]>
2716
2717         * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
2718         R_ARM_THM_PC22 relocations.
2719
2720 2000-09-29  NIIBE Yutaka <[email protected]>
2721
2722         * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
2723
2724 2000-09-29  Momchil Velikov <[email protected]>
2725
2726         * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
2727         is has the SEC_HAS_CONTENTS flag set.
2728
2729 2000-09-28  \81Örjan Friberg  <[email protected]>
2730             Hans-Peter Nilsson  <[email protected]>
2731
2732         * aout-cris.c (N_TXTADDR): Define.
2733
2734 2000-09-28  John David Anglin <[email protected]>
2735
2736         * som.c: Include alloca-conf.h.
2737         * Makefile.am: "make dep-am"
2738         * Makefile.in: Regenerate.
2739
2740 2000-09-27  Alan Modra  <[email protected]>
2741
2742         * elf32-hppa.c (plt_stub): New.
2743         (PLT_STUB_ENTRY): Define.
2744         (elf32_hppa_link_hash_table): Change multi_subspace to packed
2745         boolean.  Add need_plt_stub, has_12bit_branch and has_17bit_branch.
2746         (elf32_hppa_link_hash_table_create): Init to suit.
2747         (elf32_hppa_check_relocs): Set has_12bit_branch and
2748         has_17bit_branch as appropriate.
2749         (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
2750         non-local functions.
2751         (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
2752         Add space for plt_stub as needed.
2753         (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
2754         functions at plt_stub.
2755         (elf32_hppa_finish_dynamic_sections): Write plt_stub.
2756         (elf32_hppa_create_dynamic_sections): Leave .plt executable.
2757
2758         * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
2759         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.  Use it instead
2760         of fixed size, and if negative, disable handling of input sections
2761         before stub section.  Set up default stub group size depending
2762         on detected branch relocs.
2763         (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
2764         ensure different offsets from sym_value aren't rounded to
2765         different 2k blocks.  Use lrsel and rrsel for other stubs too for
2766         consistency rather than necessity.
2767         (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
2768         (final_link_relocate): Likewise.
2769         (elf32_hppa_relocate_section): Likewise.
2770
2771         * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
2772         (_bfd_elf_hppa_gen_reloc_type): Generate them.
2773         (elf_hppa_final_link_relocate): Handle them.
2774         (elf_hppa_relocate_insn): Likewise.
2775         (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
2776
2777 2000-09-26  Hans-Peter Nilsson  <[email protected]>
2778
2779         * elfcode.h (elf_object_p): Preserve and clear abfd section
2780         information.  Restore at error.
2781
2782 2000-09-26  Paul Sokolovsky  <[email protected]>
2783
2784         * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
2785         is empty, make sure that its rva also 0. NT loader dislikes
2786         having otherwise.
2787
2788 2000-09-26  Steve Ellcey <[email protected]>
2789
2790         * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
2791         global by default.
2792
2793 2000-09-21  Alan Modra  <[email protected]>
2794
2795         * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
2796         currently unused RELATIVE_DYNAMIC_RELOCS code.
2797         (hppa_discard_copies): Likewise.
2798         (elf32_hppa_size_stubs): Size `input_list' array correctly.  Correct
2799         comments.  Don't check non-code output sections for stub grouping.
2800
2801 2000-09-20  Alan Modra  <[email protected]>
2802
2803         * section.c (bfd_get_unique_section_name): Return NULL if
2804         bfd_malloc fails.
2805
2806 2000-09-19  Michael Sokolov  <[email protected]>
2807
2808         * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
2809         instruction sequence to actually work.
2810         (elf_m68k_finish_dynamic_sections): Change the patch-in offset
2811         accordingly.
2812
2813 2000-09-18  Alexandre Oliva  <[email protected]>
2814
2815         * elf32-sh.c (sh_elf_relocate_section): Use
2816         _bfd_final_link_relocate to apply the relocation against a section
2817         symbol, when doing relocatable links.
2818
2819 2000-09-18  Alan Modra  <[email protected]>
2820
2821         * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
2822         to id_sec.
2823         (stub_hash_newfunc): Here too.
2824         (hppa_add_stub): And here.
2825         (elf32_hppa_link_hash_table): Remove stub_section_created,
2826         reloc_section_created, first_init_sec and first_fini_sec.  Add
2827         stub_group.
2828         (elf32_hppa_link_hash_table_create): Init to suit.
2829         (hppa_get_stub_entry): Add support for grouping stub sections.
2830         (hppa_add_stub): Likewise.  Remove sec_count param and init/fini
2831         section code.  Index stub vars by section->id.
2832         (elf32_hppa_size_stubs): Likewise.  Remove duplicated function
2833         exit paths.  Zap allocation of above removed vars.  Refine
2834         link-once test.
2835
2836         * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
2837         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
2838         (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
2839         rather than pointer to bfd_link_info.
2840         (hppa_add_stub): Likewise.
2841         (final_link_relocate): Likewise.
2842
2843 2000-09-17  David Huggins-Daines  <[email protected]>
2844
2845         (elf32_hppa_size_stubs): Don't try to build stubs for discarded
2846         link-once sections.
2847
2848 2000-09-16  Alexandre Oliva  <[email protected]>
2849
2850         * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
2851         ld/emulparams/shelf.sh.
2852
2853 2000-09-10  Michael Sokolov  <[email protected]>
2854
2855         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
2856         * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
2857         * bfd-in2.h: Regenerate.
2858
2859 2000-09-15  Kenneth Block  <[email protected]>
2860
2861         * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
2862         LITUSE relocations incorrectly if -relax is specified on the ld
2863         command line and the displacement field of the load or store
2864         instruction is non-zero. (Patch by [email protected])
2865
2866 2000-09-15  Alan Modra  <[email protected]>
2867
2868         * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
2869         first_fini_sec here.
2870         (elf32_hppa_size_stubs): Instead correctly find the first .init
2871         and .fini section here.
2872
2873 2000-09-15  David Huggins-Daines  <[email protected]>
2874
2875         * elf32-hppa.c (clobber_millicode_symbols): New function.
2876         (elf32_hppa_size_dynamic_sections): Call it.
2877
2878 2000-09-14  Alan Modra  <[email protected]>
2879
2880         * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
2881         packed.  Add plabel, plt_abs packed booleans.
2882         (hppa_link_hash_newfunc): Init new fields.
2883         (PLABEL_PLT_ENTRY_SIZE): Define.
2884         (hppa_stub_name): Use size_t len vars.
2885         (hppa_add_stub): Likewise.
2886         (elf32_hppa_build_stubs): Likewise.
2887         (hppa_build_one_stub): Kill some compiler warnings.
2888         (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
2889         if dynamic linking.  Munge the local plt offsets into
2890         local_got_refcounts.  Set h->plabel for all global PLABELs.  Use
2891         size_t len vars.  Add assert for plabel addend.
2892         (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
2893         (elf32_hppa_hide_symbol): New function.
2894         (elf_backend_hide_symbol): Define.
2895         (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
2896         with h->plabel set.  Don't make plt entries to have dynamic syms
2897         when they have been forced local.  If plt entry is used by a
2898         plabel, make it PLABEL_PLT_ENTRY_SIZE.
2899         (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
2900         Set up .plt offsets for local syms.
2901         (elf32_hppa_relocate_section): Initialise plt entries for local
2902         syms.  Leave weak undefined plabels zero.  Make global plabel
2903         relocs against function symbol, and leave the addend zero.
2904         Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
2905         (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
2906         non-dynamic syms.  Init extra plt for plabels.  Use *ABS* DIR32
2907         relocs instead of SEGREL32 for dynamic got relocs.
2908         (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
2909         (elf_backend_got_header_size): Adjust.
2910         (elf32_hppa_set_gp): Calculate an "ideal" LTP.
2911
2912         * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
2913         (hppa_type_of_stub): Use it instead of #if 0
2914         (hppa_discard_copies): Use it here too.
2915         (elf32_hppa_size_dynamic_sections): And here.
2916
2917         * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
2918         (elf32_hppa_link_hash_table_create): And here.
2919         (hppa_build_one_stub): And here.  Instead keep track of stub
2920         offset using _raw_size.
2921         (elf32_hppa_size_stubs): Likewise.
2922         (elf32_hppa_build_stubs): Likewise.
2923         (hppa_size_one_stub): Likewise.  Resize reloc section too.
2924
2925         * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
2926         first_fini_sec handling.  Don't search for reloc section or set
2927         hplink->reloc_section_created here.
2928         (elf32_hppa_size_stubs): Instead search for reloc sections, and
2929         set reloc_section_created here.
2930         (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
2931         (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
2932         and DT_FINI.
2933         (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
2934
2935         * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
2936         with `hplink->root.'.
2937         (elf32_hppa_check_relocs): Likewise.
2938         (elf32_hppa_gc_sweep_hook): Likewise.
2939         (elf32_hppa_adjust_dynamic_symbol): Likewise.
2940         (hppa_handle_PIC_calls): Likewise.
2941         (elf32_hppa_size_dynamic_sections): Likewise.
2942         (elf32_hppa_set_gp): Likewise.
2943         (elf32_hppa_relocate_section): Likewise.
2944         (elf32_hppa_finish_dynamic_symbol): Likewise.
2945         (elf32_hppa_finish_dynamic_sections): Likewise.
2946
2947         From  David Huggins-Daines  <[email protected]>
2948         * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
2949         defined weak symbols in shared links.
2950         (final_link_relocate): Calls to defined weak symbols in shared
2951         objects must go via import stubs, as the target might not be known
2952         at link time.
2953
2954 2000-09-14  Alexandre Oliva  <[email protected]>
2955
2956         * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
2957         R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
2958         R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
2959         the original entries with EMPTY_HOWTOs, and added new ones to fill
2960         in the gap.
2961         (sh_elf_info_to_howto): Make sure the new gap isn't used.
2962         (sh_elf_relocate_section): Likewise.
2963
2964 2000-09-13  Anders Norlander  <[email protected]>
2965
2966         * cpu-mips.c (arch_info_struct): Add mips:4K
2967         * bfd-in2.h (bfd_mach_mips4K): New define.
2968         * archures.c: Add bfd_mach_mips4K to comment.
2969         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
2970         E_MIPS_ARCH_2 for bfd_mach_mips4K.
2971
2972 2000-09-13  Marco Franzen <[email protected]>
2973
2974         * som.c (som_write_symbol_strings): Do not used fixed buffers,
2975         use size_t as a counter.
2976         (som_write_space_strings): Similarly.
2977
2978 2000-09-12  Jason Eckhardt  <[email protected]>
2979
2980         * elf32-i860.c (elf32_i860_relocate_pc26): New function
2981         and prototype.
2982         (elf32_i860_relocate_section): Invoke new function from here.
2983
2984 2000-09-11  Michael Sokolov  <[email protected]>
2985
2986         * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
2987         static.
2988
2989 2000-09-10  Michael Sokolov  <[email protected]>
2990
2991         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
2992         target section name instead of dumping core when the target symbol is
2993         undefined.
2994
2995 2000-09-09  Kazu Hirata  <[email protected]>
2996
2997         * riscix.c: Remove DEFUN.
2998
2999 2000-09-08  Nick Clifton  <[email protected]>
3000
3001         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
3002         initialise flags in output bfd if the input bfd is the default
3003         architecture with the default flags.
3004
3005 2000-09-08  Kazu Hirata  <[email protected]>
3006
3007         * archive.c: Fix formatting.
3008         * coff-arm.c: Likewise.
3009         * doc/chew.c: Likewise.
3010
3011 2000-09-08  Alan Modra  <[email protected]>
3012
3013         * section.c (bfd_get_unique_section_name): Put a dot before the
3014         numeric suffix.
3015
3016 2000-09-07  Kazu Hirata  <[email protected]>
3017
3018         * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
3019         * elf.c: Fix formatting.
3020
3021 2000-09-07  Alexandre Oliva  <[email protected]>
3022
3023         * config.bfd (sh-*-linux*): Added.
3024         * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
3025         * targets.c: Declare them.
3026         * elf32-sh-lin.c: New file.
3027         * Makefile.am: Compile it.
3028         * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
3029         * configure, Makefile.in: Rebuilt.
3030
3031 2000-09-06  Geoffrey Keating  <[email protected]>
3032
3033         * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
3034         pseduo-section when determining where the TOC ends.
3035
3036         * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
3037         output x_tvndx as it is only two bytes wide.
3038
3039         * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
3040         reloc is 26 or 32 bits wide.
3041
3042         * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
3043         for relocs that don't change anything.  Also look at the full
3044         6 bits of bitsize.
3045
3046 2000-09-06  Philip Blundell  <[email protected]>
3047
3048         * config.bfd (arm*-*-uclinux*): New target.
3049
3050 2000-09-06  Alexandre Oliva  <[email protected]>
3051
3052         * configure: Rebuilt with new libtool.m4.
3053
3054 2000-09-06  Alan Modra  <[email protected]>
3055
3056         * section.c (bfd_get_unique_section_name): Avoid c++ reserved
3057         word for variable name.
3058         * bfd-in2.h: Regenerate.
3059
3060 2000-09-05  Nick Clifton  <[email protected]>
3061
3062         * config.in: Regenerate.
3063         * libbfd.h: Regenerate.
3064         * po/bfd.pot: Regenerate.
3065         * doc/bfdint.texi: Remove CVS date string - it foils compares with
3066         local versions.
3067
3068 2000-09-05  Steven Johnson  <[email protected]>
3069
3070         * cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
3071
3072 2000-09-05  Alan Modra  <[email protected]>
3073
3074         Shared library and PIC support.
3075         * elf32-hppa.c (PLT_ENTRY_SIZE): New.
3076         (GOT_ENTRY_SIZE): New.
3077         (ELF_DYNAMIC_INTERPRETER): New.
3078         (STUB_SUFFIX): Define.
3079         (LONG_BRANCH_PIC_IN_SHLIB): Define.
3080         (RELATIVE_DYNAMIC_RELOCS): Define.
3081         (enum elf32_hppa_stub_type): New.
3082         (struct elf32_hppa_stub_hash_entry): Rename offset to
3083         stub_offset.  Add a number of new fields.
3084         (struct elf32_hppa_link_hash_entry): New.
3085         (struct elf32_hppa_link_hash_table): Add numerous fields.  Remove
3086         global_value.
3087         (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
3088         (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
3089         (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc.  Init
3090         new fields.
3091         (hppa_link_hash_newfunc): New function.
3092         (elf32_hppa_link_hash_table_create): Use above function. Init new
3093         fields.
3094         (elf32_hppa_stub_name): Rename to hppa_stub_name.  Pass in reloc
3095         instead of addend, and remove sym_name from args.  Don't use
3096         symbol name for local syms, instead use sym index.
3097         (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
3098         stub type rather than size.  Pass in hash and handle import stub
3099         case.  Also pass in reloc instead of offset so we can calculate
3100         PCREL22F and PCREL12F branches properly.
3101         (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub.  Build
3102         import and export stubs too.
3103         (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub.  Handle
3104         import and export stub sizing.
3105         (elf32_hppa_check_relocs): New function.
3106         (elf32_hppa_adjust_dynamic_symbol): New function.
3107         (hppa_discard_copies): New function.
3108         (elf32_hppa_size_dynamic_sections): New function.
3109         (elf_backend_size_dynamic_sections): Define.
3110         (elf32_hppa_finish_dynamic_symbol): New function.
3111         (elf_backend_finish_dynamic_symbol): Define.
3112         (elf32_hppa_size_stubs): Stash params in link hash table, and move
3113         some local vars into the link hash table too.  For shared links,
3114         trundle over function syms, generating export stubs.  Handle
3115         PCREL22F branches.  Break out stub creation code from here..
3116         (hppa_add_stub): .. to here.  New function.
3117         (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
3118         call the bfd linker.  Use elf_gp to record global pointer.
3119         Calculate a value from sections if $global$ is missing.
3120         (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
3121         (elf32_hppa_gc_mark_hook): New function.
3122         (elf_backend_gc_mark_hook): Define.
3123         (elf32_hppa_gc_sweep_hook): New function.
3124         (elf_backend_gc_sweep_hook): Define.
3125         (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
3126         Add rel to args, and remove howto, input_bfd, offset, addend,
3127         sym_name as we can recalculate these locally.  Handle calls to
3128         dynamic objects, extra PIC relocs, PCREL22F branches.  Change
3129         handling of undefined weak syms.  Check that stubs are in range.
3130         Only look for import stubs on PCREL17F and PCREL22F relocs.  Add
3131         message on hitting a DPREL21L reloc that needs fixing.  Subtract
3132         off PC for PCREL14F.  Break out code that does a stub lookup from
3133         here..
3134         (hppa_get_stub_entry): ..to here.  New function.
3135         (elf32_hppa_relocate_insn): Merge into final_link_relocate.
3136         (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
3137         relocs, etc. etc.
3138         (elf32_hppa_finish_dynamic_sections): New function.
3139         (elf_backend_finish_dynamic_sections): Define.
3140         (elf_backend_final_write_processing) Define.
3141         (hppa_handle_PIC_calls): New function.
3142         (elf32_hppa_build_stubs): Call it.  Pass link_info to
3143         hppa_build_one_stub.
3144         (elf32_hppa_create_dynamic_sections): New function
3145         to create .plt and .got then set .plt flags correctly.
3146         (elf_backend_create_dynamic_sections): Define.
3147         (elf32_hppa_object_p): New function.
3148         (elf_backend_object_p): Define.
3149         (elf32_hppa_elf_get_symbol_type): New function.
3150         (elf_backend_get_symbol_type): Define.
3151         (elf_backend_can_gc_sections): Define.
3152         (elf_backend_want_got_plt): Define.
3153         (elf_backend_plt_alignment): Set to 2.
3154         (elf_backend_plt_readonly): Define.
3155         (elf_backend_want_plt_sym): Define.
3156         (elf_backend_got_header_size): Reserve one entry.
3157
3158         * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
3159         (elf32_hppa_size_stubs): Pass in multi_subspace.
3160         (elf32_hppa_set_gp): Declare.
3161
3162         * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
3163         (bfd_get_unique_section_name): New function.
3164         * bfd-in2.h: Regenerate.
3165
3166         * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
3167         (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
3168         comment.
3169
3170         From  David Huggins-Daines  <[email protected]>
3171         * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
3172         (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
3173         (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
3174         been updated in finish_dynamic_symbol before modifying function
3175         symbol.
3176
3177         * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
3178         eight entries.  Replace NULL with bfd_elf_generic_reloc.  Add
3179         R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
3180         (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*.  Add some
3181         comments.  Handle format == 12 for R_HPPA_PCREL_CALL.
3182         (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
3183         (elf_hppa_relocate_insn): Likewise.  Reformat some comments.
3184         (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
3185
3186         From David Huggins-Daines  <[email protected]>
3187         * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
3188         style of local labels as well.
3189
3190 2000-09-03  Philip Blundell  <[email protected]>
3191
3192         * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
3193         references to undefined symbols in debugging sections.
3194
3195 2000-09-02  H.J. Lu  <[email protected]>
3196
3197         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
3198         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
3199         BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
3200         section.
3201
3202 2000-09-02  Jason Eckhardt  <[email protected]>
3203
3204         * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
3205         (elf32_i860_is_local_label_name): New function and prototype.
3206
3207 2000-09-02  Nick Clifton  <[email protected]>
3208
3209         * configure.in: Increase version number to 2.10.91.
3210         * configure: Regenerate.
3211         * aclocal.m4: Regenerate.
3212         * config.in: Regenerate.
3213         * po/bfd.pot: Regenerate.
3214
3215 2000-09-02  Daniel Berlin <[email protected]>
3216
3217         * elf.c (_bfd_elf_make_section_from_shdr): Add
3218         .gnu.linkobce.wi. to the list of debug section names.
3219
3220 2000-09-02  Nick Clifton  <[email protected]>
3221
3222         * dwarf2.c (find_debug_info): New function: Locate a section
3223         containing dwarf2 debug information.
3224         (bfd_dwarf2_find_nearest_line): Find all sections containing
3225         debug information and include them in the stash.
3226
3227 2000-09-01  Niibe Yutaka  <[email protected]>, Kaz Kojima  <[email protected]>, Alexandre Oliva  <[email protected]>
3228
3229         * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
3230         R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
3231         (sh_reloc_map): Add new relocs.
3232         (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
3233         sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
3234         sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
3235         sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
3236         functions.
3237         (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
3238         (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
3239         elf_sh_plt_entry_be, elf_sh_plt_entry_le,
3240         elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
3241         New array constants.
3242         (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
3243         New variables.
3244         (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
3245         elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
3246         elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
3247         elf_sh_plt_reloc_offset): Define.
3248         (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
3249         elf_sh_link_hash_table): New structs.
3250         (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
3251         (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
3252         relocation types.
3253         (elf_backend_create_dynamic_sections,
3254         bfd_elf32_bfd_link_hash_table_create,
3255         elf_backend_adjust_dynamic_symbol,
3256         elf_backend_size_dynamic_sections,
3257         elf_backend_finish_dynamic_symbol,
3258         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
3259         elf_backend_plt_readonly, elf_backend_want_plt_sym,
3260         elf_backend_got_header_size, elf_backend_plt_header_size):
3261         Define.
3262         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
3263         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
3264         New relocs.
3265         * bfd-in2.h, libbfd.h: Rebuilt.
3266
3267 2000-09-01  Alan Modra  <[email protected]>
3268
3269         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
3270         change.
3271
3272 2000-08-31  J"orn Rennecke <[email protected]>
3273
3274         * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
3275         not initialized, set them to indicate the SH1 instruction set.
3276
3277 2000-08-31  Alexandre Oliva  <[email protected]>
3278
3279         * acinclude.m4: Include libtool and gettext macros from the
3280         top level.
3281         * aclocal.m4, configure: Rebuilt.
3282
3283 2000-08-29  Michael Snyder  <[email protected]>
3284
3285         * elf.c: Eliminate references to __sparcv9 macro; replace with
3286         autoconf variables HAVE_PSINFO32_T etc.
3287         * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
3288         HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
3289         * config.in: Ditto.
3290         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
3291         detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
3292         * aclocal.m4: Ditto.
3293         * configure: Regenerate.
3294
3295 2000-08-27  Alan Modra  <[email protected]>
3296
3297         * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
3298         for any shared link, not just shared -Bsymbolic.
3299         (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
3300         any shared link, and pass link info to it.
3301         (elf_i386_size_dynamic_sections): Update comment.
3302         (elf_i386_discard_copies): Modify to discard relocs for symbols
3303         that have been forced local.
3304         (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
3305         that have been forced local.
3306
3307 2000-08-24  Denis Chertykov  <[email protected]> & Nick Clifton  <[email protected]>
3308
3309         * elflink.h (elf_link_add_object_symbols): Allow common
3310         symbols to have an alignment of 1 if explicitly requested, and
3311         not overridden by other definitions.
3312
3313 2000-08-22  Doug Kwan <[email protected]>
3314
3315         * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
3316         * coffcode.h (coff_set_flags): Add detection of w65 architecture.
3317
3318 2000-08-22  H.J. Lu  <[email protected]>
3319
3320         * elf-bfd.h (elf_link_hash_table): Add runpath.
3321
3322         * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
3323         * bfd-in2.h: Rebuilt.
3324
3325         * elf.c (_bfd_elf_link_hash_table_init): Initialize the
3326         "runpath" field to NULL.
3327         (bfd_elf_get_runpath_list): New function.
3328
3329         * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
3330         DT_RUNPATH entries.
3331
3332 2000-08-22  Alexandre Oliva  <[email protected]>
3333
3334         * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
3335         R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
3336         explicitly.  Improve validation of r_type.
3337
3338 2000-08-21  H.J. Lu  <[email protected]>
3339
3340         * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
3341         dynamic allocated content space.  Add a comment to remind us that
3342         one day this ought to be fixed.
3343         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
3344         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
3345         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
3346
3347 2000-08-21  Jason Eckhardt  <[email protected]>
3348
3349         * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
3350         field with the newly relocated value instead of adding it to the
3351         existing immediate field.
3352         (elf32_i860_relocate_splitn): Likewise.
3353         (elf32_i860_relocate_highadj): Likewise.
3354
3355 2000-08-16  Jason Eckhardt  <[email protected]>
3356
3357         * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
3358         was previously just a stub).
3359
3360 2000-08-16  Alexandre Oliva  <[email protected]>
3361
3362         * elflink.c (_bfd_elf_create_got_section): Don't abort().
3363         Formatting fixes.
3364         (_bfd_elf_create_dynamic_sections): Likewise.
3365
3366 2000-08-16  Andrew Macleod  <[email protected]>
3367
3368         * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
3369         for undefined symbols to be the beginning of the section.
3370
3371         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
3372         four extra entries at the beginning of the .rela.plt section.
3373         (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
3374         section to account for the four reserved entries in the .plt section.
3375
3376 2000-08-15  Geoffrey Keating  <[email protected]>
3377
3378         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
3379         to the list of NOPs we recognize after a branch-and-link.
3380         Use the ori NOP when one is needed.
3381
3382         * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
3383         for large archives.
3384
3385 2000-08-14  Jim Wilson  <[email protected]>
3386
3387         * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
3388         EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
3389         (elf64_ia64_print_private_bfd_data): Likewise.  Also handle
3390         EF_IA_64_ABSOLUTE.
3391
3392 2000-08-11  Alexandre Oliva  <[email protected]>
3393
3394         * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
3395
3396 2000-08-10  Jason Eckhardt  <[email protected]>
3397
3398         * elf32-i860.c (elf32_i860_relocate_section): New function.
3399         (i860_final_link_relocate): New function.
3400         (elf32_i860_relocate_splitn): New function.
3401         (elf32_i860_relocate_pc16): New function.
3402         (elf32_i860_relocate_highadj): New function.
3403         (elf32_i860_howto): Minor adjustments to some relocations.
3404         (elf_info_to_howto_rel): Define.
3405         (elf_backend_relocate_section): Define.
3406
3407 2000-08-10  Nick Clifton  <[email protected]>
3408
3409         * elf32-arm.h: Fix formatting.
3410
3411 2000-08-10  Bernd Schmidt  <[email protected]>
3412
3413         * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
3414
3415 2000-08-08  Jason Eckhardt  <[email protected]>
3416
3417         * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
3418
3419 2000-08-07  Kazu Hirata  <[email protected]>
3420
3421         * ieee.c (ieee_write_debug_part): Rewrite a comment.
3422         * elf64-ia64.c: Fix a typo.
3423
3424 2000-08-05  Jason Eckhardt  <[email protected]>
3425
3426         * elf32-i860.c (elf32_i860_howto_table): New structure.
3427         (lookup_howto): New function.
3428         (elf32_i860_reloc_type_lookup): New function.
3429         (elf32_i860_info_to_howto_rela): New function.
3430         (elf_code_to_howto_index): New structure.
3431         (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
3432         (bfd_elf32_bfd_reloc_type_lookup): Re-define as
3433         elf32_i860_reloc_type_lookup.
3434
3435 2000-08-04  Rodney Brown  <[email protected]>
3436
3437         * som.c (struct fixup_format): Constify `format'.
3438         (som_hppa_howto_table): Use SOM_HOWTO macro.
3439         (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
3440         (som_bfd_reloc_type_lookup): Likewise.
3441         (compare_subspaces): Remove unused `count1', `count2'.
3442         (som_begin_writing): Remove unused `total_reloc_size'.
3443         (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
3444         (som_print_symbol, som_bfd_is_local_label_name): Likewise.
3445         (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
3446         (som_find_nearest_line): Decorate unused parameter(s).
3447         (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
3448         (som_bfd_link_split_section): Likewise.
3449
3450 2000-08-03  Nick Clifton  <[email protected]>
3451
3452         * section.c: Restore backed out code.
3453         * elf.c: Restore backed out code.
3454         (copy_private_bfd_data): Fix bug preventing stipped dynamic
3455         binaries from working.
3456         * bfd-in2.h: Regenerate.
3457
3458 2000-08-03  H.J. Lu  <[email protected]>
3459
3460         * section.c: Back out the change made by Nick Clifton
3461         <[email protected]> on 2000-07-31. It breaks stripping dynamic
3462         binaries.
3463         * bfd-in2.h: Likewise.
3464         * elf.c: Likewise.
3465
3466 2000-08-03  Alexandre Oliva  <[email protected]>
3467
3468         * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
3469
3470 2000-07-31  Jason Eckhardt  <[email protected]>
3471
3472         * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
3473         * bfd-in2.h, libbfd.h: Regenerate.
3474
3475 2000-07-31  Nick Clifton  <[email protected]>
3476
3477         * section.c (struct sec): Add new boolean field 'segment_mark'.
3478         (STD_SECTION): Initialise new field to zero.
3479
3480         * bfd-in2.h: Regenerate.
3481
3482         * elf.c (copy_private_bfd_data): Reorganise section to segment
3483         mapping to cope with moved sections requiring new segments,
3484         and overlapping segments.
3485         (SEGMENT_END): New macro: Return the end address of a segment.
3486         (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
3487         contains a section by comparing their VMA addresses.
3488         (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
3489         contains a section by comparing their LMA addresses.
3490         (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
3491         section should be included in a segment.
3492         (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
3493         follows another in memory.
3494         (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
3495         segments overlap.
3496
3497 2000-07-22  Jason Eckhardt  <[email protected]>
3498
3499         * cpu-i860.c: Added comments.
3500
3501         * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
3502         bfd_elf32_i860_little_vec.
3503         (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
3504         (ELF_MAXPAGESIZE): Changed to 4096.
3505
3506         * targets.c (bfd_elf32_i860_little_vec): Declaration of
3507         new target.
3508         (bfd_target_vector): Added bfd_elf32_i860_little_vec.
3509
3510         * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
3511         config for little endian elf32 i860.
3512         (targ_defvec): Define for the new config above
3513         as "bfd_elf32_i860_little_vec".
3514         (targ_selvecs): Define for the new config above
3515         as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
3516
3517         * configure.in (bfd_elf32_i860_little_vec): Added recognition
3518         of new target vec.
3519
3520         * configure: Regenerated.
3521
3522 2000-07-27  H.J. Lu  <[email protected]>
3523
3524         * elflink.h (elf_merge_symbol): Take one more argument,
3525         dt_needed, to indicate if the symbol comes from a DT_NEEDED
3526         entry. Don't overide the existing weak definition if dt_needed
3527         is true.
3528         (elf_link_add_object_symbols): Pass dt_needed to
3529         elf_merge_symbol ().
3530
3531 2000-07-27  Nick Clifton  <[email protected]>
3532
3533         * elflink.h (elf_link_size_reloc_section): Zeroes the section's
3534         allocated contents.
3535
3536 2000-07-25  Geoffrey Keating  <[email protected]>
3537
3538         * configure.host (*-*-aix*): AIX has 'long long' always.
3539
3540         * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
3541         (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
3542         (xcoff_write_archive_contents_big): Don't update the offset
3543         of the symbol table, xcoff_write_armap will do it.
3544
3545 2000-07-23  Ulf Carlsson  <[email protected]>
3546
3547         * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
3548         of dynobj for SGI_COMPAT checks.
3549
3550 2000-07-21  Michael Sokolov  <[email protected]>
3551
3552         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
3553         * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
3554         * bfd-in2.h: Regenerate.
3555
3556 2000-07-21  Nick Clifton  <[email protected]>
3557
3558         * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
3559         range symbol indices in relocs and issue an error message.
3560
3561 2000-07-20  H.J. Lu  <[email protected]>
3562
3563         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
3564         info->new_dtags when setting DT_FLAGS_1. It will only be set
3565         by the new linker options. It shouldn't break anything.
3566
3567 2000-07-20  H.J. Lu  <[email protected]>
3568
3569         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
3570         only if info->new_dtags is true.
3571
3572 2000-07-20  H.J. Lu  <[email protected]>
3573
3574         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
3575         DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
3576
3577 2000-07-20  Hans-Peter Nilsson  <[email protected]>
3578
3579         * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
3580         (ALL_MACHINES_CFILES): Add cpu-cris.c.
3581         (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
3582         (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
3583         (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
3584         * Makefile.in: Rebuild.
3585         * aclocal.m4: Rebuild.
3586         * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
3587         * archures.c (enum bfd_architecture): Add bfd_arch_cris.
3588         (bfd_cris_arch): Declare.
3589         (bfd_archures_list): Add bfd_cris_arch.
3590         * bfd-in2.h: Rebuild.
3591         * config.bfd: (cris-*-*): New target.
3592         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
3593         * configure: Rebuild.
3594         * elf.c (prep_headers): Add bfd_arch_cris.
3595         * libbfd.h: Rebuild.
3596         * libaout.h (enum machine_type): Add M_CRIS.
3597         * reloc.c: Add CRIS relocations.
3598         * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
3599         (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
3600         * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
3601         * po/POTFILES.in, po/bfd.pot: Regenerate.
3602
3603 2000-07-19  H.J. Lu  <[email protected]>
3604
3605         * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
3606         DF_TEXTREL if DT_TEXTREL is set.
3607         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
3608         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
3609         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
3610         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
3611         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
3612         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
3613         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
3614         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
3615         * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
3616         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
3617
3618         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
3619         set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
3620         DT_RPATH is set.
3621         Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
3622
3623 2000-07-19  H.J. Lu  <[email protected]>
3624
3625         * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
3626         * bfd-in2.h: Rebuild.
3627
3628         * elf-bfd.h (elf_obj_tdata): Add dt_soname.
3629         (elf_dt_soname): New.
3630
3631         * elf.c (bfd_elf_set_dt_needed_soname): New.
3632
3633         * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
3634         entry if the shared object loaded by DT_NEEDED is used to
3635         resolve the reference in a regular object.
3636
3637 2000-07-19  H.J. Lu  <[email protected]>
3638
3639         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
3640         DT_DEPAUDIT and DT_AUDIT as strings.
3641
3642 2000-07-19  Nick Clifton  <[email protected]>
3643
3644         * format.c: Fix formatting.
3645
3646 2000-07-19  H.J. Lu  <[email protected]>
3647
3648         * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
3649
3650 2000-07-19  H.J. Lu  <[email protected]>
3651
3652         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
3653         DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
3654         DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
3655         DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
3656         DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
3657         DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
3658         DT_FLAGS_1, DT_USED and DT_CHECKSUM.
3659
3660 2000-07-18  Andrew Cagney  <[email protected]>
3661
3662         * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
3663         renamed functions from here...
3664         (assign_section_numbers): Use renamed functions.
3665         (prep_headers): Use renamed functions.
3666
3667         * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
3668         * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
3669         * bfd-in2.h: Regenerate.
3670
3671 2000-07-18  Ulf Carlsson  <[email protected]>
3672
3673         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
3674         parenthesis in if statement.
3675
3676 2000-07-17  Koundinya K  <[email protected]>
3677
3678         Enable the support for Traditional MIPS.
3679         * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
3680         return ict_none appropriately for traditional mips targets.
3681         (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
3682         (STUB_MOVE): Conditionalize for traditonal mips.
3683         (STUB_LI16): Likewise.
3684         (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
3685         room for RTPROC header.
3686         (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
3687         the permission for the PT_DYNAMIC as read, write and execute.
3688         (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
3689         for traditonal mips.
3690         (_bfd_mips_elf_create_dynamic_sections): Add the symbol
3691         _DYNAMIC_LINKING for traditonal mips.
3692         (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
3693         in case of traditonal mips.
3694         (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
3695         entry is required. For a function if PLT is not required then set the
3696         corresponding hash table entry to 0.
3697         (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
3698         traditonal mips.
3699         (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
3700         shared object set the value to 0.
3701         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
3702         _DYNAMIC_LINKING for traditonal mips.
3703         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
3704         for traditonal mips.
3705
3706 2000-07-15  H.J. Lu  <[email protected]>
3707
3708         * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
3709
3710 2000-07-12  Charles Wilson  <[email protected]>
3711
3712         * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
3713         out a structure that is BFD_IN_MEMORY.
3714
3715 2000-07-11  Alan Modra  <[email protected]>
3716
3717         * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
3718         bfd pointer.  Print section id instead of bfd pointer for local
3719         syms.  Prefix addend with `+' for global syms as well as local.
3720         Correct calculation of name component lengths.
3721         (elf64_hppa_check_relocs): Update call to get_dyn_name.
3722
3723         From David Huggins-Daines  <[email protected]>
3724         * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
3725         * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
3726         (elf64_hppa_modify_segment_map): Likewise.
3727
3728 2000-07-11  Andrew Cagney  <[email protected]>
3729
3730         * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
3731         addresses to be "naturally" sign extended.  Return -1 if unknown.
3732         * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
3733         * bfd-in2.h: Regenerate.
3734
3735 2000-07-11  Andrew Cagney  <[email protected]>
3736
3737         * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
3738         and ECOF_SIGNED_64 to list ways to extract an offset.
3739         (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
3740         ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
3741         Update.
3742         * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
3743         * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
3744
3745 2000-07-11  Andrew Cagney  <[email protected]>
3746
3747         * elfcode.h (elf_object_p): Use bfd_set_start_address and not
3748         bfd_get_start_address.
3749         (elf_swap_ehdr_in): Sign extend e_entry when applicable.
3750         (elf_swap_ehdr_out): Ditto.
3751
3752 2000-07-10  Alexander Aganichev  <[email protected]>
3753
3754         * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
3755         compatibility with older binutils.
3756
3757 2000-07-10  Alan Modra  <[email protected]>
3758
3759         * section.c (bfd_make_section_anyway): Start section_id at 0x10.
3760         (STD_SECTION): Avoid negative ids, instead use 0 to 3.
3761
3762         From Ryan Bradetich  <[email protected]>
3763         * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
3764         (parse_line_table): Ditto.
3765         (_bfd_dwarf1_find_nearest_line): Ditto.
3766         * syms.c (cmpindexentry): Remove extra `*' from params.
3767
3768 2000-07-09  Koundinya K  <[email protected]>
3769
3770         * elf32-mips.c (sort_dynamic_relocs): New Function.
3771         (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
3772         via qsort to sort the dynamic relocations in increasing r_symndx
3773         value.
3774
3775 2000-07-09  Alan Modra  <[email protected]>
3776
3777         * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
3778         ATTRIBUTE_UNUSED to unused args.
3779         (get_opd): Likewise.
3780         (get_plt): Likewise.
3781         (get_dlt): Likewise.
3782         (get_stub): Likewise.
3783         (elf64_hppa_adjust_dynamic_symbol): Likewise.
3784         (elf64_hppa_link_output_symbol_hook): Likewise.
3785         (elf64_hppa_check_relocs): Delete unused var.
3786         (elf64_hppa_size_dynamic_sections): Likewise.
3787         (elf64_hppa_finalize_opd): Likewise.
3788         (elf64_hppa_finalize_dynreloc): Likewise.
3789         (elf64_hppa_modify_segment_map): Likewise.
3790         (elf64_hppa_finish_dynamic_sections): Likewise.
3791
3792         * elf-hppa.h (elf_hppa_final_write_processing): Add
3793         ATTRIBUTE_UNUSED to unused args.
3794         (elf_hppa_final_link_relocate): Likewise.
3795         (elf_hppa_record_segment_addrs): Add paretheses.
3796         (elf_hppa_relocate_section): Constify dyn_name.
3797
3798         From  David Huggins-Daines  <[email protected]>
3799         * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
3800         rearrange case statement so that it gets preferred to 32-bit ones.
3801
3802         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
3803         asection->id instead of address of asection structure.
3804         (elf32_hppa_size_stubs): Likewise.
3805
3806         * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
3807         for .init* and .fini*.
3808
3809         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
3810         and addends used in stub names to 32 bits.
3811         (elf32_hppa_size_stubs): Likewise.
3812
3813         * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
3814         twice for R_PARISC_GPREL64.  Use bfd_put_32 for R_PARISC_PCREL32,
3815         not bfd_put_64.  Fix minor comment typo and formatting.
3816
3817         Changes to create multiple linker stubs, positioned immediately
3818         before the section where they are required.
3819         * elf32-hppa.c: Don't include hppa_stubs.h.
3820         (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
3821         (elf32_hppa_stub_hash_table): Delete.
3822         (elf32_hppa_link_hash_entry): Delete.
3823         (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
3824         stub_hash_table, and store the struct here rather than a pointer.
3825         Delete output_symbol_count.  Add offset array.  Change
3826         global_value to a bfd_vma.
3827         (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
3828         (elf32_hppa_stub_hash_traverse): Delete.
3829         (elf32_hppa_name_of_stub): Delete.
3830         (elf32_hppa_link_hash_lookup): Delete.
3831         (elf32_hppa_link_hash_traverse): Delete.
3832         (elf32_hppa_stub_hash_table_init): Delete.
3833         (elf32_hppa_size_of_stub): Pass input section and offset rather
3834         than location and calculate location here.  Don't pass name as all
3835         stubs are now the same size.
3836         (elf32_hppa_stub_hash_newfunc): Init new fields.
3837         (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
3838         too.
3839         (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
3840         comparing against ints.  Rewrite stub handling code.
3841         (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
3842         Case enums to int before comparing against ints.  Remove
3843         bfd_reloc_dangerous case.
3844         (elf32_hppa_build_one_stub): Rewrite.
3845         (elf32_hppa_size_one_stub): New function.
3846         (elf32_hppa_build_stubs): Rewrite.
3847         (elf32_hppa_size_stubs): Pass in linker call-back functions.
3848         Rewrite stub-handling specific code.
3849
3850         * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
3851
3852         * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
3853
3854         * hppa_stubs.h: Delete.
3855         * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
3856         (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
3857         * Makefile.in: Regenerate.
3858
3859         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
3860         e_nlrsel.
3861
3862         * libhppa.h (hppa_field_adjust): Correct e_nsel case.
3863
3864         * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
3865         and section name for bfd_reloc_notsupported error message.
3866         (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
3867         bfd_reloc_notsupported.
3868         (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
3869
3870         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
3871         undefined weak symbols for all relocs.
3872         (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
3873         offsets are relative to one past the delay slot.
3874         (elf32_hppa_size_stubs): Account for reloc addend when calculating
3875         branch destination.  Put addend into stub name too.
3876         (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
3877         adjust by 8 when deciding whether a linker stub is needed.  Put
3878         addend into stub name as for above.
3879
3880         * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
3881         various args and vars.
3882         (elf32_hppa_bfd_final_link_relocate): Here too.
3883         (elf32_hppa_size_stubs): Rename index -> indx.  Use e_indx for
3884         inner block var to avoid shadowing.
3885
3886         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type):  Make `field' arg
3887         unsigned.
3888         * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
3889         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
3890         (elf_hppa_fake_sections): Rename local var to avoid shadowing.
3891
3892         * libhppa.h: Change practically all unsigned ints to plain ints.
3893         Remove tests on gcc version.  Instead use ATTRIBUTE_UNUSED for
3894         prototypes.
3895
3896         From Ryan Bradetich  <[email protected]>
3897         * libhppa.h (hppa_opcode_type): New enum to replace #define's.
3898         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
3899         suit above.
3900         From  David Huggins-Daines  <[email protected]>
3901         * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
3902         to the new OP_* ones.
3903
3904         * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
3905         error exit.  Bail out earlier on plabel relocs that we aren't
3906         interested in.  Don't tell elf32_hppa_stub_hash_lookup to copy
3907         string, and then don't free our copy.
3908         (elf32_hppa_build_one_stub): Make insn unsigned int.
3909
3910         * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
3911         available with BL, not BE and BLE.
3912
3913         * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
3914         code for elf arg relocs.
3915         (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
3916         argument with elf_link_hash_entry h.  Handle undefined weak
3917         symbols.  Move $global$ lookup from here...
3918         (elf32_hppa_relocate_section): ...to here.  Return correct error
3919         message for non-handled relocs.
3920         (elf32_hppa_size_of_stub): Correctly test branch range.  Previous
3921         wrong test was -0x3ffff to +0x40000.
3922
3923         * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
3924         R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
3925         Handle them as such.
3926         (elf_hppa_relocate_insn): Fix a typo.
3927
3928         * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
3929         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
3930         assemble_17, assemble_21): Delete.
3931         Supply defines for all 64 possible opcodes.
3932         (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
3933         formats.  Handle COMICLR.
3934         (hppa_rebuild_insn): Delete bfd argument.  Handle formats 10, -11,
3935         -10, -16, 16, 22.
3936
3937         * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
3938         (elf32_hppa_bfd_final_link_relocate): Major rewrite.
3939         (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
3940         to suit.
3941         (elf32_hppa_size_stubs): Don't free stub_name twice.  Read in all
3942         the local syms - did this code get deleted accidentally?  Ignore
3943         undefined and undefweak syms.
3944
3945         * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
3946         block.  Use it instead of elf64_hppa_hash_table (info).
3947         (elf_hppa_final_link_relocate): Use hppa_info instead of
3948         elf64_hppa_hash_table (info).
3949
3950         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
3951         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
3952         (hppa_rebuild_insn): Mask immediate bits here instead.
3953         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
3954
3955 2000-07-08  Alan Modra  <[email protected]>
3956
3957         * section.c (struct sec): Add id field.  Tidy comment formatting.
3958         (bfd_make_section_anyway): Set id.
3959         (STD_SECTION): Init id too.
3960         Change CONST to const throughout.
3961         * archures.c (bfd_arch_info): Tidy comment.
3962         (bfd_arch_list): Change a CONST to const.
3963         * libbfd-in.h: Tidy comments and replace CONST with const.
3964         * elf-bfd.h: Likewise.
3965         * libbfd.h: Regenerate.
3966         * bfd-in2.h: Regenerate.
3967         * libcoff.h: Regenerate.
3968
3969 2000-07-07  DJ Delorie  <[email protected]>
3970
3971         * archive.c (_bfd_write_archive_contents): Add an informative
3972         comment.
3973
3974 2000-07-06  Kazu Hirata  <[email protected]>
3975
3976         * srec.c: Fix formatting.
3977
3978 2000-06-05  DJ Delorie  <[email protected]>
3979
3980         * MAINTAINERS: new
3981
3982 2000-07-04  Alexandre Oliva  <[email protected]>
3983
3984         * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
3985         value of PC-relative offsets.
3986
3987 2000-07-03  Jim Wilson  <[email protected]>
3988
3989         * elf64-alpha.c (alpha_elf_size_info): New.
3990         (elf_backend_size_info): Define to alpha_elf_size_info.
3991         * elfcode.h (elf_size_info): Change hash bucket size to 4.
3992
3993 2000-07-03  Ulf Carlsson  <[email protected]>
3994
3995         * elf32-mips.c: Include elf32-target.h again for the traditional
3996         MIPS targets.
3997
3998 2000-07-03  Marek Michalkiewicz  <[email protected]>
3999
4000         * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
4001         Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
4002         (avr_info_to_howto_rela): Likewise.
4003         (elf32_avr_gc_mark_hook): Likewise.
4004         (elf32_avr_gc_sweep_hook): Likewise.
4005         (elf32_avr_relocate_section): Likewise.
4006
4007 2000-07-03  Mark Elbrecht  <[email protected]>
4008
4009         * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
4010         an external symbol for a non-shared, non-relocatable link.
4011
4012 2000-07-03  Nick Clifton  <[email protected]>
4013
4014         * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
4015         is an external symbol.
4016         (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
4017         external symbol.
4018
4019 2000-07-03  Kazu Hirata  <[email protected]>
4020
4021         * reloc16.c: Fix formatting.
4022
4023 2000-07-01  Koundinya K  <[email protected]>
4024
4025         * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
4026         to add a new target for traditional mips i.e
4027         bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
4028         * configure.in: Likewise.
4029         * configure: Rebuild.
4030         * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
4031         bfd_target_vector.
4032         (bfd_elf32_tradlittlemips_vec): Likewise.
4033         * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
4034         to see that elfNN_bed does not get redefined even if the target file
4035         is included twice for a chip. See elf32-mips.c.
4036
4037 2000-07-01  Alan Modra  <[email protected]>
4038
4039         * Makefile.am (DEP): Fix 2000-06-22.  grep after running dep.sed
4040         (CLEANFILES): Add DEPA.
4041         * Makefile.in: Regenerate.
4042
4043 2000-06-30  DJ Delorie  <[email protected]>
4044
4045         * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
4046         can't assume the PE header is at 0x80.
4047
4048 2000-06-29  Mark Elbrecht  <[email protected]>
4049
4050         * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
4051
4052 2000-06-28  Mark Elbrecht  <[email protected]>
4053
4054         * go32stub.h: Update stub.
4055
4056 2000-06-26  Marek Michalkiewicz  <[email protected]>
4057
4058         * archures.c (bfd_mach_avr5): Define.
4059         * bfd-in2.h (bfd_mach_avr5): Define.
4060         * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
4061         bfd_mach_avr5, add bfd_mach_avr4.  Update comments.
4062         (compatible): Update comment.  Add missing test.
4063         * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
4064         for avr2 and avr4.  Simplify 8K wrap code.
4065         (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
4066         (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
4067
4068 2000-06-26  Kazu Hirata  <[email protected]>
4069
4070         * coff-h8300.c: Fix formatting.
4071         * cpu-h8300.c: Likewise.
4072
4073 2000-06-24  Alexandre Oliva  <[email protected]>
4074
4075         * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
4076         for local symbols whose names are unknown.
4077
4078 2000-06-22  Alan Modra  <[email protected]>
4079
4080         * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
4081         find one.
4082         * Makefile.in: Regenerate.
4083         * doc/Makefile.in: Regenerate.
4084
4085 2000-06-20  H.J. Lu  <[email protected]>
4086
4087         * Makefile.am: Rebuild dependency.
4088         * Makefile.in: Rebuild.
4089
4090 2000-06-20  Maciej W. Rozycki  <[email protected]>
4091
4092         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
4093         (elf_backend_copy_indirect_symbol): Map to the new function.
4094
4095 2000-06-20  Alan Modra  <[email protected]>
4096
4097         * archive.c (normalize): Correct pointer comparison when checking
4098         for backslashes.
4099         (bfd_bsd_truncate_arname): Likewise.
4100         (bfd_gnu_truncate_arname): Likewise.
4101
4102 2000-06-20  Ulf Carlsson  <[email protected]>
4103
4104         * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
4105         sections elf_{text,data}_{section,symbol}.
4106         * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
4107         (_bfd_mips_elf_hide_symbol): New function.
4108         (elf_backend_hide_symbol): Map to the new function.
4109         (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
4110         definitions of mips_elf_{text,data}_{section,symbol}.
4111         (mips_elf_local_relocation_p): Try to find the direct symbol
4112         based on new check_forced argument.
4113         (mips_elf_calculate_relocation): Use new version of
4114         mips_elf_local_relocation_p.
4115         (mips_elf_relocate_section): Likewise.
4116         (_bfd_mips_elf_relocate_section): Likewise.
4117         (mips_elf_sort_hash_table): Only assert that have enough GOT
4118         space.
4119         (mips_elf_got16_entry): Match all 32 bits to the existing GOT
4120         entry if the relocation based on the new external argument.
4121         (mips_elf_create_dynamic_relocation): Assert that we have a
4122         section contents allocated where we can swap out the dynamic
4123         relocations.
4124         (mips_elf_calculate_relocation): Find the real hash-table entry
4125         correctly by using h->root.root.type.  Only create a dynamic
4126         relocation entry if the symbol is defined in a shared library.
4127         Create an external GOT entry for the GOT16 relocation if the
4128         symbol was forced local.
4129         (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
4130         dynamic index if the symbol was forced local.
4131
4132 2000-06-20  Maciej W. Rozycki  <[email protected]>
4133
4134         * elf32-mips.c: Fix typos in comments.
4135
4136 2000-06-19  Mark Kettenis  <[email protected]>
4137
4138         * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
4139         CORE_VERSION_1.
4140
4141 2000-06-18  Stephane Carrez  <[email protected]>
4142
4143         * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
4144         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
4145         BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
4146         * configure.in (bfd_elf32_m68hc12_vec): Recognize.
4147         (bfd_elf32_m68hc11_vec): Likewise.
4148         * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
4149         Supports 68hc11 & 68hc12  at the same time.
4150         * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
4151         bfd_target_vector.
4152         (bfd_elf32_m68hc11_vec): Likewise.
4153         * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
4154         * archures.c (bfd_m68hc12_arch): Define and register in global list
4155         (bfd_m68hc11_arch): Likewise.
4156         * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
4157         BFD_RELOC_M68HC11_3B): Define.
4158         * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
4159         * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
4160
4161 2000-06-18  Ulf Carlsson  <[email protected]>
4162
4163         * elf_bfd.h (struct elf_backend_data): Add info argument to
4164         elf_backend_hide_symbol.
4165         (_bfd_elf_link_hash_hide_symbol): Likewise.
4166         * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
4167         * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
4168         * elflink.h (elf_link_add_object_symbols): Likewise.
4169         (elf_link_assign_sym_version): Likewise.
4170
4171 2000-06-18  H.J. Lu  <[email protected]>
4172
4173         * coff-i386.c (coff_i386_reloc): Don't return in case of
4174         output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
4175         Compensate PE relocations when linking with non-PE object
4176         files to generate a non-PE executable.
4177
4178 2000-06-17  Ulf Carlsson  <[email protected]>
4179
4180         * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
4181         GOT entries if we're doing a static link or -Bsymbolic link.
4182
4183 2000-06-15  Ulf Carlsson  <[email protected]>
4184
4185         * elflink.h (elf_link_adjust_relocs): Check for and call backend
4186         specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
4187         available.
4188         (elf_link_output_relocs): Likewise.
4189         (elf_reloc_link_order): Likewise.
4190
4191 2000-06-16  Nicholas Duffek  <[email protected]>
4192
4193         * archures.c (enum bfd_architecture): #define constants for
4194         PowerPc and RS6000 machine numbers.
4195         * bfd-in2.h: Regenerate.
4196         * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
4197         to bfd_arch_powerpc instead of bfd_arch_rs6000.  Refer to PowerPc
4198         and RS6000 machine numbers using #defined constants from
4199         archures.c.
4200         * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
4201         machine numbers using #defined constants from archures.c.  Add
4202         entries for EC603e, 630, A35, RS64II, RS64III, 7400.  Specify
4203         64-bit words in 620 entry.
4204         * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
4205         RSC, and RS2.
4206         (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
4207
4208 2000-06-16  Nicholas Duffek  <[email protected]>
4209
4210         * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
4211         * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
4212         * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
4213
4214 2000-06-16  Nicholas Duffek  <[email protected]>
4215
4216         * bfd-in.h (bfd_family_coff): Define.
4217         * bfd-in2.h: Regenerate.
4218         * coffgen.c (coff_count_linenumbers, coff_symbol_from,
4219         coff_find_nearest_line): Check COFFness using bfd_family_coff()
4220         instead of bfd_target_coff_flavour.
4221         * cofflink.c (_bfd_coff_final_link): Likewise.
4222         * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
4223         exclude XCOFF files.
4224         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
4225         Likewise.
4226         * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
4227         * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
4228         * xcofflink.c (XCOFF_XVECP): Delete.
4229         (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
4230         bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
4231         bfd_xcoff_record_link_assignment,
4232         bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
4233         check for bfd_target_xcoff_flavour.
4234
4235 2000-06-16  Nicholas Duffek  <[email protected]>
4236
4237         * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
4238         files on AIX 4.3.
4239         (read_hdr): New function.
4240         (rs6000coff_core_p): Store mstsave or __context64 struct instead
4241         of trying to extract individual registers.  Set abfd->arch_info
4242         to match the architecture that created the core file.
4243         (rs6000coff_get_section_contents): Delete.
4244         * xcoff-target.h (rs6000coff_get_section_contents): Delete.
4245
4246 2000-06-14  H.J. Lu  <[email protected]>
4247
4248         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
4249         is NULL.
4250
4251 2000-06-13  H.J. Lu  <[email protected]>
4252
4253         * configure: Regenerate.
4254
4255 2000-06-13  J"orn Rennecke <[email protected]>
4256
4257         * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
4258         armpei_little_vec.
4259
4260 2000-06-08  David O'Brien  <[email protected]>
4261
4262         * configure.in (VERSION): Update to show this is the CVS mainline.
4263
4264 2000-06-07  Alan Modra  <[email protected]>
4265
4266         * elf32-d10v.c: Include elf/d10v.h
4267         (enum reloc_type): Delete.
4268         * elf32-d30v.c: Include elf/d30v.h
4269         (enum reloc_type): Delete.
4270
4271         * Makefile.am: Run "make dep-am" to regenerate dependencies.
4272         * Makefile.in: Regenerate.
4273
4274         * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
4275         (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
4276         move HOWTOs into elf_howto_table.
4277         (R_386_standard, R_386_ext_offset): Define.
4278         (R_386_ext, R_386_vt_offset, R_386_vt): Define.
4279         (elf_i386_reloc_type_lookup): Modify calculation of index into
4280         elf_howto_table since we've removed the padding.
4281         (elf_i386_info_to_howto_rel): Likewise.
4282         (elf_i386_relocate_section): Likewise.
4283
4284 2000-06-06  Michael Snyder  <[email protected]>
4285
4286         * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
4287
4288 2000-06-05  H.J. Lu  <[email protected]>
4289
4290         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
4291         an error when seeing an undefined symbol with hidden/internal
4292         attribute. It is handled in *_relocate_section ().
4293
4294 2000-06-05  H.J. Lu  <[email protected]>
4295
4296         * elflink.h (elf_fix_symbol_flags): Follow the link for the
4297         indirect symbol for the ELF_LINK_NON_ELF bit.
4298         (elf_link_output_extsym): Don't output the indirect symbol even
4299         if the ELF_LINK_NON_ELF bit is set.
4300
4301 2000-06-01  J.T. Conklin  <[email protected]>
4302
4303         * config.bfd (i[3456]86-*-netbsdelf*): New target.
4304         (i[3456]86-*-netbsdaout*): New target.
4305         (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
4306         (i[3456]86-*-openbsd*): Likewise.
4307
4308 2000-05-30  Andrew Cagney  <[email protected]>
4309
4310         * trad-core.c: From hpux-core.c, include <dirent.h> or
4311         <sys/ndir.h> when possible.
4312
4313 2000-05-31  Ulrich Drepper  <[email protected]>
4314
4315         * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
4316         definitions.  We must not assume they are sorted in the file
4317         according to their index numbers.
4318
4319 2000-05-31  Alan Modra  <[email protected]>
4320
4321         * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
4322         selector for R_PARISC_PCREL17R.  R_PARISC_DIR17R and
4323         R_PARISC_DIR17F are for absolute branches; Handle them as such.
4324
4325 2000-05-30  Nick Clifton  <[email protected]>
4326
4327         * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
4328         80960CA, 80960MC as valid machine names.
4329
4330 2000-05-30  H.J. Lu  <[email protected]>
4331
4332         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
4333         visibility bits if the symbol is undefined. Correctly handle
4334         weak undefined symbols with hidden and internal attributes.
4335
4336         * elflink.h (elf_link_add_object_symbols): Always turn the
4337         symbol into local if it has the hidden or internal attribute.
4338
4339 2000-05-29  Philip Blundell  <[email protected]>
4340
4341         * ppcboot.c:  Add packed attribute if compiling with GCC.
4342
4343 2000-05-29  Anatoly Vorobey  <[email protected]>
4344
4345         * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
4346
4347 2000-05-26  Michael Snyder  <[email protected]>
4348
4349         * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
4350         elfcore_grok_psinfo): Add code to allow debugging a 32-bit
4351         corefile on a 64-bit (Sparc Solaris) host.  Also clean up
4352         a few old comments.
4353
4354 2000-05-26  Alan Modra  <[email protected]>
4355
4356         * Makefile.am: Update dependencies with "make dep-am"
4357         * Makefile.in: Regenerate.
4358
4359         * sysdep.h (gettext, dgettext, dcgettext, textdomain,
4360         bindtextdomain): Replace defines with those from intl/libgettext.h
4361         to quieten gcc warnings.
4362
4363 2000-05-26  Eli Zaretskii  <[email protected]>
4364
4365         * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
4366
4367         * archive.c (normalize, bfd_bsd_truncate_arname,
4368         bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
4369         file names with backslashes.
4370
4371         * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
4372         before opening it.
4373
4374         * sysdep.h: Include filenames.h.
4375
4376 2000-05-26  Alan Modra  <[email protected]>
4377
4378         * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
4379
4380 2000-05-26  Jakub Jelinek  <[email protected]>
4381
4382         * elf64-sparc.c (sparc64_elf_relax_section): New.
4383         (sparc64_elf_relocate_section): Optimize tail call into branch always
4384         if possible.
4385         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4386         (elf32_sparc_relax_section): New.
4387
4388 2000-05-26  Jakub Jelinek  <[email protected]>
4389
4390         * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
4391         Remove unusued variables.
4392         (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
4393         (sparc64_elf_merge_private_bfd_data): Fix shared library case from
4394         previous fix, so that shared libs really don't influence targets
4395         extension mask and memory model.
4396
4397 2000-05-23  H.J. Lu  <[email protected]>
4398
4399         * elf64-alpha.c (elf64_alpha_relocate_section): Check
4400         h->root.other not h->other.
4401         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4402
4403         * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
4404
4405 2000-05-23  H.J. Lu  <[email protected]>
4406
4407         * elf32-i386.c (elf_i386_relocate_section): Don't allow the
4408         undefined symbol with the non-default visibility attributes.
4409         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4410         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4411         * elf32-i370.c (i370_elf_relocate_section): Likewise.
4412         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4413         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4414         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4415         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4416         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4417         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4418         * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
4419         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4420
4421 2000-05-22  Richard Henderson  <[email protected]>
4422
4423         * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
4424         PCREL22, PCREL64I.  Zero size of special relocs.
4425         (elf64_ia64_reloc_type_lookup): Likewise.
4426         (USE_BRL, oor_brl, oor_ip): New.
4427         (elf64_ia64_relax_section): New.
4428         (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
4429         (elf64_ia64_install_value): Likewise, plus PCREL21BI.
4430         (elf64_ia64_relocate_section): Likewise.
4431         (bfd_elf64_bfd_relax_section): New.
4432         * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
4433         (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
4434         * bfd-in2.h, libbfd.h: Regenerate.
4435
4436 2000-05-22  Nick Clifton  <[email protected]>
4437
4438         * configure.in : Add peigen.lo to MIPS PE targets.
4439         * configure: Regenerate.
4440
4441 2000-05-22  Momchil Velikov  <[email protected]>
4442
4443         * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
4444         only if it is known for both input and output bfds. Separate
4445         error message strings as in some languages, it may be necessary
4446         to change more than one place in the string to change between
4447         'big' and 'little'.
4448
4449         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
4450         endianess checks, call _bfd_generic_verify_endian_match() instead.
4451
4452         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
4453
4454         * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
4455
4456         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
4457         endianess before checking bfd flavours.
4458
4459 2000-05-22  H.J. Lu  <[email protected]>
4460
4461         * elflink.h (elf_link_output_extsym): Clear the visibility
4462         field for symbols not defined locally.
4463
4464 2000-05-18  Alan Modra  <[email protected]>
4465
4466         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
4467         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
4468         (hppa_rebuild_insn): Mask immediate bits here instead.
4469         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
4470
4471 2000-05-18  Momchil Velikov <[email protected]>
4472
4473         * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
4474         relocs for an executable, ensure that they are virtual addresses.
4475
4476 2000-05-18  Jeffrey A Law  ([email protected])
4477
4478         * config.bfd (hppa*64*-*-hpux11*): New target triplet.
4479
4480 2000-05-17  S. Bharadwaj Yadavalli  <[email protected]>
4481             Rick Gorton             <[email protected]>
4482
4483         * elflink.h: Add emitrelocations support: when enabled, relocation
4484         information and relocation sections are put into final output
4485         executables.  If the emitrelocations flag is set, do the following:
4486         (elf_bfd_final_link): Emit relocation sections.
4487         (elf_link_input_bfd): Compute relocation section contents.
4488         (elf_gc_sections): Don't clean relocation sections.
4489
4490 2000-05-16  Catherine Moore  <[email protected]>
4491
4492         * som.c (som_decode_symclass):  Recognize weak symbols.
4493
4494 2000-05-16  Szabolcs Szakacsits <[email protected]>
4495
4496         * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
4497         read idata section only from dataoff.
4498         (pe_print_edata): Correctly check for valid eat_member.
4499
4500 2000-05-16  J"orn Rennecke <[email protected]>
4501
4502         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
4503
4504 2000-05-14  Philip Blundell  <[email protected]>
4505
4506         * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
4507
4508 2000-05-12  Alan Modra  <[email protected]>
4509
4510         * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
4511
4512         * peigen.c (pe_print_idata): Look for .idata section and print
4513         info even if data directory has zero entries.  Read idata section
4514         starting from dataoff, and adjust all data offsets to suit.  Cast
4515         all bfd_vma vars to unsigned long before passing to fprintf.
4516         * peigen.c (pe_print_edata): Similarly, look for .edata section
4517         and print info even if data directory has zero entries.  Cast
4518         all bfd_vma vars to unsigned long before passing to fprintf.
4519
4520         From Szabolcs Szakacsits <[email protected]>
4521         * peigen.c (pe_print_idata): Use bfd_section_size rather than data
4522         directory size which may be bogus.
4523         * peigen.c (pe_print_edata): Similarly.
4524
4525 2000-05-09  Alan Modra  <[email protected]>
4526
4527         * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
4528         section is empty.
4529         (copy_private_bfd_data): Allow for space possibly taken up by elf
4530         headers when calculating segment physical address from lma.
4531
4532 2000-05-08  Alan Modra  <[email protected]>
4533
4534         * versados.c (versados_scan): Init stringlen and pass_2_done.
4535
4536         * trad-core.c (trad_unix_core_file_p): Return
4537         bfd_error_wrong_format rather than bfd_error_file_truncated.
4538
4539         * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
4540         add_data_entry.  DataDirectory virtual address is relative.
4541         (pe_print_idata): Account for relative DataDirectory virtual
4542         addresses.  Don't trash datasize inside POWERPC_LE_PE code.
4543         (pe_print_edata): Similarly.
4544
4545         From Szabolcs Szakacsits <[email protected]>
4546         * peigen.c (dir_names): Add Delay Import Directory.
4547         (pe_print_idata):  Always search for bfd section containing
4548         idata address rather than looking up section name.  Print this
4549         section name rather than .idata.
4550         (pe_print_edata): Similarly.  Also print some fields as %08lx.
4551         (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
4552         Win32Version.
4553
4554 2000-05-05  Clinton Popetz  <[email protected]>
4555
4556         * xcoff.h: Rename to xcoff-target.h
4557         * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
4558         * coff-rs6000.c: Ditto.
4559         * coff64-rs6000.c: Ditto.
4560         * coff-pmac.c: Ditto.
4561         * Makefile.in: Regenerate.
4562
4563 2000-05-05  Clinton Popetz  <[email protected]>
4564
4565         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
4566         Change U802TOC64MAGIC to U803XTOCMAGIC.
4567
4568 2000-05-04  Michael Snyder  <[email protected]>
4569
4570         * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
4571         * bfd-in.h: Prototype bfd_elf_get_arch_size.
4572         * bfd-in2.h: Prototype bfd_elf_get_arch_size.
4573
4574 2000-05-04  Alan Modra  <[email protected]>
4575
4576         * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
4577
4578 2000-05-03  Martin v. L\81öwis  <[email protected]>
4579
4580         * elflink.h (elf_link_add_object_symbols): Reset dynindx for
4581         hidden and internal symbols.
4582         (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
4583         visibility.
4584         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
4585         assign a PLT or GOT entry to symbols with hidden and
4586         internal visibility.
4587
4588 2000-05-03  Mark Elbrecht  <[email protected]>
4589
4590         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
4591         the .bss section.
4592         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4593
4594 2000-05-02  H.J. Lu  <[email protected]>
4595
4596         * elf.c (prep_headers): Use ELFOSABI_NONE instead of
4597         ELFOSABI_SYSV.
4598
4599 2000-05-02  Alan Modra  <[email protected]>
4600
4601         * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
4602         * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo.  Regenerate
4603         dependencies.
4604         * Makefile.in: Regenerate.
4605
4606 2000-05-01  Jim Wilson  <[email protected]>
4607
4608         * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
4609         (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
4610         (BFD64_BACKENDS): Delete coff-ia64.lo.  Add efi-app-ia64.lo.
4611         (BFD64_BACKENDS_CFILES): Delete coff-ia64.c.  Add efi-app-ia64.c.
4612         * Makefile.in: Rebuild.
4613
4614 2000-05-02  Alan Modra  <[email protected]>
4615
4616         * config.bfd: Re-enable elf32-hppa.  It now compiles, even if it
4617         doesn't work very well.
4618
4619         * elf-hppa.h (elf_hppa_internal_shdr): Define.
4620         (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
4621         Set hdr->s_type to 1 if ARCH_SIZE == 32.
4622         (_bfd_elf_hppa_gen_reloc_type): Add prototype.
4623         (elf_hppa_info_to_howto): Likewise.
4624         (elf_hppa_info_to_howto_rel): Likewise.
4625         (elf_hppa_reloc_type_lookup): Likewise.
4626         (elf_hppa_is_local_label_name): Likewise.
4627         (elf_hppa_fake_sections): Likewise.
4628         (elf_hppa_final_write_processing): Likewise.
4629         (elf_hppa_howto_table): Fully initialise all entries.
4630         (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
4631         (elf_hppa_info_to_howto): Likewise.
4632         (elf_hppa_info_to_howto_rel): Likewise.
4633         (elf_hppa_reloc_type_lookup): Likewise.
4634         (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
4635         elf_hppa_unmark_useless_dynamic_symbols,
4636         elf_hppa_remark_useless_dynamic_symbols,
4637         elf_hppa_record_segment_addrs, elf_hppa_final_link,
4638         elf_hppa_relocate_section, elf_hppa_final_link_relocate,
4639         elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
4640         elf32-hppa.c mess is cleaned up.
4641         (elf_hppa_final_link_relocate): Make insn and r_type unsigned
4642         int.  Delete r_field.  In case R_PARISC_PCREL21L, don't set
4643         r_field then call hppa_field_adjust inline func with variable
4644         r_field arg, instead call hppa_field_adjust with fixed arg.
4645         In case R_PARISC_PCREL22F, don't set r_field.
4646         (elf_hppa_relocate_insn): Change args and return type to unsigned
4647         int.  Call re_assemble_* funcs to do the work.
4648
4649         * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
4650         sign extending.
4651
4652         * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
4653         extending.
4654         (sign_extend): Mask first before sign extending.
4655         (low_sign_extend): Rewrite without condition expression.
4656         (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
4657         dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
4658         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
4659         assemble_17, assemble_21, sign_unext, low_sign_unext): Return
4660         result as function return value rather than through pointer arg.
4661         Accept unsigned int args, and return unsigned int.
4662         (re_assemble_3): New.  Combines function of dis_assemble_3 with
4663         re-assembly of opcode and immediate.
4664         (re_assemble_12): Likewise.
4665         (re_assemble_16): Likewise.
4666         (re_assemble_17): Likewise.
4667         (re_assemble_21): Likewise.
4668         (re_assemble_22): Likewise.
4669         (hppa_field_adjust): Rewrite and document, paying attention to
4670         size of types and signed/unsigned issues.
4671         (get_opcode): Shift before masking.
4672         (FDLW): Rename to FLDW.
4673         (bfd_hppa_insn2fmt): Change arg to unsigned int.  Delete fmt.
4674         (hppa_rebuild_insn): Change args and return value to unsigned
4675         int.  Make use of re_assemble_*.  Correct case 11.
4676
4677         * dep-in.sed: Handle ../opcodes/.
4678         * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
4679         elf64-hppa.h, hppa_stubs.h, xcoff.h.
4680         (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
4681         Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
4682         elfarm-nabi.lo dependencies outside of auto-dependency area.
4683         Regenerate dependencies.
4684         * Makefile.in: Regenerate.
4685
4686         * configure.in (TRAD_HEADER): Test non-null before
4687         AC_DEFINE_UNQUOTED.
4688         * configure: Regenerate.
4689
4690         * reloc.c: Fix mis-spelling in comment.
4691
4692 2000-05-01  Alan Modra  <[email protected]>
4693
4694         * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
4695         * vms.c (vms_openr_next_archived_file): Return NULL.
4696
4697 2000-04-28  Clinton Popetz  <[email protected]>
4698
4699         * coffcode.h Copy changes mistakenly done to libcoff.h in
4700         4/24/2000 patch.
4701
4702 2000-04-29  Andreas Jaeger  <[email protected]>
4703
4704         * libbfd-in.h: Correctly check GCC version.
4705         * bfd-in.h: Likewise.
4706         * libhppa.h: Likewise.
4707         * libbfd.h: Regenerate.
4708         * bfd-in2.h: Regenerate.
4709
4710 2000-04-28  Clinton Popetz  <[email protected]>
4711
4712         * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
4713         coffdu-rs6000.{lo,c}.
4714         (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
4715         on xcoff.h
4716         * Makefile.in: Regenerate.
4717         * xcoff.h: New file.
4718         * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
4719         * coff-rs6000.c: Move all declarations and defines that are
4720         common to the xcoff backends into xcoff.h
4721         * coff64-rs6000.c: Ditto,
4722
4723 2000-04-28  Clinton Popetz  <[email protected]>
4724
4725         * coff-mips.c (mips_ecoff_backend_data):  Add initialization of
4726         _bfd_coff_force_symnames in strings and
4727         _bfd_coff_debug_string_prefix_length to their default values.
4728         * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
4729
4730 2000-04-28  Clinton Popetz  <[email protected]>
4731
4732         * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
4733         _bfd_coff_force_symnames in strings and
4734         _bfd_coff_debug_string_prefix_length to their default values.
4735
4736 2000-04-27  Alan Modra  <[email protected]>
4737
4738         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Return if dynobj NULL.
4739         Check local_got_refcounts before dereferencing.
4740
4741         * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
4742         before deciding we don't need R_PPC_PLT32 relocation.
4743         (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
4744         dereferencing.
4745
4746         * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
4747
4748         * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
4749         .plt entries.
4750         (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
4751         (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
4752         (elf_i386_relocate_section): Allow for .plt to go missing.
4753         (elf_i386_finish_dynamic_symbol): Use same test to decide if we
4754         can use a relative reloc for got as elf_i386_relocate_section.
4755         (bfd_elf32_bfd_final_link): Define to use gc form of final link.
4756
4757 2000-04-26  Clinton Popetz  <[email protected]>
4758
4759         * config.bfd: Remove extraneous bfd_powerpc_64_arch.
4760
4761 2000-04-24  Clinton Popetz  <[email protected]>
4762
4763         * Makefile.am (coff64-rs6000.lo): New rule.
4764         * Makefile.in: Regenerate.
4765         * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
4766         xcoff_is_local_label_name, xcoff_rtype2howto,
4767         xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
4768         xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
4769         xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
4770         (NO_COFF_SYMBOLS): Define.
4771         (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
4772         xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
4773         internally.
4774         (MINUS_ONE): New macro.
4775         (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
4776         relocation.
4777         (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
4778         coff_SWAP_aux_out): Map to the new functions.
4779         * coff64-rs6000.c: New file.
4780         * libcoff.h (bfd_coff_backend_data): Add new fields
4781         _bfd_coff_force_symnames_in_strings and
4782         _bfd_coff_debug_string_prefix_length.
4783         (bfd_coff_force_symnames_in_strings,
4784         bfd_coff_debug_string_prefix_length): New macros for above fields.
4785         * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
4786         Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
4787         of using coff_swap_sym_in directly.
4788         (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
4789         (coff_set_flags) Set magic for XCOFF64.
4790         (coff_compute_section_file_positions): Add symbol name length to
4791         string section length if bfd_coff_debug_string_prefix_length is
4792         true.
4793         (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
4794         (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
4795         using coff_swap_lineno_in directly.
4796         (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
4797         and _bfd_coff_debug_string_prefix_length fields.
4798         * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
4799         symbol names into strings table when
4800         bfd_coff_force_symnames_in_strings is true.
4801         * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
4802         SET_RELOC_VADDR): New macros.
4803         (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
4804         (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
4805         code.
4806         (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
4807         changes within RS6000COFF_C specific code.
4808         (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
4809         MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
4810         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
4811         Extend existing hack on target name.
4812         * xcofflink.c (XCOFF_XVECP): Extend existing hack on
4813         target name.
4814         * coff-tic54x.c (ticof): Keep up to date with new fields
4815         in bfd_coff_backend_data.
4816         * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
4817         targ_selvecs to include rs6000coff64_vec for rs6000.
4818         * configure.in: Add rs6000coff64_vec case.
4819         * cpu-powerpc.c: New bfd_arch_info_type.
4820
4821 2000-04-24  Jeffrey A Law  ([email protected])
4822
4823         * config.bfd: Only disable elf32-hppa vectors, not all of the
4824         BSD and OSF configuration support.  Provide (disabled) clauses
4825         for PA64 support.
4826         * configure.in: Add clause for PA64 support.
4827         * configure: Rebuilt.
4828
4829         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
4830         (bfd_elf64_hppa_vec): Declare.
4831
4832         * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
4833         (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
4834         (elf64-hppa.lo): Add dependencies.
4835         * Makefile.in: Rebuilt.
4836
4837         * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
4838
4839 2000-04-24  Jason Eckhardt  <[email protected]>
4840
4841         * libhppa.h (dis_assemble_16): New function.
4842         (pa_arch): Added pa20w element.
4843
4844 2000-04-24  Ulrich Drepper  <[email protected]>
4845
4846         * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
4847         bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
4848         bfd_elf64_slurp_reloc_table.
4849
4850         * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
4851         definitions to get external names.
4852         (elf_write_relocs): Renamed from write_relocs and make global.
4853         (elf_slurp_reloc_table): Make global.
4854         (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
4855
4856         * archive.c (hpux_uid_gid_encode): New function.
4857         (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
4858         defined and the ID is greater than 99999.
4859         (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
4860         special uid/gid fields into 32 bit values.
4861
4862 2000-04-21  Matthew Green  <[email protected]>
4863
4864         * config.bfd: Add NetBSD/sparc64 support.
4865
4866 Fri Apr 21 13:20:53 2000  Richard Henderson  <[email protected]>
4867                           David Mosberger  <[email protected]>
4868                           Timothy Wall <[email protected]>
4869                           Jim Wilson  <[email protected]>
4870
4871         * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
4872         (ALL_MACHINES_CFILES): Add cpu-ia64.c.
4873         (BFD64_BACKENDS): Add elf64-ia64.lo.
4874         (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
4875         (cpu-ia64.lo, elf64-ia64.lo): New rules.
4876         * Makefile.in: Rebuild.
4877         * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
4878         (bfd_ia64_arch): Declare.
4879         (bfd_archures_list): Add bfd_ia64_arch.
4880         * bfd-in2.h: Rebuild.
4881         * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
4882         * configure: Rebuild.
4883         * configure.host: (ia64-*-linux*): New host.
4884         * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
4885         bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
4886         * elf.c (prep_headers): Add bfd_arch_ia64.
4887         * libbfd.h: Rebuild.
4888         * reloc.c: Add IA-64 relocations.
4889         * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
4890         Declare.
4891         (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
4892         * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
4893
4894 2000-04-21  Richard Henderson  <[email protected]>
4895
4896         * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
4897         contents when performing a partial link.
4898         (bfd_elf_d30v_reloc_21): Likewise.
4899
4900 2000-04-20  H.J. Lu  <[email protected]>
4901
4902         * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
4903         patch to symbols defined by a shared object.
4904         * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
4905
4906 2000-04-19  Michael Sokolov  <[email protected]>
4907
4908         K&R compiler fixes.
4909         * dwarf2.c (concat_filename): Avoid string literal concatenation.
4910         * ieee.c (ieee_get_symtab): Don't initialise union in struct.
4911
4912 Mon Apr 17 19:14:36 2000  David Mosberger  <[email protected]>
4913
4914         * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
4915         (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
4916         (coff-ia64.lo): Add dependency.
4917         * Makefile.in: Regenerate.
4918         * coff-ia64.c: New file.
4919         * efi-app-ia32.c: Ditto.
4920         * efi-app-ia64.c: Ditto.
4921         * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
4922         (coff_set_flags): Ditto.
4923         (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
4924         * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
4925         * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
4926         * configure: Regenerate.
4927         * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
4928         (PUT_OPTHDR_IMAGE_BASE): Ditto.
4929         (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
4930         (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
4931         (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
4932         (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
4933         (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
4934         (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
4935         (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
4936         (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
4937         (GET_PDATA_ENTRY): Ditto.
4938         * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
4939         data_start.  Use above macros to read fields that are 64 bit wide for
4940         COFF_WITH_PEP64.  Don't truncate entry and text_start to 32 bits.
4941         (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
4942         FileAlignment and SectionAlignment to minimum alignment if they
4943         are zero.
4944         (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
4945         Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
4946         (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
4947         Use above macros to write fields that are 64 bit wide for
4948         COFF_WITH_PEP64.
4949         (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
4950         5*4 otherwise.  This should be right for IA-32 and IA-64, but may
4951         be wrong for platforms.  Use PDATA_ROW_SIZE instead of hardcoded
4952         value of 20 bytes.  Modify printing for COFF_WITH_PEP64 to print
4953         begin address, end address, and unwind info address only.  Use
4954         GET_PDATA_ENTRY() to read .pdata entries.  Use fprintf_vma() to
4955         print addresses.
4956         (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
4957         HIGH3ADJ relocation names.
4958         (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
4959         * targets.c: Declare bfd_efi_app_ia32_vec and
4960         bfd_efi_app_ia64_vec.
4961         (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
4962         bfd_efi_app_ia64_vec.
4963
4964 2000-04-17  Timothy Wall  <[email protected]>
4965
4966         * bfd-in2.h: Add prototypes for tic54x load page access.
4967         * bfd-in.h: Regenerate.
4968         * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
4969         in customized _set_arch_mach function.
4970         * coffcode.h (coff_set_alignment_hook): Set section load page if
4971         the appropriate macro is defined.
4972         (write_object_contents): Read section load page.
4973
4974 2000-04-13  Alan Modra  <[email protected]>
4975
4976         * elf32-hppa.h: Update copyright date.
4977
4978         * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
4979         * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
4980
4981         * elf32-d30v.c (MAX32): Don't use LL suffix.
4982         (MIN32): Define in terms of MAX32.
4983         (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
4984
4985         * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
4986         expression.
4987
4988         * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
4989
4990 2000-04-12  Alan Modra  <[email protected]>
4991
4992         * dep-in.sed: Match space before file name, not after.
4993         * Makefile.am: Regenerate dependencies.
4994         * Makefile.in: Regenerate.
4995
4996         * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
4997         case, allow address wrap-around stupidly removed 2000-03-17.  Sign
4998         extend without an if statement.
4999
5000 2000-04-11  Alan Modra  <[email protected]>
5001
5002         * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
5003         signed quantites.
5004         * elf32-mips.c (gprel16_with_gp): Likewise.
5005         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
5006         here using -0x40000, not (int)0xfffc0000.
5007         (elf32_hppa_size_of_stub): Likewise.
5008
5009 2000-04-11  Timothy Wall  <[email protected]>
5010
5011         * coff-tic54x.c: Now builds with all targets.
5012         * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
5013         * Makefile.in: Regenerate.
5014         * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
5015         unitialized variable.
5016
5017 Fri Apr  7 15:56:57 2000  Andrew Cagney  <[email protected]>
5018
5019         * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
5020         --enable-build-warnings option.
5021         * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
5022         * Makefile.in, configure: Re-generate.
5023
5024 2000-04-07  Nick Clifton  <[email protected]>
5025
5026         * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
5027         BFD_RELOC_THUMB_PCREL_BLX.
5028
5029         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5030         R_ARM_XPC25 and R_ARM_THM_PC22.
5031
5032         * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
5033         R_ARM_XPC25 and R_ARM_THM_XPC22.
5034         (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
5035         R_ARM_[XPC25|THM_XPC22].
5036
5037         * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
5038         elf/arm-oabi.h to elf/arm.h
5039
5040         * Makefile.am: Fix dependency for elfarm-oabi.c
5041         * Makefile.in: Regenerate.
5042
5043         * bfd-in2.h: Regenerate.
5044         * libbfd.h: Regenerate.
5045
5046 2000-04-06  Michael Snyder  <[email protected]>
5047
5048         * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
5049         and restore it on failure.  Release newly allocated tdata on
5050         failure.
5051
5052 Fri Apr  7 11:33:47 2000  Jim Wilson  <[email protected]>
5053
5054         * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
5055         (decode_line_info): Set it.  Report error if unit->line_offset is
5056         equal to or larger than it.
5057
5058 2000-04-07  Timothy Wall  <[email protected]>
5059
5060         * targets.c: Added vecs for tic54x.
5061         * reloc.c: Added relocs for tic54x.
5062         * libbfd.h: Regenerated.
5063         * configure: Add TI COFF vecs for tic54x.
5064         * configure.in: Ditto.
5065         * config.bfd (targ_cpu): Recognize new tic54x target.
5066         * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
5067         * bfd-in2.h: Add tic54x target and relocations.
5068         * Makefile.am, Makefile.in: Add tic54x target.
5069         * archures.c (bfd_archures_list): Add tic54x target.
5070         * coff-tic54x.c: New.
5071         * cpu-tic54x.c: New.
5072
5073 2000-04-06  Michael Snyder  <[email protected]>
5074
5075         * elfcore.h (elf_core_file_p): call backend_object_p which
5076         thereby gets an opportunity to update the arch/machine type.
5077
5078 2000-04-06  Timothy Wall  <[email protected]>
5079
5080         * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
5081         class.  Handle SEC_CLINK and SEC_BLOCK flags.
5082         * section.c: Add SEC_CLINK and SEC_BLOCK flags.
5083         * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
5084
5085 2000-04-06  Nick Clifton  <[email protected]>
5086
5087         * elf32-arm.h (elf32_arm_set_private_flags): Only check for
5088         EF_INTERWORK if this is an unknown EABI.
5089         (elf32_arm_merge_private_bfd_data): Check EABI version
5090         numbers.  Only check EF_xxx flags if the EABI version number
5091         is unknown.
5092         (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
5093         if the EABI version number is unknown.
5094         (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
5095         if the EABI version number is unknown.
5096
5097 Wed Apr  5 22:04:20 2000  J"orn Rennecke <[email protected]>
5098
5099         * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
5100         BFD_RELOC_SH_LOOP_END.
5101         * elf32-sh.c (sh_elf_howto_tab): Change special_func to
5102         sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
5103         Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
5104         (sh_elf_reloc_loop): New function.
5105         (sh_elf_reloc): No need to test for always-to-be-ignored relocs
5106         any more.
5107         (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
5108         (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
5109         * bfd-in2.h, libbfd.h: Regenerate.
5110
5111 2000-04-04  Alan Modra  <[email protected]>
5112
5113         * po/bfd.pot: Regenerate.
5114
5115         * Makefile.am: Remove extraneous mkdep comment.
5116         (MKDEP): Use gcc -MM rather than mkdep.
5117         (DEP): Quote when passing vars to sub-make.  Add warning
5118         message to end.
5119         (DEP1): Rewrite for "gcc -MM".
5120         (CLEANFILES): Add DEP2.
5121         Update dependencies.
5122         * Makefile.in: Regenerate.
5123
5124 2000-04-03  Kevin Buettner  <[email protected]>
5125
5126         * configure.in: Added corefile support for AIX 4.3.  In particular,
5127         AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
5128         compiling rs6000-core.c.
5129         * configure: Regenerated.
5130
5131 2000-04-03  H.J. Lu  <[email protected]>
5132
5133         * cache.c (bfd_open_file): Unlink the output file only if
5134         it has non-zero size.
5135
5136 2000-04-01  Ken Block USG  <[email protected]>
5137
5138         * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
5139         relative relocations for non-loaded sections in shared objects.
5140         (elf64_alpha_check_relocs): Similarly.
5141
5142 Mon Apr  3 13:37:15 2000  Hans-Peter Nilsson  <[email protected]>
5143
5144         * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
5145         BFD_RELOC_16 to switch for extended relocs.
5146         (MY_swap_ext_reloc_in): New.
5147         (MY_swap_ext_reloc_out): New.
5148         (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
5149         than NAME(aout,swap_ext_reloc_in) for extended relocs.
5150         (NAME(aout,squirt_out_relocs)): Similarly use
5151         MY_swap_ext_reloc_out.
5152         (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
5153
5154 2000-04-03  Kazu Hirata  <[email protected]>
5155
5156         * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
5157         the R_PCRWORD_B case.
5158
5159 2000-03-31  Thomas de Lellis  <[email protected]>
5160
5161         * srec.c : Set CHUNK size to 16 bytes to prevent download failures
5162         on some targets.
5163         * ihex.c : Ditto.
5164
5165 Wed Mar 30 15:28:00 2000  Donald Lindsay  <[email protected]>
5166
5167         * elf32-m32r.c (m32r_elf_generic_reloc): new function.  All
5168         HOWTO references to bfd_elf_generic_reloc, that have
5169         partial_inplace == true, now use the new function.  The function
5170         is based on the recent rewrite of m32r_elf_lo16_reloc(), and
5171         extends its fixes to the R_M32R_{16,24,32} relocs.
5172         The new logic in m32r_elf_lo16_reloc() has been removed, and
5173         it instead calls the new routine to obtain that functionality.
5174
5175 2000-03-27  Alan Modra  <[email protected]>
5176
5177         * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
5178         elf32_avr_check_relocs, avr_final_link_relocate,
5179         elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
5180         elf32_avr_object_p): Add prototypes.
5181         (elf32_avr_gc_mark_hook): Add default for h->root.type.
5182         (bfd_elf_avr_final_write_processing): Make static.
5183
5184 2000-03-27  Denis Chertykov  <[email protected]>
5185
5186         * cpu-avr.c: New file.  BFD support routines for AVR architecture.
5187         * archures.c (bfd_architecture): Add AVR architecture.
5188         (bfd_archures_list): Add reference to AVR architecture info.
5189         * elf.c (prep_headers): Handle bfd_arch_avr.
5190         * reloc.c: Add various AVR relocation enums.
5191         * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
5192         list.
5193         * Makefile.am: Add support for AVR elf.
5194         * configure.in: Likewise.
5195         * config.bfd: Likewise.
5196         * Makefile.in: Regenerate.
5197         * configure: This too.
5198         * bfd-in2.h: And this.
5199         * libbfd.h: And this.
5200
5201 2000-03-24  H.J. Lu  <[email protected]>
5202
5203         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
5204         (elf64_alpha_find_reloc_at_ofs): Likewise.
5205
5206 2000-03-17  Alan Modra  <[email protected]>
5207
5208         * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
5209         flag an overflow if the bitfield is outside -2**n to 2**n-1.  The
5210         allowable range used to be -2**(n-1) to 2**n-1.
5211         * reloc.c (_bfd_relocate_contents): Same here.  Also replace
5212         "boolean overflow" with "bfd_reloc_status_type flag".
5213
5214 2000-03-14  Doug Evans  <[email protected]>
5215
5216         * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
5217
5218 2000-03-14  Kazu Hirata  <[email protected]>
5219
5220         * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
5221         of shrinks properly, including the last reloc.
5222
5223 2000-03-13  Kazu Hirata  <[email protected]>
5224
5225         * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
5226         check for R_MOVL2.
5227
5228 2000-03-11  Alan Modra  <[email protected]>
5229
5230         * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
5231         a format mismatch rather than an "error" from bfd_read such as
5232         bfd_error_file_truncated.
5233
5234 2000-03-10  Geoff Keating  <[email protected]>
5235
5236         * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
5237         sign-extension and big-endian compensation for
5238         R_MIPS_64 even in ld -r.
5239
5240 2000-03-10  Geoffrey Keating  <[email protected]>
5241
5242         * elf32-mips.c (mips_elf_next_relocation): Rename from
5243         mips_elf_next_lo16_relocation, and generalize to look
5244         for any relocation type.
5245         (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
5246         (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
5247         (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
5248         (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
5249         (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
5250         (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
5251         (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
5252         (mips_rtype_to_howto): Likewise.
5253         (mips_elf_calculate_relocation): Handle new relocs.
5254         (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
5255         are paired.  The addend for R_MIPS_GNU_REL16_S2
5256         is shifted right two bits.
5257
5258 2000-03-10  Alan Modra  <[email protected]>
5259
5260         * reloc.c (bfd_perform_relocation): Undo emacs formatting of
5261         comment, and ensure it doesn't happen again.
5262         (bfd_install_relocation): Same here.
5263         (_bfd_relocate_contents): Don't bother assigning unused signmask
5264         shift result.  Fix typos in comments.
5265         Remove trailing whitespace throughout file.
5266
5267 2000-03-07  Doug Evans  <[email protected]>
5268
5269         * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
5270         * bfd-in2.h: Rebuild.
5271
5272 2000-03-06  Nick Clifton  <[email protected]>
5273
5274         * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
5275         sym_ptr_ptr fields.
5276         (SIZEOF_ILF_SYM_PTR_TABLE): Define.
5277         (SIZEOF_ILF_STRINGS): Redefine.
5278         (pe_ILF_make_a_symbol-reloc): New function.  Creates a symbol
5279         relative reloc, as opposed to a section relative reloc.
5280         (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
5281         not C_LABEL.
5282         Add length of symbol's prefix to string pointer.
5283         Store a pointer to the symbol in the symbol pointer table.
5284         (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
5285         Initialise the symbol pointer table.
5286         Store the hint in the Hint/Name table.
5287         Make the jump reloc be symbol realtive, not section relative.
5288         Create an import symbol for imported code.
5289
5290 2000-03-06  Catherine Moore  <[email protected]>
5291
5292         * elf.c (swap_out_syms):  Check for null type_ptr.
5293
5294 2000-03-01  Hans-Peter Nilsson  <[email protected]>
5295
5296         * aout-target.h (MY(write_object_contents)): Remove unused
5297         and unusable "#if CHOOSE_RELOC_SIZE".
5298         * pc532-mach.c (MY(write_object_contents)): Ditto.
5299         * netbsd.h (MY(write_object_contents)): Ditto.
5300         * hp300hpux.c (MY(write_object_contents)): Ditto.
5301         * freebsd.h (MY(write_object_contents)): Ditto.
5302         * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
5303
5304 2000-02-29  H.J. Lu  <[email protected]>
5305
5306         * peicode.h (jtab): Make it static.
5307
5308         * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
5309         defined and COFF_IMAGE_WITH_PE is not defined.
5310         (_bfd_sh_align_load_span): Defined as sh_align_load_span if
5311         COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
5312
5313 2000-03-01  Nick Clifton  <[email protected]>
5314
5315         * coff-arm.c (bfd_arm_process_before_allocation): Make
5316         'symndx' signed to prevent compile time warning.
5317
5318         * coff-mcore.c: Remove unused prototype for pe_object_p.
5319
5320         * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
5321         functions that are not used when COFF_IMAGE_WITH_PE is
5322         defined.
5323         (struct sh_opcode): Change type of 'flags' field to unsigned
5324         long so that it can hold the USESAS flag.
5325
5326         * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
5327
5328         * elf-m10300.c (mn10300_elf_relax_section): Initialise
5329         'sym_sec'.
5330
5331         * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
5332         parameters.
5333         Remove unusued variables and code.
5334         (elf_backend_add_symbol_hook): Fix prototype.
5335
5336         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
5337         'srelgot'.
5338
5339         * elf32-mcore.c (mcore_elf_relocate_section): Initialise
5340         'oldinst'.
5341
5342         * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
5343         parameters.
5344         Remove unusued variables and code.
5345         (elf_backend_add_symbol_hook): Fix prototype.
5346
5347         * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
5348
5349         * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
5350         to unused function parameter.
5351
5352         * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
5353         parameters.
5354         Use EMPTY_HOWTO to initialise empty howto slots.
5355         Remove unused variables.
5356
5357         * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
5358
5359 2000-03-01  H.J. Lu  <[email protected]>
5360
5361         * aoutx.h (aout_link_input_section_std): Pass "true" to
5362         the undefined_symbol callback.
5363         (aout_link_input_section_ext): Likewise.
5364         * bout.c (get_value): Likewise.
5365         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
5366         * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
5367         Likewise.
5368         (alpha_relocate_section): Likewise.
5369         * coff-arm.c (coff_arm_relocate_section): Likewise.
5370         * coff-i960.c (coff_i960_relocate_section): Likewise.
5371         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
5372         * coff-mips.c (mips_relocate_section): Likewise.
5373         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
5374         * coff-sh.c (sh_relocate_section): Likewise.
5375         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
5376         * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
5377         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
5378         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5379         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
5380         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5381         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5382         * elf32-i370.c (i370_elf_relocate_section): Likewise.
5383         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5384         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5385         * elf32-sh.c (sh_elf_relocate_section): Likewise.
5386         * elf32-v850.c (v850_elf_relocate_section): Likewise.
5387         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
5388         * elflink.h (elf_link_output_extsym): Likewise.
5389         * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
5390         * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
5391         * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
5392
5393         * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
5394         undefined_symbol callback when building shared library with
5395         -Bsymbolic and undefined symbols are allowed. Otherwise, pass
5396         "true".
5397         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
5398         * elf32-i386.c (elf_i386_relocate_section): Likewise.
5399         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5400         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
5401         (elf32_mips_get_relocated_section_content): Likewise.
5402         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5403         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5404         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5405         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5406
5407 2000-02-28  Nick Clifton  <[email protected]>
5408
5409         * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
5410         * Makefile.in: Regenerate.
5411
5412         * configure.in: Add support for mips and sh pe vectors.
5413         * configure: regenerate.
5414
5415         * config.bfd: Add support for arm-wince, mips-pe and sh-pe
5416         targets.
5417
5418         * targets.c: Add mips and sh pe vectors.
5419
5420         * libpei.h (coff_final_link_postscript): Only define if not
5421         already defined.
5422
5423         * coffcode.h: Add support for WinCE magic numbers.
5424
5425         * peigen.c (pe_print_reloc): Update comment and rearrange
5426         appending of newline character.
5427
5428         * peicode.h: Add support for Image Library Format.
5429         (pe_ILF_vars): Structure containing data used by ILF code.
5430         (pe_ILF_make_a_section): New function.  Create a section based
5431         on ILF data.
5432         (pe_ILF_make_a_reloc): New function.  Create a reloc based on
5433         ILF data.
5434         (pe_ILF_make_a_symbol): New function.  Create a symbol based
5435         on ILF data.
5436         (pe_ILF_save_relocs): New function.  Store the relocs created
5437         by pe_ILF_make_a_reloc in a section.
5438         (pe_ILF_build_a_bfd): New function.  Create a BFD describing
5439         an ILF object.
5440         (pe_ILF_object_p): New function.  Return a bfd_target pointer
5441         for an ILF object.
5442         (pe_bfd_object_p): If an ILF object is detected call
5443         pe_ILF_object_p on it.
5444
5445         * coff-arm.c: Add support for WinCE relocs which are different
5446         from normal ARM COFF relocs.
5447         * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
5448
5449         * coff-sh.c: Add support for sh-pe target.
5450         * pe-sh.c: New file.  Support code for sh-pe target.
5451         * pei-sh.c: New file.  Support code for sh-pe target.
5452
5453         * pe-mips.c: New file.  Support code for mips-pe target.
5454         * pei-mips.c: New file.  Support code for mips-pe target.
5455
5456 2000-02-27  Jakub Jelinek  <[email protected]>
5457
5458         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
5459         architecture if the object causing the bump is dynamic.
5460         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
5461         and also don't it for memory ordering.
5462         (sparc64_elf_write_relocs): Take src_rela out of the loop.
5463
5464 2000-02-27  Ian Lance Taylor  <[email protected]>
5465
5466         * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
5467         calling bfd_get_section_size_before_reloc.
5468         (decode_line_info): Likewise.
5469         (_bfd_dwarf2_find_nearest_line): Likewise.
5470
5471 2000-02-27  Eli Zaretskii  <[email protected]>
5472
5473         * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
5474         name of the libtool directory.
5475         * Makefile.in: Rebuild.
5476
5477 Fri Feb 25 18:39:26 2000  Rodney Brown ([email protected])
5478
5479         * som.c (SOM_HOWTO): Define.
5480         (som_hppa_howto_table): Use it.
5481
5482 2000-02-25  Alexandre Oliva  <[email protected]>
5483
5484         * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
5485
5486         * config.bfd: Enable 64 bit support for Solaris7+/sparc.
5487
5488 2000-02-24  Catherine Moore  <[email protected]>
5489
5490         * som.c (som_misc_symbol_info):  Add field
5491         secondary_def.
5492         (som_bfd_derive_misc_symbol_info):  Initialize
5493         secondary_def.
5494         (som_build_and_write_symbol_table): Keep track
5495         of secondary_def field.
5496         (som_slurp_symbol_table): Set BSF_WEAK symbol flag
5497         if secondary_def field is set.
5498         (som_bfd_ar_write_symbol_stuff): Initialize
5499         secondary_def.
5500
5501 2000-02-23  Stephane Carrez  <[email protected]>
5502
5503         * dwarf2.c (read_address): Read 16-bits addresses.
5504         (parse_comp_unit): Accept addr_size == 2.
5505
5506 2000-02-23  Alan Modra  <[email protected]>
5507
5508         * bfd-in.h: Update copyright date.
5509
5510 2000-02-23  Linas Vepstas <[email protected]>
5511
5512         * cpu-i370.c: New file.
5513         * elf32-i370.c:  New file.
5514         * archures.c (enum bfd_architecture): Add bfd_arch_i370.
5515         (bfd_i370_arch): New.
5516         (bfd_archures_list): Add bfd_i370_arch.
5517         * elf.c (prep_headers): Add bfd_arch_i370.
5518         * Makefile.am: Add support for IBM 370 elf.
5519         * config.bfd: Likewise.
5520         * configure.in: Likewise.
5521         * libbfd.h (bfd_reloc_code_real_names): Likewise.
5522         * reloc.c (bfd_reloc_code_type): Likewise.
5523         * targets.c: Likewise.
5524
5525         * Makefile.in: Regenerate.
5526         * configure: Regenerate.
5527         * bfd-in2.h: Regenerate.
5528
5529 2000-02-22  Ian Lance Taylor  <[email protected]>
5530
5531         * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
5532         invalid relocation types, and change them to R_386_NONE.
5533
5534 2000-02-22  H.J. Lu  <[email protected]>
5535
5536         * elflink.h (elf_link_add_object_symbols): If a version symbol is
5537         not defined, don't add a second ELF_VER_CHR.
5538
5539         * elflink.h (elf_bfd_final_link): Call output_extsym for global
5540         symbols converted to local symbols even when stripping all
5541         symbols.
5542         (elf_link_output_extsym): Process global symbols converted to
5543         local symbols even if they are being stripped.
5544
5545 2000-02-21  Alan Modra  <[email protected]>
5546
5547         * archures.c (bfd_octets_per_byte): Return unsigned int.
5548         (bfd_arch_mach_octets_per_byte): Ditto.
5549         * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
5550         comparison warning.
5551         * section.c (bfd_get_section_size_before_reloc): Quell signed
5552         vs. unsigned comparison warning.
5553         (bfd_get_section_size_after_reloc): Same here.  Fix parentheses too.
5554         * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
5555         change.  What was I thinking?
5556         * bfd-in2.h: Regenerate.
5557
5558         * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
5559         (elf_gc_sections): Same here.
5560         (elf_gc_common_finalize_got_offsets): And here.
5561
5562 2000-02-21  Ian Lance Taylor  <[email protected]>
5563
5564         ELF HPPA doesn't work at present; remove it until it does.
5565         * config.bfd: Comment out setting targ_defvec to
5566         bfd_elf32_hppa_vec.
5567         * Makefile.am: Rebuild dependencies.
5568         (BFD32_BACKENDS): Remove elf32-hppa.lo.
5569         (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
5570         (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
5571         * Makefile.in: Rebuild.
5572         * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
5573
5574 2000-02-18  Geoff Keating  <[email protected]>
5575
5576         * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
5577         is no bfd_free().  Revert bfd_free part of previous change.
5578
5579 2000-02-18  Geoff Keating  <[email protected]>
5580
5581         * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
5582         arrays.
5583         (coff_compute_section_file_positions): Use bfd_free to pair
5584         bfd_malloc.
5585         (coff_write_object_contents): Likewise.
5586
5587         * coff-rs6000.c (xcoff_howto_table_16): New variable.
5588         (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
5589
5590 2000-02-18  Ulrich Drepper  <[email protected]>
5591
5592         * coff-rs6000.c (XCOFFARMAGBIG): New macro.
5593         (xcoff_ar_file_hdr_big): New structure.
5594         (SIZEOF_AR_FILE_HDR_BIG): New macro.
5595         (xcoff_ar_hdr_big): New structure.
5596         (SIZEOF_AR_HDR_BIG): New macro.
5597         (xcoff_big_format_p): New macro.
5598         (xcoff_ardata_big): New macro.
5599         (arch_xhdr_big): New macro.
5600         (xcoff_slurp_armap): Handle large archives.
5601         (xcoff_archive_p): Detect large archives.
5602         (xcoff_read_ar_hdr): Handle large archives.
5603         (xcoff_openr_next_archived_file): Handle large archives.
5604         (xcoff_generic_stat_arch_elt): Handle large archives.
5605         (xcoff_write_armap_old): Rename from xcoff_write_armap.
5606         (xcoff_write_armap_big): New function.
5607         (xcoff_write_armap): New function, dispatch to _old or _big.
5608         (xcoff_write_archive_contents_old): Rename from
5609         xcoff_write_archive_contents.
5610         (xcoff_write_archive_contents_big): New function.
5611         (xcoff_write_archive_contents): New function, dispatch to _old or
5612         _big.
5613
5614 2000-02-18  Richard Henderson  <[email protected]>
5615
5616         * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
5617         and hide_symbol members.
5618         (elf_link_hash_copy_indirect): Remove.
5619         (elf_link_hash_hide_symbol): Remove.
5620         (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
5621         and elf_backend_hide_symbol.
5622         (_bfd_elf_link_hash_copy_indirect): Declare.
5623         (_bfd_elf_link_hash_hide_symbol): Declare.
5624         * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
5625         (_bfd_elf_link_hash_hide_symbol): Likewise.
5626         (_bfd_elf_link_hash_table_init): Don't init killed members.
5627         * elflink.h (elf_link_add_object_symbols): Use the bed function
5628         pointers not elf_link_hash_{copy_indirect,hide_symbol}.
5629         (elf_link_assign_sym_version): Likewise.
5630         * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
5631         (elf_backend_hide_symbol): Likewise.
5632         (elfNN_bed): Update for new members.
5633
5634 2000-02-17  Kevin Buettner  <[email protected]>
5635
5636         * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
5637         STACK_END_ADDR): Define for new core file format.
5638         (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
5639         for handling the vagaries of the various core file structures used
5640         by AIX over the years.
5641         (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
5642         Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
5643         core_dumpx structure.
5644
5645 Thu Feb 17 00:04:48 2000  J"orn Rennecke <[email protected]>
5646
5647         * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
5648         (bfd_mach_sh3_dsp): Likewise.
5649         (bfd_mach_sh4): Reinstate.
5650         (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
5651         * bfd-in2.h: Regenerate.
5652         * coff-sh.c (struct sh_opcode): flags is no longer short.
5653         (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
5654         (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
5655         (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
5656         (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
5657         (sh_opcodes): No longer const.
5658         (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
5659         (sh_insn_uses_reg): Check for USESAS and USESR8.
5660         (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
5661         (_bfd_sh_align_load_span): Return early for SH4.
5662         Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
5663         Take into account that field b of a parallel processing insn
5664         could be mistaken for a separate insn.
5665         * cpu-sh.c (arch_info_struct): New array elements for
5666         sh2, sh-dsp and sh3-dsp.
5667         Reinstate element for sh4.
5668         (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
5669         (SH4_NEXT): Reinstate.
5670         (SH3_NEXT, SH3E_NEXT): Adjust.
5671         * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
5672         * elf32-sh.c (sh_elf_set_private_flags): New function.
5673         (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
5674         (sh_elf_merge_private_data): New function.
5675         (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
5676         (bfd_elf32_bfd_copy_private_bfd_data): Define.
5677         (bfd_elf32_bfd_merge_private_bfd_data): Change to
5678         sh_elf_merge_private_data.
5679
5680 2000-02-13  Richard Henderson  <[email protected]>
5681
5682         * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
5683         hide_symbol members.
5684         (elf_link_hash_copy_indirect): New.
5685         (elf_link_hash_hide_symbol): New.
5686         * elflink.h (elf_link_add_object_symbols): Break out copy from
5687         indirect new new symbol to elf.c.
5688         (elf_link_assign_sym_version): Break out privatization of
5689         non-exported symbol to elf.c.
5690         * elf.c (_bfd_elf_link_hash_copy_indirect): New.
5691         (_bfd_elf_link_hash_hide_symbol): New.
5692         (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
5693
5694 2000-02-13  Ian Lance Taylor  <[email protected]>
5695
5696         * section.c (_bfd_strip_section_from_output): Add info parameter.
5697         If it passed as non-NULL, use it to check whether any input BFD
5698         has an input section which uses this output section.  Change all
5699         callers.
5700         * bfd-in2.h: Rebuild.
5701
5702         * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
5703         bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
5704         1999-11-29.
5705         * bfd-in2.h: Rebuild.
5706
5707 2000-02-10  Timothy Wall  <[email protected]>
5708
5709         * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
5710         allow final modifications of swapped-in symbol.
5711         (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
5712         * coffcode.h (coff_write_relocs): Use macro
5713         SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
5714         symbol index should be set to -1.
5715
5716 Thu Feb 10 20:07:50 GMT 2000  Toshiyasu Morita ([email protected])
5717
5718         * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
5719         USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
5720         * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
5721         * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
5722         sh_insns_uses_or_sets_freg): New functions.
5723         * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
5724         * (sh_insns_conflict): Use new functions and new macros to
5725         detect conflicts when two instructions both set same integer registers,
5726         both set same fp register, and both set special register.
5727
5728 2000-02-09  Timothy Wall  <[email protected]>
5729
5730         * coffgen.c (coff_real_object_p): Set arch/mach info prior to
5731         swapping in sections, so that the swapping routines have access to
5732         the arch/mach info.
5733
5734 2000-02-08 Mark Elbrecht <[email protected]>
5735
5736         * coff-go32.c: Update comment. Update copyright.
5737
5738 2000-01-27  Thomas de Lellis  <[email protected]>
5739
5740         * syms.c (bfd_decode_symclass)
5741         Two new class characters were added - 'V' and 'v'.  The
5742         meaning of 'W' is now restricted to just weak non-object
5743         symbols.  This allows differentiation between, for example,
5744         weak functions vs weak objects.  nm for example now dumps:
5745         'W' = weak global
5746         'w' = weak unresolved
5747         'V' = weak global object
5748         'v' = weak unresolved object
5749
5750         (bfd_is_undefined_symclass): New function.  Return true if the
5751         given symbol class represents and undefined/unresolved symbol.
5752
5753         (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
5754         unresolved symbols.
5755
5756         * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
5757
5758         * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
5759         STT_ARM_16BIT flag set, but it is not attached to a data object
5760         return STT_ARM_16BIT so that it will be treated as code by the
5761         disassembler.
5762
5763 2000-01-27  Alan Modra  <[email protected]>
5764
5765         * coff-i386.c (i3coff_object_p): Remove prototype.
5766         Update copyright.
5767
5768         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
5769         to name.  Update copyright.
5770
5771         * trad-core.c (trad_unix_core_file_p): Cast core_regsec
5772         assignment to avoid warning.  Update copyright.
5773
5774 2000-01-24  Robert Lipe  ([email protected])
5775
5776         * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
5777         instead of using GNU C extension.
5778
5779 2000-01-21  Nick Clifton  <[email protected]>
5780
5781         * libbfd.c (bfd_read): Do not attempt to get a negativly sized
5782         amount from a bfd_in_memory structure.
5783         (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
5784         structure.
5785
5786 2000-01-14  Nick Clifton  <[email protected]>
5787
5788         * linker.c (default_indirect_link_order): oops - fix incorrectly
5789         applied patch from Tim Wall.
5790
5791 2000-01-13  Timothy Wall ([email protected]>
5792
5793         * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
5794         = scnhsz, filhsz, relsz, aoutsz, etc)
5795
5796         * coffswap.h: Ditto.
5797
5798 2000-01-13  Nick Clifton  <[email protected]>
5799
5800         * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
5801         interwork thumb to arm stub.
5802
5803 2000-01-13  Timothy Wall ([email protected]>
5804
5805         * archures.c (bfd_octets_per_byte): New function: Return
5806         target byte size.
5807         (bfd_arch_mach_octets_per_byte): New function: Return target
5808         byte size.
5809
5810         * section.c: Distinguish between octets and bytes for usage of
5811         _cooked_size,  _raw_size, and output_offset.  Clarify
5812         description of bfd_set_section_contents.
5813
5814         * bfd-in2.h: Regenerate.
5815
5816         * coffgen.c: Indicate that the offset parameter is in bytes, not
5817         octets.
5818
5819         * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
5820         where appropriate to get the octet offset when calling
5821         bfd_set_section_contents.
5822         (bfd_coff_reloc_link_order): Ditto.
5823
5824         * linker.c (bfd_generic_reloc_link_order): Ditto.
5825         (_bfd_default_link_order): Ditto.
5826
5827         * reloc.c (bfd_perform_relocation):  Distinguish between octets
5828         and bytes.  Use octets when indexing into octet data; use bytes
5829         when calculating target addresses.
5830         (bfd_install_relocation): Ditto.
5831
5832         * srec.c (srec_write_section): Ditto.
5833
5834 2000-01-13  Nick Clifton  <[email protected]>
5835
5836         * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
5837         3 to 2.  This allows 4 byte sized sections, which is necessary for
5838         dlltool to build functioning DLLs.
5839
5840 2000-01-10  Philip Blundell  <[email protected]>
5841
5842         * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
5843         (arm*-*-conix*): New target.
5844
5845 2000-01-10  Egor Duda  <[email protected]>
5846
5847         * config.bfd: Include elf32_i386 vector to target list for cygwin
5848         and mingw.
5849
5850         * config.in: Undefine HAVE_WIN32_PSTATUS_T.
5851         * configure.in: Test for structure win32_pstatus_t in
5852         <sys/procfs.h>
5853         * configure: Regenerate.
5854
5855         * elf.c (elfcore_grok_win32pstatus): New function: process
5856         win32_pstatus_t notes in elf core file.
5857         (elfcore_grok_note): Detect win32_pstatus notes.
5858
5859 2000-01-03  Martin v. Loewis  <[email protected]>
5860
5861         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
5862         visibility.
5863         * elflink.h (elf_link_add_object_symbols): Combine visibilities.
5864         * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
5865
5866 For older changes see ChangeLog-9899
5867 \f
5868 Local Variables:
5869 mode: change-log
5870 left-margin: 8
5871 fill-column: 74
5872 version-control: never
5873 End:
This page took 0.354974 seconds and 4 git commands to generate.