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