]> Git Repo - binutils.git/blob - bfd/ChangeLog
Fix problem with objdump and 16 bit R_BA.
[binutils.git] / bfd / ChangeLog
1 2002-05-04  Tom Rix  <[email protected]>
2
3         * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
4         (coff_swap_reloc_out): Same.
5         * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
6         (xcoff_swap_reloc_out): Same.
7         (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8         case some 16 bit relocs. Add reloc value to output.
9         (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
10         R_RBR. Improve names. 
11         (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
12         (bfd_xcoff_backend_data): Update with new reloc swap names.
13         (bfd_pmac_xcoff_backend_data) : Same.
14         * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
15         (xcoff64_swap_reloc_out): Same.
16         (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit 
17         R_POS. Add reloc value to output.
18         (xcoff64_howto_table): Move 64 bit R_POS to first entry.  Add 16 
19         bit R_RBR. Improve names, masks. 
20         (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
21         (bfd_xcoff_backend_data): Update with new reloc swap names.
22         (bfd_xcoff_aix5_backend_data) : Same.
23
24 2002-05-04  Alan Modra  <[email protected]>
25
26         * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
27         bfd_count top_index, input_list, all_local_syms.
28         (elf32_hppa_setup_section_lists): New function, split from
29         elf32_hppa_size_stubs.
30         (elf32_hppa_next_input_section): Likewise.
31         (group_sections): Likewise.
32         (get_local_syms): Likewise.
33         (elf32_hppa_size_stubs): Adjust for split out functions.  Look for
34         stubs on undefined syms too.
35         (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
36         Only access htab elf fields when we have and elf hash table.
37         * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
38         (elf32_hppa_next_input_section): Declare.
39
40 2002-05-04  Bob Byrnes  <[email protected]>
41
42         * opncls.c (_bfd_new_bfd_contained_in): Check return value of
43         _bfd_new_bfd.
44
45 2002-05-03  H.J. Lu  ([email protected])
46
47         * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
48         (mips_elf_link_hash_newfunc): Initialize forced_local to false.
49         (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
50         to hide a global symbol.
51         (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
52         forced_local to true. 
53
54 2002-05-02  Richard Henderson  <[email protected]>
55
56         * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
57         vs SHN_UNDEF to zero.
58
59 2002-05-02  Alan Modra  <[email protected]>
60
61         * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
62         16 bit reloc.
63         <R_PPC64_SECTOFF_DS>: Likewise.
64         (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
65         SECTOFF reloc.
66         * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
67         (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
68         SECTOFF reloc.
69
70         * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
71         (ppc64_elf_ha_reloc): New function.
72         (ppc64_elf_brtaken_reloc): New function.
73         (ppc64_elf_sectoff_reloc): New function.
74         (ppc64_elf_sectoff_ha_reloc): New function.
75         (ppc64_elf_toc_reloc): New function.
76         (ppc64_elf_toc_ha_reloc): New function.
77         (ppc64_elf_toc64_reloc): New function.
78         (ppc64_elf_unhandled_reloc): New function.
79         (ppc64_elf_howto_raw): Use the above.
80         <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
81         <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset.  Fix dst_mask.
82         <R_PPC64_SECTOFF_DS>: Likewise.
83         (IS_ABSOLUTE_RELOC): Update.
84         (struct ppc_link_hash_table): Add have_undefweak.
85         (ppc64_elf_link_hash_table_create): Init.
86         (func_desc_adjust): Set have_undefweak.
87         (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier.  Only
88         add the .sfpr blr when have_undefweak.
89         (ppc64_elf_setup_section_lists): Check hash table flavour.
90         (ppc64_elf_next_input_section): Move output_section->owner test to
91         ppc64elf.em.
92         (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
93         and relocatable test.  Return TOCstart and don't set elf_gp.
94         (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
95         offset calculation.  Add assert on weak sym branch tweaks.
96         * elf64-ppc.h (ppc64_elf_set_toc): Delete.
97         (ppc64_elf_toc): Declare.
98         (ppc64_elf_next_input_section): Update.
99         
100 2002-05-01  Alan Modra  <[email protected]>
101
102         * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
103         file_name.
104
105 2002-05-01  Alan Modra  <[email protected]>
106
107         * elf64-ppc.c (CROR_151515, CROR_313131): Define.
108         (ppc64_elf_relocate_section): Use them.  Don't look for plt calls
109         on R_PPC64_ADDR24 relocs.  Require a nop or no link reg on plt
110         call branches.  Correct undefined weak destination.
111         (ppc64_elf_func_desc_adjust): Always create at least one blr in
112         .sfpr, and correct case where either only savef* or restf* is
113         needed.
114
115         Long branch stubs, multiple stub sections.
116         * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
117         (ppc64_elf_next_input_section): Declare.
118         * elf64-ppc.c: Move linker-only prototypes.
119         (STUB_SUFFIX): Define.
120         (enum ppc_stub_type): New.
121         (struct ppc_stub_hash_entry): New.
122         (struct ppc_branch_hash_entry): New.
123         (struct ppc_link_hash_entry): Add stub_cache, oh.
124         (struct ppc_link_hash_table): Add stub_hash_table etc.  Remove
125         sstub.  Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
126         Rename plt_overflow to stub_error.
127         (ppc_stub_hash_lookup): Define.
128         (ppc_branch_hash_lookup): Define.
129         (stub_hash_newfunc): New function.
130         (branch_hash_newfunc): New function.
131         (link_hash_newfunc): Init new fields.
132         (ppc64_elf_link_hash_table_create): Likewise.
133         (ppc64_elf_link_hash_table_free): New function.
134         (ppc_stub_name): New function.
135         (ppc_get_stub_entry): New function.
136         (ppc_add_stub): New function.
137         (create_linkage_sections): Use bfd_make_section_anyway.  Create
138         .branch_lt and .rela.branch_lt sections.  Don't create .stub.
139         (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
140         and set up for plt call stubs.  Link func and func desc syms.
141         (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
142         (func_desc_adjust): Avoid hash lookup when func desc sym available
143         via shortcut, and set links when processing.
144         (ppc64_elf_hide_symbol): Likewise.
145         (allocate_dynrelocs): Don't allocate stub section here.
146         (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
147         Remove sstub code.
148         (ppc_type_of_stub): New function.
149         (build_one_stub): Delete.
150         (ppc_build_one_stub): New function.
151         (ppc_size_one_stub): New function.
152         (ppc64_elf_setup_section_lists): New function.
153         (ppc64_elf_next_input_section): New function.
154         (group_sections): New function.
155         (get_local_syms): New function.
156         (ppc64_elf_size_stubs): Rewrite.
157         (ppc64_elf_build_stubs): Rewrite.
158         (ppc64_elf_relocate_section): Look up stub entry for REL24
159         relocs.  Don't propagate REL14* to dynamic objects.  Look for long
160         branch stubs if REL14* or REL24 relocs won't reach.
161         (bfd_elf64_bfd_link_hash_table_free): Define.
162
163 2002-04-30  Mark Mitchell  <[email protected]>
164
165         * bfd/config.bfd: Add support for powerpc-*-windiss.
166
167 2002-04-30  Tom Rix  <[email protected]>
168
169         * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
170         symbol names into the hash table.
171
172 2002-04-28  Tom Rix  <[email protected]>
173
174         * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
175         calulating relocations. 
176         (xcoff_complain_overflow) : Function table for relocation errors.
177         (xcoff_ppc_relocate_section): Use relocation and complain function 
178         tables. 
179         (xcoff_complain_overflow_unsigned_func): New complain function. 
180         (xcoff_complain_overflow_signed_func): Same.
181         (xcoff_complain_overflow_bitfield_func): Same.
182         (xcoff_complain_overflow_dont_func): Same.
183         (xcoff_reloc_type_crel): New recot function.
184         (xcoff_reloc_type_br): Same.
185         (xcoff_reloc_type_ba): Same.
186         (xcoff_reloc_type_toc): Same.
187         (xcoff_reloc_type_rel): Same.
188         (xcoff_reloc_type_neg): Same.
189         (xcoff_reloc_type_pos): Same.
190         (xcoff_reloc_type_fail): Same.
191         (xcoff_reloc_type_noop): Same.
192         * libxcoff.h : Declare common parts for xcoff64.
193         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
194         and complain function tables. 
195
196 2002-04-28  Alan Modra  <[email protected]>
197
198         * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
199         * elf32-hppa.c (elf32_hppa_final_link): Formatting.
200
201 2002-04-26  Alan Modra  <[email protected]>
202
203         * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
204         * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
205
206         * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
207         same as the output before calling elf_link_input_bfd.
208
209         * coffcode.h (coff_compute_section_file_positions): Set
210         section_tail after shuffling section list.
211
212 2002-04-24  Christian Groessler <[email protected]>
213
214         * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
215         addresses are 23bit with a special layout, not plain 32bit
216         values.  Prevent relocation of immediate values.
217
218 2002-04-24  Chris G. Demetriou  <[email protected]>
219
220         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
221         MIPS-16 ASE flags are set, print something to indicate that.
222
223 2002-04-23  Alan Modra  <[email protected]>
224
225         * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
226         under which a plt call stub is used.
227         (final_link_relocate): Similarly.
228         (allocate_plt_static): Clear h-plabel except when plt entry is
229         exclusively used for a plabel.
230         (allocate_dynrelocs): Use the above to simplify plt sizing.
231         (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
232         (elf32_hppa_link_hash_table_create): Init.
233         (BL22_RP): Define.
234         (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
235         (elf32_hppa_check_relocs): Set has_22bit_branch.
236
237         * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
238         (final_link_relocate): Likewise.
239
240 2002-04-22  Jakub Jelinek  <[email protected]>
241
242         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
243         search table if some FDE is DW_EH_PE_aligned encoded either.
244         (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
245
246 2002-04-22  Richard Smith  <[email protected]>
247             Jakub Jelinek  <[email protected]>
248
249         * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
250         (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
251         encoded personality.
252         (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
253         for CIE/FDE removal.
254
255 2002-04-20  Tom Rix  <[email protected]>
256
257         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
258
259 2002-04-20  Alan Modra  <[email protected]>
260
261         * archures.c (bfd_lookup_arch): Move the list order comment..
262         (struct bfd_arch_info): ..to where it belongs.
263         * bfd-in2.h: Regenerate.
264
265         * archures.c (bfd_lookup_arch): Add comment on list order.
266         (bfd_default_set_arch_mach): Use bfd_lookup_arch.
267         * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
268         is always at head of list.
269
270 2002-04-18  Nick Clifton  <[email protected]>
271
272         * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
273         insert_thumb_branch, record_thumb_to_arm_glue): Suppress
274         definition of these functions for ARM_WINCE builds as they are
275         not used.
276         (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
277         for ARM_WINCE builds.
278
279 2002-04-18  Nick Clifton  <[email protected]>
280
281         * coff-arm.c (bfd_arm_process_before_allocation): 
282
283 2002-04-17  J"orn Rennecke <[email protected]>
284
285         * cpu-sh.c (scan_mach): Delete.
286         (arch_info_struct): Replace scan_mach with bfd_default_scan.
287         (bfd_sh_arch): Likewise.
288
289 2002-04-16  Nick Clifton  <[email protected]>
290
291         * ihex.c (ihex_write_object_contents): Fix check for records
292         crossing 64K boundaries.
293
294 2002-04-16  Alan Modra  <[email protected]>
295
296         * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
297         type rather than just assuming entries are ELF.
298         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
299         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
300         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
301         * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
302         rather than elf_link_hash_entry.
303
304 2002-04-15  Richard Henderson  <[email protected]>
305
306         * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
307         n32 binaries.
308
309 2002-04-15  Michael Snyder  <[email protected]>
310
311         * opncls.c (bfd_close): Write contents if writeable.
312         Minor formatting tidy-ups.
313
314 2002-04-15  Alan Modra  <[email protected]>
315
316         * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
317
318 2002-04-12  Michael Snyder  <[email protected]>
319
320         * bfd-in.h (bfd_get_section_lma): New access macro.
321         Minor white-space fix-up.
322
323 2002-04-12  Alan Modra  <[email protected]>
324
325         * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
326         header pad.
327
328 2002-04-09  DJ Delorie  <[email protected]>
329
330         * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
331
332 2002-04-09  Casper S. Hornstrup <[email protected]>
333
334         * coffcode.h (coff_read_word): New.
335         (coff_compute_checksum): New.
336         (coff_apply_checksum): New.
337         (coff_write_object_contents): Call coff_apply_checksum () to
338         apply checksum to PE image.
339
340 2002-04-08  Randolph Chung  <[email protected]>
341
342         * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
343         (elf32_hppa_final_link): Split out sorting logic to..
344         * elf-hppa.h (elf_hppa_sort_unwind): ..here.
345         (elf_hppa_final_link): Call elf_hppa_sort_unwind.
346
347 2002-04-07  Andrew Cagney  <[email protected]>
348
349         * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
350         pattern.
351         * configure: Re-generate.
352
353 2002-04-07  Andrew Cagney  <[email protected]>
354
355         * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
356         is greater or equal to 4.3.3.
357         * configure: Regenerate.
358         Fix PR gdb/344.
359
360 2002-04-05  Hans-Peter Nilsson  <[email protected]>
361
362         * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
363         R_CRIS_32_PCREL>: Fix typo in name.
364         (cris_elf_check_relocs): Always create .rela.got here when
365         R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
366         (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
367         assume it's created.
368
369 2002-04-04  Daniel Jacobowitz  <[email protected]>
370
371         * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
372         * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
373         define.
374         * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
375         * bfd.c (bfd_link_hash_table_free): Define.
376         * binary.c (binary_bfd_link_hash_table_free): Define.
377         * bout.c (b_out_bfd_link_hash_table_free): Define.
378         * coff-rs6000.c (rs6000coff_vec): Include
379         _bfd_generic_link_hash_table_free.
380         (pmac_xcoff_vec): Likewise.
381         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
382         (aix5coff64_vec): Likewise.
383         * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
384         * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
385         (bfd_elf32_bfd_link_hash_table_free): Define.
386         * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
387         (bfd_elf32_bfd_link_hash_table_free): Define.
388         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
389         define.
390         * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
391         * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
392         * ieee.c (ieee_bfd_link_hash_table_free): Define.
393         * ihex.c (ihex_bfd_link_hash_table_free): Define.
394         * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
395         (_bfd_generic_link_hash_table_free): Add prototype.
396         * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
397         * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
398         * linker.c (_bfd_generic_link_hash_table_free): New function.
399         * mmo.c (mmo_bfd_link_hash_table_free): Define.
400         * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
401         * oasys.c (oasys_bfd_link_hash_table_free): Define.
402         * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
403         * som.c (som_bfd_link_hash_table_free): Define.
404         * srec.c (srec_bfd_link_hash_table_free): Define.
405         * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
406         * versados.c (versados_bfd_link_hash_table_free): Define.
407         * vms.c (vms_bfd_link_hash_table_free): New function.
408         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
409
410         * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
411         instead of bfd_alloc.
412         * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
413         * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
414         * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
415         * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
416         * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
417         * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
418         * elf.c (_bfd_elf_link_hash_table_create): Likewise.
419         * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
420         * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
421         * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
422         * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
423         * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
424         * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
425         * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
426         * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
427         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
428         * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
429         * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
430         * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
431         * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
432         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
433         * linker.c (_bfd_generic_link_hash_table_create): Likewise.
434         * m68klinux.c (linux_link_hash_table_create): Likewise.
435         * sparclinux.c (linux_link_hash_table_create): Likewise.
436         * sunos.c (sunos_link_hash_table_create): Likewise.
437         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
438
439         * targets.c: Add _bfd_link_hash_table_free to xvec.
440
441         * bfd-in2.h: Regenerate.
442         * libbfd.h: Regenerate.
443         * libcoff.h: Regenerate.
444
445 2002-04-04  Alan Modra  <[email protected]>
446
447         * dep-in.sed: Cope with absolute paths.
448         * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
449         Run "make dep-am".
450         * Makefile.in: Regenerate.
451         * coff-arm.c: Fix copyright date.
452         * cpu-h8300.c: Likewise.
453         * cpu-i370.c: Likewise.
454         * cpu-s390.c: Likewise.
455         * cpu-mips.c: Likewise.
456         * po/SRC-POTFILES.in: Regenerate.
457
458 2002-04-04  Thiemo Seufer <[email protected]>
459
460         * Makefile.am: Add elfxx-mips.c to the known backends.
461         (elf32-mips.lo): remove dependency to coff/external.h.
462         * Makefile.in: Regenerate.
463         * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
464         Remove elf32-mips.lo from 64 bit vectors. Update dependencies
465         accordingly.
466         * configure: Regenerate.
467         * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
468         (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
469         (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
470         MIPS specific backend functions.
471         * elf32-mips.c: Moved most code to elfxx-mips.c.
472         (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
473         static.
474         (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
475         (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
476         (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
477         (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
478         interface to allow selection of the right REL or RELA howto table.
479         (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
480         static. Let it refuse n32 objects.
481         (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
482         (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
483         (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
484         (elf32_mips_ignore_discarded_relocs): Rename from
485         _bfd_elf32_mips_ignore_discarded_relocs.
486         (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
487         (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
488         (elf_mips_howto_table_rela): Remove.
489         * elf64-mips.c: Moved most code to elfxx-mips.c.
490         (bfd_elf64_bfd_reloc_type_lookup): Make static.
491         (mips_elf64_rtype_to_howto): New function.
492         (mips_elf64_object_p): Likewise.
493         (elf64_mips_irix_compat): Likewise.
494         * elfxx-mips.c: New file containing common code merged together from
495         elf32-mips.c and elf64-mips.c.
496         * elfxx-mips.h: New file containing MIPS specific prototypes from
497         elf-bfd.h.
498         * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
499         elf_backend_mips_rtype_to_howto.
500
501 2002-04-04  Alan Modra  <[email protected]>
502
503         * srec.c (MAXCHUNK, Chunk): Revise comments.
504         (srec_write_record): Correct buffer size.
505         (srec_write_header): Do without intermediate buffer.
506         (srec_write_section): Validate Chunk.
507         (srec_write_terminator): Pass NULL instead of dummy buffer.
508         (srec_write_symbols): Pass file and symbol names directly to
509         bfd_bwrite so sprintf won't overflow buffer.
510
511 2002-04-03  Jakub Jelinek  <[email protected]>
512
513         * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
514         PC relative relocs against hidden symbols.
515         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
516
517 2002-04-03  Alan Modra  <[email protected]>
518
519         * elf.c (_bfd_elf_make_section_from_shdr): When setting section
520         LMAs, loop over segments until p_vaddr and p_memsz specify an
521         extent enclosing the section.
522
523 2002-04-02  Nick Clifton  <[email protected]>
524
525         * ihex.c (ihex_write_object_contents): Do not allow records to
526         cross a 64K boundary - wrap if necessary.
527
528 2002-04-01  Nathan Williams  <[email protected]>
529
530         * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
531         which caused the returned LWP ID to always be 0.
532
533 2002-04-01  Richard Henderson  <[email protected]>
534
535         * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
536         (elf32_sparc_relocate_section): Use it to figure out when to
537         initialize .got entries.
538         * elf64-sparc.c: Similarly.
539
540 2002-03-28  Alan Modra  <[email protected]>
541
542         * linker.c (link_action): Ignore duplicate warning syms.
543         (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
544         * elflink.h (elf_adjust_dynstr_offsets): Likewise.
545         (elf_adjust_dynamic_symbol): Likewise.
546         (elf_export_symbol): Likewise.
547         (elf_link_find_version_dependencies): Likewise.
548         (elf_link_assign_sym_version): Likewise.
549         (elf_link_sec_merge_syms): Likewise.
550         (elf_link_output_extsym): Likewise.
551         (elf_gc_sweep_symbol): Likewise.
552         (elf_gc_propagate_vtable_entries_used): Likewise.
553         (elf_gc_smash_unused_vtentry_relocs): Likewise.
554         (elf_gc_allocate_got_offsets): Likewise.
555         (elf_collect_hash_codes): Likewise.
556         * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
557         * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
558         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
559         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
560         * elf32-arm.h (elf32_arm_discard_copies): Likewise.
561         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
562         (elf_cris_discard_excess_dso_dynamics): Likewise.
563         * elf32-hppa.c (clobber_millicode_symbols): Likewise.
564         (mark_PIC_calls): Likewise.
565         (allocate_plt_static): Likewise.
566         (allocate_dynrelocs): Likewise.
567         (readonly_dynrelocs): Likewise.
568         * elf32-i386.c (allocate_dynrelocs): Likewise.
569         (readonly_dynrelocs): Likewise.
570         * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
571         * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
572         * elf32-mips.c (mips_elf_output_extsym): Likewise.
573         (mips_elf_sort_hash_table_f): Likewise.
574         (mips_elf_check_mips16_stubs): Likewise.
575         * elf32-s390.c (allocate_dynrelocs): Likewise.
576         (readonly_dynrelocs): Likewise.
577         * elf32-sh.c (sh_elf_discard_copies): Likewise.
578         * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
579         (xstormy16_relax_plt_realloc): Likewise.
580         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
581         (elf64_alpha_output_extsym): Likewise.
582         * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
583         * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
584         (mips_elf64_check_mips16_stubs): Likewise.
585         (mips_elf64_output_extsym): Likewise.
586         * elf64-ppc.c (func_desc_adjust): Likewise.
587         (allocate_dynrelocs): Likewise.
588         (readonly_dynrelocs): Likewise.
589         * elf64-s390.c (allocate_dynrelocs): Likewise.
590         (readonly_dynrelocs): Likewise.
591         * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
592         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
593         (readonly_dynrelocs): Likewise.
594         * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
595         * aoutx.h (aout_link_write_other_symbol): Likewise.
596         * cofflink.c (_bfd_coff_write_task_globals): Likewise.
597         (_bfd_coff_write_global_sym): Likewise.
598         * i386linux.c (linux_tally_symbols): Likewise.
599         * m68klinux.c (linux_tally_symbols): Likewise.
600         * sparclinux.c (linux_tally_symbols): Likewise.
601         * pdp11.c (aout_link_write_other_symbol): Likewise.
602         * sunos.c (sunos_scan_dynamic_symbol): Likewise.
603         * xcofflink.c (xcoff_build_ldsyms): Likewise.
604         (xcoff_write_global_symbol): Likewise.
605
606         * cofflink.c (_bfd_coff_final_link): Formatting.
607         * cpu-mips.c (mips_compatible): Make static, prototype.
608         * elf32-i386.c (elf_i386_check_relocs): Formatting.
609         * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
610         * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
611         * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
612         (mips_elf64_final_link): Likewise.
613         * elflink.h (elf_link_find_version_dependencies): Remove duplicate
614         prototype.
615
616 2002-03-27  Nick Clifton  <[email protected]>
617
618         * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
619         (SWAP_OUT_RELOC_OFFSET): Define.
620
621 2002-03-27  Gregory Steuck <[email protected]>
622
623         * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
624         terminating NULL if empty symbol table.
625         (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
626
627 2002-03-26  H.J. Lu  ([email protected])
628
629         * elflink.h (elf_link_input_bfd): Revert the last change since
630         the gcc exception handling isn't fixed yet.
631
632 2002-03-26  H.J. Lu  ([email protected])
633
634         * elflink.h (elf_link_input_bfd): Complain about relocations
635         against local symbols in discarded sections.
636
637 2002-03-26  Alan Modra  <[email protected]>
638
639         * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
640
641 2002-03-23  Alan Modra  <[email protected]>
642
643         * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
644         section file offset for !SEC_LOAD sections.
645
646 2002-03-21  Richard Earnshaw  <[email protected]>
647
648         * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
649         <case R_ARM_GOT>): Handle relocations to Thumb functions.
650
651 2002-03-21  Alan Modra  <[email protected]>
652
653         * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
654         Whitespace changes.
655         * archive.c: Update copyright date.
656         * bfd-in2.h: Regenerate.
657         * libbfd.h: Regenerate.
658         * Makefile.am: Run "make dep-am"
659         * Makefile.in: Regenerate.
660         * po/SRC-POTFILES.in: Regenerate.
661
662 2002-03-20  Daniel Jacobowitz  <[email protected]>
663
664         * dwarf2.c (struct funcinfo): Move up.
665         (lookup_address_in_function_table): New argument function_ptr.
666         Set it.
667         (lookup_address_in_line_table): New argument function.  If function
668         is non-NULL, use it to handle ``addr'' before the first line note of
669         the function.
670         (comp_unit_find_nearest_line): Update and swap calls to
671         lookup_address_in_function_table and lookup_address_in_line_table.
672         * syms.c (_bfd_stab_section_find_nearest_line): Use the first
673         N_SLINE encountered if we see an N_FUN before any N_SLINE.
674
675 2002-03-20  Tom Rix  <[email protected]>
676
677         * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from 
678         _bfd_xcoff_generic_stat_arch_elt.  Fix format check.
679         * coff64-rs6000.c :  Use _bfd_xcoff_stat_arch_elt. 
680
681 2002-03-19  Tom Rix  <[email protected]>
682
683         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all 
684         dynamic objects in archives.
685
686 2002-03-19  Hans-Peter Nilsson  <[email protected]>
687
688         * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
689         STT_NOTYPE symbols to STT_OBJECT.
690
691 2002-03-18  Jan Hubicka  <[email protected]>
692
693         * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
694
695 2002-03-18  Tom Rix  <[email protected]>
696
697         * aix5ppc.core.c : New file for AIX 5 64 bit core support.
698         * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
699         * coff-rs6000 (do_pad) : New function for archive padding.
700         (do_copy) : New function for object file copying in archives.
701         (do_shared_object_padding) : New function for padding shared
702         objects to their text section alignment in archives.
703         (bfd_xcoff_ar_achive_set_magic) : Stub.
704         (xcoff_write_armap_big) : Use do_copy and do_pad.
705         (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
706         do_copy and do_pad.
707         * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
708         bfd_xcoff_magic_number. 
709         (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
710         fop.
711         (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
712         (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
713         (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
714         * rs6000-core.c : Update copyright date.
715         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL 
716         csectpp.
717         * coffcode.h (coff_new_section_hook) : Use new accessor macros.
718         (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
719         (coff_set_flags) : Use bfd_xcoff_magic_number.
720         * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
721         * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
722         * Makefile.am : Same.
723         * config.bfd : Same.
724         * targets.c : Same.
725         * configure : Regnerate.
726         * Makefile.in : Same.
727         * bfd-in2.h : Same.
728
729 2002-03-18  Nick Clifton  <[email protected]>
730
731         * po/fr.po: Updated version.
732
733 2002-03-18  Alan Modra  <[email protected]>
734
735         * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
736         * libbfd.h: Regenerate.
737         * archive.c (coff_write_armap): Pass on failures from
738         bfd_write_bigendian_4byte_int.
739
740 2002-03-14  H.J. Lu <[email protected]>
741
742         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
743         error to bfd_error_nonrepresentable_section for reinit_array
744         section in DSO.
745
746 2002-03-14  Nick Clifton  <[email protected]>
747
748         * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
749         OR it in rather than replacing previously selected flags.
750
751         * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
752         (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
753
754 2002-03-14  Alan Modra  <[email protected]>
755
756         * cpu-mips.c (mips_compatible): New.  Don't check bits_per_word.
757         (N): Use the above.
758         * elflink.h (elf_bfd_final_link): Revert last change.  Instead,
759         ensure reloc size matches before calling elf_link_input_bfd.
760         Add an assert to check reloc size when counting output relocs.
761
762 2002-03-14  Nick Clifton  <[email protected]>
763
764         * mmo.c (mmo_get_loc): Return NULL rather than false.
765
766 2002-03-13  Nick Clifton  <[email protected]>
767
768         * po/fr.po: Updated version.
769
770 2002-03-13  Alan Modra  <[email protected]>
771
772         * archures.c (bfd_default_compatible): Test bits_per_word.
773         * cpu-i386.c (i386_compatible): Remove.  Replace occurrences with
774         bfd_default_compatible.
775         * cpu-i370.c (i370_compatible): Likewise.
776         * cpu-sparc.c (sparc_compatible): Likewise.
777         * cpu-h8300.c (compatible): Test in->arch == out->arch.
778
779         * elflink.h: Formatting fixes.
780         (elf_link_output_extsym): Merge undefined and undef weak cases.
781
782         * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
783         when word size of input matches output word size.
784
785 2002-03-12  Andreas Jaeger  <[email protected]>
786
787         * cpu-i386.c (i386_compatible): New.  Use it instead of
788         bfd_default_compatible.
789
790 2002-03-07  H.J. Lu  ([email protected])
791
792         * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
793         as the type for bfd_reloc_val.
794
795 2002-03-05  John David Anglin  <[email protected]>
796
797         * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
798         (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
799         (elf_hppa_final_link_relocate): Correct relocations for indirect
800         references to local data through the DLT.  Fix .opd creation for
801         local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
802         relocations.  Use e_lsel selector for R_PARISC_DLTIND21L,
803         R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
804         "Processor-Specific ELF for PA_RISC, Version 1.43" document.
805         Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
806         * elf32-hppa.c (final_link_relocate): Revise relocation selectors
807         as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
808
809 2002-03-05  Jakub Jelinek  <[email protected]>
810
811         * merge.c (_bfd_merge_sections): Don't segfault if there
812         is nothing to merge due to GC.
813
814 2002-03-05  Alan Modra  <[email protected]>
815
816         * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
817         symbols that have been forced local.
818
819         * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
820         to output forced local syms for non-shared link.
821         (elf_link_output_extsym): Tweak condition for calling backend
822         adjust_dynamic_symbol so that previous behaviour is kept.
823         Whitespace changes throughout file.
824
825 2002-03-04  H.J. Lu <[email protected]>
826
827         * elf.c (bfd_section_from_shdr): Handle special sections,
828         .init_array, .fini_array and .preinit_array.
829         (elf_fake_sections): Likewise.
830
831         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
832         DT entry only if the section is in output for .init_array,
833         .fini_array and .preinit_array. Complain about .preinit_array
834         section in DSO.
835         (elf_bfd_final_link): Warn zero size for .init_array,
836         .fini_array and .preinit_array sections.
837
838         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
839         SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
840         (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
841         .preinit_array.
842
843 2002-03-04  Alan Modra  <[email protected]>
844
845         * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
846         * configure: Regenerate.
847
848 2002-03-02  Tom Rix  <[email protected]>
849
850         * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
851         symbolic equiv.
852         * coff-rs6000.c (xcoff_howto_table): Same.
853
854 2002-03-01  David Mosberger  <[email protected]>
855
856         * elflink.h (size_dynamic_sections): If section named
857         ".preinit_array" exists, create DT_PREINIT_ARRAY and
858         DT_PREINIT_ARRAYSZ entries in dynamic table.  Analogously for
859         ".init_array" and ".fini_array".
860         (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
861         DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
862         DT_FINI_ARRAY.
863
864 2002-02-26  Andrew Macleod  <[email protected]>
865
866         * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
867         dynsyms.
868
869 2002-02-25  Alan Modra  <[email protected]>
870
871         * elf64-hppa.h: Update copyright date.
872
873         * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
874         (ppc64_elf_relocate_section): Don't generate power4 style branch
875         hints for *_BRTAKEN and *_BRNTAKEN relocs.
876
877 2002-02-22  Jakub Jelinek  <[email protected]>
878
879         * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
880         last patch.
881         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
882
883 2002-02-21  Andreas Jaeger  <[email protected]>
884
885         * elf64-x86-64.c: Major rework that introduces all recent changes
886         to the x86-64 backend.  Get a closer match to elf32-i386.
887         (struct elf64_x86_64_dyn_relocs): Rename from
888         elf64_x86_64_pcrel_relocs_copied, add additional fields.  Change
889         all users.
890         (struct elf64_x86_64_link_hash_table): Add short cuts to some
891         sections.
892         (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
893         remove casts, initialize new hash members.
894         (create_got_section): New.
895         (elf64_x86_64_create_dynamic_sections): New.
896         (elf64_x86_64_copy_indirect_symbol): New.
897         (elf64_x86_64_check_relocs): Don't allocate space for dynamic
898         relocs, .got or .relgot here but do it in allocate_dynrelocs.
899         Reference count possible .plt and .got entries.  Don't test input
900         section SEC_READONLY here to try to avoid copy relocs, and keep
901         dyn_relocs regardless of ELF_LINK_NON_GOT_REF.  Don't set
902         DF_TEXTREL here.  Delay setting of variables until needed.  Cache
903         pointer to "sreloc" section in elf_section_data. Tweak condition
904         under which .got created.  Report files with bad relocation
905         section names.
906         (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
907         Reference count possible .plt entries.  Don't deallocate .got and
908         .relgot space here.
909         (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc.  Don't
910         do copy reloc processing for weakdefs.  Remove redundant casts and
911         aborts.  Delay setting of vars until needed.  Move creation of
912         dynamic symbols and allocation of .plt and .rela.plt to
913         allocate_dynrelocs.  Replace BFD_ASSERT with abort.
914         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
915         (allocate_dynrelocs): New.
916         (readonly_dynrelocs): New.
917         (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
918         Allocate space for dyn relocs.  Replace BFD_ASSERT with abort.
919         Zero out the dynamic allocated content space.
920         (elf64_x86_64_discard_copies): Removed.
921         (elf64_x86_64_relocate_section): Make use of dynamic section
922         short-cuts.  Localise vars, and delay setting.  Better error
923         reporting, replace BFD_ASSERT with abort.  Check
924         ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
925         regular object file and tread the weak definition as the normal
926         one.  Don't discard relocs for undefweak or undefined symbols and
927         check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
928         relocs.
929         (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
930         symbols that have been forced local.  Use same test to decide if
931         we can use a relative reloc for got as relocate_section.  Expand
932         SHN_UNDEF comment.  Move expressions out of function calls.
933         Replace BFD_ASSERT with abort.
934         (bfd_elf64_bfd_final_link): Removed.
935         (elf_backend_copy_indirect_symbol): Define.
936
937 2002-02-20  Tom Rix  <[email protected]>
938
939         * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
940         (_bfd_xcoff_reloc_type_lookup): Use it.
941         * coff64-rs6000.c (xcoff64_howto_table): Same.
942         (xcoff64_reloc_type_lookup): Same.
943
944 2002-02-20  Peter Schauer  <[email protected]>
945
946         * osf-core.c (osf_core_vec):  OSF/1 (Digital Unix) core files are
947         little endian.
948
949 2002-02-19  Martin Schwidefsky  <[email protected]>
950
951         * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
952         (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
953         * bfd-in2.h: Regenerate.
954         * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
955         Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
956         with "s390:64-bit".
957         * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
958         (elf_s390_reloc_type_lookup): Likewise.
959         (elf_s390_check_relocs): Likewise.
960         (elf_s390_gc_sweep_hook): Likewise.
961         (elf_s390_relocate_section): Likewise.
962         (elf_s390_object_p): Use renamed architecture define.
963         * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
964
965 2002-02-19  Frank Ch. Eigler  <[email protected]>
966
967         * syms.c (stt[]): Sorted.  Added .init/.fini -> "t" mapping.
968
969 2002-02-19  Jakub Jelinek  <[email protected]>
970
971         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
972         absptr -> pcrel optimization for shared libs.
973         Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
974         library cannot be converted to pcrel.
975         (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
976         relative.
977         * elf32-i386.c (elf_i386_relocate_section): If
978         _bfd_elf_section_offset returned -2, skip, but make sure the
979         relocation is installed.
980         * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
981         * elf32-cris.c (cris_elf_relocate_section): Likewise.
982         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
983         * elf32-i370.c (i370_elf_relocate_section): Likewise.
984         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
985         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
986         * elf32-s390.c (elf_s390_relocate_section): Likewise.
987         * elf32-sh.c (sh_elf_relocate_section): Likewise.
988         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
989         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
990         * elf64-s390.c (elf_s390_relocate_section): Likewise.
991         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
992         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
993         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
994         * elf64-alpha.c (elf64_alpha_relocate_section): Handle
995         _bfd_elf_section_offset returning -2 the same way as -1.
996         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
997         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
998         and BFD_ASSERT.
999         * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
1000
1001 2002-02-18  Tom Rix  <[email protected]>
1002
1003         * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
1004         (bfd_xcoff_size_dynamic_sections): Same.
1005         * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
1006         (bfd_xcoff_size_dynamic_sections): Same.
1007         * coff-rs6000.c (xcoff_generate_rtinit): Same.
1008         * coff-rs646000.c (xcoff64_generate_rtinit): Same.
1009         * libxcoff.h (struct xcoff_backend_data_rec): Same.
1010         * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
1011         * bfd-in2.h: Regenerate.
1012
1013 2002-02-18  Alan Modra  <[email protected]>
1014
1015         * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
1016         (struct ppc_link_hash_table): Add sfpr.
1017         (ppc64_elf_link_hash_table_create): Init it.
1018         (ppc64_elf_create_dynamic_sections): Split creation of .stub and
1019         .glink out to..
1020         (create_linkage_sections): ..here.  Make .sfpr too.
1021         (ppc64_elf_check_relocs): Call create_linkage_sections, and set
1022         dynobj early.
1023         (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
1024         (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
1025         ._restf* functions, and create as needed.
1026         (func_desc_adjust): Only force_local for shared libs.
1027
1028 2002-02-18  David O'Brien  <[email protected]>
1029
1030         * configure.in: Bump version number post 2.12 branching.
1031         * configure: Regenerate.
1032
1033 2002-02-17  Hans-Peter Nilsson  <[email protected]>
1034
1035         * mmo.c: Correct and improve comments.
1036         (mmo_write_chunk): Store trailing byte in bfd buffer; don't
1037         zero-pad.  Use input to fill up non-empty bfd buffer.
1038         (mmo_flush_chunk): New function.
1039         (mmo_write_loc_chunk): Add parameter last_vmap, all callers
1040         changed.  Don't emit location specifier if VMA is same as
1041         *LAST_VMAP after omitting leading zero contents.  Call
1042         mmo_flush_chunk before emitting location specifier.
1043         (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
1044         with mmo_write_loc_chunk calls.
1045         (mmo_internal_write_section): Call mmo_flush_chunk after
1046         mmo_write_chunk.
1047         (mmo_write_symbols_and_terminator): Move :Main to first position
1048         in symbol array.  Add faked one if it does not exist if there are
1049         other symbols.  Don't add it if there are no symbols at all.  Move
1050         out test for value of :Main from symbol loop.  Rename table
1051         fakemain to maintable and variable mainsym to fakemain.
1052
1053 2002-02-15  Richard Henderson  <[email protected]>
1054
1055         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
1056         section with no got matches any got.  Simplify error generaion.
1057
1058 2002-02-15  Alan Modra  <[email protected]>
1059
1060         Support arbitrary length fill patterns.
1061         * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
1062         (_bfd_default_link_order): Remove bfd_fill_link_order code.
1063         Call default_data_link_order.
1064         (default_fill_link_order): Delete.
1065         (default_data_link_order): New function.
1066         * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
1067         of bfd_fill_link_order with bfd_data_link_order.
1068         * elf64-alpha.c (elf64_alpha_final_link): Likewise.
1069         * elf64-mips.c (mips_elf64_final_link): Likewise.
1070
1071         * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
1072         Correct value returned in "end" for "0x<non-hex>".
1073
1074 2002-02-14  Nick Clifton  <[email protected]>
1075
1076         * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
1077         (scan): Test against 'mach' field in info structure.
1078
1079 2002-02-14  Alan Modra  <[email protected]>
1080
1081         * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
1082
1083 2002-02-14  Matt Fredette  <[email protected]>
1084
1085         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
1086         EF_M68000.
1087
1088 2002-02-13  Nick Clifton  <[email protected]>
1089
1090         * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
1091         non-zero physical addresses when adjusting the LMAs of new
1092         sections.
1093
1094 2002-02-12  John David Anglin  <[email protected]>
1095
1096         * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
1097         from _bfd_elf_hppa_gen_reloc_type.
1098         (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
1099         * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
1100         * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
1101         * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
1102
1103 2002-02-12  Alexandre Oliva  <[email protected]>
1104
1105         * elf-m10300.c (mn10300_elf_relax_section): Skip section before
1106         loading its contents if there's nothing to do in it.
1107
1108 2002-02-12  Alan Modra  <[email protected]>
1109
1110         * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
1111         64k boundary.
1112
1113         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
1114         DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
1115         (ppc64_elf_finish_dynamic_sections): Set values for them.
1116
1117 2002-02-11  Michael Snyder  <[email protected]>
1118
1119         * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
1120         * elf.c (elfcore_grok_pstatus): Add prototype.
1121         (elfcore_grok_lwpstatus): Add prototype.
1122         (elfcore_write_lwpstatus): New function.
1123         (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
1124
1125 2002-02-11  Alexandre Oliva  <[email protected]>
1126
1127         * elf32-sh.c: Added missing prototypes.
1128         * elf32-sh64.c: Likewise.
1129         (sh_elf_align_loads): Mark unused args as such.
1130         * elf64-sh64.c: Added missing prototypes.
1131         (struct elf_sh64_link_hash_entry): Fix typo.
1132         (sh_elf64_relocate_section): Fix info argument passed to
1133         _bfd_elf_section_offset.
1134
1135 2002-02-11  Alan Modra  <[email protected]>
1136
1137         * Makefile.am: "make dep-am".
1138         * Makefile.in: Regenerate.
1139         * aclocal.m4: Regenerate.
1140         * config.in: Regenerate.
1141         * configure: Regenerate.
1142
1143 2002-02-10  Daniel Jacobowitz  <[email protected]>
1144
1145         * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
1146         variable warnings.
1147         * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
1148         comparison warning.
1149         * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
1150         cast warnings for the common case.
1151
1152 2002-02-10  Hans-Peter Nilsson  <[email protected]>
1153
1154         * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
1155         vectors.
1156         (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
1157         vectors.
1158
1159 2002-02-09  Richard Henderson  <[email protected]>
1160
1161         * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
1162         (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
1163         (elf64_alpha_relocate_section): Likewise.
1164         * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
1165         * bfd-in2.h, libbfd.h: Rebuild.
1166
1167 2002-02-09  Hans-Peter Nilsson  <[email protected]>
1168
1169         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
1170         that base-plus-offset reloc accounting is consistent.
1171         (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
1172         up to date for undefined symbols.
1173
1174 2002-02-08  Eric Christopher  <[email protected]>
1175
1176         From Rainer Orth  <[email protected]>
1177
1178         * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
1179         sections for the O32 ABI.
1180
1181 2002-02-08  Chris Demetriou  <[email protected]>
1182
1183         * elf32-arm.h: Fix formatting of _("...").
1184         * elf32-d10v.c: Likewise.
1185         * elf32-m68k.c: Likewise.
1186         * elf32-mips.c: Likewise.
1187
1188 2002-02-08  Ivan Guzvinec <[email protected]>
1189
1190         * coff-or32.c: Fix compile time warning messages.
1191
1192 2002-02-08  Alexandre Oliva  <[email protected]>
1193
1194         Contribute sh64-elf.
1195         2002-01-23  Alexandre Oliva  <[email protected]>
1196         * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
1197         R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
1198         R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
1199         R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
1200         R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
1201         R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
1202         R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
1203         R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
1204         R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
1205         New relocs.
1206         * libbfd.h, bfd-in2.h: Rebuilt.
1207         * elf32-sh.c (sh_elf_howto_table): Define new relocs.
1208         (sh_reloc_map): Map them.
1209         (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
1210         elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
1211         elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
1212         elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
1213         elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
1214         elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
1215         movi_shori_putval) [INCLUDE_SHMEDIA]: New.
1216         (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
1217         datalabel_got_offset.
1218         (sh_elf_link_hash_newfunc): Initialize it.
1219         (sh_elf_relocate_section): Augment the scope of
1220         seen_stt_datalabel.  Introduce GOTPLT support.  Extend GOTPC, PLT,
1221         GOT and GOTOFF handling to new SHmedia relocation types.  Support
1222         GOT_BIAS.
1223         (sh_elf_check_relocs): Likewise.
1224         (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
1225         PLT entries using movi_shori_putval.  Support GOT_BIAS.
1226         (sh_elf_finish_dynamic_sections): Likewise.
1227         * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
1228         relocation, it's now done by the caller.
1229         (GOT_BIAS): New.
1230         * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
1231         elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
1232         elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
1233         elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
1234         elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
1235         elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
1236         sh64_elf64_hash_table): New.
1237         (sh_elf64_howto_table): Introduce new relocs.
1238         (sh_elf64_info_to_howto): Accept new PIC relocs.
1239         (sh_elf64_relocate_section): Augment the scope of
1240         seen_stt_datalabel.  Support new PIC relocs.
1241         (sh_elf64_check_relocs): Support new PIC relocs.
1242         (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
1243         elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
1244         elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
1245         elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
1246         sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
1247         movi_shori_putval, movi_3shori_putval,
1248         sh64_elf64_create_dynamic_sections,
1249         sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
1250         sh64_elf64_size_dynamic_sections,
1251         sh64_elf64_finish_dynamic_symbol,
1252         sh64_elf64_finish_dynamic_sections): New.
1253         (elf_backend_create_dynamic-sections,
1254         bfd_elf64_bfd_link_hash_table_create,
1255         elf_backend_adjust_dynamic_symbol,
1256         elf_backend_size_dynamic_sections,
1257         elf_backend_finish_dynamic_symbol,
1258         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1259         elf_backend_plt_readonly, elf_backend_want_plt_sym,
1260         elf_backend_got_header_size, elf_backend_plt_header_size):
1261         Define.
1262         2001-05-16  Alexandre Oliva  <[email protected]>
1263         * elf32-sh.c: Renumbered and renamed some SH5 relocations to
1264         match official numbers and names; moved unmaching ones to the
1265         range 0xf2-0xff.
1266         * elf32-sh64.c, elf64-sh64.c: Likewise.
1267         2001-03-12  DJ Delorie  <[email protected]>
1268         * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
1269         sections.
1270         2001-03-12  DJ Delorie  <[email protected]>
1271         * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
1272         be aligned.
1273         * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
1274         2001-01-14  Hans-Peter Nilsson  <[email protected]>
1275         * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
1276         (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
1277         .cranges section with SEC_SORT_ENTRIES set.
1278         (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
1279         incoming sorted .cranges section.
1280         (sh64_bfd_elf_copy_private_section_data): New.
1281         (sh64_elf_final_write_processing): Only sort .cranges and modify
1282         start address if called by linker.
1283         2001-01-08  Ben Elliston  <[email protected]>
1284         * elf32-sh64.c (sh64_elf_final_write_processing): Activate
1285         Hans-Peter Nilsson's set bit 0 patch from       2001-01-06.
1286         * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
1287         2001-01-06  Hans-Peter Nilsson  <[email protected]>
1288         * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
1289         line.  Add comments before all entries.
1290         <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
1291         comment.
1292         (sh_elf64_reloc): Correct head comment.
1293         (sh_elf64_relocate_section): Correct spacing.
1294         <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
1295         instead call reloc_dangerous callback.
1296         <case R_SH_SHMEDIA_CODE>: New case.
1297         (sh_elf64_gc_mark_hook): Correct spacing.
1298         (sh_elf64_check_relocs): Ditto.
1299         * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
1300         New case.
1301         * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
1302         functions.
1303         (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
1304         clarify describing comment.  Add comments before all entries.
1305         (sh_elf_relocate_section) <relocating for a local symbol>: Do not
1306         honour STO_SH5_ISA32; instead call reloc_dangerous callback.
1307         2001-01-06  Hans-Peter Nilsson  <[email protected]>
1308         Sort .cranges section in final link.  Prepare to set bit 0 on
1309         entry address.
1310         * elf32-sh64.c (struct sh64_find_section_vma_data): New.
1311         (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
1312         (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
1313         .cranges section.
1314         (sh64_backend_section_from_shdr): New, to recognize
1315         SHT_SH5_CR_SORTED on incoming .cranges section.
1316         (elf_backend_section_from_shdr): Define.
1317         (sh64_elf_final_write_processing): Sort outgoing .cranges
1318         section.  (New, temporarily disabled:) Set bit 0 on entry address
1319         according to ISA type.
1320         (sh64_find_section_for_address): New.
1321         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
1322         crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
1323         (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c.  Use
1324         bfd_malloc, not xmalloc.
1325         (sh64_get_contents_type): Move here from opcodes/sh64-dis.c.  Make
1326         global.
1327         * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
1328         temporarily disabled) setting bit 0 on entry address.
1329         (elf_backend_final_write_processing): Define.
1330         2001-01-05  Hans-Peter Nilsson  <[email protected]>
1331         * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
1332         be a proper relocation for PTA and PTB rather than a marker.
1333         <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
1334         R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
1335         R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
1336         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
1337         R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
1338         Zero src_mask.
1339         * elf64-sh64.c: Ditto.
1340         (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
1341         * elf32-sh64.c: Include opcodes/sh64-opc.h
1342         (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
1343         argument.  Drop const qualifiers from "bfd *" and "bfd_byte *"
1344         parameters.  No unused parameters.  Caller changed.
1345         <case R_SH_PT_16>: New case.
1346         * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
1347         * Makefile.in: Regenerate.
1348         2000-12-30  Hans-Peter Nilsson  <[email protected]>
1349         * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
1350         all code sections.
1351         (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
1352         (sh64_elf_merge_private_data): Ditto.
1353         * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
1354         to access stored section flags.
1355         (sh64_elf_final_write_processing): Return immediately unless
1356         called by linker.  Use sh64_elf_section_data (cranges) to get size
1357         of linker-generated cranges entries.
1358         (sh64_elf_copy_private_data): Add missing "return true".
1359         (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
1360         (sh_elf64_merge_private_data): Ditto.
1361         2000-12-19  Hans-Peter Nilsson  <[email protected]>
1362         * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
1363         elf64-sh64.c:sh64_elf_fake_sections.
1364         (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
1365         2000-12-18  Hans-Peter Nilsson  <[email protected]>
1366         * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
1367         (sh64_elf_final_write_processing): New.
1368         (elf_backend_final_write_processing): Define.
1369         (sh64_elf_fake_sections): Get header flags from tdata field.
1370         (sh64_elf_copy_private_data): Do not call
1371         sh64_elf_copy_private_data_internal, just copy e_flags field.
1372         (sh64_elf_merge_private_data): Do not call
1373         sh64_elf_copy_private_data_internal.
1374         2000-12-12  Hans-Peter Nilsson  <[email protected]>
1375         Remove EF_SH64_ABI64, let ELF size make difference.
1376         Remove SH64-specific BFD section flag.
1377         * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
1378         containing SHmedia through elf_section_data (asect)->tdata
1379         non-zero, not using a BFD section flag.
1380         (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
1381         (sh64_elf_merge_private_data): Similar.
1382         (elf_backend_section_flags): Don't define.
1383         (sh64_elf_backend_section_flags): Delete.
1384         * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
1385         not EF_SH64_ABI64.
1386         (sh_elf64_merge_private_data): Similar.
1387         * section.c (Section flags definitions): Don't define
1388         SEC_SH_ISA_SHMEDIA.
1389         (bfd-in2.h): Regenerate.
1390         2000-12-09  Hans-Peter Nilsson  <[email protected]>
1391         Make DataLabel references work with partial linking.
1392         * elf32-sh64.c: Fix formatting.
1393         (sh64_elf_link_output_symbol_hook): New.
1394         (elf_backend_link_output_symbol_hook): Define to
1395         sh64_elf_link_output_symbol_hook.
1396         (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
1397         undefined if partial linking.  Adjust sanity check.
1398         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
1399         (elf_backend_link_output_symbol_hook): Define to
1400         sh64_elf64_link_output_symbol_hook.
1401         (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
1402         undefined if partial linking.  Adjust sanity check.
1403         2000-12-07  Hans-Peter Nilsson  <[email protected]>
1404         Implement semantics for inter-file DataLabel references.
1405         * elf64-sh64.c (DATALABEL_SUFFIX): Define.
1406         (sh64_elf64_add_symbol_hook): New.
1407         (sh_elf64_relocate_section): If passing an indirect symbol with
1408         st_type STT_DATALABEL on the way to a symbol with st_other
1409         STO_SH5_ISA32, do not bitor 1 to the relocation.
1410         (elf_backend_add_symbol_hook): Define to
1411         sh64_elf64_add_symbol_hook.
1412         * elf64-sh32.c: Tweak comments.
1413         (DATALABEL_SUFFIX): Define.
1414         (sh64_elf_add_symbol_hook): New.
1415         (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
1416         * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
1417         symbol with st_type STT_DATALABEL on the way to a symbol with
1418         st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
1419         2000-12-05  Hans-Peter Nilsson  <[email protected]>
1420         Pass through STT_DATALABEL.
1421         * elf32-sh64.c (sh64_elf_get_symbol_type): New.
1422         (elf_backend_get_symbol_type): Define.
1423         * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
1424         (elf_backend_get_symbol_type): Define.
1425         2000-11-30  Hans-Peter Nilsson  <[email protected]>
1426         * elf32-sh64.c: Tweak comments.
1427         (sh64_elf_copy_private_data_internal): Add prototype.
1428         (bfd_elf32_bfd_set_private_flags): Define.
1429         (sh64_elf_copy_private_data_internal): Compare machine name, not
1430         textual BFD target name, to check whether to copy section flag
1431         SHF_SH5_ISA32.
1432         (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
1433         Tweak section-contents-type-mismatch message.
1434         (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
1435         Validize reloc-types.
1436         * elf64-sh64.c: New file.
1437         * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
1438         * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
1439         (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
1440         Regenerate dependencies.
1441         * Makefile.in: Regenerate.
1442         * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
1443         bfd_elf64_sh64l_vec.
1444         * configure.in: Handle bfd_elf64_sh64_vec and
1445         bfd_elf64_sh64l_vec.
1446         * configure: Regenerate.
1447         * po/POTFILES.in: Regenerate.
1448         * po/bfd.pot: Regenerate.
1449         2000-11-29  Hans-Peter Nilsson  <[email protected]>
1450         * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
1451         anything else but EF_SH64 and EF_SH64_ABI64.
1452         (sh64_elf_merge_private_data): Emit error for anything else but
1453         EF_SH64 and EF_SH64_ABI64.
1454         * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
1455         from targ_selvecs.
1456         * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
1457         bfd_elf32_sh64l_vec as a temporary measure.
1458         * configure: Regenerate.
1459         2000-11-27  Hans-Peter Nilsson  <[email protected]>
1460         * cpu-sh.c (arch_info_struct): Include sh5 item
1461         unconditionalized.
1462         * config.bfd (sh64-*-elf*): Do not set targ_cflags.
1463         Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
1464         bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
1465         * elf32-sh64.c: Tweak comments.
1466         (sh64_elf_set_mach_from_flags): Recognize all machine flags that
1467         are proper subsets of SH64 as bfd_mach_sh5.  Add EF_SH64_ABI64.
1468         (sh64_elf_copy_private_data_internal): Wrap long line.
1469         (sh64_elf_merge_private_data): Rewrite to allow objects from
1470         SH64 subsets to be linked together.
1471         (INCLUDE_SHMEDIA): Define.
1472         * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
1473         Parenthesize plus-expression inside or-expression.
1474         <global symbol>: Ditto.
1475         (sh_elf_set_mach_from_flags): Remove code refusing
1476         deleted EF_SH64_32BIT_ABI flag.
1477         2000-11-26  Hans-Peter Nilsson  <[email protected]>
1478         * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
1479         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
1480         R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
1481         (sh_elf_relocate_section) <local symbol>: Or 1 in
1482         calculation of relocation if sym->st_other & STO_SH5_ISA32.
1483         <global symbol>: Ditto if h->other & STO_SH5_ISA32.
1484         * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
1485         relocation.
1486         2000-11-24  Hans-Peter Nilsson  <[email protected]>
1487         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
1488         (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
1489         Regenerate dependencies.
1490         * Makefile.in: Regenerate.
1491         * archures.c: Add bfd_mach_sh5.
1492         * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
1493         Handle sh64-*-elf*.  Set targ_cflags to -DINCLUDE_SHMEDIA.
1494         * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
1495         * configure: Regenerate.
1496         * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
1497         BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
1498         BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
1499         BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
1500         BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
1501         BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
1502         BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
1503         BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
1504         BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
1505         * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
1506         in item for SH5.
1507         * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
1508         for SHmedia relocs.
1509         [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
1510         [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
1511         shmedia_prepare_reloc, goto final_link_relocate if it returns
1512         non-zero, else fail as before.
1513         (sh_elf_set_mach_from_flags): Provide function only if not defined
1514         as macro.  Do not recognize objects with EF_SH64_32BIT_ABI set.
1515         (sh_elf_set_private_flags): Provide function only if not defined
1516         as a macro.
1517         (sh_elf_copy_private_data): Similar.
1518         (sh_elf_merge_private_data): Similar.
1519         * section.c (SEC_SH_ISA_SHMEDIA): New.
1520         * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
1521         * elf32-sh64.c: New file.
1522         * libbfd.h: Regenerate.
1523         * bfd-in2.h: Regenerate.
1524         * po/POTFILES.in: Regenerate.
1525         * po/bfd.pot: Regenerate.
1526         * bfd-in2.h: Regenerate.
1527         * libbfd.h: Regenerate.
1528
1529 2002-02-07  Daniel Jacobowitz  <[email protected]>
1530
1531         * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
1532         been included, not drag it in.
1533         * bfd-in2.h: Regenerate.
1534
1535 2002-02-06  H.J. Lu  ([email protected])
1536
1537         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
1538         the mach and ISA fields if necessary.
1539
1540 2002-02-06  Nick Clifton  <[email protected]>
1541
1542         * coffcode.h (coff_set_arch_mach_hook): Select the highest known
1543         ARM architecture when an F_ARM_5 flag is detected, since we cannot
1544         be sure exactly which architecture this represents.
1545
1546 2002-02-05  Nick Clifton  <[email protected]>
1547
1548         * po/tr.po: Updated translation.
1549
1550 2002-02-05  Alan Modra  <[email protected]>
1551
1552         From Jimi X <[email protected]>
1553         * archures (bfd_mach_ppc64): Define.
1554         (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
1555         (bfd_powerpc_arch): Define.
1556         * bfd-in2.h: Regenerate.
1557         * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
1558         (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
1559         (bfd_powerpc_archs): Add default powerpc64 arch.
1560
1561 2002-02-05  Alan Modra  <[email protected]>
1562
1563         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
1564         against section syms in readonly sections.  Don't do the global
1565         sym check if we find one.
1566         * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
1567         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
1568         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
1569         * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
1570         (elf_s390_grok_prstatus): Add missing prototype.
1571
1572 2002-02-04  Hans-Peter Nilsson  <[email protected]>
1573
1574         * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
1575         (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
1576         Call bfd_get_section_by_name only once.  Initialize
1577         bpodata->n_bpo_relocs_this_section.
1578         (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
1579         referring to DSOs.
1580         (bpo_reloc_request_sort_fn): Don't use difference of values as
1581         return-value.
1582
1583 2002-02-02  David O'Brien  <obrien@FreeBSD>
1584
1585         * configure.in: Tweak the FreeBSD 4.x recognition more.  Only treat
1586         version 4.5 and later the same as 5-CURRENT.
1587         * configure: Re-generate.
1588
1589 2002-02-02  Jason Thorpe  <[email protected]>
1590
1591         * config.bfd (hppa*-*-netbsd*): New target.
1592
1593 2002-01-31  Philipp Thomas  <[email protected]>
1594
1595         * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
1596         to front of message. Unify messages with elf32-arm.h. Use
1597         commas where neccessary.
1598         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
1599         ERROR in messages. Unify messages with coff-arm.c. Correct
1600         VFP/FPA error message.
1601         (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
1602         APCS-32 for translation.
1603
1604 2002-02-01  Hans-Peter Nilsson  <[email protected]>
1605
1606         Perform on-demand global register allocation from
1607         R_MMIX_BASE_PLUS_OFFSET relocs.
1608         * elf64-mmix.c (struct bpo_reloc_section_info, struct
1609         bpo_reloc_request, struct bpo_greg_section_info): New.
1610         (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
1611         bpo_reloc_request_sort_fn, mmix_elf_relax_section,
1612         _bfd_mmix_check_all_relocs,
1613         _bfd_mmix_prepare_linker_allocated_gregs,
1614         _bfd_mmix_finalize_linker_allocated_gregs): New functions.
1615         (elf_mmix_howto_table): Correct src_mask for most relocs.
1616         (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
1617         case.
1618         (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
1619         case.  Fix typo in comment.  New label do_mmix_reloc.
1620         (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
1621         store first object file with a base-plus-offset reloc.  Call
1622         mmix_elf_check_common_relocs for the part common with mmo.
1623         (mmix_elf_final_link): Write out linker-allocated register
1624         contents section.
1625         (elf_backend_gc_sweep_hook): Define.
1626         (bfd_elf64_bfd_relax_section): Define.
1627
1628         * mmo.c: Don't include <ctype.h>
1629         (mmo_init): Correct init-once logic.
1630
1631 2002-02-01  Tom Rix  <[email protected]>
1632
1633         * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
1634
1635 2002-02-01  Alan Modra  <[email protected]>
1636
1637         * Makefile.am: Run "make dep-am"
1638         * Makefile.in: Regenerate.
1639
1640 2002-01-31  David O'Brien  <obrien@FreeBSD>
1641
1642         * configure.in: Recognize the differences in core files from FreeBSD
1643         4.{0,1} and later versions of 4.x.  This treats 4.2+ the same as
1644         5-CURRENT.
1645         * configure: Regenerate.
1646
1647 2002-01-31  Ivan Guzvinec  <[email protected]>
1648
1649         * coff-or32.c: New file.
1650         * cpu-or32.c: New file.
1651         * elf32-or32.c: New file.
1652         * archures.c: Add support for or32.
1653         * targets.c: Add support for or32.
1654         * bfd-in2.h: Regenerate.
1655         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
1656         coff_write_object_contents): Add support for or32.
1657         * config.bfd: Add target.
1658         * configure.in: Add support for or32.
1659         * configure: Regenerate.
1660         * Makefile.am: Add support for or32.
1661         * Makefile.in: Regenerate.
1662         * po/SRC-POTFILES.in: Add or32 files.
1663         * po/bfd.pot: Regenerate.
1664
1665 2002-01-31  Nick Clifton  <[email protected]>
1666             Don Lindsay  <[email protected]>
1667
1668         * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
1669         false' with a return of a bfd_reloc_ error code.
1670
1671 2002-01-31  Hans-Peter Nilsson  <[email protected]>
1672
1673         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1674         unexport unreferenced symbols when --export-dynamic.  Call
1675         _bfd_elf_strtab_delref when unexporting.
1676
1677 2002-01-30  Daniel Jacobowitz  <[email protected]>
1678
1679         * bfd-in.h: Include <stdbool.h> if it is available.
1680         * bfd-in2.h: Regenerated.
1681
1682 2002-01-31  Alan Modra  <[email protected]>
1683
1684         * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
1685         not go via the plt.
1686
1687 2002-01-30  Nick Clifton  <[email protected]>
1688
1689         * archures.c: Tidy up formatting of embedded comments.
1690         * bfd.c: Tidy up formatting of embedded comments.
1691         * bfd-in.h: Fix formatting of comments.
1692         * reloc.c: Tidy up formatting of ordinary & embedded comments.
1693         * section.c: Tidy up formatting of embedded comments.
1694         * syms.c: Tidy up formatting of embedded comments.
1695         * targets.c: Tidy up formatting of embedded comments.
1696
1697         * bfd-in2.h: Regenerate.
1698
1699 2002-01-30  Nick Clifton  <[email protected]>
1700
1701         * vms-tir.c (cmd_name): New function.
1702         (tir_cmd_name): New function.
1703         (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
1704         (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
1705         Fix formatting.
1706
1707         * peXXigen.c (pe_print_idata): Rearrange message to aid in
1708         translation.
1709         (pe_print_pdata):  Rearrange message to aid in translation.
1710
1711         * libbfd.c (warn_deprecated): Rearrange error message to aid in
1712         translation.
1713
1714         * ihex.c (ihex_write_object_contents): Fix spelling typo.
1715
1716         * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
1717
1718         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
1719         message to aid in translation.
1720
1721         * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
1722         to aid in translation.
1723
1724         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
1725
1726 2002-01-30  Philipp Thomas  <[email protected]>
1727
1728         * coff-arm.c, elf32-elf.h: Unify messages.
1729
1730 2002-01-30  Nick Clifton <[email protected]>
1731
1732         * po/sv.po: Updated translation.
1733
1734 2002-01-30  Philipp Thomas  <[email protected]>
1735
1736         * dwarf2.c (read_abbrev): Use full section name in error message.
1737         (decode_line_info): Likewise.
1738
1739         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
1740         message.
1741
1742 2002-01-30  Alan Modra  <[email protected]>
1743
1744         * elf64-ppc.c (func_desc_adjust): Only provide missing function
1745         descriptor symbols for undefined function code syms.  Clear
1746         ELF_LINK_NON_ELF so that they can stay weak.
1747
1748 2002-01-29  Chris Demetriou  <[email protected]>
1749             Mitch Lichtenberg  <[email protected]>
1750
1751         * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
1752         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
1753         to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
1754         generation.
1755         * bfd-in2.h: Regenerate.
1756
1757 2002-01-29  Chris Demetriou  <[email protected]>
1758
1759         * elf32-mips.c: Add additional comments about HI16 relocation
1760         processing.
1761         (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
1762         pc-relative relocations.  (Reverts change made on 2001-10-31.)
1763         (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
1764         for pc-relative relocations.
1765         (mips_elf_calculate_relocation): Add a comment about a kludge
1766         in the R_MIPS_GNU_REL_HI16 handling.
1767         (_bfd_mips_elf_relocate_section): Implement that kludge;
1768         adjust pc-relative HI16 relocation for difference in HI16 and
1769         LO16 addresses, since it can't easily be done in
1770         mips_elf_calculate_relocation.
1771
1772 2002-01-29  Martin Schwidefsky  <[email protected]>
1773
1774         * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
1775         relocations with PC32 relocations for undefined or weak symbols.
1776         * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
1777         * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
1778
1779 2002-01-28  Jason Thorpe  <[email protected]>
1780
1781         * elfcore.h (elf_core_file_p): Improve comment for last change.
1782
1783 2002-01-27  Daniel Jacobowitz  <[email protected]>
1784
1785         * configure: Regenerated.
1786
1787 2002-01-27  Jason Thorpe  <[email protected]>
1788
1789         * elfcore.h (elf_core_file_p): Set the machine architecture
1790         before processing the program headers.
1791
1792 2002-01-26  Hans-Peter Nilsson  <[email protected]>
1793
1794         * configure.in <64-bit configuration>: If using gcc, check and
1795         emit error for egcs-1.1.2.
1796         * configure: Regenerate.
1797
1798 2002-01-26  Egor Duda  <[email protected]>
1799
1800         * elf.c (elfcore_grok_win32pstatus): Copy only as much information
1801         as possible to avoid stack corruption.
1802
1803 2002-01-26  Richard Henderson  <[email protected]>
1804
1805         * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
1806         for non-allocated sections.
1807
1808 2002-01-25  Mark Kettenis  <[email protected]>
1809
1810         * elf.c (elfcore_write_prstatus): Make sure we pass the address of
1811         prstat.pr_reg even if it is a struct.
1812
1813 2002-01-25  Steve Ellcey <[email protected]>
1814
1815         * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
1816
1817 2002-01-25  Philipp Thomas  <[email protected]>
1818
1819         * coffgen.c (coff_print_symbol): Don't mark info message
1820         for translation.
1821
1822 2002-01-25  Nick Clifton <[email protected]>
1823
1824         * po/fr.po: Updated translation.
1825         * po/es.po: Updated translation.
1826
1827 2002-01-25  Philipp Thomas  <[email protected]>
1828
1829         * coff-alpha.c (alpha_relocate_section): Unify warning message
1830         for GP relative relocations without GP defined.
1831         * coff-mips.c (mips_relocate_section): Likewise.
1832
1833 2002-01-25  Alan Modra  <[email protected]>
1834
1835         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
1836         unsigned overflow when new_offset < old_offset.
1837
1838 2002-01-24  Philipp Thomas  <[email protected]>
1839
1840         * bfd.c (_bfd_abort): Fix typo.
1841
1842 2002-01-23  Richard Henderson  <[email protected]>
1843
1844         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
1845         plt entries for undefweak symbols.
1846
1847 2002-01-23  Steve Ellcey <[email protected]>
1848
1849         * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
1850         DEFAULT_VECTOR.
1851         (bfd_elf64_ia64_hpux_big_vec): Ditto.
1852         (bfd_elf32_h8300_vec): Ditto.
1853
1854 2002-01-23  Alan Modra  <[email protected]>
1855
1856         * elf64-ppc.c: Remove stale part of ABI comment.
1857         (NO_OPD_RELOCS): Define.
1858         (ppc64_elf_check_relocs): Use it.
1859         (ppc64_elf_relocate_section): Here too.
1860         (build_one_stub): Don't point function syms at the stub.  Instead,
1861         hijack plt.offset.
1862         (ppc64_elf_relocate_section): Check whether REL24 relocs should
1863         really go to the stub.  Make all dynamic relocs in opd against
1864         locals.
1865         (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
1866         plt.offset.
1867
1868 2002-01-22  Richard Henderson  <[email protected]>
1869
1870         * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
1871
1872 2002-01-22  Alan Modra  <[email protected]>
1873
1874         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
1875         TOC_BASE_OFF adjustment.
1876
1877         * Makefile.am: Run "make dep-am".
1878         * Makefile.in: Regenerate.
1879         * po/SRC-POTFILES.in: Regenerate.
1880
1881 2002-01-22  John David Anglin  <[email protected]>
1882
1883         * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
1884         host defines.
1885
1886 2002-01-21  Hans-Peter Nilsson  <[email protected]>
1887
1888         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
1889         Check for and emit error if sgot is NULL at this point.
1890
1891 2002-01-21  Jason Thorpe  <[email protected]>
1892
1893         * config.bfd (ia64*-*-netbsd*): New target.
1894
1895 2002-01-21  Thomas Klausner <[email protected]>
1896
1897         * som.c (som_write_space_strings): Comment typo fix.
1898
1899 2002-01-21  Alan Modra  <[email protected]>
1900
1901         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
1902         is_func_descriptor fields.
1903         (link_hash_newfunc): Init them.
1904         (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
1905         dot are candidates for plt entries.  When processing .opd relocs,
1906         set function descriptor strings to point inside function code
1907         string, and set new ppc_link_hash_entry fields.
1908         (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
1909         (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
1910         function descriptors.  It's now done in..
1911         (func_desc_adjust): New.
1912         (ppc64_elf_func_desc_adjust): New.
1913         (define elf_backend_always_size_sections): Define.
1914         (ppc64_elf_hide_symbol): New.
1915         (define elf_backend_hide_symbol): Define.
1916         (allocate_dynrelocs): Remove code looking up function descriptors
1917         as that has been done earlier.
1918         (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
1919         table.
1920         (ppc64_elf_finish_dynamic_symbol): Likewise.  Remove code looking
1921         up function descriptor.
1922         (build_one_stub): Look up the function code sym.  Check for
1923         invalid plt offsets.
1924         (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
1925         Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
1926
1927         * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
1928         boolean param.
1929         (_bfd_elf_link_hash_hide_symbol): Likewise.
1930         * elflink.h (elf_link_add_object_symbols): Adjust call to
1931         elf_backend_hide_symbol.
1932         (elf_fix_symbol_flags): Likewise.
1933         (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
1934         than bfd_alloc.
1935         * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
1936         Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
1937         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1938         (clobber_millicode_symbols): Adjust to suit new hide_symbol.
1939         * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
1940         and adjust to suit.
1941         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
1942         _bfd_elf_link_hash_hide_symbol rather than duplicating code.
1943         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
1944
1945 2002-01-18  Alan Modra  <[email protected]>
1946
1947         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
1948         dynamic function descriptor symbol, not the associated function
1949         symbol.
1950
1951 2002-01-17  Eric Christopher  <[email protected]>
1952
1953         * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
1954
1955 2002-01-17  Nick Clifton  <[email protected]>
1956
1957         * po/bfd.pot: Regenerate.
1958         * po/fr.po: Regenerate.
1959
1960 2002-01-17  Alan Modra  <[email protected]>
1961
1962         * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
1963         Remove "Elf_Internal_Shdr *" param.
1964         (_bfd_mips_elf_section_from_bfd_section): Ditto.
1965         * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
1966         * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
1967         * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
1968         * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
1969         * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
1970         * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
1971         function to override special sections.  Remove hdr arg from
1972         backend call, and don't loop.
1973
1974 2002-01-16  Eric Christopher  <[email protected]>
1975
1976         * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
1977         on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
1978         relocations requiring gp0 and gp.
1979
1980 2002-01-16  Richard Earnshaw  <[email protected]>
1981
1982         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
1983         EF_ARM_VFP_FLOAT.
1984         (elf32_arm_print_private_bfd_data): Likewise.
1985
1986 2002-01-16  Nick Clifton  <[email protected]>
1987
1988         * po/tr.po: Import new version.
1989
1990 2002-01-16  Alan Modra  <[email protected]>
1991
1992         * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
1993         (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
1994         (ORI_R0_R0_0): Correct.
1995
1996 2002-01-16  Alan Modra  <[email protected]>
1997
1998         * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
1999         when plt_not_loaded.
2000         * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
2001         clear .plt SEC_CODE here.  Create .stub and correct .glink flags.
2002         (PLT_INITIAL_ENTRY_SIZE): Set to 24.
2003         (ppc64_elf_glink_code): Delete.
2004         (PPC64_ELF_GLINK_SIZE): Delete.
2005         (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
2006         BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
2007         ORI_R0_R0_0): Define.
2008         (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
2009         (struct ppc_link_hash_table): Add sstub and plt_overflow.
2010         (ppc64_elf_link_hash_table_create): Init them.
2011         (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
2012         Don't copy to shared lib.
2013         (ppc64_elf_check_relocs): Call bfd_set_error on errors.
2014         (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
2015         (allocate_dynrelocs <plt>): Don't change function sym here.  Make
2016         room for .stub and .glink code.
2017         (ppc64_elf_size_dynamic_sections): Handle .stub.  Make entry for
2018         DT_PPC64_GLINK.
2019         (ppc64_elf_final_link): Rename to ppc64_elf_set_toc.  Don't call
2020         bfd_elf64_bfd_final_link.
2021         (bfd_elf64_bfd_final_link): Don't define.
2022         (ppc64_elf_size_stubs): New.
2023         (build_plt_stub): New.
2024         (build_one_stub): New.
2025         (ppc64_elf_build_stubs): New.
2026         (ppc64_elf_relocate_section <toc relocs>): Remove assert.
2027         (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
2028         (ppc64_elf_finish_dynamic_symbol): Don't build stubs here.  Set
2029         DT_PPC64_GLINK entry.  Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
2030         case output sections not separate.  Adjust DT_RELASZ to not
2031         include plt relocs.  Set reserved got entry.  Set got and plt
2032         entry size.
2033         (elf_backend_got_header_size): Set to 8.
2034         * elf64-ppc.h: New file.
2035
2036 2002-01-16  Alan Modra  <[email protected]>
2037
2038         * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
2039         sections, use bfd_section_list_remove.
2040         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2041         * elflink.h (elf_link_add_object_symbols): When removing all
2042         sections, use bfd_section_list_clear.
2043
2044 2002-01-15  Nick Clifton  <[email protected]>
2045
2046         * po/sv.po: New file: Swedish translation.
2047         * configure.in (ALL_LINGUAS): Add sv.
2048         * configure: Regenerate.
2049
2050 2002-01-15  Jakub Jelinek  <[email protected]>
2051
2052         * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
2053         * elf.c (merge_sections_remove_hook): New function.
2054         (_bfd_elf_merge_sections): Pass it as 3rd argument to
2055         _bfd_merge_sections.
2056         * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
2057         * libbfd.h: Rebuilt.
2058         * merge.c (_bfd_merge_sections): Add remove_hook argument.
2059         Call remove_hook if a SEC_EXCLUDE section is encountered.
2060
2061 2002-01-15  Nick Clifton  <[email protected]>
2062
2063         * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
2064         (xstormy16_reloc_map): Initialise new field with correct howto
2065         table.
2066         (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
2067         howto entry.
2068
2069 2002-01-10  Michael Snyder  <[email protected]>
2070
2071         * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
2072         (elfcore_write_pstatus): Use long instead of pid_t;
2073         * elf-bfd.h: Change prototypes to use long instead of pid_t;
2074
2075 2002-01-09  Jason Thorpe  <[email protected]>
2076
2077         * elf.c: Update copyright years.
2078         (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
2079         and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.
2080
2081 2002-01-08  Michael Snyder  <[email protected]>
2082
2083         Add capability to write corefile note sections, for gdb.
2084         * elf.c (elfcore_write_note): New function.
2085         (elfcore_write_prpsinfo): New function.
2086         (elfcore_write_prstatus): New function.
2087         (elfcore_write_pstatus): New function.
2088         (elfcore_write_prfpreg): New function.
2089         (elfcore_write_prxfpreg): New function.
2090         * elf-bfd.h: Add prototypes for above functions.
2091
2092 2002-01-08  Alexandre Oliva  <[email protected]>
2093
2094         * elf.c (elf_fake_sections): Propagate errors from
2095         elf_backend_fake_section.
2096
2097 2002-01-07  Jason Thorpe  <[email protected]>
2098
2099         * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
2100         (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
2101         (elf32-sh-nbsd.lo): New rule.
2102         * Makefile.in: Regenerate.
2103         * config.bfd (sh*le-*-netbsdelf*): New target.
2104         (sh*-*-netbsdelf*): New target.
2105         * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
2106         (bfd_elf32_shnbsd_vec): New vector.
2107         (bfd_elf32_shlnbsd_vec): New vector.
2108         * configure: Regenerate.
2109         * elf32-sh-nbsd.c: New file.
2110         * targets.c: Update copyright years.
2111         (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
2112         bfd_elf32_shnbsd_vec.
2113
2114 2002-01-07  Aldy Hernandez  <[email protected]>
2115
2116         * coff-rs6000.c (READ20): Use bfd_scan_vma.
2117
2118 2002-01-07  Geoffrey Keating  <[email protected]>
2119
2120         * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
2121         of a symbol in a section that will be deleted.
2122
2123 2002-01-07  Nick Clifton  <[email protected]>
2124
2125         * po/es.po: New file: Spanish translation.
2126         * configure.in (ALL_LINGUAS): Add es.
2127         * configure: Regenerate.
2128
2129 2002-01-06  Steve Ellcey  <[email protected]>
2130
2131         * elfxx-ia64.c (is_unwind_section_name): Add target vector as
2132         argument so we can handle HP-UX specially.
2133         (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
2134         (elfNN_hpux_backend_section_from_bfd_section): New for support
2135         of SHN_IA_64_ANSI_COMMON.
2136         (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
2137         (is_unwind_section_name): Add special HP-UX support.
2138         (elfNN_ia64_section_from_shdr): Add support for more sections.
2139         (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
2140         add support for more sections.
2141         (elfNN_ia64_additional_program_headers): Modify
2142         is_unwind_section_name call.
2143         (elfNN_ia64_modify_segment_map): Remove assumption that there is
2144         only one unwind section in segment.
2145
2146 2002-01-06  Alan Modra  <[email protected]>
2147
2148         * syms.c (_bfd_generic_make_empty_symbol): New function.
2149         * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
2150         _bfd_generic_make_empty_symbol.
2151         * libbfd.h: Regenerate.
2152         * bfd-in2.h: Regenerate.
2153         * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
2154         (hppabsd_core_get_symtab_upper_bound): Don't define.
2155         (hppabsd_core_get_symtab): Likewise.
2156         (hppabsd_core_print_symbol): Likewise.
2157         (hppabsd_core_get_symbol_info): Likewise.
2158         (hppabsd_core_bfd_is_local_label_name): Likewise.
2159         (hppabsd_core_get_lineno): Likewise.
2160         (hppabsd_core_find_nearest_line): Likewise.
2161         (hppabsd_core_bfd_make_debug_symbol): Likewise.
2162         (hppabsd_core_read_minisymbols): Likewise.
2163         (hppabsd_core_minisymbol_to_symbol): Likewise.
2164         (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
2165         Formatting fixes.
2166         * hpux-core.c: Similarly.
2167         * irix-core.c: Similarly.
2168         * osf-core.c: Similarly.
2169         * sco5-core.c: Similarly.
2170         * binary.c (binary_make_empty_symbol): Remove function, define as
2171         _bfd_generic_make_empty_symbol.
2172         * ihex.c (ihex_make_empty_symbol): Likewise.
2173         * mmo.c (mmo_make_empty_symbol): Likewise.
2174         * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
2175         * srec.c (srec_make_empty_symbol): Likewise.
2176         * versados.c (versados_make_empty_symbol): Likewise.
2177         * vms.c (_bfd_vms_make_empty_symbol): Remove.
2178         (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
2179         * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
2180         rather than _bfd_vms_make_empty_symbol.
2181         * vms-misc.c (new_symbol): Likewise.
2182
2183 2002-01-05  Alan Modra  <[email protected]>
2184
2185         * section.c (bfd_section_init): Remove unnecessary initialisations.
2186         (bfd_section_list_clear): New function.
2187         (bfd_section_list_remove, bfd_section_list_insert): New macros.
2188         (_bfd_strip_section_from_output): Use them.
2189         * coffcode.h (coff_set_alignment_hook): Likewise.
2190         * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
2191         * elf64-mips.c (mips_elf64_final_link): Likewise.
2192         * elf64-mmix.c (mmix_elf_final_link): Likewise.
2193         * sunos.c (sunos_add_dynamic_symbols): Likewise.
2194         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
2195         * bfd-in2.h: Regenerate.
2196
2197         * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
2198         rather than doing our own section handling.  Clean up after errors
2199         with bfd_release and bfd_section_list_clear.  Handle unexpected
2200         flags.
2201         * aoutf1.h (sunos4_core_file_p): Likewise.
2202         * aix386-core.c (aix386_core_file_p): Likewise.
2203         * cisco-core.c (cisco_core_file_validate): Likewise.
2204         * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
2205         * trad-core.c (trad_unix_core_file_p): Likewise.
2206
2207         * hppabsd-core.c (hppabsd_core_core_file_p):  Clean up after errors
2208         with bfd_release and bfd_section_list_clear.
2209         * hpux-core.c (hpux_core_core_file_p): Likewise.
2210         * irix-core.c (irix_core_core_file_p): Likewise.
2211         * lynx-core.c (lynx_core_file_p): Likewise.
2212         * osf-core.c (osf_core_core_file_p): Likewise.
2213         * rs6000-core.c (rs6000coff_core_p): Likewise.
2214         * sco5-core.c (sco5_core_file_p): Likewise.
2215
2216         * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
2217         sign extension adjustments without conditionals.
2218
2219 2002-01-04  Jakub Jelinek  <[email protected]>
2220
2221         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
2222         CIE at .eh_frame start is removed due to no FDEs referencing it.
2223
2224 2002-01-04  Jason Thorpe  <[email protected]>
2225
2226         * config.bfd (x86_64-*-netbsd*): New target.
2227         * configure.in (x86_64-*-netbsd*): Set COREFILE
2228         to netbsd-core.lo.
2229         * configure: Regenerated.
2230
2231 2002-01-03  Tom Rix  <[email protected]>
2232
2233         * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
2234         for recent bfd_make_section_anyway change.
2235
2236 2002-01-03  Nick Clifton  <[email protected]>
2237
2238         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
2239         R_ARM_THM_PC11 reloc.
2240
2241 2002-01-02  Nick Clifton  <[email protected]>
2242
2243         * configure.in (LINGUAS): Add ja.
2244         * configure: Regenerate.
2245         * po/ja.po: Import from translation project's web site.
2246
2247 2002-01-02  Nick Clifton  <[email protected]>
2248
2249         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
2250         messages to ease translation into other languages.
2251
2252 For older changes see ChangeLog-0001
2253 \f
2254 Local Variables:
2255 mode: change-log
2256 left-margin: 8
2257 fill-column: 74
2258 version-control: never
2259 End:
This page took 0.154701 seconds and 4 git commands to generate.