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