]> Git Repo - binutils.git/blob - bfd/ChangeLog
bfd/
[binutils.git] / bfd / ChangeLog
1 2005-10-06  Daniel Jacobowitz  <[email protected]>
2
3         * elf32-arm.c (elf32_arm_check_relocs): Avoid aliasing warnings from
4         GCC.
5         (elf32_arm_size_dynamic_sections): Likewise.
6         * ecofflink.c (bfd_ecoff_debug_one_external): Likewise.
7         * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
8         * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
9         * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
10         * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
11         * elf32-s390.c (elf_s390_check_relocs): Likewise.
12         (elf_s390_size_dynamic_sections): Likewise.
13         * elf32-sh.c (sh_elf_check_relocs): Likewise.
14         * elf64-ppc.c (ppc64_elf_check_relocs, dec_dynrel_count)
15         (ppc64_elf_size_dynamic_sections): Likewise.
16         * elf64-s390.c (elf_s390_check_relocs): Likewise.
17         (elf_s390_size_dynamic_sections): Likewise.
18         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
19         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
20         (_bfd_sparc_elf_size_dynamic_sections): Likewise.
21         * ieee.c (ieee_slurp_section_data): Likewise.
22         * oasys.c (oasys_slurp_section_data): Likewise.
23
24 2005-10-04  Bob Wilson  <[email protected]>
25
26         * archive.c: Add missing SUBSECTION for documentation.
27         * bfd.c: Likewise.
28         * cache.c: Likewise.
29         * corefile.c: Likewise.
30         * format.c: Likewise.
31         * init.c: Likewise.
32         * libbfd.c: Likewise.
33         * opncls.c: Likewise.
34         * elf.c: Remove blank line after SECTION heading.
35         * reloc.c: Change "howto manager" SECTION to a SUBSECTION.
36
37 2005-10-04  Nick Clifton  <[email protected]>
38
39         * elf32-arm.c (get_arm_elf_section_data): Cache the last pointer
40         matched so that the typical case of scanning for the previous
41         section to last one can be handled quickly.
42
43 2005-10-03  David Heine  <[email protected]>
44
45         * elf32-xtensa.c (relocations_reach): Skip range check for
46         absolute literals.
47
48 2005-10-03  Alan Modra  <[email protected]>
49
50         * elf.c (_bfd_elf_get_synthetic_symtab): Set BSF_GLOBAL on
51         synthetic syms.
52
53 2005-09-30  H.J. Lu  <[email protected]>
54
55         * Makefile.am: Run "make dep-am".
56         * Makefile.in: Regenerated.
57         * aclocal.m4: Likewise.
58
59 2005-09-30  Catherine Moore  <[email protected]>
60
61         * Makefile.am: Bfin support.
62         * Makefile.in: Regenerated.
63         * aclocal.m4: Regenerated.
64         * archures.c (bfd_mach_bfin): New.
65         (bfd_arch_bfin): New.
66         bfd-in.h (bfd_bfin_elf32_create_embedded_relocs): New.
67         * bfd-in2.h: Regenerated.
68         * config.bfd: Bfin support.
69         * configure: Regenerated.
70         * configure.in: Bfin support.
71         * libbfd.h: Regenerated.
72         * reloc.c: Add BFD relocations for Bfin.
73         * targets.c (bfd_elf32_bfin_vec): New.
74         * cpu-bfin.c: New file.
75         * elf32-bfin.c: New file.
76
77 2005-09-30  Alan Modra  <[email protected]>
78
79         * elf64-ppc.c (ppc_type_of_stub): Check both func desc and func
80         entry sym before deciding no stub is needed.
81         (ppc64_elf_size_stubs): When calculating branch destination,
82         don't use func desc sym for old ABI objects unless func entry
83         is undefined.
84
85 2005-09-28  H.J. Lu  <[email protected]>
86
87         PR binutils/1321
88         * elf-bfd.h (_bfd_elf_setup_group_pointers): Renamed to ...
89         (_bfd_elf_setup_sections): This.
90         * elf.c: Likewise.
91         * elfcode.h (elf_object_p): Likewise.
92
93         * elf.c (_bfd_elf_setup_sections): Process SHF_LINK_ORDER.
94         (_bfd_elf_copy_private_section_data): Likewise.
95
96 2005-09-28  H.J. Lu  <[email protected]>
97
98         * elflink.c (elf_fixup_link_order): Report locations for mixed
99         ordered and unordered input sections.
100
101 2005-09-22  James E. Wilson  <[email protected]>
102
103         * dwarf2.c (struct funcinfo): Delete nesting_level field.
104         (lookup_address_in_function_table): Delete code to set funcinfo
105         caller_func field.  Delete local curr_func.
106         (scan_unit_for_symbols): New locals nested_funcs, nested_funcs_size.
107         Delete code setting funcinfo nesting_level field.  Add code to set
108         funcinfo caller_func field.
109         
110 2005-09-20  James E. Wilson  <[email protected]>
111
112         * dwarf2.c (find_abstract_instance_name): Don't early exit when name
113         set.  For DW_AT_name case, only set name if not already set.  Handle
114         DW_AT_MIPS_linkage_name.
115
116 2005-09-20  Alan Modra  <[email protected]>
117
118         * elflink.c (_bfd_elf_merge_symbol): Simplify.
119
120 2005-09-19  Alan Modra  <[email protected]>
121
122         * elf64-ppc.c (ppc_build_one_stub): Replace assertion that long
123         branch offset is in range with an error.  Print full stub name on
124         errors.
125         (ppc_size_one_stub): Print full stub name on errors.
126         (group_sections): Warn if section size exceeds group size.
127         (ppc64_elf_size_stubs): Continue relaxing when stub types change.
128
129 2005-09-09  Kevin Buettner  <[email protected]>
130
131         * elf32-am33lin.c (bfd.h, sysdep.h, elf-bfd.h, elf/mn10300.h):
132         Include.
133         (elf32_am33lin_grok_prstatus, elf32_am33lin_grok_psinfo): New
134         functions.
135         (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
136
137 2005-09-09  Richard Earnshaw  <[email protected]>
138
139         * elf32-arm.c (elf32_arm_section_from_shdr): Accept SHT_ARM_PREEMPTMAP
140         and SHT_ARM_ATTRIBUTES.
141
142 2005-09-08  H.J. Lu  <[email protected]>
143
144         * elflink.c (elf_get_linked_section_vma): Fix a typo in comment.
145         * elfxx-ia64.c (elf_backend_link_order_error_handler): Likewise.
146
147 2005-09-08  H.J. Lu  <[email protected]>
148
149         PR ld/1263
150         * elflink.c (elf_link_add_object_symbols): Abort for
151         --just-symbols on DSO.
152
153 2005-09-08  Paul Brook  <[email protected]>
154
155         * reloc.c: Rename BFD_RELOC_ARM_SMI to BFD_RELOC_ARM_SMC.
156         * bfd-in2.h: Regenerate.
157         * libbfd.h: Regenerate.
158
159 2005-09-06  H.J. Lu  <[email protected]>
160
161         PR ld/1301
162         * elflink.c (_bfd_elf_merge_symbol): Don't check undefined
163         symbol introduced by "ld -u" for TLS.
164
165 2005-09-02  Paul Brook  <[email protected]>
166
167         * libbdf.h: Regenerate.
168         * bfd-in2.h: Regenerate.
169         * reloc.c: Add BFD_RELOC_ARM_T32_CP_OFF_IMM and
170         BFD_RELOC_ARM_T32_CP_OFF_IMM_S2.
171
172 2005-09-01  Dmitry Diky <[email protected]>
173
174         * elf32-msp430.c (msp430_elf_relax_delete_bytes): Do not adjust
175         local symbols and move it to
176         (msp430_elf_relax_adjust_locals): New function - walk over the
177         sections in the bfd and adjust relocations as necessary.
178         
179 2005-08-31  DJ Delorie  <[email protected]>
180
181         * elf32-i386.c (elf_i386_check_relocs): Don't cast a unary &
182         address operator, as that breaks GCC's strict aliasing rules.
183         (elf_i386_size_dynamic_sections): Avoid the need for type
184         punning.
185         * elf64-x86-64.c (elf_x86_64_check_relocs): Don't cast a unary
186         & address operator, as that breaks GCC's strict aliasing
187         rules.
188         (elf_x86_64_size_dynamic_sections): Avoid the need for type
189         punning.
190
191 2005-08-30  Phil Edwards  <[email protected]>
192
193         * config.bfd (i[3-7]86-*-vxworks):  Match vxworks* instead.
194
195 2005-08-29  H.J. Lu  <[email protected]>
196
197         PR ld/1247
198         * elfxx-ia64.c (allocate_fptr): Check undefined symbol.
199
200 2005-08-29  Steven J. Hill <[email protected]>
201
202         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Initialise
203         'value' to avoid compile time warning message.
204
205 2005-08-26  Christian Groessler  <[email protected]>
206
207         * coff-z8k.c: (r_jr, r_disp7, r_callr): Fix src_mask and dst_mask
208         of HOWTO.
209         (coff_z8k_select_reloc): Remove.
210         (SELECT_RELOC): Remove.
211         (coff_z8k_reloc_type_lookup): New function.
212         (coff_bfd_reloc_type_lookup): Define.
213         * configure.in: Add cofflink.lo to z8kcoff_vec.
214         * configure: Regenerate.
215         * reloc.c: (bfd_reloc_code_type): Add z8k relocations.
216         (bfd_install_relocation): Don't clear reloc_entry->addend for
217         coff-z8k target.
218         * bfd-in2.h: Regenerate.
219         * libbfd.h: Regenerate.
220
221 2005-08-25  Kaz Kojima  <[email protected]>
222
223         * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error.
224
225 2005-08-24  H.J. Lu  <[email protected]>
226
227         PR ld/1208
228         * elf-hppa.h (elf_hppa_relocate_section): Print out the name
229         of unresolvable relocation.
230         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
231         * elf32-arm.c (elf32_arm_relocate_section): Likewise.
232         * elf32-i386.c (elf_i386_relocate_section): Likewise.
233         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
234         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
235         * elf32-s390.c (elf_s390_relocate_section): Likewise.
236         * elf32-sh.c (sh_elf_relocate_section): Likewise.
237         * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
238         * elf64-s390.c (elf_s390_relocate_section): Likewise.
239         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
240         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
241         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
242
243 2005-08-18  Kaz Kojima  <[email protected]>
244
245         * config.bfd: Add bfd_elf32_shnbsd_vec and bfd_elf32_shlnbsd_vec
246         to targ_selvecs for sh5*-*-netbsd* and sh64*-*-netbsd*.
247
248 2005-08-18  Alan Modra  <[email protected]>
249
250         * coff-a29k.c: Delete.
251         * cpu-a29k.c: Delete.
252         * Makefile.am: Remove mention of a29k files.
253         * aoutf1.h: Remove a29k support.
254         * aoutx.h: Likewise.
255         * archures.c: Likewise.
256         * coffcode.h: Likewise.
257         * config.bfd: Likewise.
258         * configure.in: Likewise.
259         * ieee.c: Likewise.
260         * mipsbsd.c: Likewise.
261         * pdp11.c: Likewise.
262         * sparclynx.c: Likewise.
263         * targets.c: Likewise.
264         * Makefile.in: Regenerate.
265         * configure: Regenerate.
266         * bfd-in2.h: Regenerate.
267         * po/SRC-POTFILES.in: Regenerate.
268
269 2005-08-18  Alan Modra  <[email protected]>
270
271         * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Warn on
272         zero size dynamic variables.
273         * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
274         * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
275         * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
276         * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
277         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
278         * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
279         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
280         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
281         * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
282         * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
283         * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
284         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
285         * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
286         * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
287         * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
288         * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
289
290 2005-08-17  H.J. Lu  <[email protected]>
291
292         PR binutils/1179
293         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Use section lma
294         instead of vma.
295         (_bfd_dwarf2_find_line): Likewise.
296
297 2005-08-17  Alan Modra  <[email protected]>
298
299         * elf64-mmix.c (mmix_elf_add_symbol_hook): Mark reg section
300         SEC_LINKER_CREATED.
301         (mmix_elf_final_link): Check that section hasn't already been
302         removed before removing.
303         * mmo.c (mmo_scan): Mark reg contents section SEC_LINKER_CREATED.
304         (mmo_canonicalize_symtab): Likewise for reg section.
305
306 2005-08-17  Alan Modra  <[email protected]>
307
308         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Move assert later.
309         * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Cope with being called
310         without any got section.
311
312 2005-08-17  Danny Smith  <[email protected]>
313
314         * cofflink.c (_bfd_coff_generic_relocate_section): Correct
315         comment.
316
317 2005-08-17  Alan Modra  <[email protected]>
318
319         * elflink.c (_bfd_elf_define_linkage_sym): Don't call
320         bfd_elf_link_record_dynamic_symbol.  Call elf_backend_hide_symbol.
321         (_bfd_elf_link_renumber_dynsyms): Formatting.
322         (struct elf_gc_sweep_symbol_info): New.
323         (elf_gc_sweep_symbol): Rewrite.
324         (elf_gc_sweep): Adjust params and elf_gc_sweep_symbol call.
325         Call _bfd_elf_link_renumber_dynsyms.
326         (bfd_elf_gc_sections): Adjust elf_gc_sweep call.
327
328 2005-08-16  Alan Modra  <[email protected]>
329
330         * elf64-ppc.c (ppc64_elf_edit_opd): Don't call dec_dynrel_count
331         when relocatable.
332
333 2005-08-15  Bob Wilson  <[email protected]>
334
335         * elf32-xtensa.c (ELF_MACHINE_CODE, ELF_MACHINE_ALT1): Swap values
336         of EM_XTENSA and EM_XTENSA_OLD.
337
338 2005-08-16  Alan Modra  <[email protected]>
339
340         * elf-bfd.h (_bfd_elf_define_linkage_sym): Declare.
341         * elflink.c (_bfd_elf_define_linkage_sym): New function, extracted
342         from..
343         (_bfd_elf_create_got_section): ..here.
344         (_bfd_elf_link_create_dynamic_sections): Call it for _DYNAMIC.
345         (_bfd_elf_create_dynamic_sections): ..and _PROCEDURE_LINKAGE_TABLE_.
346         * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Use
347         _bfd_elf_define_linkage_sym.
348         * elf32-frv.c (_frv_create_got_section): Likewise.
349         * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
350
351 2005-08-15  Paul Brook  <[email protected]>
352
353         * elf32-arm.c (elf32_arm_howto_table_1): Make R_ARM_PLT32 the same as
354         R_ARM_PC24.
355
356 2005-08-13  John David Anglin  <[email protected]>
357
358         PR ld/1135
359         * elf64-hppa.c (elf64_hppa_special_sections): Add flag definitions for
360         .plt, .dlt, .sdata, .sbss and .tbss.
361
362 2005-08-12  Dmitry Diky  <[email protected]>
363
364         * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust relocations
365         referenced by .section + DISPLACEMENT.
366
367 2005-08-10  James E. Wilson  <[email protected]>
368
369         * dwarf2.c (scan_unit_for_symbols, case DT_AT_location): Verify that
370         DW_OP_addr is only opcode in location before using it.
371
372 2005-08-09  H.J. Lu  <[email protected]>
373
374         * elfxx-ia64.c (elfNN_ia64_final_link): Reset gp.
375
376 2005-08-09  Rodney Brown  <[email protected]>
377             Nick Clifton  <[email protected]>
378
379         * aix5ppc-core.c (xcoff64_core_p): Constify return_value
380         variable.  Also, do not use core_hdr macro as it evaluates to a
381         cast of an lvalue which is no longer supported by GCC 4.0.
382
383 2005-08-08  Eric Dönges <[email protected]>
384
385         * archures.c (bfd_mach_msp21): New MSP430 machine number.
386         * bfd-in2.h: Regenerate.
387         * cpu-msp430.c (arch_info_struct): Add support for msp430x21xx
388         variants.
389
390 2005-08-07  Nick Clifton  <[email protected]>
391             Paul Brook  <[email protected]>
392
393         PR 1147
394         * elf32-arm.c (bfd_elf32_close_and_cleanup): Define.
395         (elf32_arm_close_and_cleanup): New function - walk over the
396         sections in the bfd that is being closed removing them from the
397         list of recorded sections.
398         (unrecord_section_via_map_over_sections): New helper function.
399         (record_section_with_arm_elf_section_data): Call bfd_malloc
400         instead of bfd_alloc.  Remove unneeded abfd parameter.
401         (elf32_arm_new_section_hook): Do not pass bfd to
402         record_section_with_arm_elf_section_data.
403
404         * elfxx-target.h (bfd_elfNN_close_and_cleanup): Only define if not
405         already defined by the target.
406
407 2005-08-05  Fred Fish  <[email protected]>
408
409         * dwarf2.c (read_rangelist): Use addr_size instead of offset_size
410         to determine how many bytes to read from each rangelist entry.
411
412 2005-08-05  H.J. Lu  <[email protected]>
413
414         * bfd.c (bfd_hide_symbol): New.
415         * bfd-in2.h: Regenerated.
416
417 2005-08-04  H.J. Lu  <[email protected]>
418
419         * elf64-x86-64.c (elf64_x86_64_merge_symbol): When mixing a
420         large common symbol and a normal common symbol, always turn
421         the large common symbol into a normal one.
422
423 2005-08-04  Alan Modra  <[email protected]>
424
425         * elf32-ppc.c (struct elf_linker_section): Replace sym_val field
426         with sym.
427         (ppc_elf_relocate_section): Adjust for above.
428         (create_sdata_sym): New function.
429         (ppc_elf_create_linker_section): Call it.
430         (ppc_elf_check_relocs): Correct has_sda_refs and non_got_refs.
431         Create sdata syms for all SDA relocs.
432         (ppc_elf_adjust_dynamic_symbol): Don't special case _SDA_BASE_
433         and _SDA2_BASE_.
434         (ppc_elf_set_sdata_syms): Delete.
435         * elflink.c (bfd_elf_size_dynamic_sections): Don't create DT_INIT
436         and DT_FINI tags unless associated section has input.
437         (bfd_elf_set_symbol, _bfd_elf_provide_symbol): Delete.
438         (_bfd_elf_provide_section_bound_symbols): Delete.
439         * bfd-in.h (_bfd_elf_provide_symbol): Delete.
440         (_bfd_elf_provide_section_bound_symbols): Delete.
441         * bfd-in2.h: Regenerate.
442
443 2005-08-04  Alan Modra  <[email protected]>
444
445         * elflink.c (fix_syms, _bfd_elf_fix_excluded_sec_syms): Move to..
446         * linker.c (fix_syms, _bfd_fix_excluded_sec_syms): ..here.
447         * bfd-in.h (_bfd_fix_excluded_sec_syms): Rename.
448         * bfd-in2.h: Regenerate.
449
450 2005-08-03  H.J. Lu  <[email protected]>
451
452         * elfxx-ia64.c (elfNN_ia64_relax_section): Resize .rela.got
453         only if it isn't NULL.
454
455 2005-08-03  H.J. Lu  <[email protected]>
456
457         * elf32-i386.c (elf_howto_table): Undo the overflow change for
458         R_386_PC16 made on 2005-07-18.
459
460         * elf64-x86-64.c (x86_64_elf_howto_table): Undo the overflow
461         change for R_X86_64_PC16 made on 2005-07-18.
462
463 2005-08-03  Alan Modra  <[email protected]>
464
465         * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove hgot.  Use
466         elf.hgot throughout file.
467
468 2005-08-03  Alan Modra  <[email protected]>
469
470         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Correct value of
471         _GLOBAL_OFFSET_TABLE_ for > 32k GOT.
472
473 2005-08-02  Andreas Schwab  <[email protected]>
474
475         * elfxx-ia64.c (struct elfNN_ia64_allocate_data): Add only_got.
476         (elfNN_ia64_relax_section): Reallocate .rela.got when .got has
477         changed.
478         (allocate_dynrel_entries): Look only at GOT relocations when
479         only_got is true.
480         (elfNN_ia64_size_dynamic_sections): Set only_got to false before
481         calling allocate_dynrel_entries.
482
483 2005-08-02  Nick Clifton  <[email protected]>
484
485         PR 1147
486         * elf32-arm.c (struct _arm_elf_section_data): Turn into a typedef
487         and make the mapcount field unsigned.
488         (struct section_list): New: Used to keep track of which sections
489         have an _arm_elf_section_data structure.
490         (record_section_with_arm_elf_section_data): New function.
491         (get_arm_elf_section_data): New function.
492         (unrecord_section_with_arm_elf_section_data): New function.
493         (elf32_arm_output_symbol_hook): Use get_arm_elf_section_data.
494         (elf32_arm_new_section_hook): Call
495         record_section_with_arm_elf_section_data.
496         (elf32_arm_write_section): Use get_arm_elf_section_data and
497         unrecord_section_with_arm_elf_section_data.
498
499 2005-08-01  Richard Sandiford  <[email protected]>
500
501         * elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension
502         of MIPS32 and MIPS64r2 as an extension of MIPS32r2.
503
504 2005-07-30  David Daney  <[email protected]>
505
506         * elflink.c (elf_gc_sweep):  Set dynsymcount to correct value.
507
508 2005-07-29  David Daney  <[email protected]>
509
510         * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook):  Ignore _gp_disp
511         if it is in the *ABS* section.
512
513 2005-07-29  Paul Brook  <[email protected]>
514
515         * reloc.c: Add BFD_RELOC_ARM_T32_ADD_PC12.
516         * bfd-in2.h: Regenerate.
517         * libbfd.h: Regenerate.
518
519 2005-07-29  Paul Brook  <[email protected]>
520
521         * reloc.c (BFD_RELOC_ARM_T32_IMM12): Add.
522         * bfd-in2.h: Regeenrate.
523         * libbfd.h: Regenerate.
524
525 2005-07-29  Pavel Kankovsky  <[email protected]>
526
527         * peXXigen.c (pe_print_edata): Compute the size of the export
528         table from the size field in the DataDictionary and not the size
529         of the section.  Some linkers embed the export table inside a
530         larger section.
531
532 2005-07-29  Alan Modra  <[email protected]>
533
534         * elf-bfd.h (struct elf_backend_data): Add action_discarded.
535         (enum action_discarded): Move from..
536         * elflink.c (enum action_discarded): ..here.
537         (_bfd_elf_default_action_discarded): Rename from elf_action_discarded.
538         Remove target specific section checks.
539         (elf_link_input_bfd): Adjust.
540         * elfxx-target.h (elf_backend_action_discarded): Define.
541         (elfNN_bed): Init new field.
542         * bfd-in.h (_bfd_elf_default_action_discarded): Declare.
543         * bfd-in2.h: Regenerate.
544         * elf-hppa.h (elf_hppa_action_discarded): New function.
545         * elf32-hppa.c (elf_backend_action_discarded): Define.
546         * elf64-hppa.c (elf_backend_action_discarded): Define.
547         * elf32-ppc.c (ppc_elf_action_discarded): New function.
548         (elf_backend_action_discarded): Define.
549
550 2005-07-27  Alan Modra  <[email protected]>
551
552         * elflink.c (fix_syms): Handle symbols defined in input sections.
553
554 2005-07-27  Jan Beulich  <[email protected]>
555
556         * elf64-x86-64.c (R_X86_64_standard, R_X86_64_vt_offset): New.
557         (elf64_x86_64_info_to_howto): Use them.
558
559 2005-07-27  Alan Modra  <[email protected]>
560
561         * elflink.c (_bfd_elf_merge_symbol): Skip weak redefinition
562         regardless of strength of previous definition.
563
564 2005-07-26  Alan Modra  <[email protected]>
565
566         * elflink.c (elf_gc_mark_dynamic_ref_symbol): Handle -shared.
567         (bfd_elf_gc_sections): Allow -gc-sections when -shared.
568         * elf32-ppc.c (ppc_elf_gc_sweep_hook): Correct for -shared.
569
570 2005-07-26  Alan Modra  <[email protected]>
571
572         * elflink.c (elf_gc_sweep): Move gcc_except_table code..
573         (bfd_elf_gc_sections): ..to here.
574
575 2005-07-25  DJ Delorie  <[email protected]>
576
577         * reloc.c: Remove unused M32C relocs, add BFD_RELOC_M32C_HI8.
578         * libbfd.h: Regenerate.
579         * bfd-in2.h: Regenerate.
580
581         * elf32-m32c.c (m32c_elf_howto_table): Add R_M32C_8, R_M32C_LO16,
582         R_M32C_HI8, R_M32C_HI16.
583         (m32c_reloc_map): Likewise.
584         (m32c_elf_relocate_section): Add R_M32C_HI8 and R_M32C_HI16.
585
586 2005-07-25  Jan Hubicka  <[email protected]>
587             H.J. Lu  <[email protected]>
588
589         * elf-bfd.h (_bfd_elf_large_com_section): New.
590         * elf.c (_bfd_elf_large_com_section): New. Defined.
591
592         * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): New.
593         (elf64_x86_64_elf_section_from_bfd_section): New.
594         (elf64_x86_64_symbol_processing): New.
595         (elf64_x86_64_common_definition): New.
596         (elf64_x86_64_common_section_index): New.
597         (elf64_x86_64_common_section): New.
598         (elf64_x86_64_merge_symbol): New.
599         (elf64_x86_64_additional_program_headers): New.
600         (elf64_x86_64_special_sections): New.
601         (elf_backend_section_from_bfd_section): New. Defined.
602         (elf_backend_add_symbol_hook): Likewise.
603         (elf_backend_common_section_index): Likewise.
604         (elf_backend_common_section): Likewise.
605         (elf_backend_common_definition): Likewise.
606         (elf_backend_merge_symbol): Likewise.
607         (elf_backend_special_sections): Likewise.
608         (elf_backend_additional_program_headers): Likewise.
609
610 2005-07-25  H.J. Lu  <[email protected]>
611
612         * elf-bfd.h (elf_backend_data): Add common_definition,
613         common_section_index, common_section, and merge_symbol.
614         (_bfd_elf_common_definition): New.
615         (_bfd_elf_common_section_index): New.
616         (_bfd_elf_common_section): New.
617
618         * elf.c (elf_fake_sections): Don't clear sh_flags.
619
620         * elflink.c (_bfd_elf_merge_symbol): Call backend merge_symbol
621         if it is available.
622         (is_global_data_symbol_definition): Call backend
623         common_definition instead of checking SHN_COMMON.
624         (elf_link_add_object_symbols): Likewise.
625         (elf_link_output_extsym): Call backend common_section_index
626         for common section index.
627         (_bfd_elf_common_definition): New.
628         (_bfd_elf_common_section_index): New.
629         (_bfd_elf_common_section): New.
630
631         * elfxx-target.h (elf_backend_common_definition): New.
632         (elf_backend_common_section_index): New.
633         (elf_backend_common_section): New.
634         (elf_backend_merge_symbol): New.
635         (elfNN_bed): Initialize common_definition, common_section_index,
636         common_section, and merge_symbol.
637
638         * section.c (BFD_FAKE_SECTION): New.
639         (STD_SECTION): Use it.
640         * bfd-in2.h: Regenerated.
641
642 2005-07-23  Olaf Hering <[email protected]>
643
644         * elflink.c (elf_link_input_bfd): Add '\n' for linker einfo
645         callback.
646
647 2005-07-21  Ralf Corsepius  <[email protected]>
648
649         * config.bfd: Remove i[3-7]86-*-rtemself*.
650         Remove sparc-*-rtemself*.
651
652 2005-07-22  Kazuhiro Inaoka <[email protected]>
653
654         * elf32-m32r.c (m32r_elf_check_relocs): Fix pc count for
655         R_M32R_REL32.
656
657 2005-07-21  Ben Elliston  <[email protected]>
658
659         * Makefile.am (BFD32_BACKENDS): Remove cf-m68klynx.lo.
660         (BFD32_BACKENDS): Likewise, remove m68klynx.lo.
661         (BFD32_BACKENDS_CFILES): Remove cf-m68klynx.c, m68klynx.c.
662         (cf-m68klynx.lo, m68klynx.lo): Remove targets.
663         * Makefile.in: Regenerate.
664         * cf-m68klynx.c: Remove.
665         * m68klynx.c: Likewise.
666         * configure.in (m68klynx_aout_vec): Remove vector.
667         (m68klynx_coff_vec): Likewise.
668         * configure: Regenerate.
669         * targets.c (m68klynx_aout_vec): Remove extern.
670         (m68klynx_coff_vec): Likewise.
671         (_bfd_target_vector): Remove m68klynx_{aout,coff}_vec.
672         * po/SRC-POTFILES.in: Remove cf-m68klynx.c, m68klynx.c.
673
674 2005-07-20  Kazuhiro Inaoka  <[email protected]>
675
676         * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_REL32.
677         (m32r_reloc_map): Likewise.
678         (m32r_elf_relocate_section): Likewise.
679         (m32r_elf_gc_sweep_hook): Likewise.
680         (m32r_elf_check_relocs): Likewise.
681
682 2005-07-18  Nick Clifton  <[email protected]>
683
684         * reloc.c: Add M32C and MS1 relocs.
685         * bfd-in2.h: Regenerate.
686         * libbfd.h: Regenerate.
687
688 2005-07-18  Nick Clifton  <[email protected]>
689
690         * config.bfd: Move m32c entry to correct location.
691         * archures.c: Likewise.
692         * configure.in: Likewise.
693         * configure: Regenerate.
694         * targets.c: Move ms1 vector to correct location.
695
696 2005-07-18  Jan Beulich  <[email protected]>
697
698         * elf32-i386.c (elf_howto_table): Adjust overflow complaint handler
699         for R_386_PC16.
700         * elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint
701         handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF.
702
703 2005-07-16  Eric Botcazou  <[email protected]>
704
705         PR ld/1021
706         PR ld/1031
707         * elflink.c (elf_link_add_object_symbols): Also append the version
708         name to non-hidden absolute symbols that are functions.
709
710 2005-07-16  Alan Modra  <[email protected]>
711
712         * elf32-ppc.c (ppc_elf_set_sdata_syms): Return void.  Remove hack
713         for zero size sections.  Don't set .sbss syms here.
714         * elf32-ppc.h (ppc_elf_set_sdata_syms): Adjust prototype.
715
716 2005-07-16  Alan Modra  <[email protected]>
717
718         * Makefile.am: Run "make dep-am".
719         * Makefile.in: Regenerate.
720
721 2005-07-15  Bob Wilson  <[email protected]>
722
723         * elf32-xtensa.c (vsprint_msg): Add prototype.
724         (build_encoding_error_message): Delete.  Code moved into....
725         (elf_xtensa_do_reloc): ....here, and changed to give better
726         error messages for out of range literals.
727
728 2005-07-15  Alan Modra  <[email protected]>
729
730         * elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param.
731         (_bfd_elf_provide_symbol): Allow redefinition of weak syms and those
732         defined in output sections.  Call bfd_elf_record_link_assignment.
733         * bfd-in.h (bfd_elf_record_link_assignment): Update prototype.
734         * bfd-in2.h: Regenerate.
735
736 2005-07-14  Jim Blandy  <[email protected]>
737
738         Add support for m32c-*-elf (Renesas m32c and m16c).
739         * Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
740         (ALL_MACHINES_CFILES): Add cpu-m32c.c.
741         (BFD32_BACKENDS): Add elf32-m32c.lo.
742         (BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
743         (cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
744         * Makefile.in: Regenerated.
745         * archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
746         arch and mach codes.
747         (bfd_m32c_arch): New arch info object.
748         (bfd_archures_list): List bfd_m32c_arch.
749         * bfd-in2.h: Regenerated.
750         * config.bfd: Add case for the m32c.
751         * configure.in: Add case for the m32c.
752         * configure: Regenerated.
753         * cpu-m32c.c, elf32-m32c.c: New files.
754         * libbfd.h: Regenerated.
755         * targets.c (bfd_elf32_m32c_vec): Declare.
756         (_bfd_target_vector): List bfd_elf32_m32c_vec.
757
758 2005-07-14  Alan Modra  <[email protected]>
759
760         * bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare.
761         (_bfd_elf_provide_section_bound_symbols): Remove param name.
762         Formatting.
763         * bfd-in2.h: Regenerate.
764         * elflink.c (bfd_elf_gc_sections): Don't call generic function.
765         (_bfd_elf_provide_symbol): Formatting.
766         (_bfd_elf_provide_section_bound_symbols): Remove all hacks, just
767         create section relative syms.
768         (fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions.
769         * elf32-ppc.c (ppc_elf_set_sdata_syms): Use
770         _bfd_elf_provide_section_bound_symbols.
771         * reloc.c (bfd_mark_used_section): Delete.
772         (bfd_generic_gc_sections): Don't call the above.
773
774 2005-07-14  Paul Woegerer <[email protected]>
775
776         PR 1063
777         * cache.c (bfd_last_cache): Initialise to NULL.
778
779 2005-07-14  Daniel Marques  <[email protected]>
780             Nick Clifton  <[email protected]>
781
782         * coff-alpha.c (alpha_ecoff_bad_format_hook): Detect compressed
783         Alpha binaries and issue a helpful error message.
784         (alpha_ecoff_swap_reloc_out): Increase maximum allowed internal
785         symbol index to 15 to allow for binaries produced by DEC
786         compilers.
787
788 2005-07-13  Steve Ellcey  <[email protected]>
789
790         * bfd.m4 (BFD_NEED_DECLARATION): Remove.
791
792 2005-07-12  Alan Modra  <[email protected]>
793
794         * elf64-ppc.c (ppc64_elf_relocate_section): Don't use a plt stub
795         when !can_plt_call.
796
797 2005-07-12  Alan Modra  <[email protected]>
798
799         * elf32-xtensa.c (bfd_elf_xtensa_reloc): Warning fix.
800
801 2005-07-12  Alan Modra  <[email protected]>
802
803         * elf32-ppc.c (ppc_elf_set_sdata_syms): Correct __sbss_start value.
804
805 2005-07-11  H.J. Lu  <[email protected]>
806
807         * elflink.c (_bfd_elf_symbol_refs_local_p): Revert the last
808         change.
809
810 2005-07-08  Paul Koning  <[email protected]>
811
812         * dwarf2.c (read_address): Check sign_extend_vma to handle targets
813         where addresses are sign extended.
814
815 2005-07-08  Ralf Corsepius <[email protected]>
816
817         * config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
818         Mark a29k-*rtems*, hppa*-*-rtems*, *-go32-rtems*,
819         i[3-7]86*-*-rtemscoff*, mips*el-*-rtems*, powerpcle-*-rtems*,
820         sparc*-*-rtemsaout* as removed
821
822 2005-07-08  Alan Modra  <[email protected]>
823
824         * elf-hppa.h (elf_hppa_final_link): Use gp val of zero when none
825         of the usual sections are found.
826         * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy.
827         Strip .dynbss if it is zero size.
828         * elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise.
829         * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
830         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
831         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and
832         .dynsbss.
833         (i370_elf_finish_dynamic_sections): Don't attempt to write .got
834         when it is zero size.
835         * elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling
836         of .dynbss and zero size sections.
837         * elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if
838         it is zero size.
839         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy.  Strip
840         .dynbss if zero size.
841         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss
842         too.
843         * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
844         * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
845         * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
846         * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy.  Strip
847         .plt.* and .got.plt.* if zero size.
848         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy.  Strip
849         .got* and .dynbss if zero size.
850         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy.  Strip
851         * elf64-ppc.c (create_linkage_sections): Create branch lookup table
852         in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated
853         reloc section.
854         (create_got_section): Always create new .got and .rela.got sections.
855         (ppc64_elf_size_dynamic_sections): Tidy.  Strip .dynbss if zero size.
856         * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
857         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
858         * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle
859         dynamic bss sections correctly.
860         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy.
861         * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy.  Strip
862         .dynbss if zero size.
863
864 2005-07-08  Ben Elliston  <[email protected]>
865
866         * elf32-xtensa.c: Include <stdarg.h> unconditionally, not only
867         when ANSI_PROTOTYPES is defined.  Remove #ifdef logic.
868
869 2005-07-07  H.J. Lu  <[email protected]>
870
871         * elf-bfd.h (elf_backend_data): Add special_sections.
872
873         * elf.c (_bfd_elf_get_sec_type_attr): Check special_sections
874         first.
875
876         * elf32-arm.c (elf_backend_get_sec_type_attr): Removed.
877         (elf_backend_special_sections): New. Defined.
878         * elf32-m32r.c: Likewise.
879         * elf32-m68hc11.c: Likewise.
880         * elf32-m68hc12.c: Likewise.
881         * elf32-mcore.c: Likewise.
882         * elf32-sh64.c: Likewise.
883         * elf32-v850.c: Likewise.
884         * elf32-xtensa.c: Likewise.
885         * elf64-alpha.c: Likewise.
886         * elf64-hppa.c: Likewise.
887         * elf64-ppc.c: Likewise.
888         * elf64-sh64.c: Likewise.
889         * elfxx-ia64.c: Likewise.
890         * elfxx-mips.c: Likewise.
891         * elfxx-mips.h: Likewise.
892
893         * elfxx-target.h (elf_backend_special_sections): New.
894         (elfNN_bed): Initialize special_sections.
895
896 2005-07-07  Bob Wilson  <[email protected]>
897
898         * xtensa-modules.c: Update tables with Xtensa MMU features.
899
900 2005-07-07  Kaveh R. Ghazi  <[email protected]>
901
902         * elf32-xtensa.c (vsprint_msg): Add format attribute.  Fix
903         format bugs.
904         * vms.h (_bfd_vms_debug): Add format attribute.
905         (_bfd_vms_debug, _bfd_hexdump): Fix typos.
906
907 2005-07-07  H.J. Lu  <[email protected]>
908
909         PR 975
910         * elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
911         symbol with default visibility is local.
912
913 2005-07-07  Ben Elliston  <[email protected]>
914
915         * config.bfd: Mark m68*-*-rtemscoff as obsolete.
916
917 2005-07-06  H.J. Lu  <[email protected]>
918
919         * dwarf2.c (varinfo): Add addr.
920         (lookup_symbol_in_variable_table): Also check addr.
921         (scan_unit_for_symbols): Set addr for variable.
922         (comp_unit_find_line): Updated.
923
924 2005-07-06  Nick Clifton  <[email protected]>
925
926         * coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error
927         message if an unknown reloc is encountered.
928         (alpha_relocate_section): Likewise.
929
930         * ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc
931         with a missing howto field.
932
933 2005-07-06  Alan Modra  <[email protected]>
934
935         * po/SRC-POTFILES.in: Add cpu-ms1.c, elf32-ms1.c, elf-vxworks.c,
936         elfxx-sparc.c.
937
938 2005-07-05  Paul Brook  <[email protected]>
939
940         * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove.
941         (ppc_elf_vxworks_get_sec_type_attr): New function.
942         (elf_backend_special_sections): Remove vxwords definition.
943         (elf_backend_get_sec_type_attr): Define for vxworks.
944
945 2005-07-05  Nick Clifton  <[email protected]>
946
947         * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo.
948
949 2005-07-05  Paul Brook  <[email protected]>
950
951         * config.bfd: Add separate case for ppc-vxworks.
952         * configure: Regenerate.
953         * configure.in: Include elf-vxworks.lo on ppc targets.
954         * elf-vxworks.c (elf_vxworks_final_write_processing): Handle
955         .rela.plt.unloaded.
956         * elf32-ppc.c: Add VxWorks target vec.  Include elf-vxworks.h.
957         (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
958         (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
959         ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
960         ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
961         VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
962         VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
963         (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
964         is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
965         (ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
966         (ppc_elf_create_got): Create .got.plt for VxWorks.
967         (ppc_elf_create_dynamic_sections): Create unloaded plt relocation
968         section for VxWorks.
969         (ppc_elf_select_plt_layout): Handle VxWorks plt format.
970         (allocate_got): VxWorks does not need a got header.
971         (allocate_dynrelocs): Handle VxWorks plt format.
972         (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
973         VxWorks.  Handle VxWorks plt/got.
974         (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
975         (ppc_elf_vxworks_special_sections): New.
976         (ppc_elf_vxworks_link_hash_table_create,
977         ppc_elf_vxworks_add_symbol_hook,
978         elf_i386_vxworks_link_output_symbol_hook,
979         ppc_elf_vxworks_final_write_processing): New functions.
980         * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
981         (_bfd_target_vector): Use it.
982
983 2005-07-05  Jakub Jelinek  <[email protected]>
984
985         * libbfd-in.h (struct artdata): Add extended_names_size field.
986         * libbfd.h: Rebuilt.
987         * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly
988         allocated object by bfd_zalloc.
989         * coff64-rs6000.c (xcoff64_archive_p): Likewise.
990         * ecoff.c (_bfd_ecoff_archive_p): Likewise.
991         * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise.
992         (get_extended_arelt_filename): Fail if index is bigger or equal to
993         extended_names_size.
994         (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive,
995         get_extended_arelt_filename already did that.
996         (_bfd_slurp_extended_name_table): Initialize extended_names_size field.
997         Allocate one extra byte and clear it, in case extended names table
998         is not terminated.
999
1000         * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
1001         bfd_zalloc2): New prototypes.
1002         * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
1003         * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
1004         * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
1005         * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
1006         elf_map_symbols, map_sections_to_segments,
1007         assign_file_positions_for_segments, copy_private_bfd_data,
1008         swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
1009         where appropriate.
1010         * bfd-in2.h: Rebuilt.
1011         * libbfd.h: Rebuilt.
1012
1013         * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
1014         verdef or verneed section.
1015         (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
1016         verneed sections gracefully.
1017         * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
1018         bogus relocation values.
1019         * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
1020         * elf64-s390.c (elf_s390_info_to_howto): Likewise.
1021         * elf32-s390.c (elf_s390_info_to_howto): Likewise.
1022         * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
1023         * elfxx-ia64.c (lookup_howto): Likewise.
1024
1025         * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
1026         the end of strtab and clear it.
1027         (elf_read): Remove.
1028
1029 2005-07-05  Nick Clifton  <[email protected]>
1030
1031         * po/vi.po: New Vietnamese translation.
1032         * configure.in (ALL_LINGUAS): Add vi.
1033         * configure: Regenerate.
1034
1035 2005-07-05  Peter S. Mazinger <[email protected]>
1036
1037         * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
1038         touchup logic like i386/ppc.
1039
1040 2005-07-05  Alan Modra  <[email protected]>
1041
1042         * elf.c (special_sections): Move const qualifier.
1043         (special_sections_b..special_sections_t): Likewise.
1044         * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
1045         const.
1046         (elf32_arm_symbian_special_sections): Move const qualifier.
1047         * elf32-m32r.c: Similarly.
1048         * elf32-m68hc11.c: Similarly.
1049         * elf32-m68hc12.c: Similarly.
1050         * elf32-mcore.c: Similarly.
1051         * elf32-ppc.c: Similarly.
1052         * elf32-sh64.c: Similarly.
1053         * elf32-v850.c: Similarly.
1054         * elf32-xtensa.c: Similarly.
1055         * elf64-alpha.c: Similarly.
1056         * elf64-hppa.c: Similarly.
1057         * elf64-ppc.c: Similarly.
1058         * elf64-sh64.c: Similarly.
1059         * elfxx-ia64.c: Similarly.
1060         * elfxx-mips.c: Similarly.
1061
1062 2005-07-04  Kazuhiro Inaoka  <[email protected]>
1063
1064         * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
1065         info->executable instead of !info->shared where appropriate.
1066
1067 2005-07-04  Alan Modra  <[email protected]>
1068
1069         PR 1042
1070         * elf.c (assign_file_positions_for_segments): Remove excluded
1071         sections from the segment map.
1072
1073 2005-07-04  Alan Modra  <[email protected]>
1074
1075         PR 1004
1076         * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr.  Delete
1077         special_sections.
1078         (_bfd_elf_get_special_section): Declare.
1079         (bfd_elf_special_section): Update prototype.
1080         * elf.c (special_sections): Remove unused outer entries.
1081         (get_special_section): Delete.
1082         (_bfd_elf_get_special_section): New function.
1083         (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec".  Update
1084         special_sections indexing.
1085         (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
1086         * elf32-arm.c (symbian_special_sections_d): Delete.
1087         (symbian_special_sections_g, symbian_special_sections_h): Delete.
1088         (symbian_special_sections_i, symbian_special_sections_f): Delete.
1089         (symbian_special_sections_p): Delete.
1090         (elf32_arm_symbian_special_sections): Merge above to here.
1091         (elf32_arm_symbian_get_sec_type_attr): New function.
1092         (elf_backend_special_sections): Don't define.
1093         (elf_backend_get_sec_type_attr): Define.
1094         * elf32-m32r.c: Similarly to elf32-arm.c.
1095         * elf32-m68hc11.c: Likewise.
1096         * elf32-m68hc12.c: Likewise.
1097         * elf32-mcore.c: Likewise.
1098         * elf32-sh64.c: Likewise.
1099         * elf32-v850.c: Likewise.
1100         * elf32-xtensa.c: Likewise.
1101         * elf64-alpha.c: Likewise.
1102         * elf64-hppa.c: Likewise.
1103         * elf64-ppc.c: Likewise.
1104         * elf64-sh64.c: Likewise.
1105         * elfxx-ia64.c: Likewise.
1106         * elfxx-mips.c: Likewise.
1107         * elf32-ppc.c: Likewise.
1108         (bfd_elf_special_section ppc_alt_plt): New.  Use it if .plt loadable.
1109         * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
1110         (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
1111         (elf_backend_get_sec_type_attr): Define.
1112         * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
1113         (elf_backend_special_sections): Don't define.
1114         (elfNN_bed): Update.
1115
1116 2005-07-01  Nick Clifton  <[email protected]>
1117
1118         * cpu-d10v.c: Update to ISO C90 style function declarations and
1119         fix formatting.
1120         * cpu-d30v.c: Likewsie.
1121         * cpu-i370.c: Likewsie.
1122         * cpu-xstormy16.c: Likewsie.
1123         * elf32-arc.c: Likewsie.
1124         * elf32-d10v.c: Likewsie.
1125         * elf32-d30v.c: Likewsie.
1126         * elf32-dlx.c: Likewsie.
1127         * elf32-i370.c: Likewsie.
1128         * elf32-i960.c: Likewsie.
1129         * elf32-ip2k.c: Likewsie.
1130         * elf32-m32r.c: Likewsie.
1131         * elf32-mcore.c: Likewsie.
1132         * elf32-openrisc.c: Likewsie.
1133         * elf32-or32.c: Likewsie.
1134         * elf32-pj.c: Likewsie.
1135         * elf32-v850.c: Likewsie.
1136         * elf32-xstormy16.c: Likewsie.
1137
1138 2005-07-01  Alan Modra  <[email protected]>
1139
1140         * elf64-alpha.c (elf64_alpha_create_got_section): Always create
1141         a new .got section.
1142         (elf64_alpha_create_dynamic_sections): Always make new sections
1143         by using bfd_make_section_anyway_with_flags.  Check that .got not
1144         already created.
1145         (elf64_alpha_check_relocs): Delete "got_created".  Use tdata->gotobj
1146         instead.
1147
1148 2005-06-30  Alan Modra  <[email protected]>
1149
1150         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
1151         _SDA_BASE_ and _SDA2_BASE_ symbols.
1152         * elflink.c (_bfd_elf_provide_symbol): Correct comment.  Define
1153         sym if not def_regular.
1154         (_bfd_elf_provide_section_bound_symbols): Similarly.
1155
1156 2005-06-30  Ben Elliston  <[email protected]>
1157
1158         * config.bfd: Mark as obsolete:
1159             m68*-apollo-*
1160             m68*-apple-aux*
1161             m68*-bull-sysv*
1162
1163 2005-06-29  Alan Modra  <[email protected]>
1164
1165         * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
1166         .eh_frame specially..
1167         (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
1168         Don't recheck sections we have already marked.
1169         (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
1170         * section.c (struct bfd_section): Add gc_mark_from_eh.
1171         (STD_SECTION): Adjust.
1172         * ecoff.c (bfd_debug_section): Adjust.
1173         * bfd-in2.h: Regenerate.
1174
1175 2005-06-29  Alan Modra  <[email protected]>
1176
1177         * elflink.c (elf_gc_sweep): Do not refcount on sections that have
1178         not been processed by check_relocs.
1179
1180 2005-06-29  Paul Brook  <[email protected]>
1181
1182         * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
1183         * bfd-in2.h: Regenerate.
1184         * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
1185         relative.
1186         * elflink.c (bfd_elf_set_symbol): Add section argument.
1187         (_bfd_elf_provide_symbol): Ditto.
1188         (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
1189
1190 2005-06-27  Carlos O'Donell <[email protected]>
1191
1192         * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
1193         Use bh_root, and hh.
1194         (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
1195         (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
1196         (struct elf32_hppa_link_hash_table): Use etab and bstab.
1197         (stub_hash_newfunc): Use hh.
1198         (hppa_link_hash_newfunc): Use hsh_cache.
1199         (elf32_hppa_link_hash_table_create): Use etab, and bstab.
1200         (elf32_hppa_link_hash_table_free): Use bstab.
1201         (hppa_stub_name): Use eh.
1202         (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
1203         (hppa_add_stub): Use bstab.
1204         (hppa_type_of_stub): Use eh.
1205         (hppa_build_one_stub): Use hh and bh_root.
1206         (elf32_hppa_copy_indirect_symbol): Use hdh_next.
1207         (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
1208         (elf32_hppa_gc_sweep_hook): Use hdh_next.
1209         (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
1210         (allocate_plt_static): Use etab.
1211         (allocate_dynrelocs): Use etab, and hdh_next.
1212         (readonly_dynrelocs): Use hdh_next.
1213         (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
1214         (get_local_syms): Use eh, bstab, and hh.
1215         (elf32_hppa_size_stubs): Use eh, bstab, and hh.
1216         (elf32_hppa_set_gp): Use etab.
1217         (elf32_hppa_build_stubs): Use bstab.
1218         (final_link_relocate): Use eh, bh_root.
1219         (elf32_hppa_relocate_section): Use elf, etab.
1220         (elf32_hppa_finish_dynamic_sections): Use etab.
1221
1222 2005-06-27  H.J. Lu  <[email protected]>
1223
1224         * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
1225         the extra `;'.
1226
1227 2005-06-21  Carlos O'Donell <[email protected]>
1228
1229         * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
1230         (hppa_stub_hash_entry): Define.
1231         (stub_hash_newfunc): Rename variables.
1232         (hppa_link_hash_newfunc): Likewise.
1233         (elf32_hppa_link_hash_table_free): Likewise.
1234         (hppa_stub_name): Likewise.
1235         (hppa_get_stub_entry): Likewise.
1236         (hppa_add_stub): Likewise.
1237         (hppa_type_of_stub): Likewise.
1238         (hppa_build_one_stub): Likewise.
1239         (hppa_size_one_stub): Likewise.
1240         (elf32_hppa_create_dynamic_sections): Likewise.
1241         (elf32_hppa_copy_indirect_symbol): Likewise.
1242         (elf32_hppa_check_relocs): Likewise.
1243         (elf32_hppa_gc_mark_hook): Likewise.
1244         (elf32_hppa_gc_sweep_hook): Likewise.
1245         (elf32_hppa_grok_psinfo): Likewise.
1246         (elf32_hppa_hide_symbol): Likewise.
1247         (elf32_hppa_adjust_dynamic_symbol): Likewise.
1248         (allocate_dynrelocs): Likewise.
1249         (clobber_millicode_symbols): Likewise.
1250         (readonly_dynrelocs): Likewise.
1251         (elf32_hppa_size_dynamic_sections): Likewise.
1252         (get_local_syms): Likewise.
1253         (elf32_hppa_size_stubs): Likewise.
1254         (hppa_record_segment_addr): Likewise.
1255         (final_link_relocate): Likewise.
1256         (elf32_hppa_relocate_section): Likewise.
1257         (elf32_hppa_finish_dynamic_symbol): Likewise.
1258
1259 2005-06-20  H.J. Lu  <[email protected]>
1260
1261         PR 1025
1262         * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
1263         symbol.
1264         * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1265         * elf32-avr.c (elf32_avr_check_relocs): Likewise.
1266         * elf32-cris.c (cris_elf_check_relocs): Likewise.
1267         * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1268         * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1269         * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1270         * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1271         * elf32-i370.c (i370_elf_check_relocs): Likewise.
1272         * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1273         * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1274         * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1275         * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1276         * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1277         * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
1278         * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
1279         * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
1280         * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1281         * elf32-s390.c (elf_s390_check_relocs): Likewise.
1282         * elf32-sh.c (sh_elf_check_relocs): Likewise.
1283         * elf32-v850.c (v850_elf_check_relocs): Likewise.
1284         * elf32-vax.c (elf_vax_check_relocs): Likewise.
1285         * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1286         * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1287         * elf64-s390.c (elf_s390_check_relocs): Likewise.
1288         * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1289         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1290         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1291
1292 2005-06-20  H.J. Lu  <[email protected]>
1293
1294         PR 1022
1295         * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
1296         symbol.
1297
1298 2005-06-20  H.J. Lu  <[email protected]>
1299
1300         PR 1025
1301         * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
1302         * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1303
1304 2005-06-18  H.J. Lu  <[email protected]>
1305
1306         * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
1307         BFD_RELOC_X86_64_GOTPC32.
1308         * bfd-in2.h: Regenerated.
1309
1310 2005-06-17  Jakub Jelinek  <[email protected]>
1311
1312         * elf.c (bfd_section_from_shdr): Kill bogus warning.
1313
1314         * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
1315         symbol, relocation, group or versym sections.
1316
1317         * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
1318         is NULL.
1319         * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
1320         doesn't point into the section.
1321
1322 2005-06-17  Jan Beulich  <[email protected]>
1323
1324         * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
1325         and BFD_RELOC_X86_64_GOTPC32.
1326         * libbfd.h (bfd_reloc_code_real_names): Likewise.
1327         * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
1328         R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
1329         (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
1330         and R_X86_64_GOTPC32.
1331         (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
1332         (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
1333         R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
1334         (elf64_x86_64_relocate_section): Likewise.
1335         (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
1336
1337 2005-06-15  Mark Kettenis  <[email protected]>
1338
1339         * archive.c: Include "libiberty.h".
1340
1341 2005-06-15  Nick Clifton  <[email protected]>
1342
1343         * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
1344         produced by the GreenHills toolchain can be assimilated.
1345
1346 2005-06-14  Steve Ellcey  <[email protected]>
1347
1348         * som.c (som_find_inliner_info): New.
1349
1350 2005-06-14  H.J. Lu  <[email protected]>
1351
1352         * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
1353
1354 2005-06-14  Jakub Jelinek  <[email protected]>
1355
1356         * elf.c (bfd_section_from_shdr): Fail if name is NULL.
1357         Prevent endless recursion on broken objects.
1358
1359         * archive.c (do_slurp_coff_armap): Check for overflows.
1360
1361 2005-06-10  Daniel Jacobowitz  <[email protected]>
1362
1363         * elfcode.h (elf_write_relocs): Do nothing if there are no
1364         relocations.
1365
1366 2005-06-10  Alan Modra  <[email protected]>
1367
1368         * dwarf2.c (decode_line_info): Revert last change.  Instead set
1369         initial low_pc to -1 to avoid need to test whether loc_pc has
1370         been set.
1371
1372 2005-06-09  Christopher Faylor  <[email protected]>
1373
1374         * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
1375         either SEC_ALLOC OR SEC_LOAD.
1376
1377 2005-06-09  Christopher Faylor  <[email protected]>
1378
1379         * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
1380         section header.  Do not add STYP_NOLOAD since it does not appear to be
1381         a valid PE flag.
1382
1383 2005-06-09  H.J. Lu  <[email protected]>
1384
1385         PR 1000
1386         * dwarf2.c (lookup_address_in_line_info_table): Restore code
1387         handling NULL function info, removed with 2005-04-03 change.
1388
1389 2005-06-08  Mark Mitchell  <[email protected]>
1390
1391         * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
1392
1393 2005-06-09  Alan Modra  <[email protected]>
1394
1395         * elflink.c (elf_mark_used_section): Delete.
1396         (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
1397         * reloc.c (bfd_mark_used_section): New function.
1398         (bfd_generic_gc_sections): Call bfd_mark_used_section.
1399
1400 2005-06-08  Alan Modra  <[email protected]>
1401
1402         * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
1403         (bfd_fdopenr): Same.
1404
1405 2005-06-07  Mark Mitchell  <[email protected]>
1406
1407         * opncls.c (bfd_fdopenr): Add missing break statements.
1408
1409 2005-06-07  Mark Mitchell  <[email protected]>
1410
1411         * opncls.c (bfd_fopen): New API.
1412         (bfd_openr): Use it.
1413         (bfd_fdopenr): Likewise.
1414         * bfd-in2.h: Regenerated.
1415
1416 2005-06-07  Aldy Hernandez  <[email protected]>
1417             Michael Snyder  <[email protected]>
1418             Stan Cox  <[email protected]>
1419
1420         * Makefile.am (ALL_MACHINES): Add ms1 support.
1421         (ALL_MACHINES_CFILES): Same.
1422         (BFD32_BACKENDS): Same.
1423         (BFD32_BACKENDS_CFILES): Same.
1424
1425         * Makefile.in: Regenerate.
1426
1427         * archures.c (bfd_architecture): Add ms1 entries.
1428         Externalize bfd_ms1_arch.
1429         (bfd_archures_list): Add bfd_ms1_arch.
1430
1431         * bfd-in2.h: Regenerate.
1432
1433         * cpu-ms1.c: New file.
1434
1435         * elf32-ms1.c: New file.
1436
1437         * targets.c: Define extern of bfd_elf32_ms1_vec.
1438         Add bfd_elf32_ms1_vec to _bfd_target_vector.
1439
1440         * configure.in: Add bfd_elf32_ms1_vec case.
1441
1442         * configure: Regenerate.
1443
1444         * config.bfd: Add ms1-*-elf to table.
1445
1446 2005-06-07  Zack Weinberg  <[email protected]>
1447
1448         * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
1449
1450 2005-06-07  Alan Modra  <[email protected]>
1451
1452         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
1453         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
1454
1455 2005-06-06  H.J. Lu  <[email protected]>
1456
1457         PR 990
1458         * bfd.c (bfd_find_line): New.
1459
1460         * dwarf2.c (comp_unit): Add variable_table.
1461         (funcinfo): Add file, line, and sec.
1462         (varinfo): New.
1463         (lookup_symbol_in_function_table): New.
1464         (lookup_symbol_in_variable_table): New.
1465         (scan_unit_for_functions): Renamed to ...
1466         (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
1467         DW_TAG_variable.
1468         (comp_unit_find_nearest_line): Updated.
1469         (comp_unit_find_line): New.
1470         (_bfd_dwarf2_find_line): New.
1471
1472         * elf-bfd.h (_bfd_elf_find_line): New.
1473         (_bfd_generic_find_line): New. Defined.
1474
1475         * elf.c (_bfd_elf_find_line): New.
1476
1477         * libbfd-in.h (_bfd_dwarf2_find_line): New.
1478         (_bfd_generic_find_line): New.
1479
1480         * bfd-in2.h: Regenerated.
1481         * libbfd.h: Likewise.
1482
1483         * libbfd.c (_bfd_generic_find_line): New.
1484
1485         * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
1486         with _bfd_generic_find_line.
1487         (bfd_target): Add _bfd_find_line.
1488
1489 2005-06-06  H.J. Lu  <[email protected]>
1490
1491         * dwarf2.c (decode_line_info): Properly set low_pc.
1492
1493 2005-06-06  Alan Modra  <[email protected]>
1494
1495         * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
1496         case, include addend when indexing .opd section map.
1497         (ppc64_elf_edit_opd): Add no_opd_opt param.  Do nothing besides
1498         clear opd_adjust array if no_opd_opt set.  Tidy code.
1499         Ignore zero size .opd.  Check bfd_alloc return value.
1500         (ppc_stub_name): Return immediately on bfd_malloc fail.
1501         * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
1502
1503 2005-06-04  H.J. Lu  <[email protected]>
1504
1505         * dwarf2.c (comp_unit): Fix a typo in comment.
1506
1507 2005-06-03  Jan-Benedict Glaw  <[email protected]>
1508
1509         * elf32-vax.c (rtype_to_howto): Remove PARAMS.
1510         (reloc_type_lookup): Dito.
1511         (elf_vax_discard_copies): Dito.
1512         (elf_vax_instantiate_got_entries): Dito.
1513         (elf_vax_link_hash_traverse): Dito.
1514         (elf_vax_link_hash_newfunc): Dito.
1515         (elf_vax_link_hash_table_create): Dito.
1516         (elf32_vax_set_private_flags): Dito.
1517         (elf32_vax_merge_private_bfd_data): Dito.
1518         (elf32_vax_print_private_bfd_data): Dito.
1519         (elf_vax_check_relocs): Dito.
1520         (elf_vax_gc_mark_hook): Dito.
1521         (elf_vax_gc_sweep_hook): Dito.
1522         (elf_vax_size_dynamic_sections): Dito.
1523         (elf_vax_discard_copies): Dito.
1524         (elf_vax_instantiate_got_entries): Dito.
1525         (elf_vax_relocate_section): Dito.
1526         (elf_vax_finish_dynamic_symbol): Dito.
1527         (elf_vax_finish_dynamic_sections): Dito.
1528         (elf_vax_hash_table): Break-up of line isn't needed.
1529         (elf_vax_check_relocs): Remove leading whitespace
1530         (elf_vax_relocate_section): Remove redundant whitespace
1531         (elf_vax_link_hash_newfunc): Don't cast NULL.
1532         (elf_vax_link_hash_table_create): Dito.
1533         * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
1534
1535 2005-06-03  Alan Modra  <[email protected]>
1536
1537         PR 568
1538         * configure.in: Bump version
1539         * configure: Regenerate.
1540         * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
1541         discarded section sym refs and kill linker output.
1542         * simple.c (simple_dummy_einfo): New function.
1543         (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
1544
1545         * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
1546         for all reloc types.
1547
1548 2005-06-02  Alan Modra  <[email protected]>
1549
1550         * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
1551         restrictive of func code and func descr for undefined syms as well
1552         as defined.
1553
1554 2005-05-31  Jim Blandy  <[email protected]>
1555
1556         * Makefile.am: Regenerate dependencies with 'make dep-am'.
1557         * Makefile.in: Regenerate.
1558
1559 2005-05-31  Richard Henderson  <[email protected]>
1560
1561         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
1562         (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
1563         (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
1564         (elf64_alpha_want_plt): Update to match.
1565         (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
1566         (elf64_alpha_relax_with_lituse): Likewise.  Handle JSRDIRECT.
1567
1568 2005-05-31  Zack Weinberg  <[email protected]>
1569
1570         * elf32-arm.c (elf32_arm_reloc_type_lookup)
1571         (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
1572         Use ISO C90 function declaration style.
1573
1574 2005-05-31  James E Wilson  <[email protected]>
1575
1576         * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
1577         header PF_R flag on PT_LOAD segments.
1578
1579 2005-05-30  Richard Henderson  <[email protected]>
1580
1581         * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
1582         the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
1583
1584 2005-05-29  Richard Henderson  <[email protected]>
1585
1586         * configure.in (--enable-secureplt): New.
1587         * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
1588         (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
1589         (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
1590         (elf64_alpha_use_secureplt): New.
1591         (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
1592         (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
1593         (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
1594         (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
1595         (struct alpha_elf_link_hash_entry): Add plt_offset.
1596         (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
1597         (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
1598         (PLT_ENTRY_WORD3): Remove.
1599         (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
1600         on .plt and create .got.plt.
1601         (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
1602         (get_got_entry): Initialize plt_offset.
1603         (elf64_alpha_want_plt): New.
1604         (elf64_alpha_check_relocs): Use it.
1605         (elf64_alpha_adjust_dynamic_symbol): Likewise.  Don't allocate
1606         plt entries here.
1607         (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
1608         error as user error.
1609         (elf64_alpha_size_plt_section_1): Allocate one plt entry per
1610         got subsection.
1611         (elf64_alpha_size_plt_section): Size .got.plt section.
1612         (elf64_alpha_size_rela_got_1): Don't allocate relocations if
1613         plt entries used.
1614         (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
1615         Add PLTRO DYNAMIC entry.
1616         (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
1617         (elf64_alpha_finish_dynamic_sections): Likewise.
1618
1619 2005-05-28  David Daney  <[email protected]>
1620
1621         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections):  Move
1622         calculation of DT_RELSZ to occur after all dynamic relocations
1623         are created.
1624
1625 2005-05-28  Eli Zaretskii  <[email protected]>
1626
1627         * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
1628         * config.in, configure: Regenerate.
1629
1630 2005-05-26  Mark Kettenis  <[email protected]>
1631             Maciej W. Rozycki  <[email protected]>
1632
1633         * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
1634         stop processing of options if one of invalid size is
1635         encountered.
1636         (_bfd_mips_elf_section_from_shdr): Likewise.
1637         (_bfd_mips_elf_fake_sections): Reset the type of empty special
1638         sections.
1639
1640 2005-05-26  Richard Henderson  <[email protected]>
1641
1642         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
1643         plt_old_section, plt_old_value.
1644         (elf64_alpha_adjust_dynamic_symbol): Don't set it.
1645         (elf64_alpha_size_plt_section_1): Don't use it.
1646
1647 2005-05-26  Jakub Jelinek  <[email protected]>
1648
1649         * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
1650         first shdr has sh_size == 0.  Fail if e_shnum is large to cause
1651         arithmetic overflow when allocating the i_shdr array.
1652         Sanity check sh_link and sh_info fields.  Fix e_shstrndx sanity check.
1653
1654 2005-05-25  Richard Henderson  <[email protected]>
1655
1656         * elf64-alpha.c: Update all function definitions to ISO C.  Remove
1657         all function prototypes; rearrange functions into def-use order.
1658
1659 2005-05-25  Richard Henderson  <[email protected]>
1660
1661         * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
1662         in the presence of deleting elements.
1663         (elf64_alpha_size_got_sections): Zero dead got section size.
1664
1665 2005-05-23  Fred Fish  <[email protected]>
1666
1667         * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
1668         (struct funcinfo): Add caller_func, caller_file, caller_line.
1669         tag, and nesting_level members.
1670         (lookup_address_in_function_table): Change first passed parameter
1671         from "struct funcinfo *" to "struct comp_unit *".
1672         (lookup_address_in_function_table): Dereference unit to find function
1673         table.
1674         (lookup_address_in_function_table): Traverse the function list to
1675         create a chain of inlined functions back to the first non inlined
1676         function.
1677         (scan_unit_for_functions): Remember tag and nesting level.  Handle
1678         DW_AT_call_file and DW_AT_call_line.
1679         (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
1680         call to pass unit pointer instead of function table pointer.  For
1681         inlined functions, save pointer to the inliner chain.
1682         (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
1683         (_bfd_dwarf2_find_inliner_info): New function that returns information
1684         from the inliner chain after a call to bfd_find_nearest_line.
1685
1686         * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
1687         * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
1688         NAME##_find_inliner_info.
1689         (bfd_target): Add _bfd_find_inliner_info.
1690         * bfd-in2.h: Regenerate.
1691
1692         * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
1693         macro that always returns bfd_false.
1694         (_bfd_dwarf2_find_inliner_info): Declare.
1695         * libbfd.h: Regenerate.
1696
1697         * elf32-arm.c (elf32_arm_find_inliner_info): New function
1698         that calls _bfd_dwarf2_find_inliner_info.
1699         (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
1700
1701         * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
1702         that calls _bfd_dwarf2_find_inliner_info.
1703         * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
1704         * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
1705         _bfd_mips_elf_find_inliner_info.
1706         * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
1707         * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
1708
1709         * elf.c (_bfd_elf_find_inliner_info): New function that calls
1710         _bfd_dwarf2_find_inliner_info.
1711         * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
1712         * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
1713         _bfd_elf_find_inliner_info.
1714
1715         * coffgen.c (coff_find_inliner_info): New function that
1716         calls _bfd_dwarf2_find_inliner_info.
1717         * libcoff-in.h (coff_find_inliner_info): Declare.
1718         * libcoff.h: Regenerate.
1719         * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
1720         (pmac_xcoff_vec) Ditto.
1721         * coff64-rs6000.c (rs6000coff64_vec): Ditto.
1722         (aix5coff64_vec): Ditto.
1723
1724         * aout-target.h (MY_find_inliner_info): Define as
1725         _bfd_nosymbols_find_inliner_info.
1726         * aout-tic30.c (MY_find_inliner_info): Ditto.
1727         * binary.c (binary_find_inliner_info): Ditto.
1728         * i386msdos.c (msdos_find_inliner_info): Ditto.
1729         * ihex.c (ihex_find_inliner_info): Ditto.
1730         * libaout.h (aout_32_find_inliner_info): Ditto.
1731         * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
1732         * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
1733         * mmo.c (mmo_find_inliner_info): Ditto.
1734         * nlm-target.h (nlm_find_inliner_info): Ditto.
1735         * pef.c (bfd_pef_find_inliner_info): Ditto.
1736         * ppcboot.c (ppcboot_find_inliner_info): Ditto.
1737         * srec.c (srec_find_inliner_info): Ditto.
1738         * tekhex.c (tekhex_find_inliner_info): Ditto.
1739         * versados.c (versados_find_inliner_info): Ditto.
1740         * xsym.c (bfd_sym_find_inliner_info): Ditto.
1741
1742         * ieee.c (ieee_find_inliner_info): New function that always
1743         returns FALSE.
1744         * oasys.c (oasys_find_inliner_info): Ditto.
1745         * vms.c (vms_find_inliner_info): Ditto.
1746
1747 2005-05-24  Alan Modra  <[email protected]>
1748
1749         * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
1750         force old plt layout.
1751
1752 2005-05-22  Richard Henderson  <[email protected]>
1753
1754         * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
1755         sections.
1756         (elf64_alpha_check_relocs): Likewise.
1757         (elf64_alpha_relocate_section): Don't emit dynamic relocations to
1758         non-allocated sections.
1759
1760 2005-05-22  Richard Henderson  <[email protected]>
1761
1762         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
1763         undefweak to use zero register.  Call elf64_alpha_relax_got_load
1764         if not all uses removed.
1765         (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
1766         (elf64_alpha_relax_section): Handle undefweak symbols.
1767         (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
1768         (elf64_alpha_size_rela_got_1): Likewise.
1769         (elf64_alpha_relocate_section): Likewise.
1770
1771 2005-05-22  Richard Henderson  <[email protected]>
1772
1773         * elf64-alpha.c (elf64_alpha_relax_section): Only operate
1774         on SEC_CODE sections.
1775
1776 2005-05-22  John David Anglin  <[email protected]>
1777
1778         * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
1779         unsigned int *.
1780         (som_write_space_strings): Change type of tmp_space and p to char *.
1781         (som_write_symbol_strings): Likewise.  Also change type of comp to
1782         char *comp[4].
1783         (som_begin_writing): Change type of strings_size to unsigned int.
1784         (som_finish_writing): Likewise.
1785         (som_slurp_reloc_table): Change type of external_relocs to unsigned
1786         char *.
1787         * som.h (struct som_section_data_struct): Change type of reloc_stream
1788         field to unsigned char *.
1789
1790 2005-05-20  Daniel Jacobowitz  <[email protected]>
1791
1792         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
1793         copy relocations for VxWorks.
1794
1795 2005-05-20  Daniel Jacobowitz  <[email protected]>
1796
1797         * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
1798         has_sda_refs.
1799         (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
1800         (ppc_elf_check_relocs): Set has_sda_refs.
1801         (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
1802         copy relocations.  Use has_sda_refs to place variables in .sbss.
1803         (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
1804         .sbss.
1805
1806 2005-05-20  Bob Wilson  <[email protected]>
1807
1808         * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
1809         xtensa_default_isa is initialized.
1810
1811 2005-05-20  Alan Modra  <[email protected]>
1812
1813         * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
1814         for second and subsequent list entries.  Only allocate multiple
1815         glink stubs when shared or pie.
1816         (ppc_elf_finish_dynamic_symbol): Break out early when only one
1817         glink stub is needed.
1818
1819 2005-05-19  Zack Weinberg  <[email protected]>
1820
1821         * Makefile.am: Have 'all' depend on 'info'.
1822         * Makefile.in: Regenerate.
1823
1824 2005-05-19  Alan Modra  <[email protected]>
1825
1826         * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
1827         init_offset.  Add init_got_refcount, init_plt_refcount,
1828         init_got_offset and init_plt_offset.
1829         * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
1830         (_bfd_elf_link_hash_hide_symbol): Likewise.
1831         (_bfd_elf_link_hash_table_init): Likewise.
1832         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1833         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1834         * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
1835         (bfd_elf_size_dynamic_sections): Likewise.
1836         * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
1837         (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
1838         LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
1839         (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
1840         LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
1841         (struct plt_entry): New.
1842         (ppc_elf_link_hash_table_create): Set new init_plt fields.
1843         (ppc_elf_copy_indirect_symbol): Handle merge of plt plist.  Don't
1844         use _bfd_elf_link_hash_copy_indirect.
1845         (update_plt_info, find_plt_ent): New functions.
1846         (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
1847         and adjust for use of plt list rather than refcount.
1848         (ppc_elf_gc_sweep_hook): Likewise.
1849         (ppc_elf_tls_optimize): Likewise.
1850         (ppc_elf_adjust_dynamic_symbol): Likewise.
1851         (allocate_dynrelocs): Likewise.
1852         (ppc_elf_relax_section): Likewise.
1853         (ppc_elf_relocate_section): Likewise.  Adjust R_PPC_PLTREL24 addends
1854         when performing a relocatable link.
1855         (ppc_elf_finish_dynamic_symbol): Likewise.  Write .glink stubs here..
1856         (ppc_elf_finish_dynamic_sections): ..rather than here.  Use new
1857         pic resolver stub.
1858
1859 2005-05-19  Alan Modra  <[email protected]>
1860
1861         * elf.c (assign_file_positions_for_segments): Use maximum of
1862         maxpagesize and section alignment when adjusting initial
1863         segment offset and section offsets.
1864
1865 2005-05-18  Zack Weinberg  <[email protected]>
1866
1867         * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
1868         unconditional.
1869
1870 2005-05-18  H.J. Lu  <[email protected]>
1871
1872         * elf.c (group_signature): Undo the last change. Check if the
1873         symbol table section is correct.
1874
1875 2005-05-17  Zack Weinberg  <[email protected]>
1876
1877         * elf32-arm.c: Wherever possible, use official reloc names
1878         from AAELF.
1879         (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
1880         (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
1881         (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
1882         (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
1883         (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
1884         (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
1885         elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
1886         Add many new relocations from AAELF.
1887         (elf32_arm_howto_from_type): Update to match.
1888         (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
1889         R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
1890         R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
1891         (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
1892         (elf32_arm_final_link_relocate): Add support for
1893         R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6.  Remove
1894         case entries redundant with default.
1895
1896         * reloc.c: Reorganize ARM relocations.  Add Thumb
1897         assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
1898         BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
1899         Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
1900         BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
1901         Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
1902         * bfd-in2.h, libbfd.h: Regenerate.
1903
1904 2005-05-17  Daniel Jacobowitz  <[email protected]>
1905
1906         * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
1907         elf_shstrtab.
1908         * format.c (bfd_check_format_matches): Set output_has_begun
1909         for both_direction.
1910         * section.c (bfd_set_section_contents): Use bfd_write_p.  Remove
1911         special case for both_direction.
1912
1913 2005-05-17  Nick Clifton  <[email protected]>
1914
1915         * elf.c (group_signature): Check for a group section which is
1916         actually a (corrupt) symbol table section in disguise and prevent
1917         an infinite loop from occurring.
1918
1919 2005-05-17  H.J. Lu  <[email protected]>
1920
1921         * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
1922         2005-02-16.
1923
1924 2005-05-17  H.J. Lu  <[email protected]>
1925
1926         * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
1927         predicate on slot 0 only if slot 0 isn't br.
1928
1929 2005-05-17  H.J. Lu  <[email protected]>
1930
1931         PR 797
1932         * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
1933         empty sdynbss section.
1934         * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
1935
1936 2005-05-17  Tavis Ormandy <[email protected]>
1937
1938         * elf.c (bfd_section_from_shdr): Add sanity check when parsing
1939         dynamic sections.
1940
1941 2005-05-17  Alan Modra  <[email protected]>
1942
1943         * elf32-ppc.c (LIS_11. LIS_12): Define.
1944         (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
1945         (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
1946         for --data-plt when building non-pie executables.
1947
1948 2005-05-17  Nick Clifton  <[email protected]>
1949
1950         * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
1951         the situation where a symbols's section is not known but a section
1952         relative R_ARM_RELATIVE reloc has to be generated for the Symbian
1953         OS.
1954
1955         * elf32-v850.c (v850_elf_relocate_section): Move code to test for
1956         the presence of a symbol table to just before the symbol table is
1957         actually used.
1958
1959 2005-05-16  H.J. Lu  <[email protected]>
1960
1961         PR 834
1962         * elfxx-ia64.c (elfNN_ia64_relax_br): New.
1963         (elfNN_ia64_relax_section): Use it.
1964
1965 2005-05-14  Mark Kettenis  <[email protected]>
1966
1967         * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
1968         of basename.
1969
1970 2005-05-14  Alan Modra  <[email protected]>
1971
1972         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
1973         not DT_PPC_GLINK.
1974         (ppc_elf_finish_dynamic_sections): Likewise.
1975
1976 2005-05-13  Fred Fish  <[email protected]>
1977
1978         * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
1979         * libbfd.h: Rebuilt.
1980
1981 2005-05-13  Bob Wilson  <[email protected]>
1982
1983         * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
1984         periods in linkonce_kind values.
1985
1986 2005-05-12  H.J. Lu  <[email protected]>
1987
1988         * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
1989         against protected function when building executable.
1990
1991 2005-05-12  Alan Modra  <[email protected]>
1992
1993         * elf32-ppc.c (LWZU_0_X_11): Delete.
1994         (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
1995         (ppc_elf_select_plt_layout): Set .got flags too.  Formatting.
1996         (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
1997         table.
1998         (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
1999         table.
2000         (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
2001         Generate .glink branch table and updated stubs.
2002
2003 2005-05-11  Alan Modra  <[email protected]>
2004
2005         * reloc.c (BFD_RELOC_HI16_PCREL): Define.
2006         (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
2007         * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
2008         (CROR_151515, CROR_313131): Delete.
2009         (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
2010         LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
2011         LWZU_0_X_11): Define.
2012         (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
2013         and R_PPC_REL16_HA entries.
2014         (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
2015         (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
2016         (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
2017         new_plt, and old_plt.
2018         (ppc_elf_create_dynamic_sections): Create .glink section.
2019         (ppc_elf_check_relocs): Set new_plt and old_plt.
2020         (ppc_elf_select_plt_layout): New function.
2021         (ppc_elf_tls_setup): Set plt output section elf type and flags.
2022         (allocate_got): Handle differences between old and new got layout.
2023         (allocate_dynrelocs): Likewise for plt.
2024         (ppc_elf_size_dynamic_sections): Likewise.  Allocate memory for
2025         .glink.  Don't allocate memory for old bss .plt.  Emit DT_PPC_GLINK.
2026         (ppc_elf_relax_section): Rename ppc_info to htab.  Handle .glink
2027         destination of R_PPC_PLTREL24 relocs.
2028         (ppc_elf_relocate_section): Handle new relocs and changed destination
2029         of R_PPC_PLTREL24.
2030         (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
2031         differences in layout.
2032         (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value.  Don't
2033         put a blrl in new got.  Write glink contents.
2034         * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
2035         * libbfd.h: Regenerate.
2036         * bfd-in2.h: Regenerate.
2037
2038 2005-05-11  Andreas Schwab  <[email protected]>
2039
2040         * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
2041         warning.
2042
2043 2005-05-10  H.J. Lu  <[email protected]>
2044
2045         * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
2046         section if SEC_ALLOC isn't set.
2047
2048 2005-05-09  Kelley Cook  <[email protected]>
2049
2050         * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
2051         * acinclude.m4: Don't sinclude accross.m4.
2052         * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
2053
2054 2005-05-09  Alan Modra  <[email protected]>
2055
2056         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
2057         (ppc64_elf_add_symbol_hook): Set has_dotsym.
2058         (ppc64_elf_check_directives): Only process syms when has_dotsym.
2059         (func_desc_adjust): Hide fake function descriptors when function
2060         code entry is defined.
2061         (adjust_opd_syms): Adjust for deleted_section becoming union field.
2062
2063 2005-05-09  Alan Modra  <[email protected]>
2064
2065         * elfcode.h (elf_object_p): Add more sanity checks on elf header.
2066
2067 2005-05-08  Dave Korn   <[email protected]>
2068
2069         * coff-tic80.c:  Undefine _CONST after system headers to prevent
2070         clash with tic80-specific definition in include/coff/tic80.h
2071
2072 2005-05-08  H.J. Lu  <[email protected]>
2073
2074         PR 939
2075         * elflink.c (elf_link_output_extsym): Use output_bfd if
2076         h->root.u.def.section is bfd_abs_section_ptr when reporting
2077         error.
2078
2079 2005-05-07  H.J. Lu  <[email protected]>
2080
2081         * elf-bfd.h (elf_backend_data): Update special_sections to
2082         array of pointer to bfd_elf_special_section.
2083         * elf.c (special_sections): Likewise.
2084         * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
2085         * elf32-m32r.c (m32r_elf_special_sections): Likewise.
2086         * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
2087         * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
2088         * elf32-mcore.c (mcore_elf_special_sections): Likewise.
2089         * elf32-ppc.c (ppc_elf_special_sections): Likewise.
2090         * elf32-sh64.c (sh64_elf_special_sections): Likewise.
2091         * elf32-v850.c (v850_elf_special_sections): Likewise.
2092         * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
2093         * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
2094         * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
2095         * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
2096         * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
2097         * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
2098         * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
2099         * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
2100
2101         * elf.c (get_special_section): Updated.
2102
2103 2005-05-07  Alan Modra  <[email protected]>
2104
2105         * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
2106         * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
2107         * elflink.c (_bfd_elf_create_got_section): Use zero in place of
2108         got_symbol_offset.
2109         * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
2110         * elf32-frv.c (_frv_create_got_section): Likewise.
2111         * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
2112         (elf_backend_got_symbol_offset): Don't define.
2113         * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
2114         * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
2115         and got_gap.
2116         (ppc_elf_create_got): Tidy.
2117         (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
2118         (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
2119         (ppc_elf_gc_sweep_hook): Likewise.
2120         (ppc_elf_relocate_section): Likewise.
2121         (ppc_elf_finish_dynamic_symbol): Likewise.
2122         (allocate_got): New function.
2123         (allocate_dynrelocs): Use allocate_got.
2124         (ppc_elf_size_dynamic_sections): Likewise.  Delay tlsld_got allocation
2125         so that local got can refcount it.  Set got_header_size.
2126         (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
2127         coded 4.
2128         (ppc_elf_finish_dynamic_sections): Likewise.
2129         (elf_backend_got_symbol_offset): Don't define.
2130         (elf_backend_got_header_size): Ditto.
2131
2132 2005-05-05  Steve Ellcey  <[email protected]>
2133
2134         * configure.in (ACX_HEADER_STRING): New.
2135         * configure: Regenerate.
2136         * config.in: Regenerate.
2137         * sysdep.h (STRING_WITH_STRINGS): Use.
2138
2139 2005-05-05  H.J. Lu  <[email protected]>
2140
2141         * elf.c (_bfd_elf_close_and_cleanup): Only call
2142         _bfd_dwarf2_cleanup_debug_info on bfd_object.
2143
2144 2005-05-05  H.J. Lu  <[email protected]>
2145
2146         * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
2147         "__bss_start" instead of "_edata" as fallback.
2148
2149 2005-05-05  H.J. Lu  <[email protected]>
2150
2151         * bfd-in2.h: Regenerated.
2152
2153 2005-05-05  Paul Brook  <[email protected]>
2154
2155         * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
2156         * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
2157         elf-vxworks.lo.
2158         * configure: Regenerate.
2159         * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
2160         (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
2161         (elf32-i386.lo): Depend on elf-vxworks.h.
2162         (elf-vxworks.lo): New rule.
2163         * Makefile.in: Regenerate.
2164         * elf-bfd.h (elf_backend_data): Update type of
2165         elf_backend_emit_relocs.
2166         (_bfd_elf_link_output_relocs): Update prototype.
2167         * elflink.c (_bfd_elf_link_output_relocs): Always use
2168         bed->elf_backend_emit_relocs when outputting relocations.
2169         * elfxx-target.h (elf_backend_emit_relocs): Default to
2170         _bfd_elf_link_output_relocs.
2171         * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
2172         (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
2173         * elf32-i386.c: Add elf32-i386-vxworks target BFD.
2174         (elf_i386_plt0_entry): Remove padding.
2175         (elf_i386_pic_plt0_entry): Ditto.
2176         (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
2177         (PLT_NON_JUMP_SLOT_RELOCS): Define.
2178         (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
2179         plt0_pad_byte fields.
2180         (elf_i386_link_hash_table_create): Zero them.
2181         (elf_i386_create_dynamic_sections): Create static relocation section.
2182         (allocate_dynrelocs): Allocate space for static PLT relocations.
2183         (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
2184         symbols.  Give PLT symbols function type.  Don't strip PLT sections
2185         if we have exported symbols from them.
2186         (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
2187         relocation section.  Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
2188         VxWorks.
2189         (elf_i386_finish_dynamic_sections): Allow different pad bytes.
2190         Add relocation for GOT location.  Fill in PLT static relocations.
2191         (elf_i386_vxworks_link_hash_table_create): New function.
2192         (elf_i386_vxworks_link_output_symbol_hook): New function.
2193         * elf-vxworks.h: New file.
2194
2195 2005-05-05  H.J. Lu  <[email protected]>
2196
2197         * section.c (bfd_make_section_anyway_with_flags): New.
2198         (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
2199         (bfd_make_section_with_flags): New.
2200         (bfd_make_section): Call bfd_make_section_with_flags.
2201
2202         * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
2203         bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
2204         instead of bfd_make_section/bfd_make_section and don't call
2205         bfd_set_section_flags.
2206         (mn10300_elf_check_relocs): Likewise.
2207         (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
2208         * elf32-arm.c (create_got_section): Likewise.
2209         (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
2210         (elf32_arm_check_relocs): Likewise.
2211         * elf32-cris.c (cris_elf_check_relocs): Likewise.
2212         * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
2213         (_frv_create_got_section): Likewise.
2214         (elf32_frvfdpic_create_dynamic_sections): Likewise.
2215         * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
2216         (elf32_hppa_check_relocs): Likewise.
2217         * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
2218         (i370_elf_check_relocs): Likewise.
2219         * elf32-i386.c (create_got_section): Likewise.
2220         (elf_i386_check_relocs): Likewise.
2221         * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
2222         (create_got_section): Likewise.
2223         (m32r_elf_create_dynamic_sections): Likewise.
2224         (m32r_elf_check_relocs): Likewise.
2225         * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
2226         * elf32-ppc.c (ppc_elf_create_got): Likewise.
2227         (ppc_elf_create_dynamic_sections): Likewise.
2228         (ppc_elf_add_symbol_hook): Likewise.
2229         (ppc_elf_check_relocs): Likewise.
2230         * elf32-s390.c (create_got_section): Likewise.
2231         (elf_s390_check_relocs): Likewise.
2232         * elf32-sh.c (create_got_section): Likewise.
2233         (sh_elf_create_dynamic_sections): Likewise.
2234         (sh_elf_check_relocs): Likewise.
2235         * elf32-vax.c (elf_vax_check_relocs): Likewise.
2236         * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
2237         * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
2238         (add_extra_plt_sections): Likewise.
2239         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2240         (elf64_alpha_create_got_section): Likewise.
2241         (elf64_alpha_create_dynamic_sections): Likewise.
2242         (elf64_alpha_check_relocs): Likewise.
2243         * elf64-hppa.c (get_reloc_section): Likewise.
2244         (get_opd): Likewise.
2245         (get_plt): Likewise.
2246         (get_dlt): Likewise.
2247         (get_stub): Likewise.
2248         (elf64_hppa_create_dynamic_sectionso): Likewise.
2249         * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
2250         * elf64-ppc.c (create_linkage_sections): Likewise.
2251         (ppc64_elf_check_relocs): Likewise.
2252         * elf64-s390.c (create_got_section): Likewise.
2253         (elf_s390_check_relocs): Likewise.
2254         * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
2255         (sh64_elf64_create_dynamic_sections): Likewise.
2256         * elf64-x86-64.c (create_got_section): Likewise.
2257         (elf64_x86_64_check_relocs): Likewise.
2258         * elflink.c (_bfd_elf_create_got_section): Likewise.
2259         (_bfd_elf_link_create_dynamic_sections): Likewise.
2260         (elf_link_add_object_symbols): Likewise.
2261         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2262         (elfNN_ia64_create_dynamic_sections): Likewise.
2263         (get_fptr): Likewise.
2264         (get_pltoff): Likewise.
2265         (get_reloc_section): Likewise.
2266         (elfNN_ia64_object_p): Likewise.
2267         * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
2268         (mips_elf_create_compact_rel_section): Likewise.
2269         (mips_elf_create_got_section): Likewise.
2270         (_bfd_mips_elf_create_dynamic_sections): Likewise.
2271         * elfxx-sparc.c (create_got_section): Likewise.
2272         (_bfd_sparc_elf_check_relocs): Likewise.
2273
2274         * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
2275         on linker created sections.
2276
2277 2005-05-05  H.J. Lu  <[email protected]>
2278
2279         PR 882
2280         * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
2281         script on executable.
2282
2283 2005-05-05  John Levon  <[email protected]>
2284
2285         * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
2286         allocated memory before returning.
2287         (decode_line_info): Likewise.
2288         (_bfd_dwarf2_cleanup_debug_info): New function:  Frees memory
2289         allocated by functions in this file.
2290         * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
2291         * elf.c (_bfd_elf_close_and_cleanup): Call
2292         _bfd_dwarf2_cleanup_debug_info.
2293
2294 2005-05-05  Hans-Peter Nilsson  <[email protected]>
2295
2296         * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
2297         * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
2298         * configure, config.in, Makefile.in: Regenerate.
2299         * sysdep.h (stpcpy): Revert last change.
2300
2301 2005-05-05  Hans-Peter Nilsson  <[email protected]>
2302
2303         * sysdep.h (stpcpy): Wrap declaration in parentheses.
2304
2305 2005-05-04  H.J. Lu  <[email protected]>
2306
2307         * elfxx-ia64.c (ARCH_SIZE): New.
2308         (LOG_SECTION_ALIGN): Likewise.
2309         (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
2310         align relocation sections.
2311         (get_fptr): Likewise.
2312         (get_reloc_section): Likewise.
2313         (elfNN_ia64_tprel_base): Likewise.
2314         (elfNN_ia64_check_relocs): Support 32bit relocations.
2315         (allocate_global_fptr_got): Likewise.
2316         (allocate_dynrel_entries): Likewise.
2317         (set_got_entry): Likewise.
2318         (set_pltoff_entry): Likewise.
2319         (elfNN_ia64_relocate_section): Likewise.
2320
2321 2005-05-04  H.J. Lu  <[email protected]>
2322
2323         * configure.in: Add AC_CHECK_DECLS(stpcpy).
2324         * configure: Regenerate.
2325         * config.in: Likewise.
2326
2327         * sysdep.h (stpcpy): New.
2328
2329 2005-05-04  Nick Clifton  <[email protected]>
2330
2331         * Update the address and phone number of the FSF organization in
2332         the GPL notices in the following files:
2333         aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
2334         aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
2335         aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
2336         archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
2337         bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
2338         cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
2339         coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
2340         coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
2341         coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
2342         coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
2343         coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
2344         coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
2345         coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
2346         coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
2347         corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
2348         cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
2349         cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
2350         cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
2351         cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
2352         cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
2353         cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
2354         cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
2355         cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
2356         cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
2357         cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
2358         cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
2359         dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
2360         efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
2361         elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
2362         elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
2363         elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
2364         elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
2365         elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
2366         elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2367         elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
2368         elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
2369         elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
2370         elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
2371         elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
2372         elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
2373         elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
2374         elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
2375         elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
2376         elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
2377         elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
2378         elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
2379         epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
2380         genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
2381         hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
2382         i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
2383         i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
2384         libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
2385         libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
2386         libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
2387         m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
2388         mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
2389         netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
2390         nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
2391         nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
2392         opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
2393         pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
2394         pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
2395         pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
2396         ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
2397         sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
2398         sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
2399         syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
2400         vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
2401         vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
2402         xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
2403         hosts/alphavms.h
2404
2405 2005-05-04  H.J. Lu  <[email protected]>
2406
2407         * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
2408         * bfd-in2.h: Regenerated.
2409
2410         * elflink.c (bfd_elf_set_symbol): New.
2411         (_bfd_elf_provide_symbol): Call it.
2412         (_bfd_elf_provide_section_bound_symbols): New.
2413
2414 2005-05-04  H.J. Lu  <[email protected]>
2415
2416         * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
2417         at the end, if a strong definition has already been seen.
2418
2419 2005-05-04  Alan Modra  <[email protected]>
2420
2421         * section.c (struct bfd_section): Replace link_order_head and
2422         link_order_tail with map_head and map_tail union.
2423         (STD_SECTION): Update.
2424         (_bfd_strip_section_from_output): Delete.
2425         * aoutx.h: Update throughout for above changes.
2426         * coff-ppc.c: Likewise.
2427         * cofflink.c: Likewise.
2428         * ecoff.c: Likewise.
2429         * elf-eh-frame.c: Likewise.
2430         * elf-m10300.c: Likewise.
2431         * elf.c: Likewise.
2432         * elf32-arm.c: Likewise.
2433         * elf32-cris.c: Likewise.
2434         * elf32-hppa.c: Likewise.
2435         * elf32-i386.c: Likewise.
2436         * elf32-m32r.c: Likewise.
2437         * elf32-m68hc1x.c: Likewise.
2438         * elf32-m68k.c: Likewise.
2439         * elf32-ppc.c: Likewise.
2440         * elf32-s390.c: Likewise.
2441         * elf32-sh.c: Likewise.
2442         * elf32-vax.c: Likewise.
2443         * elf32-xtensa.c: Likewise.
2444         * elf64-alpha.c: Likewise.
2445         * elf64-hppa.c: Likewise.
2446         * elf64-ppc.c: Likewise.
2447         * elf64-s390.c: Likewise.
2448         * elf64-sh64.c: Likewise.
2449         * elf64-x86-64.c: Likewise.
2450         * elflink.c: Likewise.
2451         * elfxx-ia64.c: Likewise.
2452         * elfxx-mips.c: Likewise.
2453         * elfxx-sparc.c: Likewise.
2454         * linker.c: Likewise.
2455         * merge.c: Likewise.
2456         * pdp11.c: Likewise.
2457         * xcofflink.c: Likewise.
2458         * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
2459         out from bfd_elf_size_dynamic_sections.
2460         * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
2461         * bfd-in2.h: Regenerate.
2462
2463 2005-05-04  Alan Modra  <[email protected]>
2464
2465         * section.c (bfd_section_list_remove): Don't clear s->next.
2466         (bfd_section_list_append): Always init s->prev.
2467         (bfd_section_list_prepend): Define.
2468         (bfd_section_list_insert_after): Minor optimization.
2469         (bfd_section_removed_from_list): Rewrite.
2470         * elf.c (assign_section_numbers): Simplify list traversal now that
2471         bfd_section_list_remove doesn't destroy removed section next ptr.
2472         * sunos.c (sunos_add_dynamic_symbols): Likewise.
2473         * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
2474         * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
2475         * bfd-in2.h: Regenerate.
2476
2477 2005-05-02  H.J. Lu  <[email protected]>
2478
2479         * bfd.c (bfd): Remove section_tail and add section_last.
2480         (bfd_preserve): Likewise.
2481         (bfd_preserve_save): Likewise.
2482         (bfd_preserve_restore): Likewise.
2483         * opncls.c (_bfd_new_bfd): Likewise.
2484
2485         * coffcode.h (coff_compute_section_file_positions): Updated.
2486         (coff_compute_section_file_positions): Likewise.
2487         * elf.c (assign_section_numbers): Likewise.
2488         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2489         * elf64-mmix.c (mmix_elf_final_link): Likewise.
2490         * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
2491         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
2492         * sunos.c (sunos_add_dynamic_symbols): Likewise.
2493         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
2494
2495         * ecoff.c (bfd_debug_section): Initialize prev.
2496
2497         * section.c (bfd_section): Add prev.
2498         (bfd_section_list_remove): Updated.
2499         (bfd_section_list_append): New.
2500         (bfd_section_list_insert_after): New.
2501         (bfd_section_list_insert_before): New.
2502         (bfd_section_list_insert): Removed.
2503         (bfd_section_removed_from_list): Updated.
2504         (STD_SECTION): Initialize prev.
2505         (bfd_section_init): Updated.
2506         (bfd_section_list_clear): Updated.
2507
2508         * bfd-in2.h: Regenerated.
2509
2510 2005-05-02  H.J. Lu  <[email protected]>
2511
2512         * elf.c (_bfd_elf_new_section_hook): Don't call
2513         _bfd_elf_get_sec_type_attr on sections from input files.
2514
2515 2005-05-02  H.J. Lu  <[email protected]>
2516
2517         * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
2518         hash table size 16699 instead of bfd_hash_table_init.
2519
2520 2005-05-01  Paul Brook  <[email protected]>
2521
2522         * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
2523         definition has already been seen.
2524
2525 2005-05-01  Paul Brook  <[email protected]>
2526
2527         * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
2528         R_ARM_PLT32 the same as R_ARM_PC24.
2529         (arm_add_to_rel): Ditto.
2530
2531 2005-04-29  Ralf Corsepius <[email protected]>
2532
2533         * config.bfd: Add h8300*-*-rtemscoff.
2534         Switch h8300*-*-rtems* to elf.
2535
2536 2005-04-29  Daniel Jacobowitz  <[email protected]>
2537
2538         * aclocal.m4, Makefile.in: Regnerated.
2539
2540 2005-04-28  Paul Brook  <[email protected]>
2541
2542         Merge changes only applied to Makefile.in.
2543         * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
2544         (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2545         (elfxx-sparc.lo): New rule.
2546         (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2547         (elf64-sparc.lo): Likewise.
2548
2549 2005-04-28  Julian Brown  <[email protected]>
2550
2551         * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
2552         import.
2553
2554 2005-04-27  H.J. Lu  <[email protected]>
2555
2556         * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
2557
2558         * elf.c (bfd_elf_sym_name): Updated.
2559         (group_signature): Likewise.
2560         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2561         * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
2562         (ppc64_elf_edit_toc): Likewise.
2563         (ppc64_elf_relocate_section): Likewise.
2564         * elfcode.h (elf_slurp_symbol_table): Likewise.
2565         * elflink.c (elf_link_input_bfd): Likewise.
2566
2567         * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
2568         bfd_elf_sym_name to get local symbol name when reporting errors.
2569
2570 2005-04-27  Nick Clifton  <[email protected]>
2571
2572         * elflink.c (elf_link_input_bfd): Handle the case where a badly
2573         formatted input file results in a reloc which has no associated
2574         global symbol.
2575
2576 2005-04-26  Jerome Guitton  <[email protected]>
2577
2578         * bfd.m4 (BFD_NEED_DECLARATION): Restore.
2579
2580 2005-04-25  David S. Miller  <[email protected]>
2581
2582         * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
2583         (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
2584         sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
2585         Likewise.
2586
2587 2005-04-25  H.J. Lu  <[email protected]>
2588
2589         PR 858
2590         * elflink.c (elf_link_input_bfd): Make non-debugging reference
2591         to discarded section an error.
2592
2593 2005-04-21  Jerome Guitton  <[email protected]>
2594
2595         * configure.in: Replace BFD_NEED_DECLARATION checks by the
2596         corresponding AC_CHECK_DECLS.
2597         * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
2598         HAVE_DECL_*.
2599         * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
2600         * configure: Regenerate.
2601         * config.in: Ditto.
2602
2603 2005-04-21  Andreas Schwab  <[email protected]>
2604
2605         * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
2606         unsigned from type of dynamic_interpreter.
2607         * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
2608         casts again.
2609
2610         * elf.c (assign_section_numbers): Fix comment.
2611
2612 2005-04-21  Jerome Guitton  <[email protected]>
2613
2614         * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
2615         for struct som_exec_auxhdr fields.
2616
2617 2005-04-21  Nick Clifton  <[email protected]>
2618
2619         * aout-adobe.c: Convert to ISO C and fix formatting.
2620         * aout-arm.c: Convert to ISO C and fix formatting.
2621         * aout-cris.c: Convert to ISO C and fix formatting.
2622         * aout-ns32k.c: Convert to ISO C and fix formatting.
2623         * aout-tic30.c: Convert to ISO C and fix formatting.
2624         * coffcode.h: Convert to ISO C and fix formatting.
2625         * coffswap.h: Convert to ISO C and fix formatting.
2626         * i386aout.c: Convert to ISO C and fix formatting.
2627         * libaout.h: Convert to ISO C and fix formatting.
2628         * libcoff-in.h: Convert to ISO C and fix formatting.
2629         * libcoff.h: Convert to ISO C and fix formatting.
2630         * libecoff.h: Convert to ISO C and fix formatting.
2631         * libnlm.h: Convert to ISO C and fix formatting.
2632         * libpei.h: Convert to ISO C and fix formatting.
2633         * libxcoff.h: Convert to ISO C and fix formatting.
2634         * nlm-target.h: Convert to ISO C and fix formatting.
2635         * nlm.c: Convert to ISO C and fix formatting.
2636         * nlm32-alpha.c: Convert to ISO C and fix formatting.
2637         * nlm32-i386.c: Convert to ISO C and fix formatting.
2638         * nlm32-ppc.c: Convert to ISO C and fix formatting.
2639         * nlm32-sparc.c: Convert to ISO C and fix formatting.
2640         * nlmcode.h: Convert to ISO C and fix formatting.
2641         * nlmswap.h: Convert to ISO C and fix formatting.
2642         * pe-mips.c: Convert to ISO C and fix formatting.
2643         * peXXigen.c: Convert to ISO C and fix formatting.
2644         * peicode.h: Convert to ISO C and fix formatting.
2645         * vms-gsd.c: Convert to ISO C and fix formatting.
2646         * vms-hdr.c: Convert to ISO C and fix formatting.
2647         * vms-misc.c: Convert to ISO C and fix formatting.
2648         * vms-tir.c: Convert to ISO C and fix formatting.
2649         * vms.c: Convert to ISO C and fix formatting.
2650         * vms.h: Convert to ISO C and fix formatting.
2651
2652         * coffgen.c (coff_print_symbol): Restore correct formatting of
2653         output.
2654
2655 2005-04-20  David S. Miller  <[email protected]>
2656
2657         * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
2658         (_bfd_sparc_elf_link_hash_table_create): Likewise.
2659         (allocate_dynrelocs): Likewise.
2660
2661 2005-04-20  Jerome Guitton  <[email protected]>
2662
2663         * configure.in: Fix the check for basename declaration. Add check
2664         for declarations of ftello, ftello64, fseeko, fseeko64.
2665         * configure: Regenerate.
2666         * config.in: Ditto.
2667         * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
2668
2669 2005-04-19  David S. Miller  <[email protected]>
2670
2671         * elfxx-sparc.c: New file.
2672         * elfxx-sparc.h: New file.
2673         * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
2674         (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2675         (elfxx-sparc.lo): New rule.
2676         (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2677         (elf64-sparc.lo): Likewise.
2678         * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
2679         (bfd_elf64_sparc_vec): Likewise.
2680         * configure: Regenerate.
2681         * elf32-sparc.c: Remove common code now in elfxx-sparc.c
2682         * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
2683         which is more consistent with elf32-sparc.c
2684
2685 2005-04-19  Daniel Jacobowitz  <[email protected]>
2686
2687         * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
2688         (mips_elf_create_local_got_entry): Check h->root.forced_local.
2689
2690 2005-04-19  Alan Modra  <[email protected]>
2691
2692         * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
2693         dynamic relocs in non-SEC_ALLOC sections.
2694         (ppc_elf_gc_sweep_hook): Likewise.
2695         (ppc_elf_relax_section): Likewise.
2696         (ppc_elf_relocate_section): Likewise.
2697
2698 2005-04-18  Nick Clifton  <[email protected]>
2699
2700         * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
2701         assigning a value to return_value.
2702
2703 2005-04-17  H.J. Lu  <[email protected]>
2704
2705         PR 855
2706         * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
2707         created group data.
2708
2709 2005-04-17  H.J. Lu  <[email protected]>
2710
2711         PR 855
2712         * elf.c (setup_group): Properly handle zero group count.
2713
2714 2005-04-17  Mark Kettenis  <[email protected]>
2715
2716         * som.c (hppa_som_reloc, som_mkobject, som_is_space)
2717         (som_is_subspace, compare_subspaces, som_compute_checksum)
2718         (som_build_and_write_symbol_table, som_slurp_symbol_table): New
2719         protoypes.
2720         (hppa_som_reloc, compare_syms, compare_subspaces)
2721         (som_print_symbol, som_get_section_contents)
2722         (som_set_section_contents): Remove space after 'void *'.
2723         (som_bfd_print_private_bfd_data): Use %lx to print longs.
2724         (som_bfd_merge_private_bfd_data)
2725         (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
2726         defines.
2727
2728 2004-04-15  Julian Brown  <[email protected]>
2729
2730         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2731         * bfd-in2.h: Regenerate.
2732         * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
2733         (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
2734         (bfd_elf32_arm_set_target_relocs): Handle use_blx.
2735         (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
2736         relocations if requested to.
2737         (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
2738         use_blx rather than symbian_p.
2739         (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
2740         use_blx is in effect.
2741         (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
2742         for SymbianOS.
2743
2744 2005-04-15  Nick Clifton  <[email protected]>
2745
2746         * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
2747         values.
2748
2749 2005-04-15  Alan Modra  <[email protected]>
2750
2751         PR ld/815
2752         * elflink.c (elf_smash_syms): Clear undef.next if it's not being
2753         used as a list pointer.
2754
2755 2005-04-14  Alan Modra  <[email protected]>
2756
2757         * Makefile.am (NO_WERROR): Define.
2758         * warning.m4: New file
2759         * acinclude.m4: Include warning.m4.
2760         * configure.in: Invoke AM_BINUTILS_WARNINGS.
2761         * Makefile.in: Regenerate.
2762         * configure: Regenerate.
2763
2764 2005-04-14  Alan Modra  <[email protected]>
2765
2766         * merge.c (sec_merge_emit): Tidy.  Check for bfd_zmalloc errors.
2767         Write trailing padding.
2768
2769         * merge.c (merge_strings): Round up section size for alignment.
2770
2771 2005-04-14  David S. Miller  <[email protected]>
2772
2773         Add TLS support for 64-bit Sparc ELF.
2774         *  elf64-sparc.c (sparc64_elf_dyn_relocs,
2775         sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
2776         (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
2777         sparc64_elf_hash_entry, sparc64_elf_tdata,
2778         sparc64_elf_local_got_tls_type): New defines.
2779         (sparc64_elf_mkobject): New function.
2780         (sparc64_elf_link_hash_table): Add members for dynamic linker
2781         sections PLT, RELPLT, DYNBSS, and RELBSS.  Add tls_ldm_got
2782         uion to track TLS GOT references.  Add sym_sec to cache
2783         mappings from local sym to section.
2784         (link_hash_newfunc): New function.
2785         (sparc64_elf_bfd_link_hash_table_create): Rename to
2786         sparc64_elf_link_hash_table_create for consistency.
2787         Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
2788         (sparc64_elf_create_dynamic_sections): Initialize new section
2789         members of sparc64_elf_link_hash_table.  Only init srelbss
2790         if not-shared.
2791         (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
2792         New functions.
2793         (SPARC_NOP): Define.
2794         (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
2795         sparc64_elf_plt_ptr_offset): Delete.
2796         (sparc64_plt_entry_build): New function to build PLT entries
2797         gradually instread of all at once at the end of linking.
2798         (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
2799         local vars.  Get them from sparc64_elf_hash_table instead.
2800         Check early on if r_symndx is in bounds.  Handle TLS transitions.
2801         Account for TLS GOT references and DF_STATIC_TLS, as needed.
2802         For TLS relocs, record the tls_type in either
2803         sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
2804         appropriate.  For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
2805         to the __tls_get_addr symbol.  For PLT relocs, track references
2806         via h->plt.refcount.  When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
2807         PC_LM22} and h not-NULL, set h->non_got_ref.  For global data
2808         symbol references, count the number of relocations needed for
2809         that symbol.  For default switch case, don't error, this lets
2810         the TLS relocs not explicitly handled by this function get
2811         accepted.
2812         (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
2813         (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
2814         it from sparc64_elf_hash_table.  Store the real PLT offset
2815         in h->plt.offset, and build PLT entries one at a time.  Also
2816         get .dynbss section pointer from htab.
2817         (allocate_dynrelocs, readonly_dynrelocs,
2818         sparc64_omit_section_dynsym): New functions.
2819         (sparc64_elf_omit_section_dynsym): Use these new functions as
2820         helpers.
2821         (dtpoff_base, tpoff): New functions.
2822         (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
2823         locals, get them from sparc64_elf_hash_table.  Handle TLS
2824         relocations and refcounting in main relocation loop.
2825         (sparc64_elf_finish_dynamic_symbol): Use
2826         sparc64_elf_link_hash_table.  Build PLT entries as we see
2827         them.  Handle TLS GOT relocations.
2828         (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
2829         from sparc64_elf_hash_table.  Initialize only PLT header
2830         not all entries since we not build PLT entries one by one.
2831         (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
2832         elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
2833         elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
2834
2835 2005-04-13  Daniel Jacobowitz  <[email protected]>
2836
2837         * elflink.c (elf_link_input_bfd): Update check for removed
2838         sections.
2839
2840 2005-04-12  Alan Modra  <[email protected]>
2841
2842         * Makefile.am: Run "make dep-am".
2843         * Makefile.in: Regenerate.
2844         * aclocal.m4: Regenerate.
2845         * libcoff.h: Regenerate.
2846
2847 2005-04-11  H.J. Lu  <[email protected]>
2848
2849         * linker.c (_bfd_generic_link_output_symbols): Also check if
2850         the output section of an input section has been removed from
2851         the output file.
2852
2853         * section.c (bfd_section_list_remove): Clear the next field
2854         of the removed section.
2855         (bfd_section_removed_from_list): New.
2856         * bfd-in2.h: Regenerated.
2857
2858 2005-04-11  David S. Miller  <[email protected]>
2859
2860         * elf32-sparc.c (elf32_sparc_relocate_section,
2861         R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
2862         R_SPARC_TLS_LE_{HIX22,LOX10}.
2863         (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
2864         xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
2865         (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
2866         or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
2867
2868 2005-04-11  H.J. Lu  <[email protected]>
2869
2870         * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
2871
2872 2005-04-11  Nick Clifton  <[email protected]>
2873
2874         * aout-target.h:  Convert to ISO C.
2875         * aoutf1.h:  Convert to ISO C.
2876         * aoutx.h:  Convert to ISO C.
2877         * bout.c:  Convert to ISO C.
2878         * dwarf1.c:  Convert to ISO C.
2879         * ecoffswap.h:  Convert to ISO C.
2880         * freebsd.h:  Convert to ISO C.
2881         * genlink.h:  Convert to ISO C.
2882         * ieee.c:  Convert to ISO C.
2883         * ihex.c:  Convert to ISO C.
2884         * libcoff-in.h:  Convert to ISO C.
2885         * mach-o.c:  Convert to ISO C.
2886         * mach-o.h:  Convert to ISO C.
2887         * netbsd.h:  Convert to ISO C.
2888         * ns32k.h:  Convert to ISO C.
2889         * ns32knetbsd.c:  Convert to ISO C.
2890         * oasys.c:  Convert to ISO C.
2891         * pdp11.c:  Convert to ISO C.
2892         * pef-traceback.h:  Convert to ISO C.
2893         * pef.c:  Convert to ISO C.
2894         * pef.h:  Convert to ISO C.
2895         * riscix.c:  Convert to ISO C.
2896         * som.c:  Convert to ISO C.
2897         * som.h:  Convert to ISO C.
2898         * srec.c:  Convert to ISO C.
2899         * stabs.c:  Convert to ISO C.
2900         * sunos.c:  Convert to ISO C.
2901         * tekhex.c:  Convert to ISO C.
2902         * versados.c:  Convert to ISO C.
2903         * version.h:  Convert to ISO C.
2904         * xcoff-target.h:  Convert to ISO C.
2905         * xcofflink.c:  Convert to ISO C.
2906         * xsym.c:  Convert to ISO C.
2907         * xsym.h:  Convert to ISO C.
2908
2909 2005-04-08  Paul Brook  <[email protected]>
2910
2911         * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
2912         (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
2913         (ARM2THUMB_PIC_GLUE_SIZE): Define.
2914         (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
2915         (elf32_arm_to_thumb_stub): Create PIC stubs.
2916         (record_arm_to_thumb_glue): Use different stub size for relocatable
2917         images.
2918
2919 2005-04-05  Alan Modra  <[email protected]>
2920
2921         * elf64-ppc.c (dec_dynrel_count): New function split out from
2922         ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
2923         (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
2924         (ppc64_elf_tls_optimize): Likewise.
2925
2926 2005-04-05  Mark Kettenis  <[email protected]>
2927
2928         * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
2929         CORE_WCOOKIE_OFFSET.
2930         (SPARC64_WCOOKIE_OFFSET): New.
2931         (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
2932
2933 2005-04-05  Nick Clifton  <[email protected]>
2934
2935         * po/rw.po: New translation: Kinyarwanda
2936         * configure.in (ALL_LINGUAS): Add rw
2937         * configure: Regenerate.
2938
2939 2005-04-05  Richard Sandiford  <[email protected]>
2940
2941         * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
2942         (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
2943         SHT_MIPS_OPTIONS names.  Allow all sections with unrecognised
2944         section flags.
2945         (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
2946         to check for SHT_MIPS_OPTIONS sections.
2947         (_bfd_mips_elf_set_section_contents): Likewise.
2948
2949 2005-04-04  Eric Christopher  <[email protected]>
2950
2951         * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
2952         Clean up gp handling code.
2953
2954 2005-04-04  H.J. Lu  <[email protected]>
2955
2956         * elf.c (bfd_elf_set_group_contents): Ignore linker created
2957         group section.
2958         (assign_section_numbers): Accept link_info. Check SHT_GROUP
2959         sections for relocatable files only. Remove the linker created
2960         group sections.
2961         (_bfd_elf_compute_section_file_positions): Pass link_info to
2962         assign_section_numbers.
2963
2964         * elfxx-ia64.c (elfNN_ia64_object_p): New.
2965         (elf_backend_object_p): Defined.
2966
2967 2005-04-04  H.J. Lu  <[email protected]>
2968
2969         * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
2970
2971 2005-04-03  Fred Fish  <[email protected]>
2972
2973         * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
2974         dwarf_ranges_size members.
2975         (struct comp_unit): Add base_address member.
2976         (struct funcinfo): Replace low/high members with an arange.
2977         (arange_add): Replace incoming "unit" parameter with "abfd" and
2978         "first_arange" pointers.  Reorganize/rewrite function body.
2979         (decode_line_info): Change arange_add call to pass bfd and arange
2980         pointers.
2981         (lookup_address_in_line_info_table): Use arange list instead of
2982         individual low/high members.  Walk function's arange list to find
2983         lowest PC in list, to test for overlapping functions.
2984         (read_debug_ranges): New function, reads the debug_ranges section.
2985         (lookup_address_in_function_table): Use arange list instead of
2986         individual low/high members.  Rewrite to find smallest range that
2987         matches.
2988         (read_rangelist): Read a given rangelist from debug_ranges.
2989         (scan_unit_for_functions): Use arange list instead of individual
2990         low/high members.  Handle a DW_AT_ranges attribute.
2991         (parse_comp_unit): Use arange list instead of individual low/high
2992         members.  Save comp unit base address.  Handle a DW_AT_ranges
2993         attribute.
2994
2995 2005-04-01  H.J. Lu  <[email protected]>
2996
2997         * elf.c (assign_section_numbers): Really use the kept section.
2998
2999 2005-03-31  H.J. Lu  <[email protected]>
3000
3001         * elf-bfd.h (_bfd_elf_check_kept_section): New.
3002
3003         * elf.c (assign_section_numbers): When sh_link points to a
3004         discarded section, call _bfd_elf_check_kept_section to see if
3005         the kept section can be used. Otherwise reject sh_link
3006         pointing to discarded section.
3007
3008         * elflink.c (_bfd_elf_check_kept_section): New.
3009         (elf_link_input_bfd): Use it.
3010
3011 2005-04-01  Alan Modra  <[email protected]>
3012
3013         * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
3014         that we no longer need.
3015
3016 2005-04-01  Alan Modra  <[email protected]>
3017
3018         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
3019         rather than 0.
3020         (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
3021
3022 2005-03-31  H.J. Lu  <[email protected]>
3023
3024         * elf.c (assign_section_numbers): Fix a typo.
3025
3026 2005-03-31  H.J. Lu  <[email protected]>
3027
3028         * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
3029         error message.
3030         (_bfd_elf_section_already_linked): Likewise.
3031
3032 2005-03-31  Jerome Guitton  <[email protected]>
3033
3034         * config.in: Regenerate.
3035
3036 2005-03-31  Jerome Guitton  <[email protected]>
3037
3038         * config.in (HAVE_DECL_BASENAME): New configure macro.
3039         * configure.in: Check for basename.
3040         * configure: Regenerate.
3041
3042 2005-03-30  Julian Brown  <[email protected]>
3043
3044         * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
3045         bfd_elf32_is_arm_mapping_symbol_name.
3046         * bfd-in2.h: Regenerate.
3047         * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
3048         bfd_elf32_is_arm_mapping_symbol_name.
3049         * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
3050         bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
3051         (arm_elf_find_function): Likewise.
3052         (elf32_arm_output_symbol_hook): Likewise.
3053
3054 2005-03-30  Julian Brown  <[email protected]>
3055
3056         * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
3057         * bfd-in2.h: Regenerate.
3058         * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
3059         bfd_elf32_is_arm_mapping_symbol_name.
3060         (elf32_arm_output_symbol_hook): Likewise.
3061         (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
3062         mapping symbols.
3063         (is_arm_mapping_symbol_name): Function moved from here...
3064         * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
3065         and made global.
3066
3067 2005-03-29  Aaron W. LaFramboise  <[email protected]>
3068
3069         * configure.in: Check for ffs decl and alphabetize.
3070         * config.in: Regenerate.
3071         * configure: Regenerate.
3072         * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
3073
3074 2005-03-29  Fred Fish  <[email protected]>
3075
3076         * dwarf2.c (struct comp_unit): Fix typo.
3077         (scan_unit_for_functions): Remove unused local variable "name"
3078         and dead code that set it.
3079
3080 2005-03-29  Daniel Jacobowitz  <[email protected]>
3081             Phil Blundell  <[email protected]>
3082
3083         * bfd-in2.h, libbfd.h: Regenerated.
3084         * reloc.c: Add ARM TLS relocations.
3085         * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
3086         relocations.
3087         (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
3088         (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
3089         (elf32_arm_tls_ie32_howto): New.
3090         (elf32_arm_howto_from_type): Support TLS relocations.
3091         (elf32_arm_reloc_map): Likewise.
3092         (elf32_arm_reloc_type_lookup): Likewise.
3093         (TCB_SIZE): Define.
3094         (struct elf32_arm_obj_tdata): New.
3095         (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
3096         (elf32_arm_mkobject): New function.
3097         (struct elf32_arm_relocs_copied): Add pc_count.
3098         (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
3099         (GOT_TLS_IE): Define.
3100         (struct elf32_arm_link_hash_table): Add tls_ldm_got.
3101         (elf32_arm_link_hash_newfunc): Initialize tls_type.
3102         (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
3103         (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
3104         (dtpoff_base, tpoff): New functions.
3105         (elf32_arm_final_link_relocate): Handle TLS relocations.
3106         (IS_ARM_TLS_RELOC): Define.
3107         (elf32_arm_relocate_section): Warn about TLS mismatches.
3108         (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
3109         (elf32_arm_check_relocs): Detect invalid symbol indexes.  Handle
3110         TLS relocations and pc_count.
3111         (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
3112         (allocate_dynrelocs): Handle TLS.  Bind REL32 relocs to local
3113         calls.
3114         (elf32_arm_size_dynamic_sections): Handle TLS.
3115         (elf32_arm_finish_dynamic_symbol): Likewise.
3116         (bfd_elf32_mkobject): Define.
3117
3118 2005-03-29  Daniel Jacobowitz  <[email protected]>
3119
3120         * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
3121         relocation types.  Don't count relocations which will use a PLT.
3122
3123 2005-03-29  Joel Brobecker  <[email protected]>
3124
3125         * elf.c (elfcore_grok_nto_status): Print tid as long.
3126         (elfcore_grok_nto_regs): Likewise.
3127
3128 2005-03-29  Joel Brobecker  <[email protected]>
3129
3130         * irix-core.c: Remove some unnecessary prototypes.
3131
3132 2005-03-28  Joel Brobecker  <[email protected]>
3133
3134         * irix-core.c: Convert to ISO C.
3135
3136 2005-03-28  Joel Brobecker  <[email protected]>
3137
3138         * irix-core.c (do_sections): Replace + by | in expression.
3139         (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
3140         to unused parameters to avoid a compiler warning.
3141
3142 2005-03-28  Mark Kettenis  <[email protected]>
3143
3144         * netbsd-core.c: Convert to ISO C.  Fix formatting.
3145
3146 2005-03-24  Eric Christopher  <[email protected]>
3147
3148         * elfxx-mips.c: Revert previous patch.
3149
3150 2005-03-24  Nick Clifton  <[email protected]>
3151
3152         * targets.c (_bfd_target_vector): Only include the
3153         bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
3154         all targets enabled.
3155
3156 2005-03-24  James E Wilson  <[email protected]>
3157
3158         * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
3159         (BFD64_BACKENDS): Add elf32-ia64.lo.
3160         * Makefile.in: Regenerate.
3161
3162 2005-03-23  Eric Christopher  <[email protected]>
3163
3164         * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
3165         (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
3166         after emitting relocation.
3167         (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
3168         (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
3169         and readonly_reloc.
3170
3171 2005-03-23  Mike Frysinger  <[email protected]>
3172             Nick Clifton  <[email protected]>
3173
3174         * config.bfd: Accept any C library to accompany a GNU Linux
3175         implementation, not just the GNU C library.
3176         * configure.in: Likewise.
3177         * configure: Regenerate.
3178
3179 2005-03-22  H.J. Lu  <[email protected]>
3180
3181         * bfd-in.h (_bfd_elf_provide_symbol): New.
3182         * bfd-in2.h: Regenerated.
3183
3184         * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
3185         (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
3186         of set_linker_sym.
3187
3188         * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
3189         from elf32-ppc.c.
3190
3191 2005-03-22  Hans-Peter Nilsson  <[email protected]>
3192
3193         * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
3194
3195 2005-03-22  Bob Wilson  <[email protected]>
3196
3197         * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
3198         xtensa_sysreg_lookup_name, xtensa_interface_lookup,
3199         xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
3200         (xtensa_opcode_decode): Rearrange code.
3201
3202 2005-03-22  Nick Clifton  <[email protected]>
3203
3204         * binary.c: Convert to ISO C90 formatting.
3205         * coff-arm.c: Convert to ISO C90 formatting.
3206         * coffgen.c: Convert to ISO C90 formatting.
3207         * elf32-gen.c: Convert to ISO C90 formatting.
3208         * elf64-gen.c: Convert to ISO C90 formatting.
3209         * hash.c: Convert to ISO C90 formatting.
3210         * ieee.c: Convert to ISO C90 formatting.
3211
3212 2005-03-22  Daniel Jacobowitz  <[email protected]>
3213
3214         * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
3215         unresolved symbols in R_ARM_NONE relocations.
3216
3217 2005-03-22  Daniel Jacobowitz  <[email protected]>
3218
3219         * elf32-arm.c (elf32_arm_final_link_relocate): Add
3220         UNRESOLVED_RELOC_P argument.  Set it appropriately.
3221         (elf32_arm_relocate_section): Update call to
3222         elf32_arm_final_link_relocate.  Don't clobber RELOCATION; use
3223         unresolved_reloc instead.
3224
3225 2005-03-23  Alan Modra  <[email protected]>
3226
3227         * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
3228         .gnu.warning.* sections.
3229
3230 2005-03-22  Alan Modra  <[email protected]>
3231
3232         * elf32-ppc.c (elf_linker_section_pointers_t): Remove
3233         written_address_p.
3234         (ppc_elf_create_linker_section): Don't try to reuse existing section.
3235         (elf_create_pointer_linker_section): Delete info parm.  Don't make
3236         h dynamic.  Don't set written_address_p.
3237         (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
3238         (bfd_put_ptr): Delete.
3239         (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
3240         Always write section contents.  Assert global sym is def_regular.
3241         Use offset bottom bit as a written flag.
3242         (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
3243         calls.
3244
3245 2005-03-22  Alan Modra  <[email protected]>
3246
3247         * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
3248         (ppc_elf_set_sdata_syms): ..here.  Expand comment.  Set .sbss start
3249         and end syms.
3250
3251 2005-03-21  Nick Clifton  <[email protected]>
3252
3253         * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
3254         targets.
3255         (t2a1_bx_pc_insn): Likewise.
3256         (t2a2_noop_insn): Likewise.
3257         (t2a3_b_insn): Likewise.
3258         (t2a1_push_insn): Likewise.
3259         (t2a2_ldr_insn): Likewise.
3260         (t2a3_mov_insn): Likewise.
3261         (t2a4_bx_insn): Likewise.
3262         (t2a5_pop_insn): Likewise.
3263         (t2a6_bx_insn): Likewise.
3264         (coff_arm_relocate_section): Only declare the high_address
3265         variable for non WINCE targets.
3266
3267 2005-03-22  Alan Modra  <[email protected]>
3268
3269         * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
3270         SEC_LINKER_CREATED.  Attach to dynobj.
3271         (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
3272
3273 2005-03-21  Alan Modra  <[email protected]>
3274
3275         * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
3276         sym_offset.  Add name, bss_name, sym_name, sym_val.
3277         (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
3278         Add sdata array of elf_linker_section_t.
3279         (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
3280         (enum elf_linker_section_enum): Delete.
3281         (ppc_elf_create_linker_section): Rewrite.  Don't create syms here.
3282         (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
3283         the special sections are needed.  Adjust htab->sdata refs.
3284         Ensure dynobj is set in sreloc code.
3285         (ppc_elf_size_dynamic_sections): Strip sdata sections.
3286         (ppc_elf_set_sdata_syms): New function.
3287         (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
3288         (ppc_elf_relocate_section): Adjust references to htab->sdata.  Use
3289         sym_val instead of sym_hash.
3290         * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
3291
3292 2005-03-21  Alan Modra  <[email protected]>
3293
3294         * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
3295         (ppc_elf_merge_private_bfd_data): Likewise.
3296
3297 2005-03-21  Alan Modra  <[email protected]>
3298
3299         * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
3300         (ppc_elf_create_linker_section): Don't create rel_section.
3301         (elf_create_pointer_linker_section): Don't size relocs.
3302         (elf_finish_pointer_linker_section): Remove relative_reloc parm.
3303         Don't generate relocs.
3304         (ppc_elf_relocate_section): Adjust calls to
3305         elf_finish_pointer_linker_section.
3306
3307 2005-03-21  Alan Modra  <[email protected]>
3308
3309         * elf32-ppc.c (is_ppc_elf_target): New function.
3310         (ppc_elf_merge_private_bfd_data): Use it rather than just testing
3311         for bfd_target_elf_flavour.  Do this test before endian check.
3312         (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
3313         (ppc_elf_size_dynamic_sections): Likewise.
3314
3315 2005-03-20  H.J. Lu  <[email protected]>
3316
3317         * elf-bfd.h (elf_backend_data): Add int to
3318         elf_backend_section_from_shdr.
3319         (bfd_elf_section_data): Update comment for this_idx.
3320         (_bfd_elf_make_section_from_shdr): Add int.
3321         * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
3322
3323         * elf.c (_bfd_elf_make_section_from_shdr): Take section index
3324         and use it to set this_idx in bfd_elf_section_data.
3325         (bfd_section_from_shdr): Pass shindex to
3326         _bfd_elf_make_section_from_shdr.
3327         (_bfd_elf_section_from_bfd_section): Use this_idx in
3328         bfd_elf_section_data to find section index.
3329
3330         * elf32-arm.c (elf32_arm_section_from_shdr): Take section
3331         index and pass it to _bfd_elf_make_section_from_shdr.
3332         * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
3333         * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
3334         * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
3335         * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
3336         * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
3337         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
3338         * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
3339         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
3340         * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
3341
3342 2005-03-19  Danny Smith <[email protected]>
3343             Ross Ridge  <[email protected]>
3344
3345         * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
3346         character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
3347         cases.  Add comment.
3348
3349 2005-03-18  H.J. Lu  <[email protected]>
3350
3351         * elflink.c (elf_mark_used_section): Remove check for special
3352         sections.
3353
3354 2005-03-18  Andreas Schwab  <[email protected]>
3355
3356         * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
3357         from bfd_vma to ia64_insn, remove broken cast.
3358
3359 2005-03-18  C Jaiprakash  <[email protected]>
3360
3361         * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
3362         (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
3363          elf_m68k_finish_dynamic_sections): Use it.
3364
3365 2005-03-17  Paul Brook <[email protected]>
3366             Dan Jacobowitz <[email protected]>
3367             Mark Mitchell  <[email protected]>
3368
3369         * elf32-arm.c (elf32_arm_modify_segment_map): New function.
3370         (elf32_arm_additional_program_headers): Likewise.
3371         (elf_backend_modify_segment_map): Define.
3372         (elf_backend_additional_program_headers): Likewise.
3373         (elf32_arm_symbian_modify_segment_map): Use
3374         elf32_arm_modify_segment_map.
3375
3376 2005-03-18  H.J. Lu  <[email protected]>
3377
3378         * elflink.c (elf_mark_used_section): Check bfd_is_const_section
3379         for special sections.
3380
3381 2005-03-18  Alan Modra  <[email protected]>
3382
3383         * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
3384         * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
3385         section_sym_count param, and return number of section symbols.
3386         (bfd_elf_size_dynamic_sections): Clear section symbol area of
3387         .dynsym contents.  Don't bother calling swap_symbol_out on the
3388         first all-zero dynsym.
3389         (elf_mark_used_section): Formatting.  Avoid twiddling flags in
3390         special sections like bfd_abs_section.
3391         (bfd_elf_gc_sections): Spelling fix.
3392
3393 2005-03-16  Fred Fish  <[email protected]>
3394
3395         PR binutils/790
3396         * dwarf2.c (read_indirect_string): Fix apparent typo, check
3397         dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
3398
3399 2005-03-16  H.J. Lu  <[email protected]>
3400
3401         * elflink.c (elf_mark_used_section): New.
3402         (bfd_elf_gc_sections): Call elf_gc_mark_section for
3403         non-relocatable link if we don't do GC.
3404
3405 2005-03-16  Nick Clifton  <[email protected]>
3406             Ben Elliston  <[email protected]>
3407
3408         * configure.in (werror): New switch: Add -Werror to the
3409         compiler command line.  Enabled by default.  Disable via
3410         --disable-werror.
3411         * configure: Regenerate.
3412
3413 2005-03-16  Nick Clifton  <[email protected]>
3414
3415         * ecoff.c: Convert to ISO C90 formatting.
3416
3417 2005-03-16  Alan Modra  <[email protected]>
3418
3419         * elf32-ppc.c: Divide file into general and linker specific
3420         functions.  Sort linker functions into roughly the order in which
3421         they are called by the ELF linker code.
3422
3423 2005-03-16  Alan Modra  <[email protected]>
3424
3425         * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
3426         on section.  Correct comment, and add FIXME.
3427         (ppc_elf_additional_program_headers): Don't bump header count for
3428         interp.  Test SEC_ALLOC, not SEC_LOAD, and don't test size.
3429         (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
3430         do allocate memory if they need it.
3431
3432 2005-03-15  Mikkel Krautz  <[email protected]>
3433
3434         * config.bfd (x86_64-elf): Add target.
3435
3436 2005-03-15  Alan Modra  <[email protected]>
3437
3438         * po/es.po: Commit new Spanish translation.
3439
3440 2005-03-14  H.J. Lu  <[email protected]>
3441
3442         * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
3443         for global symbol when reporting overflow.
3444
3445 2005-03-11  Jakub Jelinek  <[email protected]>
3446
3447         * libbfd-in.h (_bfd_ar_spacepad): New prototype.
3448         * libbfd.h: Rebuilt.
3449         * archive.c (_bfd_ar_spacepad): New function.
3450         (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
3451         bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
3452         coff_write_armap): Use it.
3453         (bfd_ar_hdr_from_filesystem): Likewise.  Fix HP-UX large
3454         uid/gid support.
3455         * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
3456
3457 2005-03-10  Mark Kettenis  <[email protected]>
3458
3459         * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
3460         has_table to the start of the function.
3461
3462 2005-03-10  Ben Elliston  <[email protected]>
3463
3464         * archive.c: Include hashtab.h.
3465         (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
3466         (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
3467         (hash_file_ptr): New function.
3468         (eq_file_ptr): Likewise.
3469         (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
3470         * libbfd-in.h: Include hashtab.h.
3471         (struct artdata): Change `cache' member type to htab_t.
3472         * libbfd.h: Rebuild.
3473
3474 2005-03-08  Daniel Jacobowitz  <[email protected]>
3475
3476         * configure.in: Bump version to 2.16.90.
3477         * configure: Regenerated.
3478
3479 2005-03-07  Jakub Jelinek  <[email protected]>
3480
3481         * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
3482         close is a function like macro in system headers.
3483
3484 2005-03-07  Alan Modra  <[email protected]>
3485
3486         PR ld/778
3487         * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
3488         _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
3489
3490 2005-03-06  Alan Modra  <[email protected]>
3491
3492         * elf.c (elfcore_grok_win32pstatus): Warning fixes.
3493
3494 2005-03-05  Alan Modra  <[email protected]>
3495
3496         * po/bfd.pot: Regenerate.
3497
3498 2005-03-05  Alan Modra  <[email protected]>
3499
3500         * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
3501         with is_func.
3502         (func_desc_adjust): Force dot-syms local in executables as well
3503         as shared libs.
3504
3505 2005-03-04  David Daney  <[email protected]>
3506
3507         * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
3508         '__gnu_local_gp' symbol used by gas -mno-shared.
3509
3510 2005-03-03  H.J. Lu  <[email protected]>
3511
3512         * elf-bfd.h (elf_backend_data): Add "const char *" to
3513         elf_backend_section_from_phdr.
3514
3515         * elf.c (bfd_section_from_phdr): Pass "proc" to the
3516         elf_backend_section_from_phdr hook.
3517
3518 2005-03-02  Daniel Jacobowitz  <[email protected]>
3519             Joseph Myers  <[email protected]>
3520
3521         * elfxx-mips.c (struct mips_got_entry): Add tls_type.
3522         (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
3523         and tls_ldm_offset.
3524         (struct mips_elf_got_per_bfd_arg): Add global_count.
3525         (struct mips_elf_count_tls_arg): New.
3526         (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
3527         (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
3528         (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
3529         (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
3530         (TLS_RELOC_P): Define.
3531         (TP_OFFSET, DTP_OFFSET): Define.
3532         (dtprel_base, tprel_base): New functions.
3533         (mips_elf_link_hash_newfunc): Initialize tls_type.
3534         (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
3535         (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
3536         TLS entries.
3537         (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
3538         (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
3539         (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
3540         (mips_tls_got_index): New functions.
3541         (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
3542         arguments.  Pass them to mips_elf_create_local_got_entry.  Use
3543         mips_tls_got_index.
3544         (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
3545         Handle TLS entries.
3546         (mips_elf_got_page, mips_elf_got16_entry): Update calls to
3547         mips_elf_create_local_got_entry.
3548         (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
3549         arguments.  Handle TLS entries.
3550         (mips_elf_sort_hash_table_f): Add non-TLS assertions.
3551         (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument.  Handle
3552         TLS entries.
3553         (mips_elf_record_global_got_symbol): Likewise.
3554         (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
3555         Count TLS entries.
3556         (mips_elf_merge_gots): Handle TLS entries when merging.
3557         (mips_elf_initialize_tls_index): New function.
3558         (mips_elf_set_global_got_offset): Handle TLS entries.
3559         (mips_elf_adjust_gp): Handle TLS.
3560         (mips_elf_multi_got): Remove redundant call to
3561         mips_elf_resolve_final_got_entries.  Initialize global_count.
3562         Correct a comment.  Initialize new TLS members of mips_got_info.
3563         Assign TLS GOT indexes for new GOTs.
3564         (mips_elf_create_got_section): Initialize new TLS members of
3565         mips_got_info.
3566         (mips_elf_calculate_relocation): Handle TLS relocs.
3567         (_bfd_mips_elf_check_relocs): Likewise.  Update calls to changed
3568         functions.
3569         (_bfd_mips_elf_always_size_sections): Handle TLS.
3570         (_bfd_mips_elf_size_dynamic_sections): Likewise.
3571         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.  Update calls to
3572         changed functions.
3573         (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
3574         (_bfd_mips_elf_hide_symbol): Handle TLS.
3575         * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
3576         (mips_reloc_map): Add TLS relocs.
3577         * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
3578         * elf64-mips.c (mips_elf64_howto_table_rel)
3579         (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
3580         * reloc.c: Define new MIPS TLS relocations.
3581         * libbfd.h, bfd-in2.h: Regenerated.
3582
3583 2005-03-02  Jan Beulich  <[email protected]>
3584
3585         * Makefile.am: Add dependency of cache.o on libiberty.h.
3586         * cache.c: Include libiberty.h.
3587         (bfd_open_file): Use unlink_if_ordinary instead of unlink.
3588
3589 2005-03-01  Zack Weinberg  <[email protected]>
3590
3591         * elf.c (bfd_section_from_shdr <default case>): Call
3592         elf_backend_section_from_shdr hook unconditionally, and return
3593         what it returns.
3594         (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
3595         * elfxx-target.h (elf_backend_section_from_shdr)
3596         (elf_backend_section_from_phdr): Default to
3597         _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
3598         respectively.
3599
3600 2005-03-01  Alan Modra  <[email protected]>
3601
3602         * targets.h: Typo fix.
3603         * bfd-in2.h: Regenerate.
3604
3605         * bout.c (b_out_write_object_contents): Don't use sizeof on host
3606         structs to size on-disk structures.
3607         (b_out_set_section_contents): Size the external struct, not the
3608         internal one for on-disk size.
3609         (b_out_sizeof_headers): Likewise.
3610
3611 2005-03-01  Alan Modra  <[email protected]>
3612
3613         * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
3614         entry points with the func descriptor as well as undefweak.
3615
3616 2005-02-28  Ross Ridge  <[email protected]>
3617
3618         * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
3619         present when IMPORT_NAME_UNDOECRATE is used.
3620
3621 2005-02-28  H.J. Lu  <[email protected]>
3622
3623         PR 757
3624         * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
3625         int.
3626
3627         * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
3628         to _bfd_elf_merge_symbol.
3629
3630         * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
3631         unsigned int to return the alignment of the old common symbol
3632         in the dynamic object.
3633         (_bfd_elf_add_default_symbol): Pass NULL to
3634         _bfd_elf_merge_symbol.
3635         (elf_link_add_object_symbols): Pass &old_alignment to
3636         _bfd_elf_merge_symbol. Get the alignment of the new common
3637         symbol in the dynamic object.
3638
3639 2005-02-24  Ben Elliston  <[email protected]>
3640
3641         * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
3642         * format.c (bfd_check_format_matches): Likewise.
3643         * archive.c (BFD_GNU960_ARMAG): Likewise.
3644         (bfd_generic_archive_p): Likewise.
3645         (_bfd_write_archive_contents): Likewise.
3646
3647 2005-02-24  H.J. Lu  <[email protected]>
3648
3649         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
3650         * configure: Regenerate.
3651
3652 2005-02-24  Julian Brown  <[email protected]>
3653
3654         * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
3655         COMDAT group sections to have default visibility.
3656
3657 2005-02-24  Alan Modra  <[email protected]>
3658
3659         * coffcode.h (coff_print_aux): Warning fix.
3660         * elf-m10300.c (mn10300_elf_relax_section): Use section->id
3661         instead of section pointer to identify.
3662         * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.  Allocate
3663         the correct size buffer for local sym mangling too.
3664         (h8300_bfd_link_add_symbols): Likewise.
3665         * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
3666         warning.
3667         * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
3668         * elf32-xtensa.c (literal_value_hash): Warning fix.
3669         * versados.c (process_otr): Warning fix.
3670         (versados_canonicalize_reloc): Likewise.
3671         * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
3672         * vms.c (fill_section_ptr): Warning fix.
3673
3674 2005-02-23  H.J. Lu  <[email protected]>
3675
3676         * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
3677         * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
3678
3679 2005-02-23  Nick Clifton  <[email protected]>
3680
3681         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
3682         the relvaddr field of the Elf32_crinfo structure.
3683
3684         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
3685         variables that are passed by reference to
3686         m68hc11_get_relocation_value in case that function does not
3687         initialise them.
3688
3689         * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
3690         return statements and replace with a single return at the end of
3691         the function.  This helps pacify the flow analysis code in gcc 4.0.
3692
3693         * elf.c (_bfd_elf_compute_section_file_positions): Initialise
3694         strtab to avoid compile time warning.
3695
3696 2005-02-23  Ben Elliston  <[email protected]>
3697
3698         * opncls.c (bfd_zalloc): Document this function.
3699
3700 2005-02-21  H.J. Lu  <[email protected]>
3701
3702         * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
3703         SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
3704         Replace SEC_SHARED with SEC_COFF_SHARED.
3705         (styp_to_sec_flags): Likewise.
3706
3707         * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
3708         (TARGET_LITTLE_SYM): Likewise.
3709
3710         * section.c (SEC_ARCH_BIT_0): Removed.
3711         (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
3712         SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
3713         (SEC_SHARED): Renamed to ...
3714         (SEC_COFF_SHARED): This.
3715         (SEC_BLOCK): Renamed to ...
3716         (SEC_TIC54X_BLOCK): This.
3717         (SEC_CLINK): Renamed to ...
3718         (SEC_TIC54X_CLINK): This.
3719         (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
3720         SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
3721         end.
3722         * bfd-in2.h: Regenerated.
3723
3724 2005-02-21  Fred Fish  <[email protected]>
3725
3726         * dwarf2.c (find_abstract_instance_name): Call recursively
3727         to handle a DW_AT_specification.
3728
3729 2005-02-21  Thiemo Seufer  <[email protected]>
3730
3731         * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
3732         mips_elf_create_dynamic_relocation,
3733         _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
3734         Remove #if 0'd code.
3735
3736 2005-02-21  Alan Modra  <[email protected]>
3737
3738         * Makefile.am: Run "make dep-am"
3739         * Makefile.in: Regenerate.
3740
3741 2005-02-21  Alan Modra  <[email protected]>
3742
3743         * coffgen.c (bfd_coff_get_comdat_section): Check that
3744         coff_section_data isn't NULL.
3745
3746 2005-02-21  Alan Modra  <[email protected]>
3747
3748         * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
3749         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
3750         * coff-rs6000.c (xcoff_write_armap_big): Warning fixes.  Remove
3751         useless assignments.
3752         (xcoff_write_archive_contents_big): Likewise.
3753         (_bfd_xcoff_put_ldsymbol_name): Likewise.
3754         * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
3755         * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
3756         * cofflink.c (process_embedded_commands): Warning fixes.
3757         * cpu-arm.c: Delete unnecessary prototypes.  Convert to C90.
3758         Warning fixes.
3759         * dwarf2.c: Warning fixes.
3760         * elf-bfd.h: Likewise.
3761         * elf-eh-frame.c: Likewise.
3762         * elf-strtab.c: Likewise.
3763         * elf.c: Likewise.
3764         * elf32-m68k.c: Likewise.
3765         * elf32-ppc.c: Likewise.
3766         * elf32-sh-symbian.c: Likewise.
3767         * elf32-sh.c: Delete unnecessary prototypes.  Warning fixes.
3768         * elf64-sh64.c: Likewise.
3769         * peicode.h: Likewise.
3770         * elf64-mmix.c: Warning fixes.
3771         * elfcode.h: Likewise.
3772         * elfxx-mips.c: Likewise.
3773         * libbfd-in.h: Likewise.
3774         * libbfd.c: Likewise.
3775         * mach-o.c: Likewise.
3776         * merge.c: Likewise.
3777         * mmo.c: Likewise.
3778         * opncls.c: Likewise.
3779         * pef.c: Likewise.
3780         * srec.c: Likewise.
3781         * vms-hdr.c: Likewise.
3782         * vms-tir.c: Likewise.
3783         * xtensa-isa.c: Likewise.
3784         * xtensa-modules.c: Likewise.
3785         * xsym.c: Likewise.
3786         (pstrcmp): Use correct choice of string lengths.  Fix return value.
3787         (bfd_sym_module_name): Correct string length.
3788         * bfd-in2.h: Regenerate.
3789         * libbfd.h: Regenerate.
3790
3791 2005-02-17  Alexandre Oliva  <[email protected]>
3792
3793         * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
3794         uninitialized check_segment[1] in TLSMOFF case.
3795         Reported by Alan Modra.
3796         (elf32_frv_relocate_section): Improve errors and warnings.
3797
3798 2005-02-17  Alan Modra  <[email protected]>
3799
3800         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
3801
3802 2005-02-16  Alan Modra  <[email protected]>
3803
3804         * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
3805         * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
3806         * pef.c (bfd_pef_scan): Don't ignore return value of
3807         bfd_pef_scan_start_address.
3808         * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
3809         bfd_mach_o_scan_start_address.
3810         * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
3811         * elfxx-mips.c: Remove unnecessary prototypes.
3812         (sort_dynamic_relocs_64): Abort if not BFD64.
3813
3814 2005-02-16  Alan Modra  <[email protected]>
3815
3816         * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
3817         Skip toc reloc adjust if reloc_count is zero.
3818
3819 2005-02-15  Nigel Stephens  <[email protected]>
3820             Maciej W. Rozycki  <[email protected]>
3821
3822         * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3823         reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3824         R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3825         (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3826         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
3827         dst_mask.
3828         (mips16_gprel_reloc): Remove bit shuffling; call
3829         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3830         and _bfd_mips16_elf_reloc_shuffle() instead.
3831         (mips16_reloc_map): New reloc map for MIPS16 relocs.
3832         (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3833         relocs.
3834         (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
3835         elf_mips16_howto_table_rel.
3836         * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
3837         MIPS16 REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16
3838         relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3839         (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
3840         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
3841         dst_mask.
3842         (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
3843         reloc howtos.  Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
3844         R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
3845         placeholders.
3846         (mips16_gprel_reloc): Remove bit shuffling; call
3847         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3848         and _bfd_mips16_elf_reloc_shuffle() instead.
3849         (mips16_reloc_map): New reloc map for MIPS16 relocs.
3850         (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3851         relocs.
3852         (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
3853         mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
3854         * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3855         REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3856         R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3857         (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3858         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
3859         dst_mask.
3860         (mips16_gprel_reloc): Remove bit shuffling; call
3861         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3862         and _bfd_mips16_elf_reloc_shuffle() instead.
3863         (mips16_reloc_map): New reloc map for MIPS16 relocs.
3864         (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3865         relocs.
3866         (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
3867         elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
3868         * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
3869         handle bit shuffling for MIPS16 relocs.
3870         (_bfd_mips16_elf_reloc_shuffle): Likewise.
3871         (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
3872         and _bfd_mips16_elf_reloc_shuffle().
3873         (_bfd_mips_elf_generic_reloc): Likewise.
3874         (mips_elf_calculate_relocation): Likewise.  Handle R_MIPS16_HI16
3875         and R_MIPS16_LO16.
3876         (mips_elf_obtain_contents): Remove bit shuffling.
3877         (mips_elf_perform_relocation): Likewise; call
3878         _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
3879         instead.
3880         (_bfd_mips_elf_relocate_section): Likewise.  Handle R_MIPS16_HI16
3881         and R_MIPS16_LO16.
3882         * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
3883         (_bfd_mips16_elf_reloc_shuffle): Likewise.
3884         * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
3885         (BFD_RELOC_MIPS16_HI16_S): Likewise.
3886         (BFD_RELOC_MIPS16_LO16): Likewise.
3887         * bfd-in2.h: Regenerate.
3888         * libbfd.h: Regenerate.
3889
3890 2005-02-15  Jan Beulich  <[email protected]>
3891
3892         * elfxx-ia64.c (ia64_howto_table): Correct strings for
3893         R_IA64_DTPMOD64[LM]SB.
3894
3895 2005-02-14  H.J. Lu  <[email protected]>
3896
3897         * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
3898         backward branch in the same section.
3899         (elfNN_ia64_relocate_section): Inform users that the input
3900         section is too big to relax br instruction when overflow
3901         happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
3902         and R_IA64_PCREL21F.
3903
3904 2005-02-14 Orjan Friberg <[email protected]>
3905
3906         * elfcore.h (elf_core_file_p): Move the call to
3907         elf_backend_object_p to allow the correct machine to be set before
3908         processing the program headers.
3909
3910 2005-02-14  Nick Clifton  <[email protected]>
3911
3912         PR binutils/716
3913         * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
3914         aware flag from the input bfd to the output bfd.
3915
3916 2005-02-11  Maciej W. Rozycki  <[email protected]>
3917
3918         * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
3919         R_MIPS_LITERAL relocations for external symbols.
3920         * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
3921         * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
3922
3923 2005-02-11  H.J. Lu  <[email protected]>
3924
3925         * bfd-in2.h: Rebuilt.
3926
3927 2005-02-11  Paul Brook  <[email protected]>
3928
3929         * elf-bfd.h (struct elf_link_hash_table): Add
3930         is_relocatable_executable.
3931         * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
3932         * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
3933         symbols in relocatable executables.
3934         (bfd_elf_record_link_assignment): Create dynamic section symbols in
3935         relocatable executables.
3936         (_bfd_elf_link_renumber_dynsyms): Ditto.
3937         (bfd_elf_final_link): Ditto.
3938         * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
3939         relocations into relocatable executables.
3940         (elf32_arm_check_relocs): Crate dynamic sections for relocatable
3941         executables.  Also copy absolute relocations.
3942         (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
3943         in relocatable executables.
3944         (allocate_dynrelocs): Copy relocations for relocatable executables.
3945         Output dynamic symbols for symbols defined in linker scripts.
3946
3947 2005-02-11  Nick Clifton  <[email protected]>
3948
3949         * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
3950         to avoid a compile time warning.
3951
3952         * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
3953         BFD_ASSERT.
3954
3955         * coff-tic4x.c (coff_rtype_to_howto): Move definition before
3956         inclusion of coffcode.h so that it is actually picked up.
3957
3958         * coffcode.h (coff_std_swap_table): Add an unused attribute in
3959         case it is not used.
3960
3961         * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
3962         structure and macro.
3963
3964         * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
3965         array.
3966
3967         * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
3968         to protect the declaration of this array.
3969
3970         * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
3971         Avoid call to memcpy with a size of 0.
3972
3973 2005-02-12  Alan Modra  <[email protected]>
3974
3975         * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
3976         old-style branches to undefined dot-symbols which will be
3977         satisfied by a plt call.
3978
3979 2005-02-11  Alan Modra  <[email protected]>
3980
3981         * elf64-ppc.c (move_plt_plist): New function, extracted from..
3982         (ppc64_elf_copy_indirect_symbol): ..here.
3983         (func_desc_adjust): Use move_plt_plist.
3984
3985 2005-02-10  Paul Brook  <[email protected]>
3986
3987         * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
3988
3989 2005-02-10  Paul Brook  <[email protected]>
3990
3991         * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
3992         symbols local.
3993         (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
3994         (elf_link_renumber_local_hash_table_dynsyms): New function.
3995         (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
3996
3997 2005-02-10  Jakub Jelinek  <[email protected]>
3998
3999         * bfd-in.h (BFD_LINKER_CREATED): Define.
4000         * bfd-in2.h: Rebuilt.
4001         * elflink.c (bfd_elf_size_dynamic_sections): Disregard
4002         BFD_LINKER_CREATED bfds when determining input bfds without
4003         .note.GNU-stack section.
4004
4005 2005-02-10  Maciej W. Rozycki  <[email protected]>
4006
4007         * elf64-mips.c (mips16_gprel_reloc): Update a comment.
4008         * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
4009         relocations against external symbols unchanged.
4010
4011 2005-02-08  Paul Brook  <[email protected]>
4012
4013         * elflink.c (elf_link_input_bfd): Ignore symbols from null input
4014         sections.
4015
4016 2005-02-08  Hans-Peter Nilsson  <[email protected]>
4017
4018         * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
4019         prefix here.
4020
4021 2005-02-07  Maciej W. Rozycki  <[email protected]>
4022
4023         * elf64-mips.c: Fix formatting throughout.
4024
4025 2005-02-07  Maciej W. Rozycki  <[email protected]>
4026
4027         * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
4028
4029 2005-02-07  Alexandre Oliva  <[email protected]>
4030
4031         * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
4032         *ABS*/*UND* sections.
4033         (elf32_frv_relocate_section): Move zero-addend-required error...
4034         (_frv_emit_got_relocs_plt_entries): ... here.  Report error for
4035         missing needed TLS section.
4036
4037 2005-02-07  Hans-Peter Nilsson  <[email protected]>
4038
4039         * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
4040         being the last symbol.
4041         (aout_link_add_symbols): Just return TRUE if a warning
4042         symbol was last.
4043
4044 2005-02-07  Maciej W. Rozycki  <[email protected]>
4045
4046         * elf32-mips.c (mips_elf_gprel32_reloc): Reject
4047         R_MIPS_GPREL32 relocations against external symbols.
4048         * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
4049         comment.
4050
4051 2005-02-07  Alan Modra  <[email protected]>
4052
4053         * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
4054         * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
4055         elf_string_from_elf_strtab.
4056         (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
4057         (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
4058         if it exists.  Don't do the reverse for SHT_SYMTAB_SHNDX.  For
4059         SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
4060         looking at cached symtab info first, before iterating over headers.
4061         For SHT_REL and SHT_RELA, load dynsymtab if needed.
4062         * elfcode.h (elf_object_p): Don't load section header stringtab
4063         specially.
4064
4065 2005-02-06  H.J. Lu  <[email protected]>
4066
4067         * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
4068         against protected function when building shared library.
4069
4070         PR 584
4071         * elf64-x86-64.c (is_32bit_relative_branch): New.
4072         (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
4073         protected function symbol when building shared library for
4074         32bit relative branch instruction.
4075
4076 2005-02-06  Alan Modra  <[email protected]>
4077
4078         * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
4079         syms when doing a relocatable link.
4080         (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
4081         at u.def.section.
4082         (ppc64_elf_tls_setup): Likewise.
4083         (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
4084
4085 2005-02-04  Alan Modra  <[email protected]>
4086
4087         * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
4088         (link_hash_newfunc): Clear all locals using memset.
4089         (make_fdh): Remove flags param.  Always create fake func desc
4090         weak.  Link the descriptor with the code entry sym.
4091         (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
4092         (add_symbol_adjust): Adjust make_fdh call.
4093         (func_desc_adjust): Likewise.  Twiddle any pre-existing fake
4094         descriptor to strong undefined if code entry is strong.
4095
4096 2005-02-04  Alan Modra  <[email protected]>
4097
4098         * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
4099         lookup here.  Set to new before calling bfd_link_repair_undef_list.
4100         (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
4101
4102 2005-02-03  Alan Modra  <[email protected]>
4103
4104         * linker.c (_bfd_link_hash_newfunc): Set all local fields.
4105
4106 2005-02-03  Alan Modra  <[email protected]>
4107
4108         * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
4109         * elflink.c (elf_smash_syms): Restore symbols that were undefweak
4110         before the as-needed lib was loaded.  Abort on unexpected refs.
4111
4112 2005-02-02  Alan Modra  <[email protected]>
4113
4114         * elflink.c (elf_smash_syms): Expand comments.
4115         (elf_link_add_object_symbols): Only call elf_smash_syms for
4116         as-needed dynamic objects.
4117
4118         * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
4119         everything, just the field specific to ia64.
4120         * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
4121
4122 2005-02-01  Alan Modra  <[email protected]>
4123
4124         * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
4125         (make_fdh): ..here.  New function.  Don't set BSF_OBJECT for
4126         undefined syms.
4127         (struct add_symbol_adjust_data): New.
4128         (add_symbol_adjust): Make an undefweak func desc for old ABI
4129         objects to link with --as-needed shared libs.  Return fail status.
4130         Don't adjust old ABI func entry sym to weak if func desc syms
4131         isn't defined.
4132         (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
4133         and return status.
4134
4135 2005-02-01  Hans-Peter Nilsson  <[email protected]>
4136
4137         * cpu-cris.c (get_compatible): Rearrange disabled code and comment
4138         for clarity.
4139
4140 2005-02-01  Alan Modra  <[email protected]>
4141
4142         * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
4143         * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
4144         remove anything but new and undefweak.
4145         * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
4146         existing _DYNAMIC.
4147         (_bfd_elf_create_dynamic_sections): Formatting.
4148         (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
4149         (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
4150         (struct elf_smash_data): New.
4151         (elf_smash_syms): New function.
4152         (elf_link_add_object_symbols): Call elf_smash_syms.  Don't add
4153         unneeded dynamic objects to loaded list.
4154         (elf_link_output_extsym): Don't handle as-needed here.  Strip
4155         bfd_link_hash_new symbols.
4156         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
4157         delref when dynindx is already -1.
4158         * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
4159         symbols.
4160         * elfxx-mips.c (mips_elf_output_extsym): Likewise.
4161
4162 2005-02-01  Ben Elliston  <[email protected]>
4163
4164         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
4165
4166 2005-02-01  Ben Elliston  <[email protected]>
4167
4168         * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
4169         bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
4170         coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
4171         coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
4172         cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
4173         elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
4174         elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
4175         elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
4176         i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
4177         nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
4178         pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
4179         sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
4180         hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
4181         throughout. Similarly, collapse #if 1'd code.
4182
4183 2005-02-01  Ben Elliston  <[email protected]>
4184
4185         * elf-bfd.h (bfd_elf_discard_group): Remove.
4186         * elf.c (bfd_elf_discard_group): Likewise.
4187         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
4188
4189 2005-01-31  Richard Sandiford  <[email protected]>
4190
4191         * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
4192         (_bfd_elf_eh_frame_address_size): Declare.
4193         * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
4194         (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
4195         * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
4196         (elf_backend_eh_frame_address_size): Define.
4197         * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
4198         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
4199         size from the new backend hook.
4200         (_bfd_elf_write_section_eh_frame): Likewise.
4201         (_bfd_elf_eh_frame_address_size): New function.
4202
4203 2005-01-31  Andrew Cagney  <[email protected]>
4204
4205         * configure: Regenerate to track ../gettext.m4.
4206
4207 2005-01-31  Mark Mitchell  <[email protected]>
4208
4209         * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
4210         SHF_WRITE for .init_array, .fini_array, and .preinit_array.
4211
4212 2005-01-31  Nick Clifton  <[email protected]>
4213
4214         * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
4215         sparc-lynxos, vax-vms) be obsolete.
4216
4217 2005-01-28  Daniel Jacobowitz  <[email protected]>
4218
4219         * elf-bfd.h (struct elf_backend_data): Add minpagesize.
4220         * elf32-arm.c (ELF_MINPAGESIZE): Define.
4221         * elf32-ppc.c (ELF_MINPAGESIZE): Define.
4222         * elfcode.h (elf_object_p): Use minpagesize instead of
4223         maxpagesize.
4224         * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
4225         (elfNN_bed): Include ELF_MINPAGESIZE.
4226
4227 2005-01-28  Julian Brown  <[email protected]>
4228
4229         * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
4230         * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
4231         * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
4232         (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
4233         passing flag value from ld. Set flag value in global hash table entry.
4234         (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
4235         relocation.
4236
4237 2005-01-27  Andrew Cagney  <[email protected]>
4238
4239         * configure: Regenerate to track ../gettext.m4 change.
4240
4241 2005-01-25  Mark Mitchell  <[email protected]>
4242
4243         * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
4244         SymbianOS.
4245
4246 2005-01-25  Alexandre Oliva  <[email protected]>
4247
4248         2004-12-10  Alexandre Oliva  <[email protected]>
4249         * elf32-frv.c (elf32_frv_relocate_section): Force local binding
4250         for TLSMOFF.
4251         * reloc.c: Add R_FRV_TLSMOFF.
4252         * elf32-frv.c (elf32_frv_howto_table): Likewise.
4253         (frv_reloc_map, frv_reloc_type_lookup): Map it.
4254         (elf32_frv_relocate_section): Handle it.
4255         (elf32_frv_check_relocs): Likewise.
4256         * libbfd.h, bfd-in2.h: Rebuilt.
4257         2004-11-26  Alexandre Oliva  <[email protected]>
4258         * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
4259         when given an undefweak TLS symbol.  Fix constant TLS PLT entries
4260         such that they return the constant in gr9.
4261         (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
4262         symbols.
4263         (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
4264         too, such that they shrink on relaxation.
4265         (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
4266         marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
4267         (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
4268         if we can guarantee the use of 16-bit constants.
4269         2004-11-10  Alexandre Oliva  <[email protected]>
4270         Introduce TLS support for FR-V FDPIC.
4271         * reloc.c: Add TLS relocations.
4272         * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
4273         (elf32_frv_rel_tlsdesc_value_howto): New.
4274         (elf32_frv_rel_tlsoff_howto): New.
4275         (frv_reloc_map): Add new mappings.
4276         (struct frvfdpic_elf_link_hash_table): Add pointer to summary
4277         reloc information.
4278         (frvfdpic_dynamic_got_plt_info): New.
4279         (frvfdpic_plt_tls_ret_offset): New.
4280         (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
4281         (struct _frvfdpic_dynamic_got_info): Likewise.  Add TLS members.
4282         (struct _frvfdpic_dynamic_got_plt_info): Likewise.
4283         (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
4284         section as local.
4285         (struct frvfdpic_relocs_info): Add TLS fields.
4286         (frvfdpic_relocs_info_hash): Warning clean up.
4287         (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
4288         (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
4289         (FRVFDPIC_TLS_BIAS): Define.
4290         (tls_biased_base): New.
4291         (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
4292         relocations.
4293         (frv_reloc_type_lookup): Likewise.
4294         (frvfdpic_info_to_howto_rel): Likewise.
4295         (elf32_frv_relocate_section): Likewise.
4296         (_frv_create_got_section): Create the PLT section here.
4297         (elf32_frvfdpic_create_dynamic_sections): Not here.
4298         (_frvfdpic_count_nontls_entries): Move out of...
4299         (_frvfdpic_count_got_plt_entries): ... here.
4300         (_frvfdpic_count_tls_entries): Likewise.  Add TLS support.
4301         (_frvfdpic_count_relocs_fixups): Likewise.  Add relaxation
4302         support.
4303         (_frvfdpic_relax_tls_entries): New.
4304         (_frvfdpic_compute_got_alloc_data): Add TLS support.
4305         (_frvfdpic_get_tlsdesc_entry): New.
4306         (_frvfdpic_assign_got_entries): Add TLS support.
4307         (_frvfdpic_assign_plt_entries): Likewise.
4308         (_frvfdpic_reset_got_plt_entries): New.
4309         (_frvfdpic_size_got_plt): Move out of...
4310         (elf32_frvfdpic_size_dynamic_sections): ... here.
4311         (_frvfdpic_relax_got_plt_entries): New.
4312         (elf32_frvfdpic_relax_section): New.
4313         (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
4314         (elf32_frv_check_relocs): Add TLS support.
4315         (bfd_elf32_bfd_relax_section): Define for FDPIC.
4316         * libbfd.h, bfd-in2.h: Rebuilt.
4317
4318 2005-01-25  Alan Modra  <[email protected]>
4319
4320         * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
4321         loadable reloc sections.
4322         (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
4323         (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
4324
4325 2005-01-25  Alan Modra  <[email protected]>
4326
4327         * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
4328         sections immediately when linking shared libs.  Instead, wait until
4329         we know a lib is needed.
4330         (_bfd_elf_link_create_dynstrtab): Extract from..
4331         (_bfd_elf_link_create_dynamic_sections_): ..here.
4332         (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
4333         _bfd_elf_link_create_dynamic_sections.  Add abfd param.  Allow
4334         for non-existent .dynamic.
4335         (elf_link_output_extsym): Don't complain about undefined symbols
4336         in as-needed dynamic libs that aren't actually linked.
4337
4338 2005-01-24  Andrew Cagney  <[email protected]>
4339
4340         * configure: Regenerate, ../gettext.m4 was updated.
4341
4342 2005-01-21  Ben Elliston  <[email protected]>
4343
4344         * aout-encap.c: Remove unused file.
4345
4346 2005-01-19  H.J. Lu  <[email protected]>
4347
4348         PR 679
4349         * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
4350         non-function symbols are local.
4351         (_bfd_elf_symbol_refs_local_p): Likewise.
4352
4353 2005-01-18  Alan Modra  <[email protected]>
4354
4355         * bfd.c (bfd_link_just_syms): Add abfd param.
4356         * bfd-in2.h: Regenerate.
4357
4358 2005-01-17  Richard Sandiford  <[email protected]>
4359
4360         * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
4361         (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
4362         instructions.  If the amount of padding is known, reduce the size
4363         of the CIE or FDE by that amount.
4364
4365 2005-01-17  Richard Sandiford  <[email protected]>
4366
4367         * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
4368         augmentation_size.  Use bfd_signed_vmas for data_align.
4369         * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
4370         (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
4371         functions.  Don't read past the end of the enclosing CIE or FDE.
4372         (skip_bytes): New utility function.
4373         (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
4374         sanity checking.
4375         (_bfd_elf_write_section_eh_frame): Use new functions.
4376
4377 2005-01-17  Richard Sandiford  <[email protected]>
4378
4379         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
4380         assert-style REQUIRE() macro to handle sanity checks.
4381
4382 2005-01-17  H.J. Lu  <[email protected]>
4383
4384         * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
4385         (comp_unit): Here.
4386         (read_unsigned_leb128): Removed.
4387         (read_signed_leb128): Removed.
4388         (find_abstract_instance_name): Updated.
4389         (parse_comp_unit): Accept info_ptr_unit.
4390         (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
4391         comp unit and pass it to parse_comp_unit.
4392
4393         * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
4394         (read_signed_leb128): Moved to ...
4395         * libbfd.c: Here.
4396
4397         * libbfd-in.h (read_unsigned_leb128): New prototype.
4398         (read_signed_leb128): Likewise.
4399         * libbfd.h: Regenerated.
4400
4401 2005-01-17  Andrew Stubbs  <[email protected]>
4402             Nick Clifton   <[email protected]>
4403
4404         * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
4405         arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
4406         arch_sh4a_nofpu_up in order to match the external names and make the
4407         testsuite's job easier.
4408         * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
4409         names.
4410         * bfd-in2.h: Regenerate.
4411
4412 2005-01-15  Andrew Cagney  <[email protected]>
4413
4414         * bfd.m4: New file.
4415         * acinclude.m4: Move BFD_NEED_DECLARATION,
4416         BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
4417         the new file bfd.m4.  Include ../bfd/bfd.m4.
4418         * configure: Re-generate.
4419
4420 2005-01-12  Alan Modra  <[email protected]>
4421
4422         * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
4423         (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
4424         reaching PLT.
4425         (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
4426         R_PPC_RELAX32PC_PLT.
4427
4428 2005-01-11  Alan Modra  <[email protected]>
4429
4430         * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
4431         symbols.
4432         * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
4433         * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
4434         * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
4435         * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
4436         * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
4437         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
4438         * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
4439         * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4440         * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4441         * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
4442         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
4443         * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
4444         * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4445         * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4446
4447 2005-01-11  Alan Modra  <[email protected]>
4448
4449         * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
4450         .dynsbss flags.
4451
4452 2005-01-10  Inderpreet Singh <[email protected]>
4453
4454         * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
4455         * bfd-in2.h:  Regenerate.
4456         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
4457         to support these new machine values.
4458         * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
4459         the maxq10.
4460         (bfd_maxq_arch): Update values for the maxq20.
4461
4462 2005-01-10  Eric Botcazou  <[email protected]>
4463
4464         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
4465         non-shared object, do not reserve space in .plt and .rela.plt for
4466         regular symbols neither defined nor referenced in shared objects.
4467
4468 2005-01-09  Eric Botcazou  <[email protected]>
4469
4470         * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
4471         to zero the structure.
4472         (create_got_section): Use BFD_ASSERT instead of abort.
4473         * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
4474         'srelgot' fields.
4475         (create_got_section): New function.
4476         (sparc64_elf_create_dynamic_sections): Likewise.
4477         (sparc64_elf_check_relocs): Invoke create_got_section instead of
4478         _bfd_elf_create_got_section.  Use the sgot and srelgot shortcuts.
4479         (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
4480         (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
4481         (sparc64_elf_finish_dynamic_symbol): Likewise.
4482         (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
4483         (elf_backend_create_dynamic_sections): Define to
4484         sparc64_elf_create_dynamic_sections.
4485
4486 2005-01-09  Eric Botcazou  <[email protected]>
4487
4488         * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
4489         (elf_backend_omit_section_dynsym): Define to it.
4490         * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
4491         (elf_backend_omit_section_dynsym): Define to it.
4492
4493 2005-01-07  Jakub Jelinek  <[email protected]>
4494
4495         * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
4496         PT_DYNAMIC segment, unless .dynamic.
4497
4498 2005-01-06  Paul Brook  <[email protected]>
4499
4500         * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
4501         * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
4502         * configure: Regenerate.
4503         * elf32-arm.c: Add VxWorks target bfd.
4504         (USE_REL): Remove.
4505         (elf32_arm_link_hash_table): Add use_rel.
4506         (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
4507         elf32_arm_relocate_section): Replace USE_REL with runtime check.
4508         Correct offset calculation for RELA case.
4509         (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
4510         elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
4511         (elf32_arm_vxworks_link_hash_table_create): New function.
4512         * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
4513         (bfd_elf32_littlearm_vxworks_vec): Ditto.
4514         (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
4515
4516 2005-01-06  Alan Modra  <[email protected]>
4517
4518         * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
4519         multi_toc_needed.
4520         (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
4521         (ppc64_elf_check_relocs): Update references to has_gp_reloc.
4522         (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
4523         (ppc64_elf_next_toc_section): Heed no_multi_toc.
4524         (ppc64_elf_reinit_toc): Set multi_toc_needed.
4525         (toc_adjusting_stub_needed): Rewrite.
4526         (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
4527         toc tests.  Adjust for toc_adjusting_stub_needed changes.
4528         (ppc64_elf_size_stubs): Update references to has_gp_reloc.
4529         * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
4530         * section.c: Expand comment on backend bits.
4531         * bfd-in2.h: Regenerate.
4532         * libbfd.h: Regenerate.
4533
4534 2005-01-06  Alan Modra  <[email protected]>
4535
4536         * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
4537         toc adjusting stub, do not test source section flags.
4538
4539 2005-01-05  Eric Botcazou  <[email protected]>
4540
4541         * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4542         from STABS debugging sections again.
4543
4544 2005-01-05  Fred Fish  <[email protected]>
4545
4546         * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
4547         (find_abstract_instance_name): New function.
4548         (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
4549         (scan_unit_for_functions): Handle DW_AT_abstract_origin.
4550         (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
4551
4552 2004-12-31  Paul Brook  <[email protected]>
4553
4554         * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
4555
4556 2004-12-31  Alan Modra  <[email protected]>
4557
4558         * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
4559         Commit missing changes from 2004-12-22.
4560         * bfd-in2.h: Regenerate.
4561
4562 2004-12-23  Tomer Levi  <[email protected]>
4563
4564         * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
4565
4566 2004-12-21  Kris Warkentin  <[email protected]>
4567
4568         * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
4569         Add 'base' argument for constructing register sections.  Reformat.
4570         (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
4571         gp and fp regs.  Reformat.
4572
4573 2004-12-22  Klaus Rudolph  <[email protected]>
4574
4575         * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
4576         * bfd-in2.h: Regenerate.
4577         * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
4578         (avr_reloc_map): Likewise.
4579         (avr_final_link_relocate): Likewise.
4580
4581 2004-12-22  Alan Modra  <[email protected]>
4582
4583         * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
4584         as-needed dynamic libs as undefined.
4585         (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
4586         libs when finding they are needed.
4587
4588 2004-12-20  Alan Modra  <[email protected]>
4589
4590         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
4591         (opd_entry_value): Use opd_relocs if available.
4592         (ppc64_elf_relocate_section): Don't set reloc_done.  Instead
4593         copy .opd relocations to opd_relocs.
4594         (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
4595
4596 2004-12-16  Richard Sandiford  <[email protected]>
4597
4598         * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
4599         * elf32-v850.c (v850_elf_howto_table): Add entry for
4600         R_V850_LO16_SPLIT_OFFSET.
4601         (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
4602         (v850_elf_perform_lo16_relocation): New function, extracted from...
4603         (v850_elf_perform_relocation): ...here.  Use it to handle
4604         R_V850_LO16_SPLIT_OFFSET.
4605         (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
4606         R_V850_LO16_SPLIT_OFFSET.
4607         * libbfd.h, bfd-in2.h: Regenerate.
4608
4609 2004-12-14  P.J. Darcy  <[email protected]>
4610
4611         * config.bfd: Add s390x-ibm-tpf support.
4612
4613 2004-12-14  Tomer Levi  <[email protected]>
4614
4615         * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
4616         to prototype, to make hash info available.
4617         Prevent wrapped symbols from being adjusted twice.
4618
4619 2004-12-14  Richard Sandiford  <[email protected]>
4620
4621         * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
4622         overflow for calls to undefined weak symbols.
4623
4624 2004-12-11  Alan Modra  <[email protected]>
4625
4626         * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
4627         canonical sections syms have a name.
4628
4629 2004-12-11  Alan Modra  <[email protected]>
4630
4631         * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
4632         have been adjusted for output.
4633         (ppc64_elf_relocate_section): Mark sections with reloc_done.
4634
4635 2004-12-10  Alan Modra  <[email protected]>
4636
4637         * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
4638         add symtab_hdr param.
4639         (group_signature): Update calls.
4640         * elf-bfd.h (bfd_elf_sym_name): Update.
4641         * elf32-ppc.c (ppc_elf_relocate_section): Update.
4642         * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
4643         (ppc64_elf_relocate_section): Update.
4644         * elflink.c (elf_link_input_bfd): Update.
4645
4646 2004-12-10  Jakub Jelinek  <[email protected]>
4647
4648         * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
4649         st_shndx on STT_SECTION sections.
4650
4651 2004-12-09  Daniel Jacobowitz  <[email protected]>
4652
4653         * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
4654         ELF section symbols.
4655
4656 2004-12-09  Ian Lance Taylor  <[email protected]>
4657
4658         * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
4659         return a real value, unless it is a PLT symbol.
4660         (mips_elf_perform_relocation): On the RM9000, turn a jal into a
4661         bal if possible.
4662
4663         * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
4664         R_MIPS_JALR entry to 0.
4665
4666         * archures.c: Define bfd_mach_mips9000.
4667         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
4668         (mips_set_isa_flags): Handle bfd_mach_mips9000.
4669         * cpu-mips.c (I_mips9000): Define.
4670         (arch_info_struct): Add case for bfd_mach_mips9000.
4671         * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
4672         * bfd-in2.h: Regenerate.
4673
4674 2004-12-08  Ian Lance Taylor  <[email protected]>
4675
4676         * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
4677         overflow.
4678
4679 2004-12-07  Ben Elliston  <[email protected]>
4680
4681         * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
4682
4683 2004-12-06  Daniel Jacobowitz  <[email protected]>
4684
4685         Suggested by Fergal Daly <[email protected]>:
4686         * simple.c (simple_dummy_multiple_definition): New function.
4687         (bfd_simple_get_relocated_section_contents): Use it.
4688
4689 2004-12-03  Jan Beulich  <[email protected]>
4690
4691         * elf.c (elf_find_function): Don't use the last file symbol ever,
4692         seen, but the last one seen prior to the symbol being reported.
4693         Don't report a filename at all for global symbols when that might
4694         be ambiguous/wrong.
4695
4696 2004-12-01  Paul Brook  <[email protected]>
4697
4698         * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
4699         (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
4700         version.
4701
4702 2004-12-01  Paul Brook  <[email protected]>
4703
4704         * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
4705         sections undefined.
4706
4707 2004-11-30  Paul Brook  <[email protected]>
4708
4709         * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
4710         no_pipeline_knowledge
4711         (elf32_arm_link_hash_table_create): Ditto.
4712         (bfd_elf32_arm_process_before_allocation): Ditto.
4713         (elf32_arm_final_link_relocate): Ditto.  Remove oabi relocation
4714         handling.
4715         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4716         prototype.
4717         * bfd-in2.h: Regenerate.
4718
4719 2004-11-30  Randolph Chung  <[email protected]>
4720
4721         * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
4722         (elf32_hppa_grok_psinfo): New function.
4723         (elf_backend_grok_prstatus): Define.
4724         (elf_backend_grok_psinfo): Define.
4725
4726 2004-11-24  H.J. Lu  <[email protected]>
4727
4728         PR 574:
4729         * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
4730
4731 2004-11-24  Paul Brook  <[email protected]>
4732
4733         * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
4734
4735 2004-11-24  Paul Brook  <[email protected]>
4736
4737         * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
4738         (elf32_arm_swap_symbol_out): New function.
4739         (elf32_arm_size_info): Add.
4740         (elf_backend_size_info): Define.
4741
4742 2004-11-20  John David Anglin  <[email protected]>
4743
4744         * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
4745         make_bfd_asection.
4746
4747 2004-11-19  Alan Modra  <[email protected]>
4748
4749         * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
4750         * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
4751         * nlmcode.h (nlm_write_object_contents): Warning fix.
4752
4753 2004-11-18  Bob Wilson  <[email protected]>
4754
4755         * elf32-xtensa.c (ebb_propose_action): Fix argument order.
4756
4757 2004-11-17  Daniel Jacobowitz  <[email protected]>
4758
4759         * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
4760         (elf32_arm_plt_thumb_stub): New.
4761         (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
4762         and plt_got_offset.
4763         (elf32_arm_link_hash_traverse): Fix typo.
4764         (elf32_arm_link_hash_table): Add obfd.
4765         (elf32_arm_link_hash_newfunc): Initialize new fields.
4766         (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
4767         (elf32_arm_link_hash_table_create): Initialize obfd.
4768         (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
4769         (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
4770         (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
4771         interworking BFD is not dynamic.
4772         (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32.  Do
4773         not emit glue for PLT references.
4774         (elf32_arm_final_link_relocate): Handle Thumb functions.  Do not
4775         emit glue for PLT references.  Support the Thumb PLT prefix.
4776         (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
4777         plt_thumb_refcount.
4778         (elf32_arm_check_relocs): Likewise.
4779         (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
4780         plt_thumb_refcount.
4781         (allocate_dynrelocs): Handle Thumb PLT references.
4782         (elf32_arm_finish_dynamic_symbol): Likewise.
4783         (elf32_arm_symbol_processing): New function.
4784         (elf_backend_symbol_processing): Define.
4785
4786 2004-11-16  Richard Sandiford  <[email protected]>
4787
4788         * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
4789         add_fde_encoding.  Remove need_relative.
4790         * elf-eh-frame.c (extra_augmentation_string_bytes)
4791         (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
4792         (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
4793         in cases where the CIE has no existing 'R' augmentation.  Use
4794         size_of_output_cie_fde when assigning offsets.  Use the final offset
4795         as the new section size.
4796         (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
4797         Account for any extra augmentation bytes in the returned offset.
4798         (_bfd_elf_write_section_eh_frame): Rework so that the entries are
4799         moved before being modified.  Pad growing entries with DW_CFA_nops.
4800         Add 'z' and 'R' augmentations as directed by add_augmentation_size
4801         and add_fde_encoding.
4802
4803 2004-11-15  Mark Mitchell  <[email protected]>
4804
4805         * elf32-arm.c (elf32_arm_relocate_section): Use
4806         arm_real_reloc_type.
4807
4808 2004-11-16  Richard Sandiford  <[email protected]>
4809
4810         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
4811         for discard relocations; don't add an R_MIPS_NONE to the main body
4812         of .rel.dyn.
4813
4814 2004-11-04  Paul Brook  <[email protected]>
4815
4816         * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
4817         * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
4818         (_bfd_elf_slurp_version_tables): Add extra argument.  Create extra
4819         default version definition for unversioned symbols.
4820         * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
4821         * elflink.c (elf_link_add_object_symbols): Pass extra argument to
4822         _bfd_elf_slurp_version_tables.  Set default version for unversioned
4823         imported symbols.
4824
4825 2004-11-15  Paul Brook  <[email protected]>
4826
4827         * elflink.c (elf_link_add_object_symbols): Don't assume version
4828         indices are consecutive.
4829
4830 2004-11-14  Richard Sandiford  <[email protected]>
4831
4832         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
4833         composite relocations against the personality data.
4834
4835 2004-11-13  Paul Brook  <[email protected]>
4836
4837         * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
4838         R_ARM_PREL31 relocations to PLT entries.
4839         (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
4840         (elf32_arm_check_relocs): Ditto.
4841
4842 2004-11-12  Bob Wilson  <[email protected]>
4843
4844         * xtensa-isa.c (xtensa_interface_class_id): New.
4845
4846 2004-11-11  Bob Wilson  <[email protected]>
4847
4848         * elf32-xtensa.c (property_table_compare): Remove assertion about
4849         entries with the same address and non-zero size.
4850         (xtensa_read_table_entries): Report such entries as errors.
4851
4852 2004-11-11  Mark Mitchell  <[email protected]>
4853
4854         * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
4855         R_ARM_RELATIVE on Symbian OS.
4856
4857 2004-11-09  Mark Mitchell  <[email protected]>
4858
4859         * som.c (som_bfd_print_private_bfd_data): New function.
4860         (som_object_setup): Save the auxiliary header.  Don't assume that
4861         zero is an invalid entry point for a shared library.
4862         (som_object_p): Allocate the auxiliary header on the heap.
4863
4864         * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
4865         declaration.
4866         (elf32_arm_symbian_modify_segment_map): Likewise.
4867
4868 2004-11-09  Daniel Jacobowitz  <[email protected]>
4869
4870         From David Poole <[email protected]>:
4871         * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
4872         (elf32_arm_size_dynamic_sections): Call it.
4873
4874 2004-11-09  Alan Modra  <[email protected]>
4875
4876         * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
4877         (ALL_MACHINES_CFILES): Fix typo.
4878         * Makefile.in: Regenerate.
4879         * po/SRC-POTFILES.in: Regenerate.
4880
4881 2004-11-08  Mark Mitchell  <[email protected]>
4882
4883         * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
4884         R_ARM_RELATIVE relocation for Symbian OS, mention the section
4885         symbol in the relocation.
4886
4887 2004-11-08  Inderpreet Singh  <[email protected]>
4888             Vineet Sharma  <[email protected]>
4889
4890         * coff-maxq.c: New File.
4891         * cpu-maxq.c: New File.
4892         * coffcode.h: Likewise.
4893         * config.bfd: Likewise.
4894         * configure.in (maxqcoff_vec): New target vector.
4895         * Makefile.am: Add support for maxq target.
4896         * configure.in: Likewise.
4897         * archures.c:. Likewise.
4898         * targets.c: Likewise.
4899         * bfd_in2.h : Regenerated.
4900         * Makefile.in: Regenerated.
4901         * configure: Regenerated.
4902         * doc/Makefile.in: Regenerated.
4903
4904 2004-11-08  Aaron W. LaFramboise <[email protected]>
4905
4906         * coff-i386.c (coff_i386_reloc): Fix weak symbols.
4907         * cofflink.c (_bfd_coff_link_input_bfd): Don't process
4908         C_NT_WEAK aux entries.
4909         (_bfd_coff_generic_relocate_section): Handle undefined
4910         aliases.
4911
4912 2004-11-07  Andreas Schwab  <[email protected]>
4913
4914         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
4915         SYMBOL_CALLS_LOCAL and check for undefweak symbols with
4916         non-default visibility.
4917
4918 2004-11-01  Mark Mitchell  <[email protected]>
4919
4920         * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
4921         D_PAGED.
4922         (elf32_arm_symbian_modify_segment_map): Don't
4923         reset includes_filehdr and includes_phdrs here.
4924
4925 2004-11-04  Daniel Jacobowitz  <[email protected]>
4926
4927         * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
4928         elfarm-nabi with elf32-arm.  Remove elfarm-oabi.
4929         (elf32-arm.lo): Replace elfarm-nabi.lo rule.  Remove elf32-arm.h
4930         dependency.
4931         * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
4932         to a new removed list.  Remove normal configuration stanzas.
4933         * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
4934         (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
4935         elfarm-nabi.lo with elf32-arm.lo.
4936         (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
4937         * elf32-arm.c: Renamed from elfarm-nabi.c.  Inline elf32-arm.h.
4938         * elf32-arm.h: Remove.
4939         * elfarm-oabi.c: Remove.
4940         * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
4941         and bfd_elf32_littlearm_oabi_vec.
4942         * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
4943
4944 2004-11-04  Hans-Peter Nilsson  <[email protected]>
4945
4946         * config.bfd: Support crisv32-*-* like cris-*-*.
4947         * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
4948         (bfd_mach_cris_v10_v32): New macros.
4949         * cpu-cris.c: Tweak formatting.
4950         (get_compatible): New function.
4951         (N): New macro.
4952         (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
4953         bfd_arch_info_type:s.
4954         (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
4955         get_compatible for member compatible and link bfd_cris_arch_v32 as
4956         next.
4957         * elf32-cris.c (cris_elf_pcrel_reloc)
4958         (cris_elf_set_mach_from_flags): New functions.
4959         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
4960         <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
4961         (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
4962         numbers for bfd_mach_cris_v32.
4963         (PLT_ENTRY_SIZE_V32): New macro.
4964         (elf_cris_plt0_entry): Drop last comma in initializer.
4965         (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
4966         (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
4967         PLT initializers.
4968         (cris_elf_relocate_section): Change all "%B(%A)" messages to
4969         "%B, section %A".
4970         (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
4971         (elf_cris_finish_dynamic_sections): Similar.
4972         (elf_cris_adjust_dynamic_symbol): Similar.
4973         (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
4974         section %A".
4975         <switch with PIC relocs>: Emit error and return FALSE for
4976         bfd_mach_cris_v10_v32.
4977         <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4978         Emit warning when generating textrel reloc.
4979         (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
4980         (cris_elf_final_write_processing): Set flags according to mach.
4981         (cris_elf_print_private_bfd_data): Display
4982         EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
4983         (cris_elf_merge_private_bfd_data): Drop variables old_flags,
4984         new_flags.  Don't call cris_elf_final_write_processing.  Don't
4985         look at the actual elf header flags at all; use
4986         bfd_get_symbol_leading_char to check ibfd, obfd.  Trap difference
4987         in bfd_get_mach for ibfd and obfd and handle merging of compatible
4988         objects.
4989         (bfd_elf32_bfd_copy_private_bfd_data): Define.
4990         * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
4991         (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
4992         (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
4993         * bfd-in2.h, libbfd.h: Regenerate.
4994
4995 2004-11-04  Alan Modra  <[email protected]>
4996
4997         * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
4998         * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
4999         comment.
5000         (struct adjust_toc_info): New.
5001         (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
5002
5003 2004-11-03  Bob Wilson  <[email protected]>
5004
5005         * elf.c (assign_file_positions_for_segments): Set next_file_pos even
5006         if there are no segments.
5007
5008 2004-11-02  Daniel Jacobowitz  <[email protected]>
5009
5010         * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
5011
5012 2004-11-02  Nick Clifton  <[email protected]>
5013
5014         * elf32-iq2000.c: Convert to ISO C90 formatting.
5015
5016 2004-11-02  Hans-Peter Nilsson  <[email protected]>
5017
5018         * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
5019
5020 2004-10-28  H.J. Lu  <[email protected]>
5021
5022         * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
5023         undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
5024         R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
5025
5026 2004-10-28  Kaz Kojima  <[email protected]>
5027
5028         * elf32-sh.c (tpoff): Take alignment into account.
5029
5030 2004-10-28  Nick Clifton  <[email protected]>
5031
5032         * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
5033         performing a relocatable link.
5034         (iq2000_elf_object_p): Do not set elf_bad_symtab.  This is only
5035         for MIPS ports under Irix.
5036
5037 2004-10-27  Richard Earnshaw  <[email protected]>
5038
5039         * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
5040         R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
5041         (elf32_arm_final_link_relocate): Ditto.
5042         (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
5043         (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
5044         (elf32_arm_adjust_dynamic_symbol): Ditto.
5045         * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
5046         R_ARM_JUMP32.  Move R_ARM_R{REL32,ABS32,PC24,BASE}...
5047         (elf32_arm_r_howto): ... To here.
5048         (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
5049
5050 2004-10-26  H.J. Lu  <[email protected]>
5051
5052         PR 475
5053         * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
5054         R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
5055         and R_IA64_SECREL64LSB.
5056
5057 2004-10-26  Paul Brook  <[email protected]>
5058
5059         * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
5060         (bfd_elf_size_dynamic_sections): Create default version definition.
5061         (elf_link_output_extsym): Adjust for default symbol version.
5062
5063 2004-10-24  Hans-Peter Nilsson  <[email protected]>
5064
5065         * mmo.c: Adjust to ISO C.
5066
5067         * mmo.c (mmo_write_section_description): New function broken out
5068         of mmo_internal_write_section.
5069         (mmo_internal_write_section): For each of .text and .data, call
5070         mmo_write_section_description before outputting contents if it has
5071         nontrivially deducible vma or contents.
5072         (mmo_has_leading_or_trailing_zero_tetra_p): New function.
5073         (mmo_canonicalize_symtab): Adjust absolute symbols to .data
5074         symbols if found within the .data address range.
5075
5076 2004-10-24  Daniel Jacobowitz  <[email protected]>
5077
5078         * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
5079
5080 2004-10-24  Hans-Peter Nilsson  <[email protected]>
5081
5082         * mmo.c (File Layout): Correct place of misplaced blurb about
5083         special data.
5084
5085 2004-10-22  Mark Kettenis  <[email protected]>
5086
5087         * config.bfd: Add mips64*-*-openbsd.
5088
5089 2004-10-21  Bob Wilson  <[email protected]>
5090
5091         * elf32-xtensa.c (ebb_propose_action): Put declarations before
5092         statements.
5093
5094 2004-10-21  H.J. Lu  <[email protected]>
5095
5096         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
5097         * configure: Regenerate.
5098
5099 2004-10-21  H.J. Lu  <[email protected]>
5100
5101         PR 463
5102         * aoutx.h (aout_link_input_section_std): Pass proper hash entry
5103         to linker reloc_overflow callback.
5104         (aout_link_input_section_ext): Likewise.
5105         (aout_link_reloc_link_order): Likewise.
5106         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
5107         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
5108         Likewise.
5109         (alpha_relocate_section): Likewise.
5110         * coff-arm.c (coff_arm_relocate_section): Likewise.
5111         * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
5112         * coff-h8500.c (extra_case): Likewise.
5113         * coff-i960.c (coff_i960_relocate_section): Likewise.
5114         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
5115         * coff-mips.c (mips_relocate_section): Likewise.
5116         * coff-or32.c (coff_or32_relocate_section): Likewise.
5117         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
5118         * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
5119         * coff-sh.c (sh_relocate_section): Likewise.
5120         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
5121         * coff-w65.c (w65_reloc16_extra_cases): Likewise.
5122         * coff-z8k.c (extra_case): Likewise.
5123         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
5124         * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
5125         (_bfd_coff_generic_relocate_section): Likewise.
5126         * ecoff.c (ecoff_reloc_link_order): Likewise.
5127         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
5128         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
5129         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5130         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
5131         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5132         * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
5133         * elf32-cris.c (cris_elf_relocate_section): Likewise.
5134         * elf32-crx.c (elf32_crx_relocate_section): Likewise.
5135         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
5136         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5137         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5138         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5139         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5140         * elf32-i370.c (i370_elf_relocate_section): Likewise.
5141         * elf32-i386.c (elf_i386_relocate_section): Likewise.
5142         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5143         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5144         * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
5145         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5146         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
5147         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5148         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5149         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
5150         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5151         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5152         * elf32-s390.c (elf_s390_relocate_section): Likewise.
5153         * elf32-sh.c (sh_elf_relocate_section): Likewise.
5154         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5155         * elf32-v850.c (v850_elf_relocate_section): Likewise.
5156         * elf32-vax.c (elf_vax_relocate_section): Likewise.
5157         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5158         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5159         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
5160         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5161         * elf64-s390.c (elf_s390_relocate_section): Likewise.
5162         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5163         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5164         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5165         * elflink.c (elf_reloc_link_order): Likewise.
5166         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
5167         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
5168         (_bfd_elf_mips_get_relocated_section_contents): Likewise.
5169         * linker.c (_bfd_generic_reloc_link_order): Likewise.
5170         * pdp11.c (pdp11_aout_link_input_section): Likewise.
5171         (aout_link_reloc_link_order): Likewise.
5172         * reloc.c (bfd_generic_get_relocated_section_contents):
5173         Likewise.
5174         * xcofflink.c (xcoff_reloc_link_order): Likewise.
5175         * simple.c (simple_dummy_reloc_overflow): Updated.
5176
5177 2004-10-20  Andreas Schwab  <[email protected]>
5178
5179         * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
5180         (elf_backend_plt_sym_val): Define.
5181
5182 2004-10-19  Danny Smith  <[email protected]>
5183
5184         * config.bfd: Set targ_underscore=yes for PE COFF targets
5185
5186 2004-10-19  Alan Modra  <[email protected]>
5187
5188         * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
5189         (ppc64_elf_edit_opd): Likewise.
5190
5191 2004-10-18  Mark Mitchell  <[email protected]>
5192
5193         * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
5194         * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
5195         set SEC_ALLOC and SEC_LOAD.
5196
5197 2004-10-18  Nick Clifton  <[email protected]>
5198
5199         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
5200         'name' for relocs against both local and global symbols.
5201
5202 2004-10-16  Daniel Jacobowitz  <[email protected]>
5203
5204         * bfd-in2.h: Regenerate.
5205         * bfd.c (struct bfd): Add no_export.
5206         * elflink.c (elf_link_add_object_symbols): Handle no_export.
5207
5208 2004-10-15  Alan Modra  <[email protected]>
5209
5210         * config.bfd: Whitespace cleanup.
5211         * Makefile.am: Run "make dep-am"
5212         * Makefile.in: Regenerate.
5213
5214 2004-10-15  Jakub Jelinek  <[email protected]>
5215
5216         * elflink.c (struct already_linked_section): Removed.
5217         (try_match_symbols_in_sections, already_linked): Removed.
5218         (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
5219         prefix of section names when finding already_linked_table
5220         chain.  Compare section names.  Instead of calling already_linked,
5221         do it inline and only for sections in the same already_linked_list.
5222
5223 2004-10-15  Alan Modra  <[email protected]>
5224
5225         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
5226         parameter.  If called after _bfd_elf_write_section_eh_frame,
5227         don't allow a -2 return unless need_* bit is already set, and
5228         handle offsets adjusted for output_offset.
5229         * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
5230         * elf.c (_bfd_elf_section_offset): Update call.
5231
5232 2004-10-13  H.J. Lu  <[email protected]>
5233
5234         PR 440
5235         * coffcode.h (coff_compute_section_file_positions): Cast to
5236         bfd_vma when computing page alignment.
5237
5238 2004-10-13  Mark Mitchell  <[email protected]>
5239
5240         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5241         offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
5242
5243 2004-10-12  Mark Mitchell  <[email protected]>
5244
5245         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
5246         relocations use a virtual address, not a section offset.
5247
5248 2004-10-12  Bob Wilson  <[email protected]>
5249
5250         * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
5251         (narrow_instruction, widen_instruction): Remove unnecessary calls to
5252         xtensa_format_encode.
5253         (ebb_propose_action): Inline call to ebb_add_proposed_action.
5254         (ebb_add_proposed_action): Delete.
5255
5256 2004-10-12  Bob Wilson  <[email protected]>
5257
5258         * elf32-xtensa.c: Use ISO C90 formatting.
5259
5260 2004-10-12  Paul Brook  <[email protected]>
5261
5262         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
5263         message.
5264
5265 2004-10-12  Paul Brook  <[email protected]>
5266
5267         * elf32-arm.h: Support EABI version 4 objects.
5268
5269 2004-10-12  Alan Modra  <[email protected]>
5270
5271         PR 325
5272         * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
5273         Don't mark as default.
5274         (bfd_x86_64_arch): Don't mark as default.
5275
5276 2004-10-12  Alan Modra  <[email protected]>
5277
5278         * elflink.c (enum action_discarded): New.
5279         (elf_section_complain_discarded): Delete.
5280         (elf_action_discarded): New function subsuming the above and also
5281         controlling reloc behaviour.
5282         (elf_link_input_bfd): Use it.
5283
5284 2004-10-11  Jakub Jelinek  <[email protected]>
5285
5286         * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
5287         (special_sections): Add .gnu.liblist and .gnu.conflict.
5288         (assign_section_numbers): Handle SHT_GNU_LIBLIST.
5289
5290 2004-10-11  Alan Modra  <[email protected]>
5291
5292         PR 233
5293         * elflink.c (elf_link_input_bfd): Try harder to support
5294         relocations against symbols in removed linkonce sections.
5295
5296 2004-10-11  Alan Modra  <[email protected]>
5297
5298         * elflink.c (elf_link_input_bfd): Revert PR 354 change.
5299
5300         PR 354
5301         * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
5302         sections do not reference symbols in non-SEC_ALLOC sections.
5303
5304 2004-10-11  Alan Modra  <[email protected]>
5305
5306         PR 437
5307         * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
5308         (_bfd_elf_link_omit_section_dynsym): Formatting.
5309
5310 2004-10-10  Alan Modra  <[email protected]>
5311
5312         * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
5313         * libbfd.h: Regnerate.
5314         * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
5315         * elf32-frv.c: Likewise.
5316         * elf32-m32r.c: Likewise.
5317         * elf32-ppc.c: Likewise.
5318         * elf64-hppa.c: Likewise.
5319         * elfxx-ia64.c: Likewise.
5320         * opncls.c: Likewise.
5321
5322 2004-10-10  Alan Modra  <[email protected]>
5323
5324         * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
5325         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
5326         offsets stored in struct eh_cie_fde entries before doing other
5327         work.
5328
5329         * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
5330         (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
5331         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
5332         setting offsets for removed CIEs.  Don't set "sec", instead set
5333         cie_inf for FDEs.  Keep a pointer to last struct eh_cie_fde for a
5334         CIE in hdr_info.  Only set make_relative and make_lsda_relative
5335         for CIEs.  Use pointers rather than array indices.
5336         (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
5337         make_lsda_relative, need_* on cie_inf for FDEs.
5338         (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
5339         section output_offset.  Delete cie_offset, instead use cie_inf
5340         pointer to CIE entry.  Use need_relative and need_lsda_relative on
5341         CIE entry for FDEs.  Use pointers rather than array indices.
5342
5343 2004-10-09  Alan Modra  <[email protected]>
5344
5345         * coff-rs6000.c (rs6000coff_vec): Add initializer for
5346         bfd_is_target_special_symbol.
5347         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5348         * som.c (som_bfd_is_target_special_symbol): Define.
5349
5350 2004-10-08  Nick Clifton  <[email protected]>
5351
5352         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
5353         * configure: Regenerate.
5354         * bfd-in2.h: Regenerate.
5355         * syms.c (bfd_is_target_special_symbol): New interface function.
5356         Returns true when a symbol should be considered to be special.
5357         * targets.c (bfd_target): Include bfd_is_target_special_symbol in
5358         the symbol jump table.
5359         * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
5360         Return true iff the symbol is a mapping symbol.
5361         (bfd_elf32_bfd_is_target_special_symbol): Define.
5362         * elfxx-target.h: Provide a default definition for
5363         bfd_is_target_special_symbol.
5364         * aout-target.h: Likewise.
5365         * aout-tic30.c: Likewise.
5366         * binary.c: Likewise.
5367         * coffcode.h: Likewise.
5368         * i386msdos.c: Likewise.
5369         * ieee.c: Likewise.
5370         * ihex.c: Likewise.
5371         * libaout.h: Likewise.
5372         * libbfd-in.h: Likewise
5373         * libecoff.h: Likewise.
5374         * mach-o.c: Likewise.
5375         * mmo.c: Likewise.
5376         * nlm-target.h: Likewise.
5377         * oasys.c: Likewise.
5378         * pef.c: Likewise.
5379         * ppcboot.c: Likewise.
5380         * srec.c: Likewise.
5381         * tekhex.c: Likewise.
5382         * versados.c: Likewise.
5383         * vms.c: Likewise.
5384         * xcoff-target.h: Likewise.
5385         * xsym.c: Likewise.
5386         * libbfd.h: Regenerate.
5387
5388 2004-10-08  Daniel Jacobowitz  <[email protected]>
5389
5390         * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
5391         * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
5392         (elf_backend_section_from_shdr): Define.
5393
5394 2004-10-08  Alan Modra  <[email protected]>
5395
5396         * syms.c (bfd_is_local_label): Return false for file symbols.
5397
5398 2004-10-07  Bob Wilson  <[email protected]>
5399             David Heine  <[email protected]>
5400
5401         * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
5402         (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
5403         (elf32xtensa_no_literal_movement): New global variable.
5404         (elf_howto_table): Add entries for new relocations.
5405         (elf_xtensa_reloc_type_lookup): Handle new relocations.
5406         (property_table_compare): When addresses are equal, compare sizes and
5407         various property flags.
5408         (property_table_matches): New.
5409         (xtensa_read_table_entries): Extend to read new property tables.  Add
5410         output_addr parameter to indicate that output addresses should be used.
5411         Use bfd_get_section_limit.
5412         (elf_xtensa_find_property_entry): New.
5413         (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
5414         (elf_xtensa_check_relocs): Handle new relocations.
5415         (elf_xtensa_do_reloc): Use bfd_get_section_limit.  Handle new
5416         relocations.  Use new xtensa-isa.h functions.
5417         (build_encoding_error_message): Remove encode_result parameter.  Add
5418         new target_address parameter used to detect alignment errors.
5419         (elf_xtensa_relocate_section): Use bfd_get_section_limit.  Clean up
5420         error handling.  Use new is_operand_relocation function.
5421         (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
5422         Use underbar macro for error messages.  Formatting.
5423         (get_const16_opcode): New.
5424         (get_l32r_opcode): Add a separate flag for initialization.
5425         (get_relocation_opnd): Operand number is no longer explicit in the
5426         relocation.  Change to decode the opcode and analyze its operands.
5427         (get_relocation_slot): New.
5428         (get_relocation_opcode): Add bfd parameter.  Use bfd_get_section_limit.
5429         Use new xtensa-isa.h functions to handle multislot instructions.
5430         (is_l32r_relocation): Add bfd parameter.  Use is_operand_relocation.
5431         (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
5432         insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
5433         check_loop_aligned, check_branch_target_aligned_address, narrowable,
5434         widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
5435         get_single_format, init_op_single_format_table): New.
5436         (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
5437         instead of calling _bfd_error_handler.  Use new xtensa-isa.h functions.
5438         (contract_asm_expansion): Add error_message parameter and pass it to
5439         elf_xtensa_do_asm_simplify.  Replace use of R_XTENSA_OP0 relocation
5440         with R_XTENSA_SLOT0_OP.
5441         (get_expanded_call_opcode): Extend to handle either L32R or CONST16
5442         instructions.  Use new xtensa-isa.h functions.
5443         (r_reloc struct): Add new virtual_offset field.
5444         (r_reloc_init): Add contents and content_length parameters.  Set
5445         virtual_offset field to zero.  Add contents to target_offset field for
5446         partial_inplace relocations.
5447         (r_reloc_is_defined): Check for null.
5448         (print_r_reloc): New debug function.
5449         (source_reloc struct): Replace xtensa_operand field with pair of the
5450         opcode and the operand position.  Add is_abs_literal field.
5451         (init_source_reloc): Specify operand by opcode/position pair.  Set
5452         is_abs_literal field.
5453         (source_reloc_compare): When target_offsets are equal, compare other
5454         fields to make sorting predictable.
5455         (literal_value struct): Add is_abs_literal field.
5456         (value_map_hash_table struct): Add has_last_loc and last_loc fields.
5457         (init_literal_value): New.
5458         (is_same_value): Replace with ...
5459         (literal_value_equal): ... this function.  Add comparisons of
5460         virtual_offset and is_abs_literal fields.
5461         (value_map_hash_table_init): Use bfd_zmalloc.  Check for allocation
5462         failure.  Initialize has_last_loc field.
5463         (value_map_hash_table_delete): New.
5464         (hash_literal_value): Rename to ...
5465         (literal_value_hash): ... this.  Include is_abs_literal flag and
5466         virtual_offset field in the hash value.
5467         (get_cached_value): Rename to ...
5468         (value_map_get_cached_value): ... this.  Update calls to
5469         literal_value_hash and literal_value_equal.
5470         (add_value_map): Check for allocation failure.  Update calls to
5471         value_map_get_cached_value and literal_value_hash.
5472         (text_action, text_action_list, text_action_t): New types.
5473         (find_fill_action, compute_removed_action_diff, adjust_fill_action,
5474         text_action_add, text_action_add_literal, offset_with_removed_text,
5475         offset_with_removed_text_before_fill, find_insn_action,
5476         print_action_list, print_removed_literals): New.
5477         (offset_with_removed_literals): Delete.
5478         (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
5479         fix_array, fix_array_count, allocated_relocs, relocs_count, and
5480         allocated_relocs_count fields.
5481         (init_xtensa_relax_info): Initialize new fields.
5482         (reloc_bfd_fix struct): Add new translated field.
5483         (reloc_bfd_fix_init): Add translated parameter and use it to set the
5484         translated field.
5485         (fix_compare, cache_fix_array): New.
5486         (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
5487         section via get_xtensa_relax_info.  Use cache_fix_array to set up
5488         sorted fix_array and use bsearch instead of linear search.
5489         (section_cache_t): New struct.
5490         (init_section_cache, section_cache_section, clear_section_cache): New.
5491         (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
5492         (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
5493         extend_ebb_bounds_forward, extend_ebb_bounds_backward,
5494         insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
5495         New.
5496         (retrieve_contents): Use bfd_get_section_limit.
5497         (elf_xtensa_relax_section): Add relocations_analyzed flag.  Update call
5498         to compute_removed_literals.  Free value_map_hash_table when no longer
5499         needed.
5500         (analyze_relocations): Check is_relaxable_asm_section flag.  Call
5501         compute_text_actions for all sections.
5502         (find_relaxable_sections): Mark sections as relaxable if they contain
5503         ASM_EXPAND relocations that can be optimized.  Adjust r_reloc_init
5504         call.  Increment relax_info src_count field only for appropriate
5505         relocation types.  Remove is_literal_section check.
5506         (collect_source_relocs): Use bfd_get_section_limit.  Adjust calls to
5507         r_reloc_init and find_associated_l32r_irel.  Check
5508         is_relaxable_asm_section flag.  Handle L32R instructions with absolute
5509         literals.  Pass is_abs_literal flag to init_source_reloc.
5510         (is_resolvable_asm_expansion): Use bfd_get_section_limit.  Check for
5511         CONST16 instructions.  Adjust calls to r_reloc_init and
5512         pcrel_reloc_fits.  Handle weak symbols conservatively.
5513         (find_associated_l32r_irel): Add bfd parameter and pass it to
5514         is_l32r_relocation.
5515         (compute_text_actions, compute_ebb_proposed_actions,
5516         compute_ebb_actions, check_section_ebb_pcrels_fit,
5517         check_section_ebb_reduces, text_action_add_proposed,
5518         compute_fill_extra_space): New.
5519         (remove_literals): Replace with ...
5520         (compute_removed_literals): ... this function.  Call
5521         init_section_cache.  Use bfd_get_section_limit.  Sort internal_relocs.
5522         Call xtensa_read_table_entries to get the property table.  Skip
5523         relocations other than R_XTENSA_32 and R_XTENSA_PLT.  Use new
5524         is_removable_literal, remove_dead_literal, and
5525         identify_literal_placement functions.
5526         (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
5527         instead of linear search.
5528         (is_removable_literal, remove_dead_literal,
5529         identify_literal_placement): New.
5530         (relocations_reach): Update check for literal not referenced by any
5531         PC-relative relocations.  Adjust call to pcrel_reloc_fits.
5532         (coalesce_shared_literal, move_shared_literal): New.
5533         (relax_section): Use bfd_get_section_limit.  Call
5534         translate_section_fixes.  Update calls to r_reloc_init and
5535         offset_with_removed_text.  Check new is_relaxable_asm_section flag.
5536         Add call to pin_internal_relocs.  Add special handling for
5537         R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs.  Use virtual_offset
5538         info to calculate new addend_displacement variable.  Replace code for
5539         deleting literals with more general code to perform the actions
5540         determined by the action_list for the section.
5541         (translate_section_fixes, translate_reloc_bfd_fix): New.
5542         (translate_reloc): Check new is_relaxable_asm_section flag.  Call
5543         find_removed_literal only if is_operand_relocation.  Update call to
5544         offset_with_removed_text.  Use new target_offset and removed_bytes
5545         variables.
5546         (move_literal): New.
5547         (relax_property_section):  Use bfd_get_section_limit.  Set new
5548         is_full_prop_section flag and handle new property tables.  Update calls
5549         to r_reloc_init and offset_with_removed_text.  Check
5550         is_relaxable_asm_section flag.  Handle expansion of zero-sized
5551         unreachable entries, with use of offset_with_removed_text_before_fill.
5552         For relocatable links, combine entries only for literal tables.
5553         (relax_section_symbols): Check is_relaxable_asm_section flag.  Update
5554         calls to offset_with_removed_text.  Translate st_size field for
5555         function symbols.
5556         (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
5557         failure.  Add contents parameter.  Update call to get_bfd_fix.  Update
5558         call to r_reloc_init.  Call _bfd_error_handler and return FALSE for
5559         R_XTENSA_ASM_EXPAND relocs.
5560         (do_fix_for_final_link): Add input_bfd and contents parameters.  Update
5561         call to get_bfd_fix.  Include offset from contents for partial_inplace
5562         relocations.
5563         (is_reloc_sym_weak): New.
5564         (pcrel_reloc_fits): Use new xtensa-isa.h functions.
5565         (prop_sec_len): New.
5566         (xtensa_is_property_section): Handle new property sections.
5567         (is_literal_section): Delete.
5568         (internal_reloc_compare): When r_offset matches, compare r_info and
5569         r_addend to make sorting predictable.
5570         (internal_reloc_matches): New.
5571         (xtensa_get_property_section_name): Handle new property sections.
5572         (xtensa_get_property_predef_flags): New.
5573         (xtensa_callback_required_dependence): Use bfd_get_section_limit.
5574         Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
5575         * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
5576         (xtisa_errno, xtisa_error_msg): New variables.
5577         (xtensa_isa_errno, xtensa_isa_error_msg): New.
5578         (xtensa_insnbuf_alloc): Add error handling.
5579         (xtensa_insnbuf_to_chars): Add num_chars parameter.  Update to
5580         use xtensa_format_decode.  Add error handling.
5581         (xtensa_insnbuf_from_chars): Add num_chars parameter.  Decode the
5582         instruction length to find the number of bytes to copy.
5583         (xtensa_isa_init): Add error handling.  Replace calls to
5584         xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
5585         tables in the xtensa_modules structure.
5586         (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
5587         xtensa_extend_isa): Delete.
5588         (xtensa_isa_free): Change to only free lookup tables.
5589         (opname_lookup_compare): Replace with ...
5590         (xtensa_isa_name_compare): ... this function.  Use strcasecmp.
5591         (xtensa_insn_maxlength): Rename to ...
5592         (xtensa_isa_maxlength): ... this.
5593         (xtensa_insn_length): Delete.
5594         (xtensa_insn_length_from_first_byte): Replace with ...
5595         (xtensa_isa_length_from_chars): ... this function.
5596         (xtensa_num_opcodes): Rename to ...
5597         (xtensa_isa_num_opcodes): ... this.
5598         (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
5599         xtensa_isa_num_regfiles, xtensa_isa_num_stages,
5600         xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
5601         xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
5602         xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
5603         xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
5604         xtensa_format_get_slot, xtensa_format_set_slot): New functions.
5605         (xtensa_opcode_lookup): Add error handling.
5606         (xtensa_decode_insn): Replace with ...
5607         (xtensa_opcode_decode): ... this function, with new format and
5608         slot parameters.  Add error handling.
5609         (xtensa_encode_insn): Replace with ...
5610         (xtensa_opcode_encode): ... this function, which does the encoding via
5611         one of the entries in the "encode_fns" array.  Add error handling.
5612         (xtensa_opcode_name): Add error handling.
5613         (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
5614         xtensa_opcode_is_call): New.
5615         (xtensa_num_operands): Replace with ...
5616         (xtensa_opcode_num_operands): ... this function.  Add error handling.
5617         (xtensa_opcode_num_stateOperands,
5618         xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
5619         xtensa_opcode_funcUnit_use, xtensa_operand_name,
5620         xtensa_operand_is_visible): New.
5621         (xtensa_get_operand, xtensa_operand_kind): Delete.
5622         (xtensa_operand_inout): Add error handling and special-case for
5623         "sout" operands.
5624         (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
5625         operate on one slot of an instruction.  Added error handling.
5626         (xtensa_operand_encode): Handle default operands with no encoding
5627         functions.  Check for success by comparing against decoded value.
5628         Add error handling.
5629         (xtensa_operand_decode): Handle default operands.  Return decoded value
5630         through argument pointer.  Add error handling.
5631         (xtensa_operand_is_register, xtensa_operand_regfile,
5632         xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
5633         (xtensa_operand_isPCRelative): Rename to ...
5634         (xtensa_operand_is_PCrelative): ... this.  Add error handling.
5635         (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
5636         through argument pointer.  Add error handling.
5637         (xtensa_stateOperand_state, xtensa_stateOperand_inout,
5638         xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
5639         xtensa_regfile_lookup_shortname, xtensa_regfile_name,
5640         xtensa_regfile_shortname, xtensa_regfile_view_parent,
5641         xtensa_regfile_num_bits, xtensa_regfile_num_entries,
5642         xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
5643         xtensa_state_is_exported, xtensa_sysreg_lookup,
5644         xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
5645         xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
5646         xtensa_interface_num_bits, xtensa_interface_inout,
5647         xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
5648         xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
5649         * xtensa-modules.c: Rewrite to use new data structures.
5650         * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
5651         BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
5652         BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
5653         BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
5654         BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
5655         BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
5656         BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
5657         BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
5658         BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
5659         BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
5660         BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
5661         BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
5662         BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
5663         BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
5664         BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
5665         BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
5666         BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
5667         * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
5668         * Makefile.in: Regenerate.
5669         * bfd-in2.h: Likewise.
5670         * libbfd.h: Likewise.
5671
5672 2004-10-07  Richard Sandiford  <[email protected]>
5673
5674         * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
5675         against the absolute section.
5676         (mips_elf64_write_rela): Likewise.
5677
5678 2004-10-07  Jan Beulich <[email protected]>
5679
5680         * elf.c (elf_find_function): Don't generally check for matching
5681         section, just for non-file symbols.  Remove redunant comparison
5682         for the latter.
5683         * elf32-arm.h (arm_elf_find_function): Likewise.
5684
5685 2004-10-07  Jeff Baker  <[email protected]>
5686
5687         * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
5688         adding a DT_TEXTREL to a shared object and --warn-shared-textrel
5689         was specified.
5690
5691 2004-10-04  Roland McGrath  <[email protected]>
5692
5693         * hash.c (bfd_hash_set_default_size): Use const for table.
5694         Use size_t instead of int for variable compared to sizeof results.
5695
5696 2004-10-05  Alan Modra  <[email protected]>
5697
5698         PR 425
5699         * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
5700
5701 2004-10-01  Paul Brook  <[email protected]>
5702
5703         * elf32-arm.h (elf32_arm_fake_sections,
5704         is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
5705         functions.
5706         (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
5707
5708 2004-10-01  Alan Modra  <[email protected]>
5709
5710         * elf-bfd.h (struct eh_cie_fde): Add need_relative and
5711         need_lsda_relative.
5712         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
5713         need_relative or need_lsda_relative if we are processing an
5714         offset for a reloc on a FDE initial loc or LSDA field
5715         respectively.
5716         (_bfd_elf_write_section_eh_frame): Test need_relative and
5717         need_lsda_relative in place of corresponding make_* field
5718         when deciding to use pc-relative encodings.
5719
5720 2004-09-30  Paul Brook  <[email protected]>
5721
5722         * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
5723         target2 relocation type.
5724
5725 2004-09-30  H.J. Lu  <[email protected]>
5726
5727         PR 414
5728         * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
5729
5730 2004-09-30  Paul Brook  <[email protected]>
5731
5732         * reloc.c: Add BFD_RELOC_ARM_SMI.
5733         * bfd-in2.h: Regenerate.
5734         * libbfd.h: Ditto.
5735
5736 2004-09-24  Alan Modra  <[email protected]>
5737
5738         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
5739         vma and output offset to address.
5740         * simple.c (simple_save_output_info): Only set output section
5741         and offset for debug sections, or those not already set up by
5742         the linker.
5743         (bfd_simple_get_relocated_section_contents): Update comment.
5744
5745 2004-09-24  Alan Modra  <[email protected]>
5746
5747         * elf.c (IS_LOADED): Delete.
5748         (assign_file_positions_for_segments): Just test SEC_LOAD instead.
5749         Restore SEC_HAS_CONTENTS test to the one place it was used prior
5750         to 2004-09-22.
5751
5752 2004-09-23  Alan Modra  <[email protected]>
5753
5754         PR gas/396
5755         * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
5756         bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite.  Remove
5757         redundant assignment of EM_SPARC.
5758
5759 2004-09-22  Brian Ford  <[email protected]>
5760
5761         * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
5762         alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
5763         constants.
5764         * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5765
5766 2004-09-22  Alan Modra  <[email protected]>
5767
5768         * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
5769         (elf_backend_modify_segment_map): Don't define.
5770
5771 2004-09-22  Alan Modra  <[email protected]>
5772
5773         * elf.c (IS_LOADED): Define.
5774         (assign_file_positions_for_segments): Don't round up file offset of
5775         PT_LOAD segments containing no SEC_LOAD sections, instead round down.
5776         Delete code handling link script adjustment of lma.  Do the adjust
5777         in later code handling similar ajustments.  Remove dead code error
5778         check.  Warn if section lma would require a negative offset
5779         adjustment.  Tweak lma adjustment to use p_filesz rather than p_memsz.
5780         Use p_vaddr + p_memsz inside section loop in place of voff.  Don't
5781         update voff in section loop.  Change voff in segment loop to be an
5782         adjustment on top of "off".  Set sec->filepos and update "off" later.
5783         Test for loadable sections consistently using IS_LOADED.  Similarly,
5784         test for alloc-only sections other than .tbss consistently.
5785         Don't bother checking SEC_ALLOC in PT_LOAD segments.  Remove FIXME.
5786         Tidy PT_NOTE handling.  Use %B and %A in error messages.
5787         (assign_file_positions_except_relocs): Use %B in error message.
5788
5789 2004-09-17  H.J. Lu  <[email protected]>
5790
5791         * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
5792         (CONFIG_STATUS_DEPENDENCIES): New.
5793         (Makefile): Removed.
5794         (config.status): Likewise.
5795         * Makefile.in: Regenerated.
5796
5797 2004-09-17  Paul Brook  <[email protected]>
5798
5799         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
5800         (bfd_elf32_arm_process_before_allocation): Update prototype.
5801         * bfd-in2.h: Regenerate.
5802         * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
5803         (elf32_arm_link_hash_table_create): Set it.
5804         (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
5805         (bfd_elf32_arm_set_target_relocs): New function.
5806         (arm_real_reloc_type): New function.
5807         (elf32_arm_final_link_relocate): Use it.  Handle R_ARM_PREL31 and
5808         R_ARM_GOT_PREL.  Remove R_ARM_TARGET1.
5809         (elf32_arm_gc_sweep_hook): Ditto.
5810         (elf32_arm_check_relocs): Ditto.
5811         (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
5812         * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
5813         R_ARM_GOT_TARGET2.
5814         (elf32_arm_got_prel): New variable.
5815         (elf32_arm_howto_from_type): New function.
5816         (elf32_arm_info_to_howto): Use it.
5817         (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
5818         BFD_RELOC_ARM_TARGET2.
5819         * libbfd.h: Regenerate.
5820         * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
5821
5822 2004-09-17  Alan Modra  <[email protected]>
5823
5824         * ecoff.c: Update u.undef.next refs.
5825         * elf64-ppc.c: Likewise.
5826         * elflink.c: Likewise.
5827         * linker.c: Likewise.
5828         * xcofflink.c: Likewise.
5829
5830         * elf-bfd.h (struct elf_link_hash_entry): Rearrange.  Add FIXME to
5831         dynamic_def.  Combine weakdef and elf_hash_value.  Move vtable
5832         fields to indirect struct.
5833         * elf-m10300.c: Update u.weakdef refs.
5834         * elf32-arm.h: Likewise.
5835         * elf32-cris.c: Likewise.
5836         * elf32-frv.c: Likewise.
5837         * elf32-hppa.c: Likewise.
5838         * elf32-i370.c: Likewise.
5839         * elf32-i386.c: Likewise.
5840         * elf32-m32r.c: Likewise.
5841         * elf32-m68k.c: Likewise.
5842         * elf32-ppc.c: Likewise.
5843         * elf32-s390.c: Likewise.
5844         * elf32-sh.c: Likewise.
5845         * elf32-sparc.c: Likewise.
5846         * elf32-vax.c: Likewise.
5847         * elf32-xtensa.c: Likewise.
5848         * elf64-alpha.c: Likewise.
5849         * elf64-hppa.c: Likewise.
5850         * elf64-ppc.c: Likewise.
5851         * elf64-s390.c: Likewise.
5852         * elf64-sh64.c: Likewise.
5853         * elf64-sparc.c: Likewise.
5854         * elf64-x86-64.c: Likewise.
5855         * elfxx-ia64.c: Likewise.
5856         * elfxx-mips.c: Likewise.
5857         * elflink.c: Likewise.  Also u.elf_hash_value.
5858         (elf_gc_propagate_vtable_entries_used): Update for h->vtable
5859         indirection.
5860         (elf_gc_smash_unused_vtentry_relocs): Likewise.
5861         (bfd_elf_gc_record_vtinherit): Alloc vtable.
5862         (bfd_elf_gc_record_vtentry): Likewise.
5863         * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
5864
5865 2004-09-17  Alan Modra  <[email protected]>
5866
5867         * Makefile.am: Run "make dep-am".
5868         * Makefile.in: Regenerate.
5869         * bfd-in2.h: Regenerate.
5870         * po/SRC-POTFILES.in: Regenerate.
5871         * po/bfd.pot: Regenerate.
5872
5873 2004-09-16  Alan Modra  <[email protected]>
5874
5875         * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
5876         with bitfields.  Make "type" and "other" bitfields too.
5877         (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
5878         ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
5879         ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
5880         ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
5881         ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
5882         ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
5883         ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
5884         (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
5885         * elf-hppa.h: Update all uses of elf_link_hash_flags.
5886         * elf-m10300.c: Likewise.
5887         * elf.c: Likewise.
5888         * elf32-arm.h: Likewise.
5889         * elf32-cris.c: Likewise.
5890         * elf32-frv.c: Likewise.
5891         * elf32-hppa.c: Likewise.
5892         * elf32-i370.c: Likewise.
5893         * elf32-i386.c: Likewise.
5894         * elf32-m32r.c: Likewise.
5895         * elf32-m68k.c: Likewise.
5896         * elf32-ppc.c: Likewise.
5897         * elf32-s390.c: Likewise.
5898         * elf32-sh-symbian.c: Likewise.
5899         * elf32-sh.c: Likewise.
5900         * elf32-sh64.c: Likewise.
5901         * elf32-sparc.c: Likewise.
5902         * elf32-vax.c: Likewise.
5903         * elf32-xtensa.c: Likewise.
5904         * elf64-alpha.c: Likewise.
5905         * elf64-hppa.c: Likewise.
5906         * elf64-ppc.c: Likewise.
5907         * elf64-s390.c: Likewise.
5908         * elf64-sh64.c: Likewise.
5909         * elf64-sparc.c: Likewise.
5910         * elf64-x86-64.c: Likewise.
5911         * elflink.c: Likewise.
5912         * elfxx-ia64.c: Likewise.
5913         * elfxx-mips.c: Likewise.
5914         * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
5915         * configure: Regenerate.
5916         * aclocal.m4: Regenerate.
5917
5918 2004-09-16  Alan Modra  <[email protected]>
5919
5920         * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
5921         around uses of R_ARM_TARGET1.
5922         (elf32_arm_check_relocs): Likewise.
5923
5924 2004-09-13  Paul Brook  <[email protected]>
5925
5926         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
5927         prototype.
5928         * bfd-in2.h: Regenerate.
5929         * libbfd.h: Regenerate.
5930         * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
5931         (elf32_arm_link_hash_table_create): Set target1_is_rel.
5932         (bfd_elf32_arm_process_before_allocation): Ditto.
5933         (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
5934         (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
5935         * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
5936         * reloc.c: Ditto.
5937
5938 2004-09-10  Joel Brobecker  <[email protected]>
5939
5940         * hpux-core.c (thread_section_p): New function.
5941         (hpux_core_core_file_p): Fix computation of offset in call
5942         to bfd_seek. Create a ".reg" section from an arbitrary
5943         ".reg/<id>" section if none was created after having read
5944         all sections.
5945
5946 2004-09-11  Andreas Schwab  <[email protected]>
5947
5948         * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
5949         * aclocal.m4: Rebuild.
5950         * configure: Rebuild.
5951
5952 2004-09-10  Joel Brobecker  <[email protected]>
5953
5954         * section.c (bfd_sections_find_if): Fix parameter name in
5955         comment to match code.
5956
5957 2004-09-10  Alan Modra  <[email protected]>
5958
5959         * elf.c  (assign_file_positions_except_relocs): Assign relocs
5960         stored in a bfd section.
5961
5962 2004-09-08  Hans-Peter Nilsson  <[email protected]>
5963
5964         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
5965         h->gotplt_refcount to 0, not -1.
5966
5967 2004-09-07  Hans-Peter Nilsson  <[email protected]>
5968
5969         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
5970         case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
5971         symname.
5972         (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
5973         handle symbol visibility here.
5974
5975 2004-09-07  Alan Modra  <[email protected]>
5976
5977         * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
5978         (is_ppc64_elf_target): Rename from is_ppc64_target.  Update all
5979         callers.
5980         (ppc_stub_name): Remove trailing "+0" on stub name.
5981         (create_linkage_sections): Create relocations for
5982         branch lookup table when --emit-relocs as well as when --shared.
5983         (ppc_build_one_stub): Emit relocs for long branch stubs.  Adjust
5984         relbrlt test.  For --emit-stub-syms, always output a sym even when
5985         one already exists on a plt call stub.  Put stub type in the stub
5986         symbol name.
5987         (ppc_size_one_stub): Size long branch stub relocs.  Adjust relbrlt
5988         test.
5989         (ppc64_elf_size_stubs): Count global sym stubs added.  Zero
5990         reloc_count in stub sections.  Adjust relbrlt test.
5991         (ppc64_elf_build_stubs): Adjust relbrlt test.  Tweak stats output.
5992         * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
5993         (elf_link_input_bfd): Ignore symbol index zero relocs when checking
5994         for relocs against discarded symbols.  Fix comments.
5995
5996 2004-09-06  Mark Mitchell  <[email protected]>
5997
5998         * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
5999         * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
6000         from ...
6001         (map_sections_to_segments): ... here.  Use it.  Assign a file
6002         position to the .dynamic section if it is not loadable, but part
6003         of the PT_DYNAMIC segment.
6004         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
6005         offsets, not VMAs, for the BPABI.  Do not fill in the header in
6006         the .got.plt section for the BPABI.
6007         * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
6008         PT_DYNAMIC segment.
6009         (elf_backend_want_got_plt): Define to zero for Symbian OS.
6010
6011 2004-09-06  Nick Clifton  <[email protected]>
6012
6013         * elflink.c (elf_link_add_object_symbols): Set the error code to
6014         bfd_error_wrong_format when the input format does not match the
6015         output format.
6016
6017 2004-09-06  Alan Modra  <[email protected]>
6018
6019         * elf64-ppc.c (is_ppc64_target): New function, extracted from..
6020         (ppc64_elf_check_directives): ..here.
6021         (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
6022         before accessing ppc64_elf_tdata.
6023         (ppc64_elf_finish_dynamic_sections): And here too.
6024
6025 2004-09-04  Alan Modra  <[email protected]>
6026
6027         * bfd.c (_bfd_default_error_handler): Correct loop exit.
6028
6029 2004-09-03  Mark Mitchell  <[email protected]>
6030
6031         * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
6032         * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
6033         (bfd_elf32_littlearm_symbian_vec): Likewise.
6034         * configure: Regenerated.
6035         * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
6036         * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
6037         (PLT_ENTRY_SIZE): Likewise.
6038         (bfd_vma_elf32_arm_symbian_plt_entry): New
6039         variable.
6040         (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
6041         and symbian_p.
6042         (create_got_section): Don't create sections when generating BPABI
6043         objects.
6044         (elf32_arm_create_dynamic_sections): Tidy.
6045         (elf32_arm_link_hash_table_create): Set plt_header_size,
6046         plt_entry_size, and symbian_p.
6047         (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
6048         generating BPABI objects.
6049         (allocate_dynrelocs): Use htab->plt_header_size, not
6050         PLT_HEADER_SIZE.  Do not add to .got.plt when
6051         generating BPABI objects.
6052         (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
6053         * elfarm-nabi.c: Add SymbianOS target vectors.
6054         * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
6055         (_bfd_elf_link_create_dynamic_sections): Likewise.
6056         * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
6057         (elfNN_bed): Use it.
6058         * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
6059         (bfd_elf32_littlearm_symbian_vec): Likewise.
6060         (_bfd_target_vector): Add them.
6061
6062 2004-09-03  Nick Clifton  <[email protected]>
6063
6064         PR 360
6065         * coffcode.h (handle_COMDAT): Replace abort with an warning
6066         message and allow the scan to continue.
6067
6068 2004-09-02  Alan Modra  <[email protected]>
6069
6070         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
6071         in when reading relocs, not our sorted syms.  Remove unnecessary
6072         var.
6073
6074 2004-08-31  Eric Botcazou  <[email protected]>
6075
6076         * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
6077
6078 2004-08-30  Nathanael Nerode  <[email protected]>
6079
6080         * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
6081         Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
6082         replace uses of *_alias with *_noncanonical.
6083         * aclocal.m4: Rebuild with aclocal 1.4p6.
6084         * Makefile.in: Rebuild with automake 1.4p6.
6085         * doc/Makefile.in: Rebuild with automake 1.4p6.
6086         * configure.in: Autoupdate with autoupdate 2.59.
6087         * config.in: Regenerate with autoheader 2.59.
6088         * configure: Regnerate with autoconf 2.59.
6089
6090 2004-08-28  Alan Modra  <[email protected]>
6091
6092         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
6093         symbol pointer arrays before modifying.
6094
6095 2004-08-28  Alan Modra  <[email protected]>
6096
6097         * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
6098         * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
6099         * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
6100         * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
6101         * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
6102         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
6103         Use both symbol tables on non-relocatable objects.  Use a common
6104         error exit.  Fix "mid" warning.
6105         * libbfd.h: Regenerate.
6106         * bfd-in2.h: Regenerate.
6107
6108 2004-08-28  Alan Modra  <[email protected]>
6109
6110         * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
6111         object file.
6112         (struct sfpr_def_parms): Save some space.
6113         (sfpr_define): Here too.
6114
6115         * elf64-ppc.c (compare_symbols): Put section syms first.
6116         (sym_exists_at): New function.
6117         (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
6118         points only for relocatable files.  Use .opd section contents
6119         otherwise.  Generally clean up the code.
6120
6121 2004-08-27  Alan Modra  <[email protected]>
6122
6123         * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
6124         LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
6125         (struct sfpr_def_parms): New.
6126         (sfpr_define): New function.
6127         (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
6128         (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
6129         (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
6130         (savefpr1_tail, restfpr1_tail): New functions.
6131         (savevr, savevr_tail, restvr, restvr_tail): New functions.
6132         (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
6133         (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
6134         code.  Define all ABI mandated _save and _rest functions.
6135
6136 2004-08-26  Paul Brook  <[email protected]>
6137
6138         * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
6139
6140 2004-08-26  Alan Modra  <[email protected]>
6141
6142         * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
6143         TRUE or FALSE.
6144
6145 2004-08-26  Alan Modra  <[email protected]>
6146
6147         * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
6148         that pcrel correction is applied for R_386_PC32.
6149
6150 2004-08-25  Alan Modra  <[email protected]>
6151
6152         * elf32-i386.c (elf_i386_relocate_section): Zero section contents
6153         for R_386_32 and R_386_PC32 relocs against symbols defined in
6154         discarded sections.
6155
6156 2004-08-25  Dmitry Diky  <[email protected]>
6157
6158         * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
6159         Add new relocations.
6160         * bfd-in2.h: Regenerate.
6161         * libbfd.h: Regenerate.
6162         * elf32-msp430.c: Clean-up code.
6163         (elf_msp430_howto_table): Add new relocation entries.
6164         (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
6165         (msp430_elf_relax_section): New function.
6166         (msp430_elf_relax_delete_bytes): New function.
6167         (msp430_elf_symbol_address_p): New function.
6168
6169 2004-08-24  Kazuhiro Inaoka  <[email protected]>
6170
6171         * elf32-m32r.c (m32r_elf_relocate_section): Handle
6172         R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
6173
6174 2004-08-20  Daniel Jacobowitz  <[email protected]>
6175
6176         * elflink.c (_bfd_elf_section_already_linked): Handle
6177         SEC_LINK_DUPLICATES_SAME_CONTENTS.
6178
6179 2004-08-19  Mark Mitchell  <[email protected]>
6180
6181         * config.bfd (arm*-*-symbianelf*): New target.
6182         (arm*-*-eabi*): Likewise.
6183
6184 2004-08-19  Alan Modra  <[email protected]>
6185
6186         * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
6187         "struct ppc_link_hash_entry *".
6188         (ppc64_elf_relocate_section): Ditto for type of h.  Introduce h_elf
6189         to satisfy RELOC_FOR_GLOBAL_SYMBOL.
6190
6191 2004-08-19  Jakub Jelinek  <[email protected]>
6192
6193         * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
6194         entries (where fd_aux overlaps next entry's fd_func).
6195         Add non_overlapping argument, use it.
6196         (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
6197         ppc64_elf_size_stubs, ppc64_elf_relocate_section,
6198         ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
6199         as indexes into opd_sym_map/opd_adjust array.
6200         * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
6201
6202 2004-08-18  Alan Modra  <[email protected]>
6203
6204         * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
6205         if we can look up their function descriptor in a regular file.
6206
6207 2004-08-18  Nick Clifton  <[email protected]>
6208
6209         PR 324
6210         * cofflink.c (coff_link_add_symbols): Check that the comdat
6211         pointer in the coff_section_data structure has been initialised
6212         before using it.
6213
6214 2004-08-18  Alan Modra  <[email protected]>
6215
6216         PR 338
6217         * elflink.c (bfd_elf_record_link_assignment): Add comment about
6218         changing bfd_link_hash_undefined to bfd_link_hash_new.
6219
6220 2004-08-17  Jakub Jelinek  <[email protected]>
6221
6222         * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
6223         if not yet defined.
6224         * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
6225         (synthetic_opd, synthetic_relocatable): New variables.
6226         (compare_symbols, compare_relocs): New helper routines.
6227         (ppc64_elf_get_synthetic_symtab): New function.
6228         * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
6229         to relsyms.
6230         * bfd-in2.h: Regenerated.
6231         * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
6232         to relsyms.  Return 0 if abfd is relocatable.
6233
6234 2004-08-17  Alan Modra  <[email protected]>
6235
6236         * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
6237
6238 2004-08-17  Nick Clifton  <[email protected]>
6239
6240         * (is_arm_mapping_symbol_name): New function - return true
6241         when a symbol name matches the requirements for an ARM mapping
6242         symbol name.
6243         (arm_elf_find_function): New function based on
6244         elf_find_function in elf.c but skipping ARM mapping symbols
6245         and including thumb function symbols.
6246         (elf32_arm_find_nearest_line): Use arm_elf_find_function.
6247         (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
6248
6249 2004-08-17  Alan Modra  <[email protected]>
6250
6251         * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
6252         (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
6253         (ppc64_elf_brtaken_reloc): Here too.
6254
6255 2004-08-17  Alan Modra  <[email protected]>
6256
6257         * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
6258         symbol visibility.
6259         (ppc64_elf_check_directives): Check that we have the right hash
6260         table before proceeding.
6261
6262 2004-08-17  Alan Modra  <[email protected]>
6263
6264         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
6265         (adjust_opd_syms): Attach opd syms for deleted entries to one of
6266         the sections that will be discarded.
6267
6268 2004-08-16  Alan Modra  <[email protected]>
6269
6270         * elflink.c (elf_section_complain_discarded): Ignore .fixup.
6271
6272 2004-08-16  Alan Modra  <[email protected]>
6273
6274         * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
6275         free space available.
6276
6277 2004-08-16  Alan Modra  <[email protected]>
6278
6279         * pdp11.c (struct pdp11_aout_reloc_external): Delete.  Replace
6280         occurrences with bfd_byte * thoughout file.
6281
6282         * coff-rs6000.c (do_shared_object_padding): Warning fix.
6283         (xcoff_write_armap_big): Likewise.
6284         (xcoff_write_archive_contents_old): Likewise.
6285         (xcoff_write_archive_contents_big): Likewise.
6286
6287         * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
6288
6289 2004-08-13  Nick Clifton  <[email protected]>
6290
6291         * elf32-arm.h: Convert to ISO C90.
6292
6293 2004-08-13  Alan Modra  <[email protected]>
6294
6295         PR 293
6296         * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
6297         zero the plt field.
6298
6299 2004-08-13  Alan Modra  <[email protected]>
6300
6301         * bfd.c (_bfd_default_error_handler): Handle %A and %B.
6302         (bfd_archive_filename, bfd_get_section_ident): Delete.
6303         * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
6304         bfd_archive_filename.
6305         * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
6306         to warn about symbols in discarded sections.  Use _bfd_error_handler.
6307         * aout-adobe.c (aout_adobe_callback): See below.
6308         * aout-cris.c (swap_ext_reloc_in): ..
6309         * coff-arm.c (find_thumb_glue, find_arm_glue,
6310         coff_arm_relocate_section, bfd_arm_process_before_allocation,
6311         coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
6312         coff_arm_copy_private_bfd_data): ..
6313         * coff-i860.c (i860_reloc_processing): ..
6314         * coff-mcore.c (mcore_coff_unsupported_reloc,
6315         coff_mcore_relocate_section): ..
6316         * coff-ppc.c (coff_ppc_relocate_section): ..
6317         * coff-rs6000.c (xcoff_create_csect_from_smclas
6318         * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6319         sh_swap_insns, sh_relocate_section): ..
6320         * coff-tic54x.c (tic54x_reloc_processing): ..
6321         * coff-tic80.c (coff_tic80_relocate_section): ..
6322         * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
6323         * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
6324         coff_slurp_symbol_table, coff_classify_symbol,
6325         coff_slurp_reloc_table): ..
6326         * coffgen.c (_bfd_coff_read_string_table): ..
6327         * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
6328         _bfd_coff_generic_relocate_section): ..
6329         * cpu-arm.c (bfd_arm_merge_machines): ..
6330         * cpu-sh.c (sh_merge_bfd_arch): ..
6331         * elf-hppa.h (elf_hppa_relocate_section): ..
6332         * elf.c (bfd_elf_string_from_elf_section, setup_group,
6333         _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
6334         assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
6335         copy_private_bfd_data, _bfd_elf_validate_reloc): ..
6336         * elf32-arm.h (find_thumb_glue, find_arm_glue,
6337         bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
6338         elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
6339         elf32_arm_relocate_section, elf32_arm_set_private_flags,
6340         elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
6341         * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
6342         cris_elf_merge_private_bfd_data
6343         * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
6344         * elf32-gen.c (elf32_generic_link_add_symbols): ..
6345         * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
6346         elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
6347         elf32_hppa_relocate_section): ..
6348         * elf32-i370.c (i370_elf_merge_private_bfd_data,
6349         i370_elf_check_relocs, i370_elf_relocate_section): ..
6350         * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
6351         elf_i386_relocate_section): ..
6352         * elf32-m32r.c (m32r_elf_relocate_section,
6353         m32r_elf_merge_private_bfd_data): ..
6354         * elf32-m68hc1x.c (m68hc12_add_stub,
6355         _bfd_m68hc11_elf_merge_private_bfd_data): ..
6356         * elf32-m68k.c (elf_m68k_relocate_section): ..
6357         * elf32-mcore.c (mcore_elf_unsupported_reloc,
6358         mcore_elf_relocate_section): ..
6359         * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
6360         ppc_elf_check_relocs, ppc_elf_relocate_section,
6361         ppc_elf_begin_write_processing): ..
6362         * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6363         elf_s390_relocate_section): ..
6364         * elf32-sh-symbian.c (sh_symbian_import_as,
6365         sh_symbian_process_embedded_commands,
6366         sh_symbian_relocate_section): ..
6367         * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
6368         sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
6369         sh_elf_merge_private_data): ..
6370         * elf32-sparc.c (elf32_sparc_check_relocs,
6371         elf32_sparc_relocate_section,
6372         elf32_sparc_merge_private_bfd_data): ..
6373         * elf32-v850.c (v850_elf_check_relocs,
6374         v850_elf_merge_private_bfd_data): ..
6375         * elf32-xtensa.c (elf_xtensa_check_relocs,
6376         elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
6377         * elf64-alpha.c (elf64_alpha_relax_with_lituse,
6378         elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
6379         elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
6380         * elf64-gen.c (elf64_generic_link_add_symbols): ..
6381         * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
6382         ppc64_elf_check_relocs, ppc64_elf_edit_opd,
6383         ppc64_elf_relocate_section): ..
6384         * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6385         elf_s390_relocate_section): ..
6386         * elf64-sh64.c (sh_elf64_relocate_section): ..
6387         * elf64-sparc.c (sparc64_elf_check_relocs,
6388         sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
6389         sparc64_elf_merge_private_bfd_data): ..
6390         * elf64-x86-64.c (elf64_x86_64_check_relocs,
6391         elf64_x86_64_relocate_section): ..
6392         * elflink.c (_bfd_elf_add_default_symbol,
6393         _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
6394         _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
6395         bfd_elf_size_dynamic_sections, elf_link_output_extsym,
6396         elf_get_linked_section_vma, elf_fixup_link_order,
6397         bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
6398         bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
6399         * elfxx-ia64.c (elfNN_ia64_relax_section,
6400         elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
6401         * elfxx-mips.c (mips_elf_perform_relocation,
6402         _bfd_mips_elf_check_relocs,
6403         _bfd_mips_elf_merge_private_bfd_data): ..
6404         * ieee.c (ieee_slurp_external_symbols): ..
6405         * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
6406         * libbfd.c (_bfd_generic_verify_endian_match): ..
6407         * linker.c (_bfd_generic_link_add_one_symbol,
6408         _bfd_generic_section_already_linked): ..
6409         * pdp11.c (translate_to_native_sym_flags): ..
6410         * pe-mips.c (coff_pe_mips_relocate_section): ..
6411         * peicode.h (pe_ILF_build_a_bfd): ..
6412         * srec.c (srec_bad_byte): ..
6413         * stabs.c (_bfd_link_section_stabs): ..
6414         * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
6415         Replace all uses of bfd_archive_filename and bfd_get_section_ident
6416         with corresponding %B and %A in _bfd_error_handler format string.
6417         Replace occurrences of "fprintf (stderr," with _bfd_error_handler
6418         calls to use %A and %B.  Fix "against symbol .. from section" and
6419         similar error messages.  Combine multiple _bfd_error_handler calls
6420         where they were separated due to bfd_archive_filename deficiencies.
6421         * bfd-in2.h: Regenerate.
6422
6423 2004-08-12  H.J. Lu  <[email protected]>
6424
6425         * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
6426         relocation.
6427
6428 2004-08-10  Alan Modra  <[email protected]>
6429
6430         * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
6431         (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
6432         Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
6433         Add twiddled_syms.
6434         (link_hash_newfunc): Init was_undefined.
6435         (add_symbol_adjust): Don't set undefined dot symbols to defweak;
6436         Use undefweak instead.
6437         (ppc64_elf_check_directives): Fix undefs chain.
6438         (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
6439         references.
6440         (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
6441         (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
6442         * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
6443
6444 2004-08-09  Jakub Jelinek  <[email protected]>
6445
6446         * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
6447         error, test input_section flags rather than sec.
6448
6449 2004-08-09  Alan Modra  <[email protected]>
6450
6451         * elf-bfd.h (struct elf_backend_data): Add
6452         elf_backend_archive_symbol_lookup.
6453         (_bfd_elf_archive_symbol_lookup): Declare.
6454         * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
6455         (elf_link_add_archive_symbols): ..extracted from here.  Call the
6456         backend version.
6457         * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
6458         (elfNN_bed): Init new field.
6459         * elf64-ppc.c (elf_backend_check_directives): Define.
6460         (elf_backend_archive_symbol_lookup): Define.
6461         (struct ppc_link_hash_table): Add tls_get_add_fd.  Make tls_get_add
6462         a ppc_link_hash_entry pointer.
6463         (get_fdh): Move.
6464         (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
6465         (add_symbol_adjust, ppc64_elf_check_directives): New functions.
6466         (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
6467         ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
6468         ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
6469         ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
6470         ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
6471         descriptor symbols.
6472
6473 2004-08-09  Alan Modra  <[email protected]>
6474
6475         * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
6476         (ppc64_elf_add_symbol_hook): Test for NULL section.
6477         (get_sym_h): Formatting.
6478         (ppc64_elf_size_stubs): Include reloc addend in value stored as
6479         stub target_value.
6480
6481         * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
6482         long branch stubs with code handling plt and r2off branch stubs.
6483
6484 2004-08-09  Alan Modra  <[email protected]>
6485
6486         * elf-bfd.h (_bfd_elf_gc_mark): Declare.
6487         * elflink.c (elf_link_input_bfd): Formatting.
6488         (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global.  Adjust
6489         all callers.
6490         * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
6491         (link_hash_newfunc): Don't set it.
6492         (ppc64_elf_copy_indirect_symbol): Nor copy it.
6493         (ppc64_elf_mark_entry_syms): Delete.
6494         (ppc64_elf_gc_mark_hook): Mark entry syms here.  Also mark opd
6495         sections.  Use get_opd_info.
6496         * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
6497
6498 2004-08-09  Alan Modra  <[email protected]>
6499
6500         * elf64-ppc.c (adjust_opd_syms): Fix merge error.
6501
6502         * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
6503         (func_desc_adjust): Don't set have_undefweak.
6504         (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
6505         (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
6506
6507         * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
6508         "struct ppc_link_hash_entry *".  Adjust all references.
6509         (ppc64_elf_hide_symbol): Correct a comment.
6510
6511         * elf64-ppc.c (get_opd_info): New function.
6512         (adjust_opd_syms): Use get_opd_info.  Define removed symbols as zero.
6513         (ppc64_elf_edit_opd): Use get_opd_info.  Check that sym has a dot
6514         before calling get_fdh.  Test fdh rather than h before dereferencing
6515         fdh.  Mark removed symbols in opd_adjust.
6516         (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
6517         (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
6518         opd symbols.
6519         (ppc64_elf_output_symbol_hook): Likewise.
6520
6521 2004-08-06  Paul Brook  <[email protected]>
6522
6523         * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
6524         (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
6525         BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
6526         * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
6527         and BFD_RELOC_ARM_SBREL32.
6528         * bfd-in2.h, bbfd.h: Regenerate.
6529
6530 2004-08-01  Thiemo Seufer  <[email protected]>
6531
6532         * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
6533         the dynamic link symbol actually in use.
6534
6535 2004-08-01  Stephane Carrez  <[email protected]>
6536
6537         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
6538
6539 2004-07-31  Joel Brobecker  <[email protected]>
6540             Thiemo Seufer  <[email protected]>
6541
6542         * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
6543         SHN_MIPS_TEXT and SHN_MIPS_DATA.
6544
6545 2004-07-30  H.J. Lu  <[email protected]>
6546             Nick Clifton  <[email protected]>
6547
6548         PR 290
6549         * bfd.c (_bfd_default_error_handler): Make it global.
6550
6551         * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
6552
6553         * elf.c (assign_section_numbers): Cope gracefully with sections
6554         which have SHF_LINK_ORDER set but no sh_link set up.
6555         * elflink.c (elf_get_linked_section_vma): Likewise.
6556
6557         * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
6558         it to NULL.
6559
6560         * elfxx-target.h (elf_backend_link_order_error_handler): New.
6561         Set it to _bfd_default_error_handler.
6562         (elfNN_bed): Add elf_backend_link_order_error_handler.
6563
6564         * libbfd-in.h (_bfd_default_error_handler): New.
6565
6566         * libbfd.h: Regenerated.
6567
6568 2004-07-30  Jakub Jelinek  <[email protected]>
6569
6570         * archures.c (bfd_mach_sparc_64bit_p): Define.
6571         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
6572         * bfd-in2.h: Rebuilt.
6573
6574 2004-07-29  Alexandre Oliva  <[email protected]>
6575
6576         Introduce SH2a support.
6577         2004-02-18  Corinna Vinschen  <[email protected]>
6578         * archures.c (bfd_mach_sh2a_nofpu): New.
6579         * bfd-in2.h: Rebuilt.
6580         * cpu-sh.c (SH2A_NOFPU_NEXT): New.
6581         (arch_info_struct): Add sh2a_nofpu.
6582         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
6583         2003-12-29  DJ Delorie  <[email protected]>
6584         * reloc.c: Add relocs for sh2a.
6585         * bfd-in2.h: Regenerate.
6586         * libbfd.hh: Regenerate.
6587         2003-12-01  Michael Snyder  <[email protected]>
6588         * archures.c (bfd_mach_sh2a): New.
6589         * bfd-in2.h: Rebuilt.
6590         * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
6591         (SH2A_NEXT): New.
6592         (arch_info_struct): Add sh2a.
6593         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
6594
6595 2004-07-28  Nick Clifton  <[email protected]>
6596             John David Anglin  <[email protected]>
6597
6598         PR 273
6599         * som.c (setup_sections): Improve estimation of space sizes in
6600         relocatable objects.
6601
6602 2004-07-27  Jason Thorpe  <[email protected]>
6603         * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
6604         bfd_elf32_hppa_nbsd_vec.  Add bfd_elf32_hppa_linux_vec
6605         to targ_selvecs.
6606         * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
6607         * configure: Regenerate.
6608         * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
6609         case that accepts OSABI=NetBSD and OSABI=SysV.
6610         (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
6611         the base of .got or .data (if .got does not exist).
6612         (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
6613         set OSABI=NetBSD.
6614         (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
6615         (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
6616         * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
6617         (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
6618
6619 2004-07-27  H.J. Lu  <[email protected]>
6620
6621         PR 161/251
6622         * elf-bfd.h (bfd_elf_section_data): Add sec_group.
6623         (elf_sec_group): Defined.
6624         (bfd_elf_match_symbols_in_sections): New prototype.
6625         (_bfd_elf_setup_group_pointers): Likewise.
6626
6627         * elf.c (bfd_elf_discard_group): Abort.
6628         (bfd_elf_set_group_contents): Also include relocation sections.
6629         Remove zero-fill for ld -r.
6630         (_bfd_elf_setup_group_pointers): New function.
6631         (elf_sort_elf_symbol): Likewise.
6632         (elf_sym_name_compare): Likewise.
6633         (bfd_elf_match_symbols_in_sections): Likewise.
6634
6635         * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
6636
6637         * elflink.c (match_group_member): New.
6638         (elf_link_input_bfd): Check group member for discarded section.
6639         (try_match_symbols_in_sections): New function.
6640         (already_linked): Likewise.
6641         (_bfd_elf_section_already_linked): Support mixing comdat group
6642         and linkonce section.
6643
6644         * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
6645         * linker.c (bfd_section_already_linked_table_traverse): New.
6646
6647         * libbfd.h: Regenerated.
6648
6649 2004-07-27  Tomer Levi  <[email protected]>
6650
6651         * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
6652         BFD_RELOC_CRX_SWITCH32.
6653         * bfd-in2.h: Regenerate.
6654         * libbfd.h: Regenerate.
6655         * elf32-crx.c: Support relocation/relaxation of
6656         BFD_RELOC_CRX_SWITCH* types.
6657
6658 2004-07-27  Alan Modra  <[email protected]>
6659
6660         * elf64-ppc.c: Correct "Linker stubs" comment.
6661
6662 2004-07-26  H.J. Lu  <[email protected]>
6663
6664         * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
6665         linked-to section.
6666         (elf_linked_to_section): New.
6667
6668         * elf.c (assign_section_numbers): Set up sh_link for
6669         SHF_LINK_ORDER.
6670
6671         * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
6672         to sh_link for SHT_IA_64_UNWIND sections.
6673
6674 2004-07-22  H.J. Lu  <[email protected]>
6675
6676         * elflink.c (elf_fixup_link_order): Add _() to error message.
6677
6678 2004-07-22  H.J. Lu  <[email protected]>
6679
6680         * elflink.c (elf_fixup_link_order): Issue a warning and flag
6681         an error if failed.
6682
6683 2004-07-21  H.J. Lu  <[email protected]>
6684
6685         * aout-adobe.c (aout_32_section_already_linked): Defined.
6686         * aout-target.h (MY_section_already_linked): Likewise.
6687         * aout-tic30.c (MY_section_already_linked): Likewise.
6688         * binary.c (binary_section_already_linked): Likewise.
6689         * bout.c (b_out_section_already_linked): Likewise.
6690         * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
6691         * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
6692         * coffcode.h (coff_section_already_linked): Likewise.
6693         * i386msdos.c (msdos_section_already_linked): Likewise.
6694         * i386os9k.c (os9k_section_already_linked): Likewise.
6695         * ieee.c (ieee_section_already_linked): Likewise.
6696         * ihex.c (ihex_section_already_linked): Likewise.
6697         * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
6698         * mmo.c (mmo_section_already_linked): Likewise.
6699         * nlm-target.h (nlm_section_already_linked): Likewise.
6700         * oasys.c (oasys_section_already_linked): Likewise.
6701         * pef.c (bfd_pef_section_already_linked): Likewise.
6702         * ppcboot.c (ppcboot_section_already_linked): Likewise.
6703         * som.c (som_bfd_discard_group): Likewise.
6704         * srec.c (srec_section_already_linked): Likewise.
6705         * tekhex.c (tekhex_section_already_linked): Likewise.
6706         * versados.c (versados_section_already_linked): Likewise.
6707         * vms.c (vms_section_already_linked): Likewise.
6708         * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
6709         * xsym.c (bfd_sym_section_already_linked): Likewise.
6710
6711         * bfd-in.h (bfd_section_already_linked_table_init): New.
6712         (bfd_section_already_linked_table_free): Likewise.
6713
6714         * coff-rs6000.c (rs6000coff_vec): Add
6715         _bfd_generic_section_already_linked.
6716         (pmac_xcoff_vec): Likewise.
6717         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6718         (aix5coff64_vec): Likewise.
6719
6720         * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
6721         * elflink.c (_bfd_elf_section_already_linked): New function.
6722
6723         * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
6724
6725         * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
6726         (_bfd_generic_section_already_linked): New.
6727         (bfd_section_already_linked_hash_entry): Likewise.
6728         (bfd_section_already_linked): Likewise.
6729         (bfd_section_already_linked_table_lookup): Likewise.
6730         (bfd_section_already_linked_table_insert): Likewise.
6731
6732         * linker.c (bfd_section_already_linked): New.
6733         (_bfd_section_already_linked_table): Likewise.
6734         (bfd_section_already_linked_table_lookup): Likewise.
6735         (bfd_section_already_linked_table_insert): Likewise.
6736         (already_linked_newfunc): Likewise.
6737         (bfd_section_already_linked_table_init): Likewise.
6738         (bfd_section_already_linked_table_free): Likewise.
6739         (_bfd_generic_section_already_linked): Likewise.
6740
6741         * section.c (bfd_section): Remove comdat.
6742         (bfd_comdat_info): Moved to ...
6743         * bfd-in.h (coff_comdat_info): Here.
6744         (bfd_coff_get_comdat_section): New.
6745         * coffgen.c (bfd_coff_get_comdat_section): Likewise.
6746         * libcoff-in.h (coff_section_tdata): Add comdat.
6747         * coffcode.h (handle_COMDAT): Updated.
6748         * cofflink.c (coff_link_add_symbols): Likewise.
6749         * ecoff.c (bfd_debug_section): Likewise.
6750
6751         * targets.c (bfd_target): Add _section_already_linked.
6752         (BFD_JUMP_TABLE_LINK): Updated.
6753
6754         * bfd-in2.h: Regenerated.
6755         * libbfd.h: Likewise.
6756         * libcoff.h: Likewise.
6757
6758 2003-07-21  Paul Brook  <[email protected]>
6759
6760         * elflink.c (elf_get_linked_section_vma, compare_link_order,
6761         elf_fixup_link_order): New functions.
6762         (bfd_elf_final_link): Call elf_fixup_link_order.
6763
6764 2004-07-21  Alexandre Oliva  <[email protected]>
6765
6766         * elf-bfd.h (ELF_COMMON_DEF_P): New.
6767         * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
6768         common definitions.
6769         * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
6770         _bfd_elf_symbol_refs_local_p.
6771         * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
6772         symbols.
6773
6774 2004-07-19  H.J. Lu  <[email protected]>
6775
6776         * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
6777         DYN_NO_NEEDED.
6778         (bfd_elf_get_dyn_lib_class): New prototype.
6779         * elf.c (bfd_elf_get_dyn_lib_class): New function.
6780
6781         * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
6782         DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
6783         entry is needed. Issue an error if a DT_NEEDED entry is needed
6784         for a file marked DYN_NO_NEEDED.
6785         (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
6786         for DT_NEEDED tags.
6787
6788         * bfd-in2.h: Regenerated.
6789
6790 2004-07-14  John David Anglin  <[email protected]>
6791
6792         * elflink.c (elf_section_complain_discarded): Don't complain in
6793         .PARISC.unwind.
6794
6795 2004-07-10  James E Wilson  <[email protected]>
6796
6797         * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
6798         (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
6799         (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
6800         elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
6801         Fix callers.
6802         (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64.  Change
6803         bfd_put_64 to bfd_putl64.
6804         (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
6805
6806 2004-07-09  H.J. Lu  <[email protected]>
6807
6808         PR 240
6809         * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
6810         .init/.fini sections when trying to relax it.
6811
6812 2004-07-09  Jie Zhang  <[email protected]>
6813
6814         * elf.c (assign_file_positions_for_segments): Make sure the
6815         .dynamic section is the first section in the PT_DYNAMIC segment.
6816
6817 2004-07-09  Nick Clifton  <[email protected]>
6818
6819         * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
6820         * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
6821         sh_elf_get_flags_from_mach functions so that they do not conflict
6822         when this target is built with other sh-elf targets.
6823         * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
6824         suppression of this function.
6825         (sh_elf_find_flags): Likewise.
6826
6827 2004-07-07  Tomer Levi  <[email protected]>
6828
6829         * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
6830         (ALL_MACHINES_CFILES): Add cpu-crx.c.
6831         (BFD32_BACKENDS): Add elf32-crx.lo.
6832         (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
6833         (cpu-crx.lo): New target.
6834         (elf32-crx.lo): New target.
6835         * Makefile.in: Regenerate.
6836         * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
6837         (bfd_archures_list): Add bfd_crx_arch.
6838         * bfd-in2.h: Regenerate.
6839         * config.bfd: Handle crx-*-elf*, crx*.
6840         * configure.in: Handle bfd_elf32_crx_vec.
6841         * configure: Regenerate.
6842         * cpu-crx.c: New file.
6843         * elf32-crx.c: Likewise.
6844         * libbfd.h: Regenerate.
6845         * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
6846         BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
6847         BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
6848         BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
6849         BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
6850         BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
6851         * targets.c (bfd_elf32_crx_vec): Declare.
6852         (bfd_target_vector): Add bfd_elf32_crx_vec.
6853
6854 2004-07-06  Nick Clifton  <[email protected]>
6855
6856         * config.bfd: Add sh-symbian-elf target.
6857         * configure.in: Add bfd_elf32_shl_symbian_vec.
6858         * configure: Regenerate.
6859         * elf-bfd.h (struct elf_backend_data): Add new field
6860         'check_directives'.
6861         * elflink.c (elf_link_add_object_symbols): Invoke the
6862         check_directives function, if defined.
6863         * elfxx-target.h: Provide a default, NULL definition for
6864         check_directives.
6865         * targets.c: Add bfd_elf32_shl_symbian_vec.
6866         * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
6867         definition.
6868         (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
6869         * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
6870         (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
6871         not already been defined.
6872         * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
6873         * sh-symbian.c: New file.  Provide functions to support the
6874         * sh-symbian-elf target.
6875         * Makefile.am: Add elf32-sh-symbian.c
6876         * Makefile.in: Regenerate.
6877
6878 2004-07-05  Andrew Stubbs <[email protected]>
6879
6880         * elf32-sh.c: Include ../opcodes/sh-opc.h.
6881         * Makefile.am: Ran make dep-am.
6882         * Makefile.in: Ran make dep-in.
6883
6884 2004-07-03  Aaron W. LaFramboise  <[email protected]>
6885
6886         * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
6887         externals properly.
6888
6889 2004-07-02  Martin Schwidefsky  <[email protected]>
6890
6891         * config.bfd: Add want64 to configuration target s390-*-linux*.
6892
6893 2004-07-01  H.J. Lu  <[email protected]>
6894
6895         * bfd.c (bfd_get_section_ident): New.
6896
6897         * elflink.c (elf_link_read_relocs_from_section): Call
6898         bfd_get_section_ident to identify the section when reporting
6899         error.
6900         (_bfd_elf_link_output_relocs): Likewise.
6901         (elf_link_output_extsym): Likewise.
6902         (elf_link_input_bfd): Likewise.
6903         (bfd_elf_gc_record_vtinherit): Likewise.
6904
6905         * bfd-in2.h: Regenerated.
6906
6907 2004-07-01  Jie Zhang  <[email protected]>
6908             Nick Clifton  <[email protected]>
6909
6910         PR 204
6911         * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
6912         of section symbols to mips_elf_sort_hash_table ().
6913
6914 2004-07-01  Alan Modra  <[email protected]>
6915
6916         * elflink.c (elf_section_ignore_discarded_relocs): Revert last
6917         change.  Comment.
6918         (elf_section_complain_discarded): New function.  Handle
6919         .gcc_except_table too.
6920         (elf_link_input_bfd): Rewrite handling of relocs against symbols
6921         in discarded sections.
6922         * elf-bfd.h (elf_discarded_section): Protect macro arg.
6923
6924 2004-06-30  James E Wilson  <[email protected]>
6925
6926         * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff.  Initialize
6927         to NULL.  Call get_pltoff if NULL and NEED_PLTOFF is true.
6928
6929 2004-06-30  H.J. Lu  <[email protected]>
6930
6931         PR 233
6932         * elflink.c (elf_link_input_bfd): Issue an error for non-debug
6933         local references to discarded sections and report their
6934         locations.
6935
6936 2004-06-30  Alan Modra  <[email protected]>
6937
6938         * elflink.c (elf_section_ignore_discarded_relocs): Don't test
6939         sec_info_type, test section name instead.
6940
6941 2004-06-29  H.J. Lu  <[email protected]>
6942
6943         PR 240
6944         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
6945         in .init/.fini sections.
6946
6947 2004-06-29  Bob Wilson  <[email protected]>
6948
6949         * elf32-xtensa.c (elf_xtensa_relocate_section): Use
6950         bfd_get_section_limit.
6951
6952 2004-06-29  Bob Wilson  <[email protected]>
6953
6954         * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
6955         output section size.
6956
6957 2004-06-29  Alan Modra  <[email protected]>
6958
6959         * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
6960         rawsize.
6961         (mmix_elf_perform_relocation): Adjust for above change.
6962         (mmix_elf_relocate_section): Likewise.
6963         (mmix_elf_relax_section): Likewise.  Use output_section->rawsize.
6964         (mmix_elf_get_section_contents): Delete.
6965         (bfd_elf64_get_section_contents): Delete.
6966         (mmix_elf_relocate_section): Zero stub area.
6967         * linker.c (default_indirect_link_order): Alloc max of section size
6968         and rawsize.
6969         * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
6970         * section.c (bfd_malloc_and_get_section): Likewise.
6971         (struct bfd_section): Update rawsize comment.
6972         * bfd-in2.h: Regenerate.
6973
6974         * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
6975
6976 2004-06-29  Alan Modra  <[email protected]>
6977
6978         * bfd-in.h (bfd_get_section_limit): Define.
6979         * reloc.c (bfd_perform_relocation, bfd_install_relocation)
6980         (_bfd_final_link_relocate): Use bfd_get_section_limit.
6981         * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
6982         * coff-arm.c (coff_arm_relocate_section): Likewise.
6983         * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
6984         * cpu-ns32k.c (do_ns32k_reloc): Likewise.
6985         (bfd_ns32k_final_link_relocate): Likewise.
6986         * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
6987         * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
6988         * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
6989         (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
6990         * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
6991         (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
6992         * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
6993         * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6994         * elf32-or32.c (or32_elf_consth_reloc): Likewise.
6995         * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
6996         * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
6997         * elf32-sh.c (sh_elf_reloc_loop): Likewise.
6998         * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
6999         (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
7000         * elf32-v850.c (v850_elf_reloc): Likewise.
7001         * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
7002         * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
7003         * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
7004         * elf64-mips.c (mips_elf64_gprel32_reloc)
7005         (mips16_gprel_reloc): Likewise.
7006         * elf64-mmix.c (mmix_elf_reloc): Likewise.
7007         * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
7008         * elf64-sparc.c (init_insn_reloc): Likewise.
7009         * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
7010         * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
7011         (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
7012         (_bfd_mips_elf_generic_reloc): Likewise.
7013         * bfd-in2.h: Regenerate.
7014
7015 2004-06-28  Alan Modra  <[email protected]>
7016
7017         * bfd-in.h (struct stab_info): Move from stabs.c.
7018         * stabs.c (struct stab_link_includes_table): Delete.
7019         (stab_link_includes_lookup): Delete.
7020         (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
7021         level of indirection from sinfo parm.
7022         (_bfd_link_section_stabs): Likewise.  Set SEC_LINKER_CREATED on
7023         stabstr section.  Adjust hash table accesses.
7024         * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
7025         alloc.  Adjust stab_info test.
7026         * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
7027         (_bfd_coff_final_link): Adjust stab_info test.
7028         (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
7029         * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
7030         in place.
7031         * libcoff-in.h (struct coff_link_hash_table): Likewise.
7032         * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
7033         * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
7034         stabstr section.  Adjust stab_info test.
7035         * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
7036         (_bfd_write_stab_strings): Adjust prototypes.
7037         * libbfd.h: Regenerate.
7038         * libcoff.h: Regenerate.
7039         * bfd-in2.h: Regenerate.
7040
7041 2004-06-27  Mark Kettenis  <[email protected]>
7042
7043         From Miod Vallat <[email protected]>:
7044         * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
7045
7046 2004-06-26  Alexandre Oliva  <[email protected]>
7047
7048         * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
7049         (struct elf32_mn10300_link_hash_entry): Remove
7050         pcrel_relocs_copied.
7051         (mn10300_elf_check_relocs): Only reserve dynamic relocations for
7052         R_MN10300_32.  Don't adjust pcrel_relocs_copied.
7053         (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
7054         and gotoff relocations if the symbol doesn't bind locally.  Use
7055         _bfd_elf_symbol_refs_local_p to test.  Don't create dynamic
7056         relocation for PCREL32.
7057         (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
7058         to test whether a symbol binds locally.
7059         (elf32_mn10300_link_hash_newfunc): Don't initialize
7060         pcrel_relocs_copied.
7061         (_bfd_mn10300_elf_discard_copies): Delete.
7062         (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
7063
7064 2004-06-26  Mark Kettenis  <[email protected]>
7065
7066         * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
7067
7068 2004-06-25  Joel Brobecker  <[email protected]>
7069
7070         * som.c (som_set_reloc_info): Correct small typo.
7071
7072 2004-06-25  Kazuhiro Inaoka  <[email protected]>
7073
7074         * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
7075         (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
7076         (m32r_elf_gcsweep_hook): Likewise.
7077         (m32r_elf_check_relocs): Likewise.
7078         (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
7079         R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
7080         * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
7081         BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
7082         * bfd-in2.h: Regenerated.
7083         * libbfd.h: Regenerated.
7084
7085 2004-06-24  H.J. Lu  <[email protected]>
7086
7087         * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
7088         relocation symbol.
7089         (elf64_x86_64_relocate_section): Issue an error for
7090         R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
7091         against global symbols when building shared library.
7092
7093 2004-06-24  Alan Modra  <[email protected]>
7094
7095         * section.c (struct sec): Rename "_cooked_size" to "size".
7096         Rename "_raw_size" to "rawsize".
7097         (STD_SECTION): Adjust comments.
7098         (bfd_set_section_size, bfd_get_section_contents): Use size.
7099         (bfd_malloc_and_get_section): New function.
7100         * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
7101         * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
7102         Correctly free reloc and contents memory.
7103         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
7104         and fake CIE now that we can shink section size to zero.
7105         (_bfd_elf_write_section_eh_frame): Likewise..
7106         * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
7107         * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
7108         _bfd_stab_section_offset.  Use _bfd_elf_section_offset.
7109         * stabs.c (_bfd_stab_section_offset_): Remove unused args and
7110         unneeded indirection.
7111         * elf.c (_bfd_elf_section_offset): .. and update call.
7112         * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
7113         * libbfd.h: Regenerate.
7114         * bfd-in2.h: Regenerate.
7115
7116         Replace occurrences of "_raw_size" and "_cooked_size" in most places
7117         with "size".  Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
7118         sections.  Use "rawsize", if non-zero, for bfd_get_section_contents
7119         calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
7120         Similarly use "rawsize", if non-zero, in reloc functions to validate
7121         reloc addresses.  Use new bfd_malloc_and_get_section in most places
7122         where bfd_get_section_contents was called.  Expand all occurrences of
7123         bfd_section_size and bfd_get_section_size.  Rename "raw_size" var in
7124         grok_prstatus and similar functions to "size".
7125         * aix386-core.c (aix386_core_file_p): ..
7126         * aix5ppc-core.c (xcoff64_core_p): ..
7127         * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
7128         aout_adobe_set_section_contents): ..
7129         * aout-target.h (callback): ..
7130         * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
7131         MY_bfd_final_link): ..
7132         * aoutf1.h (sunos4_core_file_p): ..
7133         * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
7134         adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
7135         final_link, aout_link_input_section): ..
7136         * binary.c (binary_object_p, binary_canonicalize_symtab,
7137         binary_set_section_contents): ..
7138         * bout.c (b_out_callback, b_out_write_object_contents,
7139         b_out_set_section_contents, b_out_bfd_relax_section,
7140         b_out_bfd_get_relocated_section_contents): ..
7141         * cisco-core.c (cisco_core_file_validate): ..
7142         * coff-alpha.c (alpha_ecoff_object_p,
7143         alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
7144         * coff-arm.c (coff_arm_relocate_section,
7145         bfd_arm_allocate_interworking_sections): ..
7146         * coff-h8300.c (h8300_reloc16_extra_cases,
7147         h8300_bfd_link_add_symbols): ..
7148         * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
7149         * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
7150         ppc_bfd_coff_final_link): ..
7151         * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
7152         * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
7153         sh_align_loads, sh_coff_get_relocated_section_contents): ..
7154         * coff64-rs6000.c (xcoff64_write_object_contents,
7155         xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
7156         * coffcode.h (coff_compute_section_file_positions,
7157         coff_write_object_contents): ..
7158         * coffgen.c (make_a_section_from_file, coff_write_symbols,
7159         coff_section_symbol, build_debug_section): ..
7160         * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
7161         process_embedded_commands, _bfd_coff_link_input_bfd,
7162         _bfd_coff_write_global_sym): ..
7163         * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
7164         * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
7165         * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
7166         * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
7167         _bfd_dwarf2_find_nearest_line): ..
7168         * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
7169         ecoff_compute_section_file_positions,
7170         _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
7171         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
7172         _bfd_elf_discard_section_eh_frame_hdr,
7173         _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
7174         _bfd_elf_write_section_eh_frame,
7175         _bfd_elf_write_section_eh_frame_hdr): ..
7176         * elf-hppa.h (elf_hppa_sort_unwind): ..
7177         * elf-m10200.c (mn10200_elf_relax_section,
7178         mn10200_elf_relax_delete_bytes,
7179         mn10200_elf_get_relocated_section_contents): ..
7180         * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
7181         mn10300_elf_check_relocs, mn10300_elf_relax_section,
7182         mn10300_elf_relax_delete_bytes,
7183         mn10300_elf_get_relocated_section_contents,
7184         _bfd_mn10300_elf_adjust_dynamic_symbol,
7185         _bfd_mn10300_elf_discard_copies,
7186         _bfd_mn10300_elf_size_dynamic_sections,
7187         _bfd_mn10300_elf_finish_dynamic_sections): ..
7188         * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
7189         _bfd_elf_make_section_from_phdr, elf_fake_sections,
7190         bfd_elf_set_group_contents, map_sections_to_segments,
7191         elf_sort_sections, assign_file_positions_for_segments,
7192         SECTION_SIZE, copy_private_bfd_data,
7193         _bfd_elf_get_dynamic_reloc_upper_bound,
7194         _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
7195         _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
7196         elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
7197         elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
7198         _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
7199         * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
7200         bfd_elf32_arm_process_before_allocation,
7201         elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
7202         elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
7203         elf32_arm_write_section): ..
7204         * elf32-cris.c (cris_elf_grok_prstatus,
7205         elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
7206         elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
7207         cris_elf_check_relocs, elf_cris_size_dynamic_sections,
7208         elf_cris_discard_excess_dso_dynamics,
7209         elf_cris_discard_excess_program_dynamics): ..
7210         * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
7211         * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
7212         * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
7213         _frv_create_got_section, _frvfdpic_assign_plt_entries,
7214         elf32_frvfdpic_size_dynamic_sections,
7215         elf32_frvfdpic_modify_segment_map,
7216         elf32_frvfdpic_finish_dynamic_sections): ..
7217         * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
7218         elf32_h8_get_relocated_section_contents): ..
7219         * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
7220         elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
7221         allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
7222         elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
7223         elf32_hppa_finish_dynamic_sections): ..
7224         * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
7225         i370_elf_size_dynamic_sections, i370_elf_check_relocs,
7226         i370_elf_finish_dynamic_sections): ..
7227         * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
7228         allocate_dynrelocs, elf_i386_size_dynamic_sections,
7229         elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
7230         * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
7231         i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
7232         * elf32-ip2k.c (ip2k_is_switch_table_128,
7233         ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
7234         ip2k_relax_switch_table_256, ip2k_elf_relax_section,
7235         adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
7236         * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
7237         m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
7238         allocate_dynrelocs, m32r_elf_size_dynamic_sections,
7239         m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
7240         m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
7241         m32r_elf_get_relocated_section_contents): ..
7242         * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
7243         m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
7244         m68hc11_elf_relax_delete_bytes): ..
7245         * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
7246         m68hc12_elf_size_one_stub): ..
7247         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
7248         elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
7249         * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
7250         elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
7251         elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
7252         * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
7253         elf32_mips_grok_prstatus): ..
7254         * elf32-or32.c (or32_elf_consth_reloc): ..
7255         * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
7256         elf_create_pointer_linker_section, ppc_elf_create_linker_section,
7257         ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
7258         allocate_dynrelocs, ppc_elf_size_dynamic_sections,
7259         ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
7260         ppc_elf_final_write_processing): ..
7261         * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
7262         allocate_dynrelocs, elf_s390_size_dynamic_sections,
7263         elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
7264         * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
7265         sh_elf_relax_delete_bytes, sh_elf_align_loads,
7266         sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
7267         sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
7268         sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
7269         * elf32-sh64-com.c (sh64_address_in_cranges,
7270         sh64_get_contents_type): ..
7271         * elf32-sh64.c (sh64_find_section_for_address,
7272         sh64_elf_final_write_processing): ..
7273         * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
7274         sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
7275         allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
7276         elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
7277         * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
7278         * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
7279         elf_vax_size_dynamic_sections, elf_vax_discard_copies,
7280         elf_vax_instantiate_got_entries, elf_vax_relocate_section,
7281         elf_vax_finish_dynamic_sections): ..
7282         * elf32-xstormy16.c (xstormy16_elf_24_reloc,
7283         xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
7284         xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
7285         xstormy16_elf_finish_dynamic_sections): ..
7286         * elf32-xtensa.c (xtensa_read_table_entries,
7287         elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
7288         elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
7289         bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
7290         elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
7291         elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
7292         get_relocation_opcode, retrieve_contents, find_relaxable_sections,
7293         collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
7294         relax_section, shrink_dynamic_reloc_sections, relax_property_section,
7295         xtensa_callback_required_dependence): ..
7296         * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
7297         elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
7298         elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
7299         elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
7300         elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
7301         elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
7302         elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
7303         elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
7304         * elf64-hppa.c (allocate_dynrel_entries,
7305         elf64_hppa_size_dynamic_sections,
7306         elf64_hppa_finish_dynamic_sections): ..
7307         * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
7308         mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
7309         elf64_mips_grok_prstatus): ..
7310         * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
7311         mmix_elf_relocate_section, mmix_elf_final_link,
7312         mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
7313         mmix_elf_relax_section, mmix_elf_get_section_contents): ..
7314         * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
7315         ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
7316         ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
7317         allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
7318         ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
7319         toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
7320         ppc64_elf_build_stubs, ppc64_elf_relocate_section,
7321         ppc64_elf_finish_dynamic_sections): ..
7322         * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
7323         allocate_dynrelocs, elf_s390_size_dynamic_sections,
7324         elf_s390_finish_dynamic_sections): ..
7325         * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
7326         sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
7327         sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
7328         sh64_elf64_finish_dynamic_sections): ..
7329         * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
7330         sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
7331         sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
7332         sparc64_elf_finish_dynamic_symbol,
7333         sparc64_elf_finish_dynamic_sections): ..
7334         * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
7335         elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
7336         elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
7337         elf64_x86_64_finish_dynamic_sections): ..
7338         * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
7339         * elfcode.h (elf_slurp_reloc_table): ..
7340         * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
7341         elf_finalize_dynstr, elf_link_add_object_symbols,
7342         bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
7343         elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
7344         * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
7345         elf32_mips_grok_prstatus): ..
7346         * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
7347         elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
7348         elfNN_ia64_choose_gp, elfNN_ia64_final_link,
7349         elfNN_ia64_finish_dynamic_sections): ..
7350         * elfxx-mips.c (mips_elf_create_procedure_table,
7351         mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
7352         _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
7353         mips_elf_global_got_index, mips_elf_multi_got,
7354         mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
7355         mips_elf_allocate_dynamic_relocations,
7356         mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
7357         _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
7358         _bfd_mips_elf_always_size_sections,
7359         _bfd_mips_elf_size_dynamic_sections,
7360         _bfd_mips_elf_finish_dynamic_symbol,
7361         _bfd_mips_elf_finish_dynamic_sections,
7362         _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
7363         _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
7364         _bfd_elf_mips_get_relocated_section_contents,
7365         _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
7366         * hp300hpux.c (callback): ..
7367         * hppabsd-core.c (make_bfd_asection): ..
7368         * hpux-core.c (make_bfd_asection): ..
7369         * i386linux.c (linux_link_create_dynamic_sections,
7370         bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
7371         * i386msdos.c (msdos_write_object_contents): ..
7372         * i386os9k.c (os9k_callback, os9k_write_object_contents,
7373         os9k_set_section_contents): ..
7374         * ieee.c (parse_expression, ieee_slurp_external_symbols,
7375         ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
7376         ieee_write_section_part, do_with_relocs, do_as_repeat,
7377         do_without_relocs, ieee_write_debug_part, init_for_output,
7378         ieee_set_section_contents): ..
7379         * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
7380         * irix-core.c (do_sections, make_bfd_asection): ..
7381         * libaout.h (aout_section_merge_with_text_p): ..
7382         * libbfd.c (_bfd_generic_get_section_contents,
7383         _bfd_generic_get_section_contents_in_window): ..
7384         * linker.c (default_indirect_link_order): ..
7385         * lynx-core.c (make_bfd_asection): ..
7386         * m68klinux.c (linux_link_create_dynamic_sections,
7387         bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7388         * mach-o.c (bfd_mach_o_make_bfd_section,
7389         bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
7390         bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
7391         bfd_mach_o_scan_read_segment): ..
7392         * merge.c (_bfd_add_merge_section, record_section, merge_strings,
7393         _bfd_merge_sections): ..
7394         * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
7395         mmo_map_set_sizes, mmo_canonicalize_symtab,
7396         mmo_internal_write_section, mmo_write_object_contents): ..
7397         * netbsd-core.c (netbsd_core_file_p): ..
7398         * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
7399         nlm_alpha_set_public_section): ..
7400         * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
7401         * nlm32-sparc.c (nlm_sparc_write_import): ..
7402         * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
7403         nlm_compute_section_file_positions): ..
7404         * oasys.c (oasys_object_p, oasys_slurp_section_data,
7405         oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
7406         * opncls.c (get_debug_link_info): ..
7407         * osf-core.c (make_bfd_asection): ..
7408         * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
7409         adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
7410         final_link, aout_link_input_section): ..
7411         * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
7412         pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
7413         * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
7414         bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
7415         * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
7416         * ptrace-core.c (ptrace_unix_core_file_p): ..
7417         * reloc.c (bfd_perform_relocation, bfd_install_relocation,
7418         _bfd_final_link_relocate, bfd_generic_relax_section,
7419         bfd_generic_get_relocated_section_contents): ..
7420         * reloc16.c (bfd_coff_reloc16_relax_section,
7421         bfd_coff_reloc16_get_relocated_section_c): ..
7422         * riscix.c (riscix_some_aout_object_p): ..
7423         * rs6000-core.c (read_hdr, make_bfd_asection): ..
7424         * sco5-core.c (make_bfd_asection): ..
7425         * simple.c (bfd_simple_get_relocated_section_contents): ..
7426         * som.c (som_object_setup, setup_sections, som_prep_headers,
7427         som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
7428         som_set_reloc_info, som_get_section_contents,
7429         som_bfd_link_split_section): ..
7430         * sparclinux.c (linux_link_create_dynamic_sections,
7431         bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7432         * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
7433         * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
7434         _bfd_write_stab_strings, _bfd_stab_section_offset): ..
7435         * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
7436         bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
7437         sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
7438         sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
7439         sunos_finish_dynamic_link): ..
7440         * syms.c (_bfd_stab_section_find_nearest_line): ..
7441         * tekhex.c (first_phase, tekhex_set_section_contents,
7442         tekhex_write_object_contents): ..
7443         * trad-core.c (trad_unix_core_file_p): ..
7444         * versados.c (process_esd, process_otr, process_otr): ..
7445         * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
7446         * vms-misc.c (add_new_contents): ..
7447         * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
7448         * vms.c (vms_set_section_contents): ..
7449         * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
7450         xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
7451         _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
7452         * xsym.c (bfd_sym_scan): .. See above.
7453
7454 2004-06-21  H.J. Lu  <[email protected]>
7455
7456         * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
7457         calling _bfd_merged_section_offset only for section symbols.
7458
7459 2004-06-22  Alan Modra  <[email protected]>
7460
7461         * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
7462         for handling SEC_MERGE symbols in relax_section.
7463
7464 2004-06-21  Alexandre Oliva  <[email protected]>
7465
7466         2003-05-15  Richard Sandiford  <[email protected]>
7467         * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
7468         linked together. Mark the result as h8300sx code.
7469
7470 2004-06-21  Alexandre Oliva  <[email protected]>
7471
7472         * elf-bfd.h (struct elf_backend_data): Added
7473         elf_backend_omit_section_dynsym.
7474         (_bfd_elf_link_omit_section_dynsym): Declare.
7475         * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
7476         (elf_backend_omit_section_dynsym): Use it for frvfdpic.
7477         * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
7478         (_bfd_elf_link_renumber_dynsyms): ... this function.
7479         * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
7480         _bfd_elf_link_omit_section_dynsym).
7481         (elfNN_bed): Added elf_backend_omit_section_dynsym.
7482
7483 2004-06-21  Nick Clifton  <[email protected]>
7484
7485         * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
7486         flags.
7487
7488 2004-06-17  Jerome Guitton  <[email protected]>
7489
7490         * bfd-in.h (bfd_cache_close_all): New function declaration.
7491         * bfd-in2.h: Regenerate.
7492         * cache.c (bfd_cache_close_all): New function definition.
7493
7494 2004-06-16  Mark Kettenis  <[email protected]>
7495
7496         * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
7497         4.10 and beyond.
7498         * configure: Regenerate.
7499
7500 2004-06-16  Daniel Jacobowitz  <[email protected]>
7501
7502         * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
7503         the pre-existing section.
7504
7505 2004-06-15  Alan Modra  <[email protected]>
7506
7507         * section.c (struct sec): Remove usused flags.  Reorganize a little.
7508         (bfd_get_section_size_before_reloc): Delete.
7509         (bfd_get_section_size_after_reloc): Delete.
7510         (STD_SECTION): Update.
7511         (bfd_get_section_size_now): Delete.
7512         (bfd_set_section_contents): Don't referece reloc_done.
7513         (bfd_get_section_contents): Remove reloc_done comment.
7514         * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
7515         reloc_done.
7516         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
7517         * ecoff.c (bfd_debug_section): Update initializer.
7518         * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
7519         * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
7520         * bfd-in.h (bfd_section_size): Expand.
7521         (bfd_get_section_size): New macro.
7522         * bfd-in2.h: Regenerate.
7523         * coff64-rs6000.c (xcoff64_write_object_contents): Replace
7524         bfd_get_section_size_before_reloc with bfd_get_section_size.
7525         * coffcode.h (coff_write_object_contents): Likewise.
7526         * coffgen.c (build_debug_section): Likewise.
7527         * dwarf1.c (parse_line_table): Likewise.
7528         (_bfd_dwarf1_find_nearest_line): Likewise.
7529         * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
7530         * i386msdos.c (msdos_write_object_contents): Likewise.
7531         * pdp11.c (squirt_out_relocs): Likewise.
7532         * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
7533         * elf64-mmix.c (mmix_elf_final_link): Update comment.
7534
7535 2004-06-14  Chris Demetriou  <[email protected]>
7536
7537         * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
7538         removal) with updated comment.
7539         (bfd_elf32_bfd_reloc_type_lookup): Add back case for
7540         BFD_RELOC_32_PCREL.
7541         (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
7542         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7543
7544 2004-06-12  Alan Modra  <[email protected]>
7545
7546         * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
7547         overflow on branches to undefweaks.
7548
7549 2004-06-11  Maciej W. Rozycki  <[email protected]>
7550
7551         * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
7552         as ecoff_section_data() does not return a valid lvalue.
7553
7554 2004-06-09  Alexandre Oliva  <[email protected]>
7555
7556         * elflink.c (elf_sort_symbol): Compare section id, not pointers.
7557         (elf_link_add_object_symbols): Likewise.
7558
7559         * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
7560         (elf_backend_reloc_type_class): New.
7561
7562 2004-06-08  Mark Kettenis  <[email protected]>
7563
7564         * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
7565         netbsd-core.lo.
7566         * configure: Regenerate.
7567
7568 2004-06-07  Daniel Jacobowitz  <[email protected]>
7569
7570         From:  Albert Chin-A-Young  <[email protected]>
7571         * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
7572         to unsigned int.
7573
7574 2004-05-29  H.J. Lu  <[email protected]>
7575
7576         * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
7577         change.
7578
7579 2004-05-28  DJ Delorie  <[email protected]>
7580
7581         * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
7582         for linking, but otherwise adjust reloc for merged sections.
7583
7584 2004-05-28  H.J. Lu  <[email protected]>
7585
7586         * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
7587         _bfd_merged_section_offset for local symbols.
7588
7589 2004-05-28  Andrew Stubbs <[email protected]>
7590
7591         * Makefile.am: Regenerate dependencies.
7592         * Makefile.in: Regenerate.
7593         * archures.c: Add bfd_mach_sh3_nommu .
7594         * bfd-in2.h: Regenerate.
7595         * cpu-sh.c: Add sh3-nommu architecture.
7596         (bfd_to_arch_table): Create new table.
7597         (sh_get_arch_from_bfd_mach): Create new function.
7598         (sh_get_arch_up_from_bfd_mach): Create new function.
7599         (sh_merge_bfd_arch): Create new function.
7600         * elf32-sh.c (sh_ef_bfd_table): Add table.
7601         (sh_elf_check_relocs): Replace switch statement with
7602         use of sh_ef_bfd_table .
7603         (sh_elf_get_flags_from_mach): Add new function.
7604         (sh_find_elf_flags): Likewise.
7605         (sh_elf_copy_private_data): Replace most of non-elf contents
7606         with a call to sh_merge_bfd_arch() .
7607
7608 2004-05-27  Michael Chastain  <[email protected]>
7609
7610         * Makefile.am (bfdver.h): Use explicit filename, not $< .
7611         * Makefile.in: Regenerate.
7612
7613 2004-05-27  Alexandre Oliva  <[email protected]>
7614
7615         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
7616         custom calling conventions for dynamic symbols.
7617         (mn10300_elf_relax_section): Avoid relaxing a function as a local
7618         symbol if it's an alias to a global one.
7619
7620 2004-05-26  H.J. Lu  <[email protected]>
7621
7622         * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
7623         change.
7624
7625 2004-05-27  Alexandre Oliva  <[email protected]>
7626
7627         * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
7628         loop over hashes.
7629
7630 2004-05-26  Alan Modra  <[email protected]>
7631
7632         * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
7633         for SHT_GROUP sections.
7634
7635 2004-05-25  Alan Modra  <[email protected]>
7636
7637         * elflink.c (elf_link_add_object_symbols): Don't set up merge
7638         section data here..
7639         * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
7640         * merge.c: Formatting.  Remove unnecessary casts.  Expand
7641         bfd_get_section_alignment macro.
7642         (struct sec_merge_sec_info): Rename "first" to "first_str".  Update
7643         use throughout file.
7644         (_bfd_add_merge_section): Rename from _bfd_merge_section.  Update
7645         comment.  Abort on dynamic or non-SEC_MERGE input.  Don't test
7646         section name to determine sinfo group, instead test output section
7647         and alignment.
7648         (_bfd_merge_sections): Add struct bfd_link_info param.  Call
7649         _bfd_strip_section_from_output rather than just twiddling flags.
7650         * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
7651         (_bfd_merge_sections): Update prototype.
7652         * libbfd.h: Regenerate.
7653
7654 2004-05-24  Mark Kettenis  <[email protected]>
7655
7656         * netbsd-core.c: Correctly indent section that sets architecture
7657         from machine ID.
7658
7659         From Miod Vallat <[email protected]>:
7660         * m88kopenbsd.c: New file.
7661         * targets.c (m88k_openbsd_vec): New.
7662         * config.bfd: Add m88k-*-openbsd*.
7663         * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
7664         (m88kopenbsd_vec): New.
7665         * configure: Regenerate.
7666         * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
7667         (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
7668         Run "make dep-am".
7669         * Makefile.in: Regenerate.
7670         * po/SRC-POTFILES.in: Regenerate.
7671
7672 2004-05-24  Nick Clifton  <[email protected]>
7673
7674         * hash.c: Remove bogus node "Changing the default Hash Table Size"
7675         introduced by hash table size patch.
7676
7677 2004-05-22  Ben Elliston  <[email protected]>
7678
7679         * configure.in (is_release): Remove.
7680         (bfd_version_date, bfd_version, bfd_version_string): Likewise.
7681         (AC_OUTPUT): Don't output bfdver.h from version.h.
7682         * configure: Regenerate.
7683         * Makefile.am (RELEASE): New variable.
7684         (bfdver.h): New target.
7685         * Makefile.in: Regenerate.
7686         * doc/Makefile.in: Likewise.
7687
7688 2004-05-22  Ben Elliston  <[email protected]>
7689
7690         * Makefile.am (config.status): Don't depend on version.h.
7691         * Makefile.in: Regenerate.
7692
7693 2004-05-22  Alan Modra  <[email protected]>
7694
7695         * merge.c (_bfd_merged_section_offset): Remove "addend" param.
7696         * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
7697         * libbfd.h: Regenerate.
7698         * elf.c (_bfd_elf_rela_local_sym): Adjust call.
7699         (_bfd_elf_rel_local_sym): Likewise.
7700         * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
7701         (elf_link_input_bfd): Likewise.
7702         * elf32-ppc.c (ppc_elf_relax_section): Likewise.
7703         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7704         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7705         (elfNN_ia64_relocate_section): Likewise.
7706
7707 2004-05-21  Andy Chittenden  <[email protected]>
7708
7709         * hash.c (bfd_default_hash_table_size): New variable.
7710         (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
7711         (bfd_hash_set_default_size): New function.  Set the default size
7712         to a selected prime number close to the argument.  Document new
7713         function.
7714         * bfd-in.h: Add prototype for  bfd_hash_set_default_size.
7715         * bfd-in2.h: Regenerate.
7716         * Makefile.am (hash.lo): Add dependency upon libiberty.h.
7717         * Makefile.in: Regenerate.
7718
7719 2004-05-21  Mark Kettenis  <[email protected]>
7720
7721         * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
7722         * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
7723         arm, m68k, m88k and hppa core files.
7724
7725 2004-05-21  Nick Clifton  <[email protected]>
7726
7727         * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
7728         (bfd_bwrite): Likewise.
7729         (bfd_tell): Likewise.
7730         (bfd_flush): Likewise.
7731         (bfd_stat): Likewise.
7732         (bfd_seek): Likewise.
7733         (bfd_get_mtime): Likewise.
7734         (bfd_get_size): Likewise.
7735
7736 2004-05-19  Ben Elliston  <[email protected]>
7737
7738         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
7739
7740 2004-05-19  Mikulas Patocka  <[email protected]>
7741
7742         * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
7743         (bfd_generic_openr_next_archived_file): Likewise.
7744
7745 2004-05-17  Bob Wilson  <[email protected]>
7746
7747         * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
7748         section names by inserting a new substring after .gnu.linkonce, except
7749         for .gnu.linkonce.t.* where the "t." is replaced.
7750
7751 2004-05-17  Adam Nemet  <[email protected]>
7752
7753         * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
7754         (m68-*-lynxos* case): Likewise.
7755         (powerpc-*-lyxnos* case): New case.
7756         (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
7757
7758 2004-05-17  David Heine  <[email protected]>
7759
7760         * aout-target.h (MY_bfd_copy_private_header_data): Define.
7761         * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
7762         * bfd.c (bfd_copy_private_header_data): Define.
7763         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
7764         interface.
7765         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7766         * coffcode.h (coff_bfd_copy_private_header_data): Define.
7767         * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
7768         * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
7769         segments by calling copy_private_bfd_data.
7770         (_bfd_elf_copy_private_header_data): Define.
7771         * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
7772         * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
7773         * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
7774         * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
7775         * mmo.c (mmo_bfd_copy_private_header_data): Define.
7776         * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
7777         * som.c (som_bfd_copy_private_header_data): Define.
7778         * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
7779         * vms.c (vms_bfd_copy_private_header_data): Define.
7780         * bfd-in2.h: Regenerate.
7781         * libbfd.h: Regenerate.
7782
7783 2004-05-15  Thiemo Seufer  <[email protected]>
7784
7785         * elfxx-mips.c (MINUS_TWO): Define.
7786         (mips_elf_higher, mips_elf_highest,
7787         mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
7788         some bfd_vma values.
7789         (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
7790
7791 2004-05-14  John David Anglin  <[email protected]>
7792
7793         * som.c (log2): Rename to exact_log2.  Adjust all callers.
7794
7795 2004-05-13  Paul Brook  <[email protected]>
7796
7797         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
7798         dwarf3 format CIE entries.  Remove comment about the size of the
7799         ra_column field.  It is now correctly deduced.
7800
7801 2004-05-13  Joel Sherrill <[email protected]>
7802
7803         * config.bfd (or32-*-rtems*): Switch to elf.
7804
7805 2004-05-13  Nick Clifton  <[email protected]>
7806
7807         * po/fr.po: Updated French translation.
7808
7809 2004-05-11  Jakub Jelinek  <[email protected]>
7810
7811         * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
7812         into .dynsym if elf_section_data (sec)->dynindx <= 0.
7813         Adjust counting of last_local.
7814         (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
7815         other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
7816         created by the linker nor !SHF_ALLOC.
7817
7818         * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
7819         DT_PLTGOT to the start of the .got.plt section instead of the
7820         .got output section.  Set sh_entsize for .got section in addition
7821         to .got.plt.
7822         (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7823         is at sgot->output_section->vma.
7824         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
7825         DT_PLTGOT to the start of the .got.plt section instead of the
7826         .got output section.
7827         (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7828         is at sgot->output_section->vma.  Set sh_entsize for .got section
7829         in addition to .got.plt.
7830         * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
7831         (bfd_section_from_phdr): Likewise.
7832         (map_sections_to_segments): Likewise.
7833         (assign_file_positions_for_segments): Likewise.
7834         (get_program_header_size): Likewise.
7835         * elflink.c (bfd_elf_size_dynamic_sections): Set
7836         elf_tdata (output_bfd)->relro from info->relro.
7837         * elf-bfd.h (struct elf_obj_tdata): Add relro field.
7838
7839 2004-05-08  Alexandre Oliva  <[email protected]>
7840
7841         * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
7842         a zero symndx for which we hadn't accounted a dynamic relocation.
7843         (_frvfdpic_add_rofixup): Likewise.
7844
7845 2004-05-07  Brian Ford  <[email protected]>
7846             DJ Delorie  <[email protected]>
7847
7848         * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
7849         Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
7850         * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
7851         IMAGE_FILE_LARGE_ADDRESS_AWARE.  Use PE defines.
7852
7853 2004-05-07  Alexandre Oliva  <[email protected]>
7854
7855         * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
7856         immediately if there's no link info.
7857         (elf32_frvfdpic_copy_private_bfd_data): New.
7858         (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
7859
7860 2004-05-06  Zack Weinberg  <[email protected]>
7861
7862         * dwarf2.c (add_line_info): Also set info->filename to NULL if
7863         filename argument is null; do not call strlen on a null pointer.
7864
7865 2004-05-06  Daniel Jacobowitz  <[email protected]>
7866
7867         * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
7868         special case.
7869
7870 2004-05-05  Alexandre Oliva  <[email protected]>
7871
7872         * configure.in (bfd_elf32_frvfdpic_vec): New.
7873         * configure: Rebuilt.
7874         * targets.c (bfd_elf32_frvfdpic_vec): New.
7875         * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
7876         on the latter.
7877         * elf32-frv.c: Prefix all identifiers added for FDPIC support with
7878         frvfdpic instead of frv.  Rearrange elf-target macros such that
7879         the FDPIC-specific ones are only defined for this new target
7880         vector.
7881         (bfd_elf32_frvfdpic_vec): Declare.
7882         (IS_FDPIC): New.
7883         (elf32_frv_relocate_section): Use it to enable segment checking
7884         and to control rofixup emission.  Add output section vma to
7885         applied relocation in non-LOAD non-ALLOC sections.  Use
7886         _bfd_error_handler for errors.
7887         (_frv_create_got_section): Create .rel.got and .rofixup only in
7888         FDPIC.  Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
7889         linker script.
7890         (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
7891         (elf32_frvfdpic_modify_segment_map): Likewise.
7892         (elf32_frv_finish_dynamic_sections): New, do-nothing.
7893         (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC.  Improve
7894         error message if we miscompute the rofixup size.
7895         (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
7896         (frvfdpic_elf_encode_eh_address): Likewise.
7897         (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
7898         Record relocs only in FDPIC.  Make sure _gp is defined for GPREL
7899         relocs.  Reject unknown relocation types.
7900         (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
7901         (frv_elf_merge_private_bfd_data): Likewise.
7902         (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
7903         0x4000 for newly-added elf32-frvfdpic.
7904
7905 2004-05-05  Nick Clifton  <[email protected]>
7906
7907         PR/136
7908         * cache.c (bfd_cache_lookup_worker): Call abort() rather than
7909         returning NULL as most users of this function do not check its
7910         return value.
7911         * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
7912         of bfd_cache_lookup().
7913         * sco5-core.c (sco5_core_file_p): Likewise.
7914         * trad-core.c (trad_unix_core_file_p): Likewise.
7915
7916 2004-05-05  Nick Clifton  <[email protected]>
7917
7918         * cache.c (bfd_cache_lookup): Improve formatting.
7919         * archive.c: Fix formatting.
7920
7921 2004-05-05  Peter Barada  <[email protected]>
7922
7923         * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
7924         * cpu-m68k.c(bfd_m68k_arch): Likewise.
7925         * bfd-in2.h(bfd_architecture): Regenerate.
7926
7927 2004-05-03  Alan Modra  <[email protected]>
7928
7929         * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
7930         SEC_MERGE sections.
7931         * elflink.c (elf_link_input_bfd): Adjust output reloc index for
7932         those against discarded link-once and SEC_MERGE section symbols.
7933
7934 2004-05-02  H.J. Lu  <[email protected]>
7935
7936         * section.c (bfd_get_section_by_name_if): New.
7937         * bfd-in2.h: Regenerated.
7938
7939 2004-05-02  Alan Modra  <[email protected]>
7940
7941         * som.c (som_bfd_is_group_section): Define.
7942
7943 2004-05-01  Alan Modra  <[email protected]>
7944
7945         * section.c (bfd_make_section_anyway): Copy the whole
7946         bfd_hash_entry, not just "next" from existing entry.
7947
7948 2004-04-30  H.J. Lu  <[email protected]>
7949
7950         * elf.c (bfd_section_from_shdr): Maintain the section order in
7951         a section group.
7952         (special_sections): Add ".note.GNU-stack".
7953         (elf_fake_sections): Handle section group for relocatable
7954         link..
7955
7956 2004-04-30  H.J. Lu  <[email protected]>
7957
7958         * section.c (bfd_sections_find_if): New.
7959         * bfd-in2.h: Regenerated.
7960
7961 2004-04-30  Alan Modra  <[email protected]>
7962
7963         * section.c (bfd_make_section_anyway): Add all sections to hash tab.
7964
7965         * elf-bfd.h (bfd_elf_is_group_section): Declare.
7966         * elf.c (bfd_elf_is_group_section): New function.
7967         * elfxx-target.h (bfd_elfNN_bfd_is_group_section
7968         * section.c (bfd_generic_is_group_section): New function.
7969         * targets.c (struct bfd_target): Add _bfd_is_group_section field.
7970         (BFD_JUMP_TABLE_LINK): Adjust.
7971         * aout-adobe.c (aout_32_bfd_is_group_section): Define.
7972         * aout-target.h (MY_bfd_is_group_section): Define.
7973         * aout-tic30.c (MY_bfd_is_group_section): Define.
7974         * bfd.c (bfd_is_group_section): Define.
7975         * binary.c (binary_bfd_is_group_section): Define.
7976         * bout.c (b_out_bfd_is_group_section): Define.
7977         * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
7978         * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
7979         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
7980         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
7981         * coffcode.h (coff_bfd_is_group_section): Define.
7982         * i386msdos.c (msdos_bfd_is_group_section): Define.
7983         * i386os9k.c (os9k_bfd_is_group_section): Define.
7984         * ieee.c (ieee_bfd_is_group_section): Define.
7985         * ihex.c (ihex_bfd_is_group_section): Define.
7986         * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
7987         * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
7988         * mmo.c (mmo_bfd_is_group_section): Define.
7989         * nlm-target.h (nlm_bfd_is_group_section): Define.
7990         * oasys.c (oasys_bfd_is_group_section): Define.
7991         * pef.c (bfd_pef_bfd_is_group_section): Define.
7992         * ppcboot.c (ppcboot_bfd_is_group_section): Define.
7993         * srec.c (srec_bfd_is_group_section): Define.
7994         * tekhex.c (tekhex_bfd_is_group_section): Define.
7995         * versados.c (versados_bfd_is_group_section): Define.
7996         * vms.c (vms_bfd_is_group_section): Define.
7997         * xsym.c (bfd_sym_bfd_is_group_section): Define.
7998         * bfd-in2.h: Regenerate.
7999         * libbfd.h: Regenerate.
8000
8001 2004-04-30  Alan Modra  <[email protected]>
8002
8003         * elflink.c (elf_gc_mark): Follow indirect and warning syms.
8004
8005 2004-04-30  Hans-Peter Nilsson  <[email protected]>
8006
8007         * configure.in: Update version to 2.15.91.
8008         * configure: Regenerate.
8009
8010 2004-04-29  Brian Ford  <[email protected]>
8011
8012         * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
8013         * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
8014         [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
8015         (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
8016         [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
8017         .gnu.linkonce.wi. sections.
8018         * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
8019         (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
8020         .gnu.linkonce.wi..
8021         * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
8022         (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
8023
8024 2004-04-28  Chris Demetriou  <[email protected]>
8025
8026         * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
8027         * bfd-in2.h: Regenerate.
8028         * libbfd.h: Likewise.
8029
8030 2004-04-28  John David Anglin  <[email protected]>
8031
8032         * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
8033         dup_common fields.
8034         (setup_sections): Use som_subspace_dictionary_record struct instead
8035         subspace_dictionary_record.  Set SEC_LINK_ONCE if subspace is
8036         is_comdat, is_common or dup_common.
8037         (som_prep_headers): Use som_subspace_dictionary_record struct.  Set
8038         is_comdat, is_common and dup_common in section subspace_dict from
8039         copy_data.
8040         (som_begin_writing): Use som_subspace_dictionary_record struct.
8041         (som_finish_writing): Likewise.
8042         (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
8043         is_common and dup_common flags in info for symbol.  Add comment
8044         regarding linker support for these fields.  Slightly reorganize
8045         function.
8046         (som_build_and_write_symbol_table): Set is_comdat, is_common and
8047         dup_common fields in symbol table from symbol info.
8048         (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
8049         arguments.  Set corresponding fields in copy_data.  Change all callers.
8050         (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
8051         symbol table.
8052         (som_vec): Add SEC_LINK_ONCE to applicable section flags.
8053         * som.h (som_subspace_dictionary_record): Define.
8054         (som_copyable_section_data_struct): Add is_comdat, is_common and
8055         dup_common fields.
8056         (som_section_data_struct): Use som_subspace_dictionary_record struct
8057         instead of subspace_dictionary_record.
8058         (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
8059
8060 2004-04-27  Bob Wilson  <[email protected]>
8061
8062         * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
8063         if set.  Check reloc_done flag before applying relocations.  Use
8064         output addresses, both when applying relocations and when comparing
8065         against the specified section.
8066         (elf_xtensa_relocate_section): Use output address to check if dynamic
8067         reloc is in a literal pool.  Set section's reloc_done flag.
8068
8069 2004-04-27  H.J. Lu  <[email protected]>
8070
8071         * elf32-sh64.c (elf_backend_section_flags): New. Defined.
8072         (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
8073         section.
8074         (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
8075         section.
8076
8077 2004-04-27  Alan Modra  <[email protected]>
8078
8079         * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
8080         structure field removed in 2004-04-24 patch.
8081         * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
8082
8083         * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
8084         Constify hdr arg.
8085         * elf32-arm.h (elf32_arm_section_flags): Likewise.
8086         * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
8087         * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
8088         * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
8089         field before calling elf_backend_section_flags.
8090
8091 2004-04-24  Chris Demetriou  <[email protected]>
8092
8093         * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
8094         (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
8095         (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
8096         BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
8097         and BFD_RELOC_32_PCREL.
8098         (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
8099         R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
8100         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8101         (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
8102         (mips_elf_next_relocation): Move comment about matching HI/LO
8103         relocations to...
8104         (_bfd_mips_elf_relocate_section): Here.  Remove handling for
8105         R_MIPS_GNU_REL_HI16.
8106
8107 2004-04-23  Chris Demetriou  <[email protected]>
8108
8109         * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
8110         (mips_switch_reloc, mips_read_relocs, mips_relax_section)
8111         (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
8112         (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
8113         and update comments to reflect current usage.
8114         (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
8115         and MIPS_R_SWITCH, as well as several empty entries.  Update comment
8116         for MIPS_R_PCREL16.
8117         (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
8118         (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
8119         for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
8120         (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
8121         type number to be MIPS_R_PCREL16.
8122         (mips_relocate_section): Remove support for link-time relaxation
8123         of branches used by embedded-PIC.  Remove support for MIPS_R_SWITCH,
8124         MIPS_R_RELLO, and MIPS_R_RELHI relocations.
8125         (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
8126         * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
8127         relaxation of branches used by embedded-PIC.
8128         * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
8129         * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
8130         related members, update comment.
8131         * pe-mips.c: Remove disabled (commented-out and #if 0'd)
8132         code related to embedded-PIC.
8133         * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
8134         initialization of now-removed 'adjust' member of
8135         'struct ecoff_debug_info'.
8136
8137 2004-04-23  Chris Demetriou  <[email protected]>
8138
8139         * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
8140
8141 2004-04-21  Philip Blundell  <[email protected]>
8142
8143         * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
8144         relocs for locally defined symbols during -shared final link.
8145         (elf32_arm_final_link_relocate): Likewise.
8146
8147 2004-04-22  Jakub Jelinek  <[email protected]>
8148
8149         * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
8150         ELF_LINK_POINTER_EQUALITY_NEEDED.
8151         (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
8152         if r_type is not R_X86_64_PC32.
8153         (elf64_x86_64_finish_dynamic_symbol): If
8154         ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
8155         SHN_UNDEF symbols.
8156
8157 2004-04-22  Kaz Kojima  <[email protected]>
8158
8159         * elf32-sh.c (sh_elf_plt_sym_val): New function.
8160         (elf_backend_plt_sym_val): Define.
8161
8162 2004-04-22  Andrew Cagney  <[email protected]>
8163
8164         * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
8165
8166 2004-04-22  John David Anglin  <[email protected]>
8167
8168         * hpux-core.c (hpux_core_core_file_p): Add cast in call to
8169         make_bfd_asection.
8170         * som.c (som_set_section_contents): Constantify second argument.
8171         (hppa_som_gen_reloc_type): Abort for unsupported selectors.
8172         (som_object_setup): Rework to avoid warning.
8173         (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
8174         Likewise.
8175
8176 2004-04-22  Andrew Cagney  <[email protected]>
8177
8178         * cache.c (bfd_cache_close): Check for a previously closed file.
8179
8180 2004-04-22  Jakub Jelinek  <[email protected]>
8181
8182         * bfd.c (bfd_get_synthetic_symtab): Define.
8183         * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
8184         NAME##_get_synthetic_symtab.
8185         (struct bfd_target): Add _bfd_get_synthetic_symtab.
8186         * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
8187         * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
8188         relplt_name fields.
8189         (_bfd_elf_get_synthetic_symtab): New prototype.
8190         * elfcode.h (elf_get_synthetic_symtab): Define.
8191         * elf.c (_bfd_elf_get_synthetic_symtab): New function.
8192         * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
8193         (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
8194         (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
8195         * bfd-in2.h: Rebuilt.
8196         * libbfd.h: Rebuilt.
8197         * elf32-i386.c (elf_i386_plt_sym_val): New function.
8198         (elf_backend_plt_sym_val): Define.
8199         * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
8200         (elf_backend_plt_sym_val): Define.
8201         * elf32-s390.c (elf_s390_plt_sym_val): New function.
8202         (elf_backend_plt_sym_val): Define.
8203         * elf64-s390.c (elf_s390_plt_sym_val): New function.
8204         (elf_backend_plt_sym_val): Define.
8205         * elf32-sparc (elf32_sparc_plt_sym_val): New function.
8206         (elf_backend_plt_sym_val): Define.
8207         * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
8208         (elf_backend_plt_sym_val): Define.
8209         * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
8210         (elf_backend_plt_sym_val): Define.
8211         * aout-target.h (MY_get_synthetic_symtab): Define.
8212         * aout-tic30.c (MY_get_synthetic_symtab): Define.
8213         * coff-rs6000.c (rs6000coff_vec): Add
8214         _bfd_nodynamic_get_synthetic_symtab.
8215         (pmac_xcoff_vec): Likewise.
8216         * coff64-rs6000.c (rs6000coff64_vec): Add
8217         _bfd_nodynamic_get_synthetic_symtab.
8218         (aix5coff64_vec): Likewise.
8219         * sunos.c (MY_get_synthetic_symtab): Define.
8220         * vms.c (vms_get_synthetic_symtab): Define.
8221
8222 2004-04-22  Nick Clifton  <[email protected]>
8223
8224         * bfd.c (bfd_archive_filename): Return NULL on NULL input.
8225
8226 2004-04-22  Peter Barada <[email protected]>
8227
8228         * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
8229         * bfd2-in.h: Regenerate.
8230         * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
8231
8232 2004-04-21  Chris Demetriou  <[email protected]>
8233
8234         * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
8235         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
8236         * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
8237         (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
8238         * bfd-in2.h: Regenerate.
8239
8240 2004-04-21  Bob Wilson  <[email protected]>
8241
8242         * elf32-xtensa.c (is_same_value): Add final_static_link argument and
8243         require relocations against a weak symbol to reference the same
8244         symbol hash entry if not a final, static link.
8245         (get_cached_value, add_value_map): Add final_static_link argument.
8246         (remove_literals): Pass final_static_link argument as needed.
8247
8248 2004-04-21  Andrew Cagney  <[email protected]>
8249
8250         * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
8251         (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
8252         (opncls_bwrite, opncls_bclose, opncls_bflush)
8253         (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
8254         bfd iovec that uses function callbacks.
8255         (bfd_close): Use the iovec's bclose.
8256         * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
8257         (cache_bclose, cache_bflush, cache_bstat)
8258         (cache_iovec): New functions and global variable, implement a
8259         cache "iovec", where applicable set bfd_error.
8260         (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
8261         * bfdio.c (struct bfd_iovec): Define.
8262         (real_read): Delete function.
8263         (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
8264         (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
8265         assume that bread and bwrite set bfd_error.
8266         * bfd.c (struct bfd): Add "iovec", update comments.
8267         * bfd-in2.h, libbfd.h: Re-generate.
8268
8269 2004-04-21  Andrew Cagney  <[email protected]>
8270
8271         * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
8272
8273 2004-04-21  Eric Botcazou  <[email protected]>
8274
8275         * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
8276         (bfd_elf_gc_sections): Fail if a shared object is being created.
8277         Do not fail if dynamic sections have been created.  Instead call
8278         elf_gc_mark_dynamic_ref_symbol to mark sections that contain
8279         dynamically referenced symbols.  Do not mark the whole graph
8280         rooted at .eh_frame, only the section proper.
8281
8282 2004-04-20  DJ Delorie  <[email protected]>
8283
8284         * reloc.c: Add BFD_RELOC_32_SECREL.
8285         * bfd-in2.h: Regenerate.
8286         * libbfd.h: Likewise.
8287         * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
8288         (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
8289         (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
8290
8291 2004-04-19  Jakub Jelinek  <[email protected]>
8292
8293         * elf32-sparc.c (elf32_sparc_relocate_section): Handle
8294         relocs against hidden/protected undefweak symbols properly.
8295         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8296
8297 2004-04-18  Mark Kettenis  <[email protected]>
8298
8299         * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
8300         * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
8301         core files.
8302
8303 2004-04-17  Brian Ford  <[email protected]>
8304
8305         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
8306         filepos for the SizeOfHeaders field.
8307         (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
8308         overflow.
8309         (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
8310
8311 2004-04-16  Alan Modra  <[email protected]>
8312
8313         * simple.c (bfd_simple_get_relocated_section_contents): Don't
8314         change reloc_done.  Set and restore _cooked_size.
8315         (RETURN): Delete.
8316
8317 2004-04-15  Mark Kettenis  <[email protected]>
8318
8319         * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
8320         core files.
8321
8322 2004-04-15  Nick Clifton  <[email protected]>
8323
8324         * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
8325
8326 2004-04-15  Alan Modra  <[email protected]>
8327
8328         * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
8329
8330 2004-04-15  H.J. Lu  <[email protected]>
8331
8332         * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
8333         when it is a definition.
8334
8335 2004-04-14  Alan Modra  <[email protected]>
8336
8337         * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
8338         when statically linking PIC code.
8339         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8340
8341 2004-04-11  Thiemo Seufer  <[email protected]>
8342
8343         * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
8344         * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
8345         targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
8346         * configure: Regenerate.
8347
8348 2004-04-08  Richard Sandiford  <[email protected]>
8349
8350         * elflink.c: Include libiberty.h.
8351         * Makefile.am (elflink.lo): Depend on libiberty.h.
8352         * Makefile.in: Regenerate.
8353
8354 2004-04-06  Daniel Jacobowitz  <[email protected]>
8355
8356         * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
8357         ".MIPS.stubs".
8358
8359 2004-04-05  H.J. Lu  <[email protected]>
8360
8361         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
8362         reserve the memory for dynamic linker
8363
8364 2004-04-05  Mark Kettenis  <[email protected]>
8365
8366         * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
8367         (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
8368
8369 2004-04-02  H.J. Lu  <[email protected]>
8370
8371         * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
8372         RELOC_FOR_GLOBAL_SYMBOL.
8373         (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
8374
8375 2004-04-02  H.J. Lu  <[email protected]>
8376
8377         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8378         R_ARM_ALU* only if OLD_ARM_ABI is not defined.
8379
8380 2004-04-01  Paul Brook  <[email protected]>
8381
8382         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
8383         * elf32-arm.h (struct elf32_elf_section_map): New.
8384         (struct _arm_elf_section_data): New.
8385         (elf32_arm_section_data): Define.
8386         (struct elf32_arm_link_hash_table): Add byteswap_code.
8387         (elf32_arm_link_hash_table_create): Initialize byteswap_code.
8388         (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
8389         (elf32_arm_post_process_headers): Set EF_ARM_BE8.
8390         (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
8391         elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
8392         (bfd_elf32_new_section_hook, elf_backend_write_section,
8393         elf_backend_link_output_symbol_hook): Define.
8394
8395 2004-04-01  Andy Chittenden  <[email protected]>
8396
8397         * stabs.c (struct stab_link_includes_totals): Add field 'symb'
8398         that keeps the characters in a B_INCL..B_EINCL range.
8399         (_bfd_link_section_stabs): When computing the sum of the
8400         characters in a B_INCL..B_EINCL range also keep a copy of those
8401         characters.  Use this information to distinguish between
8402         include sections that have the same sum and the same length
8403         but which are nevertheless unique.
8404
8405 2004-03-31  Paul Brook  <[email protected]>
8406
8407         * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
8408         * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
8409
8410 2004-03-31  Andy Chittenden <[email protected]>
8411
8412         * stabs.c (struct stab_link_includes_totals): Rename field 'total'
8413         to 'sum_chars' and add field 'num_chars'.
8414         (_bfd_link_section_stabs): When computing the sum of the
8415         characters in a B_INCL..B_EINCL range also keep a count of the
8416         number of characters.  Use this information to help distinguish
8417         between include sections when have the same sum but which
8418         nevertheless are still unique.
8419
8420 2004-03-31  Mattias EngdegÃ¥rd  <[email protected]>
8421
8422         * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
8423
8424 2004-03-30  Galit Heller  <[email protected]>
8425             Tomer Levi    <[email protected]>
8426
8427         * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
8428         (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
8429         (BFD32_BACKENDS): Add elf32-cr16c.lo.
8430         (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
8431         (cpu-cr16c.lo): New target.
8432         (elf32-cr16c.lo): Likewise.
8433         * Makefile.in: Regenerate.
8434         * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
8435         (bfd_archures_list): Add bfd_cr16c_arch.
8436         * config.bfd: Handle cr16c-*-elf*.
8437         * configure.in: Handle bfd_elf32_cr16c_vec.
8438         * configure: Regenerate.
8439         * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
8440         BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
8441         BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
8442         BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
8443         BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
8444         BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
8445         BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
8446         BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
8447         BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
8448         BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
8449         BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
8450         BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
8451         BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
8452         BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
8453         BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
8454         BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
8455         BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
8456         BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
8457         BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
8458         BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
8459         * targets.c (bfd_elf32_cr16c_vec): Declare.
8460         (bfd_target_vector): Add bfd_elf32_cr16c_vec.
8461         * cpu-cr16c.c: New file.
8462         * elf32-cr16c.c: Likewise.
8463         * libbfd.h: Regenerate.
8464         * bfd-in2.h: Likewise.
8465
8466 2004-03-30  Jakub Jelinek  <[email protected]>
8467
8468         * elf.c (map_sections_to_segments): Fix handling of .tbss.
8469
8470 2004-03-27  Alan Modra  <[email protected]>
8471
8472         * Makefile.am: Remove all mention of elflink.h.
8473         * Makefile.in: Regenerate.
8474         * bfd-in.h (bfd_elf_discard_info): Declare.
8475         (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
8476         * bfd-in2.h: Regenerate.
8477         * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
8478         bfd_elf32_link_record_dynamic_symbol,
8479         bfd_elf64_link_record_dynamic_symbol,
8480         _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
8481         bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
8482         _bfd_elf32_link_record_local_dynamic_symbol,
8483         _bfd_elf64_link_record_local_dynamic_symbol,
8484         _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
8485         _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
8486         _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
8487         _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
8488         _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
8489         _bfd_elf32_reloc_symbol_deleted_p,
8490         _bfd_elf64_reloc_symbol_deleted_p): Delete.
8491         (bfd_elf_link_record_dynamic_symbol,
8492         bfd_elf_link_record_local_dynamic_symbol,
8493         bfd_elf_final_link, bfd_elf_gc_sections,
8494         bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
8495         bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
8496         bfd_elf_reloc_symbol_deleted_p): Declare.
8497         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
8498         * elf32-arm.h: Update for changed function names.  Remove local
8499         WILL_CALL_FINISH_DYNAMIC_SECTION define.
8500         * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
8501         * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
8502         * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
8503         * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8504         * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
8505         * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
8506         * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
8507         * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
8508         * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
8509         (bfd_elfNN_print_symbol): Define.
8510         * elfcode.h: Don't include elflink.h.
8511         (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
8512         elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
8513         elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
8514         elf_gc_record_vtinherit, elf_gc_record_vtentry,
8515         elf_link_record_local_dynamic_symbol): Don't define.
8516         * elflink.c: Update for changed function names.  Move elflink.h
8517         code here.
8518         * elflink.h: Delete file.
8519         * po/SRC-POTFILES.in: Regenerate.
8520         * po/bfd.pot: Regenerate.
8521
8522 2004-03-27  Alan Modra  <[email protected]>
8523
8524         * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
8525         "name" for global syms accidentally removed in 2004-03-20 change.
8526
8527 2004-03-27  Alan Modra  <[email protected]>
8528
8529         * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
8530         * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
8531         where Elf_External_* is different for 64 and 32 bit, with
8532         corresponding elf_size_info field.
8533         (struct elf_final_link_info): Use "bfd_byte *" instead
8534         of "Elf_External_Sym *" for external_syms and symbuf.
8535         (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
8536         vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
8537         (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
8538         (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
8539         (elf_link_sort_cmp2): Adjust.
8540         (elf_link_sort_relocs): Set up r_sym_mask local var instead of
8541         using ELF_R_SYM macro.  Set u.sym_mask.
8542         (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
8543         version, elf_stringtab_init.  Ditto for bfd_section_from_elf_index
8544         vs. section_from_elf_index.  Adjust Elf_External_Sym pointer
8545         arithmetic.  Pass bed to elf_link_flush_output_syms.  Adjust
8546         Elf_External_Dyn pointer arithmentic.  Use bed swap_dyn_in and
8547         swap_syn_out functions.  Rearrange dyn swap in/out switch.
8548         (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
8549         Pass bed to elf_link_flush_output_syms.  Use bed swap_symbol_out.
8550         (elf_link_flush_output_syms): Add elf_backend_data arg.
8551         (elf_link_check_versioned_symbol): Likewise.
8552         (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
8553         Adjust Elf_External_Sym pointer arithmetic.  Use bed swap_symbol_out.
8554         (elf_link_input_bfd): Use bfd_section_from_elf_index.  Set up
8555         r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
8556         ELF_R_TYPE and ELF_R_INFO macros.
8557         (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
8558         based on size rather than using ELF_R_INFO.
8559         (elf_gc_mark): Set up r_sym_shift local var and use instead of
8560         ELF_R_SYM macro.
8561         (struct alloc_got_off_arg): New.
8562         (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
8563         ARCH_SIZE.  Pass get entry size down to elf_gc_allocate_got_offsets.
8564         (elf_gc_allocate_got_offsets): Adjust.
8565         (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
8566         ELF_R_SYM.  Use bfd_section_from_elf_index.
8567         (elf_bfd_discard_info): Set cookie.r_sym_shift.
8568         * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
8569         (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
8570
8571 2004-03-26  Stan Shebs  <[email protected]>
8572
8573         Remove MPW support, no longer used.
8574         * config.bfd (powerpc-*-mpw*): Remove configuration.
8575         * mpw-config.in, mpw-make.sed: Remove files.
8576         * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
8577
8578 2004-03-26  Alan Modra  <[email protected]>
8579
8580         * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
8581         (ppc64_elf_add_symbol_hook): New function.
8582         * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
8583         const from Elf_Internal_Sym param.
8584         * elflink.c (elf_link_add_object_symbols): Adjust.
8585         * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
8586         * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
8587         * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
8588         * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
8589         * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
8590         * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
8591         * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
8592         * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
8593         * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
8594         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
8595         * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
8596         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
8597         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
8598         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
8599         * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
8600         * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
8601
8602 2004-03-26  Alan Modra  <[email protected]>
8603
8604         * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
8605         * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
8606         (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
8607         (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
8608         (bfd_elf64_bfd_link_add_symbols): Delete.
8609         (bfd_elf_link_add_symbols): Declare.
8610         * elfcode.h (elf_bfd_link_add_symbols): Delete.
8611         * elflink.c: Include safe-ctype.h.
8612         (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
8613         make static.
8614         (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
8615         (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
8616         static.
8617         (elf_link_add_archive_symbols): Rename from
8618         _bfd_elf_link_add_archive_symbols, make static.
8619         (elf_link_add_object_symbols): New function.  Corresponding
8620         elflink.h function converted to use elf_size_info.
8621         (bfd_elf_link_add_symbols): Likewise.
8622         (bfd_elf_size_dynamic_sections): Adjust.
8623         * elflink.h (elf_bfd_link_add_symbols): Delete.
8624         (elf_link_add_object_symbols): Delete.
8625         * elf32-gen.c (elf32_generic_link_add_symbols): Call
8626         bfd_elf_link_add_symbols.
8627         * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
8628
8629 2004-03-25  Alan Modra  <[email protected]>
8630
8631         * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
8632         and chained shared libs only if dynsym.  Clear dynsym on forced-local.
8633
8634         * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
8635         (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
8636         (_bfd_elf_add_dt_needed_tag): Declare.
8637         (_bfd_elf_sort_symbol): Declare.
8638         (_bfd_elf_finalize_dynstr): Declare.
8639         (RELOC_FOR_GLOBAL_SYM): Formatting.
8640         * elfcode.h (elf_add_dynamic_entry): Delete.
8641         * elflink.c (_bfd_elf_add_dynamic_entry): New function.  Corresponding
8642         elflink.h function converted to use elf_size_info.
8643         (_bfd_elf_add_dt_needed_tag): Likewise.
8644         (_bfd_elf_sort_symbol): Likewise.
8645         (_bfd_elf_finalize_dynstr): Likewise.
8646         (compute_bucket_count): Likewise.
8647         (bfd_elf_size_dynamic_sections): Likewise.  Check result of
8648         _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
8649         (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
8650         * elflink.h: ..here.
8651         (sort_symbol, add_dt_needed_tag): Delete.
8652         (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
8653         (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
8654         Update all users.
8655         * elf32-arm.h (add_dynamic_entry): Update.  Remove casts.
8656         * elf32-cris.c (add_dynamic_entry): Likewise.
8657         * elf32-hppa.c (add_dynamic_entry): Likewise.
8658         * elf32-i370.c (add_dynamic_entry): Likewise.
8659         * elf32-i386.c (add_dynamic_entry): Likewise.
8660         * elf32-m32r.c (add_dynamic_entry): Likewise.
8661         * elf32-m68k.c (add_dynamic_entry): Likewise.
8662         * elf32-ppc.c (add_dynamic_entry): Likewise.
8663         * elf32-s390.c (add_dynamic_entry): Likewise.
8664         * elf32-sh.c (add_dynamic_entry): Likewise.
8665         * elf32-sparc.c (add_dynamic_entry): Likewise.
8666         * elf32-vax.c (add_dynamic_entry): Likewise.
8667         * elf32-xtensa.c (add_dynamic_entry): Likewise.
8668         * elf64-alpha.c (add_dynamic_entry): Likewise.
8669         * elf64-hppa.c (add_dynamic_entry): Likewise.
8670         * elf64-ppc.c (add_dynamic_entry): Likewise.
8671         * elf64-s390.c (add_dynamic_entry): Likewise.
8672         * elf64-sparc.c (add_dynamic_entry): Likewise.
8673         * elf64-x86-64.c (add_dynamic_entry): Likewise.
8674         * elfxx-ia64.c (add_dynamic_entry): Likewise.
8675         * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
8676         * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
8677         * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
8678         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
8679
8680 2004-03-23  Paul Brook  <[email protected]>
8681
8682         * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
8683
8684 2004-03-22  Bob Wilson  <[email protected]>
8685
8686         * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
8687         literal tables and check for relocs outside of literal pools.
8688         (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
8689         (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
8690         set DF_TEXTREL.
8691         (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
8692         (elf_xtensa_relocate_section): Read literal tables and check for
8693         dynamic relocations in read-only sections and not in literal pools.
8694
8695 2004-03-23  Alan Modra  <[email protected]>
8696
8697         PR 51.
8698         * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
8699
8700 2004-03-22  Hans-Peter Nilsson  <[email protected]>
8701
8702         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
8703         R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
8704         not defined by the executable, or defined in a DSO.
8705         <eliding run-time relocation of .got>: Initialize GOT entry for a
8706         function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
8707         executable.
8708         (cris_elf_gc_sweep_hook): Improve fallthrough marking.
8709         (elf_cris_try_fold_plt_to_got): Improve head comment.  Do not fold
8710         a PLT reloc to GOT for an executable.
8711         (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
8712         .got for a DSO and explain why.
8713         (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
8714         and unreferenced symbols for which a PLT is defined.  Adjust
8715         dynamic-symbol pruning correspondingly, to make sure we don't lose
8716         a dynamic symbol also defined by a DSO.
8717
8718 2004-03-22  Alan Modra  <[email protected]>
8719
8720         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
8721         and rel args.  Group input and output args.  Wrap to 80 columns.
8722         * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
8723         elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
8724         elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
8725         elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
8726         elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8727         elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
8728         elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
8729         elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
8730         RELOC_FOR_GLOBAL_SYMBOL invocation.
8731
8732 2004-03-20  H.J. Lu  <[email protected]>
8733
8734         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
8735         unresolved symbols in objects aren't allowed.
8736
8737         * elf-hppa.h (elf_hppa_relocate_section): Properly handle
8738         unresolved symbols.
8739         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8740         (elf_hppa_unmark_useless_dynamic_symbols):
8741         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
8742         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
8743         (elf32_hppa_relocate_section): Likewise.
8744         * elf32-i370.c (i370_elf_relocate_section): Likewise.
8745         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8746         * elf32-sh.c (sh_elf_relocate_section): Likewise.
8747         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8748         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8749
8750         * elf-m10200.c (mn10200_elf_relocate_section): Use
8751         RELOC_FOR_GLOBAL_SYMBOL.
8752         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
8753         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8754         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8755         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
8756         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8757         * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
8758         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8759         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
8760         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8761         * elf32-v850.c (v850_elf_relocate_section): Likewise.
8762         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8763         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
8764
8765 2004-03-19  John David Anglin  <[email protected]>
8766
8767         * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
8768         (final_link_relocate): Likewise.
8769         * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
8770         R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
8771
8772 2004-03-19  Alan Modra  <[email protected]>
8773
8774         * Makefile.am: Run "make dep-am".
8775         * Makefile.in: Regenerate.
8776         * aclocal.m4: Regenerate.
8777         * config.in: Regenerate.
8778         * po/bfd.pot: Regenerate.
8779
8780 2004-03-19  Alan Modra  <[email protected]>
8781             H.J. Lu  <[email protected]>
8782
8783         * elflink.c (_bfd_elf_merge_symbol): Revert last change.  Move
8784         type and size change code to where it was previously.  Remove
8785         dt_needed param.  Treat old weak syms as strong if new sym is
8786         from a shared lib, even when old sym is from another shared
8787         lib.  Remove unnecessary tests of oldweak and newweak.  Correct
8788         comments.
8789         (_bfd_elf_add_default_symbol): Remove dt_needed param.  Update
8790         _bfd_elf_merge_symbol calls.
8791         * elflink.h (elf_link_add_object_symbols): Update calls.  Remove
8792         dt_needed local var.  Update comments.
8793         * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
8794         (_bfd_elf_add_default_symbol): Likewise.
8795
8796         * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
8797         strong syms in one shared object overriding weak syms in another.
8798
8799 2004-03-18  Alan Modra  <[email protected]>
8800
8801         * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field.  Add
8802         dyn_lib_class field.  Rearrange for better packing.
8803         (elf_dt_soname): Delete.
8804         (elf_dyn_lib_class): Define.
8805         * elf.c (bfd_elf_set_dt_needed_name): Update comment.
8806         (bfd_elf_set_dt_needed_soname): Delete.
8807         (bfd_elf_set_dyn_lib_class): New function.
8808         * elflink.h (add_dt_needed_tag): New function.  Split out from..
8809         (elf_link_add_object_symbols): ..here.  Rename "name" to "soname".
8810         Use elf_dyn_lib_class to set dt_needed and add_needed.  Move fallback
8811         initialization of soname.
8812         (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
8813         elf_dt_soname.
8814         * bfd-in.h (enum dynamic_lib_link_class): New.
8815         (bfd_elf_set_dt_needed_soname): Delete.
8816         (bfd_elf_set_dyn_lib_class): Declare.
8817         * bfd-in2.h: Regenerate.
8818
8819         * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
8820         (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
8821         * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
8822         symbol loop.  Instead use add_needed to flag tag as written.
8823
8824 2004-03-17  Nathan Sidwell  <[email protected]>
8825
8826         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
8827         logic for null_input_bfd detection.
8828
8829 2004-03-17  Ralf Corsepius <[email protected]>
8830
8831         * config.bfd: Switch sh-*-rtems* to ELF.  Add sh-*-rtemscoff*.
8832
8833 2004-03-16  Mark Kettenis  <[email protected]>
8834
8835         * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
8836         code.
8837
8838 2004-03-16  Alan Modra  <[email protected]>
8839
8840         * elflink.c (elf_link_read_relocs_from_section): Don't use
8841         NUM_SHDR_ENTRIES in end of reloc calc.  Move NULL shdr check..
8842         (_bfd_elf_link_read_relocs): ..to here.
8843         * elf32-ppc.c (ppc_elf_relax_section): Formatting.
8844
8845 2004-03-16  Alan Modra  <[email protected]>
8846
8847         * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
8848         values selected in configure.host.  Require both to be defined
8849         before setting BFD_HOST_64_BIT_DEFINED.  Protect assignment to
8850         corresponding BFD_HOST vars with quotes.
8851         <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
8852         Always require BFD_HOST_64_BIT_DEFINED.
8853         <file_ptr type>: Find off_t size before emitting message.  Combine
8854         off_t and ftello64 conditional.
8855         * configure: Regenerate.
8856
8857 2004-03-16  Alan Modra  <[email protected]>
8858
8859         * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
8860         aliasing warning.  Remove trailing whitespace throughout file.
8861
8862 2004-03-15  John David Anglin  <[email protected]>
8863
8864         * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
8865         input_section in calls to get_dyn_name.
8866         * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *".        Use section id of first section in input BFD to build dynamic name for
8867         local symbols.
8868         (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
8869
8870 2004-03-15  Alan Modra  <[email protected]>
8871
8872         * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
8873         (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
8874         (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
8875         (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
8876         (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
8877         * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
8878         (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
8879         when using long.
8880         * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
8881         (bfd_getb64): Return bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
8882         (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8883         (bfd_putb64): Accept bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
8884         (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
8885         * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
8886         (read_8_bytes, read_indirect_string, read_address): Likewise.
8887         (read_abbrevs, parse_comp_unit): Likewise.
8888         * targets.c (struct bfd_target): Likewise.
8889         * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
8890         * hppabsd-core.c: Likewise.  Formatting.
8891         * hpux-core.c: Likewise.
8892         * irix-core.c: Likewise.
8893         * netbsd-core.c: Likewise.
8894         * osf-core.c: Likewise.
8895         * ptrace-core.c: Likewise.
8896         * sco5-core.c: Likewise.
8897         * trad-core.c: Likewise.
8898         * configure: Regenerate.
8899         * bfd-in2.h: Regenerate.
8900
8901 2004-03-15  Alan Modra  <[email protected]>
8902
8903         * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
8904         (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
8905         (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8906         (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
8907         (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
8908         (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
8909         (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
8910         * libbfd.c: Likewise in function definitions.
8911         (bfd_put_8): Mask with 0xff rather than casting to char.
8912         (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
8913         (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
8914         (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
8915         (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
8916         (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
8917         (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
8918         * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
8919         (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
8920         (H_GET_64, H_GET_32, H_GET_16): Likewise.
8921         (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
8922         * archive.c (do_slurp_coff_armap): Update swap prototype.
8923         * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
8924         (tic54x_getl_signed_32): Likewise.
8925         (tic54x_putl32): Likewise.  Mask with 0xff rather than casting to char.
8926         * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
8927         * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
8928         (bfd_getp_signed_32, bfd_putp32): Likewise.
8929         * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
8930         bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
8931         bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
8932         bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
8933         bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
8934         bfd_h_getx_signed_16, bfd_h_putx16.
8935         * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
8936         * hppabsd-core.c: Similarly.  Rename NO_SIGNED_GET to NO_GETS.
8937         * hpux-core.c: Likewise.
8938         * irix-core.c: Likewise.
8939         * netbsd-core.c: Likewise.
8940         * osf-core.c: Likewise.
8941         * ptrace-core.c: Likewise.
8942         * sco5-core.c: Likewise.
8943         * trad-core.c: Likewise.
8944         * bfd-in2.h: Regenerate.
8945
8946 2004-03-15  Matt Thomas  <[email protected]>
8947
8948         * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
8949         selected.
8950
8951 2004-03-13  Mark Kettenis  <[email protected]>
8952
8953         * config.bfd: Add x86_64-*-openbsd*.
8954         * configure.in (x86_64-*-openbsd*): Set COREFILE to
8955         netbsd-core.lo.
8956         * configure: Regenerate.
8957
8958 2004-03-12  Nick Clifton  <[email protected]>
8959             Dave Murphy  <[email protected]>
8960
8961         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
8962         if the input bfd does not contain any code.
8963
8964 2004-03-09  Steve Ellcey  <[email protected]>
8965
8966         * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
8967
8968 2004-03-05  Fred Fish  <[email protected]>
8969
8970         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
8971         mips16 symbols to be even rather than testing first for even/odd.
8972         (_bfd_mips_elf_link_output_symbol_hook): Ditto.
8973
8974 2004-03-05  Nathan Sidwell  <[email protected]>
8975
8976         * elf.c (map_sections_to_segments): Ignore .tbss sections for
8977         layout purposes.
8978
8979 2004-03-03  Alexandre Oliva  <[email protected]>
8980
8981         * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
8982         undefined symbols as hash_new.
8983
8984 2003-03-03  Andrew Stubbs  <[email protected]>
8985
8986         * archures.c: Add bfd_mach_sh4_nommu_nofpu.
8987         * cpu-sh.c: Ditto.
8988         * elf32-sh.c: Ditto.
8989         * bfd-in2.h: Regenerate.
8990
8991 2004-03-02  Alexandre Oliva  <[email protected]>
8992
8993         * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
8994         dynrelocs.
8995         (_frv_count_got_plt_entries): Initialize them.
8996         (frv_pic_relocs_info_find): Add insert argument.  Adjust all
8997         callers.
8998         (frv_pic_relocs_info_for_global): Likewise.
8999         (frv_pic_relocs_info_for_local): Likewise.
9000         (frv_pic_merge_early_relocs_info): New.
9001         (_frv_resolve_final_relocs_info): Use it in case one entry maps to
9002         another.
9003         (_frv_add_dyn_reloc): Add entry argument.  Adjust all callers.
9004         Check that we don't exceed the allocated count for entry.
9005         (_frv_add_rofixup): Likewise.
9006         (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
9007         (elf32_frv_finish_dynamic_sections): Improve error message in case
9008         we emit too few rofixup entries.
9009
9010 2004-03-01  Richard Sandiford  <[email protected]>
9011
9012         * archures.c (bfd_mach_fr450): New.
9013         * bfd-in2.h: Regenerate.
9014         * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
9015         (arch_info_500): Link to it.
9016         * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
9017         (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
9018         (frv_elf_arch_extension_p): New function.
9019         (frv_elf_merge_private_bfd_data): Use it.
9020
9021 2004-02-28  H.J. Lu  <[email protected]>
9022
9023         * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
9024
9025         * elflink.h (is_global_data_symbol_definition): Moved to
9026         elflink.c.
9027         (elf_link_is_defined_archive_symbol): Likewise.
9028         (elf_link_add_archive_symbols): Likewise. Renamed to
9029         _bfd_elf_link_add_archive_symbols.
9030
9031         * elflink.c (elf_link_is_defined_archive_symbol): Get the size
9032         of ELF symbol table entry from backend.
9033         (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
9034         instead of elf_link_add_object_symbols.
9035
9036 2004-02-27  Alexandre Oliva  <[email protected]>
9037
9038         * elf-bfd.h (struct elf_backend_data): Added
9039         elf_backend_can_make_relative_eh_frame,
9040         elf_backend_can_make_lsda_relative_eh_frame and
9041         elf_backend_encode_eh_address.
9042         (_bfd_elf_encode_eh_address): Declare.
9043         (_bfd_elf_can_make_relative): Declare.
9044         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
9045         hooks to decide whether to attempt to make_relative and
9046         make_lsda_relative.
9047         (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
9048         (_bfd_elf_can_make_relative): New.
9049         (_bfd_elf_encode_eh_address): New.
9050         * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
9051         (frv_elf_encode_eh_address): New.
9052         (elf_backend_can_make_relative_eh_frame): Define.
9053         (elf_backend_can_make_lsda_relative_eh_frame): Define.
9054         (elf_backend_encode_eh_address): Define.
9055         * elfxx-target.h
9056         (elf_backend_can_make_relative_eh_frame): Define.
9057         (elf_backend_can_make_lsda_relative_eh_frame): Define.
9058         (elf_backend_encode_eh_address): Define.
9059         (elfNN_bed): Add them.
9060
9061 2004-02-27  Alexandre Oliva  <[email protected]>
9062
9063         * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
9064         complain_on_overflow to signed.
9065
9066 2004-02-27  H.J. Lu  <[email protected]>
9067
9068         * elflink.h (sort_symbol): New.
9069         (elf_link_add_object_symbols): Use a sorted symbol array for
9070         weakdef.
9071
9072 2004-02-27  Jakub Jelinek  <[email protected]>
9073
9074         * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
9075         for pc relative relocs.
9076         (elf_s390_relocate_section): Likewise.
9077         * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
9078         for pc relative relocs.
9079         (elf_s390_relocate_section): Likewise.
9080
9081 2004-02-26  H.J. Lu  <[email protected]>
9082
9083         * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
9084         count_dyn_reloc.
9085
9086 2004-02-25  H.J. Lu  <[email protected]>
9087
9088         * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
9089         field to track if a relocation is against readonly section.
9090         (count_dyn_reloc): Take a new argument for rent->reltext.
9091         (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
9092         (get_reloc_section): Don't set ia64_info->reltext here.
9093         (allocate_dynrel_entries): Set ia64_info->reltext here.
9094
9095 2004-02-24  Alexandre Oliva  <[email protected]>
9096
9097         * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
9098         (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
9099         function's descriptor to symbol+offset, and map local undefweak
9100         symbol to NULL function descriptor.
9101         (elf32_frv_relocate_section): Likewise.
9102
9103 2004-02-23  Mark Kettenis  <[email protected]>
9104
9105         * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
9106         M_X86_64_NETBSD.
9107         * netbsd-core.c (M_SPARC64_OPENBSD): Define.
9108         (netbsd_core_file_p): Set architecture from machine ID for
9109         selected machines.
9110
9111 2004-02-23  Jakub Jelinek  <[email protected]>
9112
9113         * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
9114         DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
9115
9116 2004-02-21  H.J. Lu  <[email protected]>
9117
9118         * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
9119         symbols with non-default visibility.
9120
9121 2004-02-21  Danny Smith  <[email protected]>
9122
9123         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
9124         IMAGE_SCN_MEM_WRITE on known sections only.
9125
9126 2004-02-20  Jakub Jelinek  <[email protected]>
9127
9128         * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
9129         symbols used in PIE relocs.
9130
9131 2004-02-19  Jakub Jelinek  <[email protected]>
9132
9133         * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
9134         .plt sh_entsize.
9135
9136 2004-02-18  Daniel Jacobowitz  <[email protected]>
9137
9138         * configure.in: Update version to 2.15.90.
9139         * configure: Regenerate.
9140
9141 2004-02-17  Daniel Jacobowitz  <[email protected]>
9142             Richard Sandiford  <[email protected]>
9143
9144         * elfxx-mips.c (mips_elf_calculate_relocation): Use
9145         _bfd_elf_symbol_refs_local_p to decide whether to decay
9146         a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
9147         (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
9148         relocs if the symbol wasn't defined by a regular object file.
9149         Don't check the symbol's dynindx.
9150
9151 2004-02-16  Andrew Cagney  <[email protected]>
9152
9153         * bfd-in.h (file_ptr, ufile_ptr): Configure type using
9154         @bfd_file_ptr@.
9155         * bfd-in2.h: Re-generate.
9156
9157 2004-02-14  Andrew Cagney  <[email protected]>
9158
9159         * configure.host (HDEFINES): When hppa*-*-hpux*, define
9160         _LARGEFILE64_SOURCE.
9161
9162 2004-02-13  Andrew Cagney  <[email protected]>
9163
9164         * elf.c (vma_page_aligned_bias): New function.
9165         (assign_file_positions_except_relocs)
9166         (assign_file_positions_for_segments): Replace broken modulo
9167         arithmetic with call to vma_page_aligned_bias.
9168
9169 2004-02-11  Andrew Cagney  <[email protected]>
9170
9171         * bfd-in.h: Update copyright.
9172         (bfd_tell): Change return type to file_ptr.
9173         * bfd-in2.h: Re-generate.
9174         * cache.c: Update copyright.
9175         (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
9176         parameter.
9177         (close_one): Use real_ftell.
9178         * bfdio.c: Update copyright.
9179         (real_ftell, real_fseek): New functions.
9180         (bfd_tell): Use real_fseek and real_ftell, change return type to
9181         file_ptr.
9182         (bfd_seek): Use real_ftell and real_fseek, change type of
9183         file_position to a file_ptr.
9184         * libbfd-in.h: Update copyright.
9185         (real_ftell, real_fseek): Declare.
9186         * libbfd.h: Re-generate.
9187
9188         * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
9189         fseeko and fseeko64.  Determine bfd_file_ptr.
9190         * configure: Re-generate.
9191         * config.in: Re-generate.
9192
9193 2004-02-09  Anil Paranjpe  <[email protected]>
9194
9195         * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
9196         * elf32-h8300.c: Likewise.
9197
9198 2004-02-09  Christian Vogel <[email protected]>
9199             Nick Clifton  <[email protected]>
9200
9201         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
9202         GOT entries with no associated GOT subsection.
9203
9204 2004-02-09  Richard Sandiford  <[email protected]>
9205
9206         * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
9207         * elf.c (swap_out_syms): Use it to decide whether local section
9208         symbols should be named.
9209         * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
9210         * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
9211         (elf_backend_name_local_section_symbols): Define.
9212         * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
9213
9214 2004-01-30  H.J. Lu  <[email protected]>
9215
9216         * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
9217         (elfNN_ia64_relax_section): Optimize brl to br during the relax
9218         finalize pass.
9219
9220 2004-01-30  Alexandre Oliva  <[email protected]>
9221
9222         * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
9223         to bfd_link_hash_entry passed by reference to
9224         _bfd_generic_link_add_one_symbol.
9225
9226 2004-01-25  H.J. Lu  <[email protected]>
9227
9228         * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
9229         relocations against dynamic symbols.
9230
9231 2004-01-23  Daniel Jacobowitz  <[email protected]>
9232
9233         * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
9234         change.
9235
9236 2004-01-21  Tom Rix  <[email protected]>
9237
9238         * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
9239         * bfd-in2.h, libbfd.h: Rebuilt.
9240
9241 2004-01-20  Danny Smith  <[email protected]>
9242
9243         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
9244         IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
9245         flag has been cleared.
9246
9247 2004-01-19  Kazu Hirata  <[email protected]>
9248
9249         * coff-h8300.c: Add and adjust comments about relaxation.
9250         * elf32-h8300.c: Likewise.
9251
9252 2004-01-16  Kazu Hirata  <[email protected]>
9253
9254         * coff-h8300.c: Fix comment typos.
9255         * elf32-h8300.c: Likewise.
9256
9257 2004-01-16  Kazu Hirata  <[email protected]>
9258
9259         * coff-h8300.c: Add comments about relaxation.
9260         * elf32-h8300.c: Likewise.
9261
9262 2004-01-14  Maciej W. Rozycki  <[email protected]>
9263
9264         * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
9265         throughout.
9266         * aclocal.m4: Regenerate.
9267         * configure: Regenerate.
9268
9269 2004-01-13  Ian Lance Taylor  <[email protected]>
9270
9271         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
9272         mips_elf64_rtype_to_howto instead of using howto_table.
9273
9274 2004-01-13  Daniel Jacobowitz  <[email protected]>
9275
9276         * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
9277         the .plt section.
9278         (elf32_arm_check_relocs): Don't increment the PLT refcount for
9279         relocs which would not use the PLT.
9280
9281 2004-01-13  Alan Modra  <[email protected]>
9282
9283         * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
9284         (ppc64_elf_gc_sweep_hook): Likewise.
9285         (ppc64_elf_size_dynamic_sections): Test for .plt directly.
9286
9287 2004-01-12  Anil Paranjpe  <[email protected]>
9288
9289         Adds linker relaxation support for bit manipulation insns like
9290         band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
9291         bst, btst, bxor.
9292         * elf32-h8300.c: Opcode for bit manipulation insn is checked in
9293         elf32_h8_relax_section function while relxation for aa:16 and aa:32.
9294         * coff-h8300.c: Opcode for bit manipulation insn is checked in
9295         h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
9296
9297 2004-01-12  Alan Modra  <[email protected]>
9298
9299         * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
9300
9301 2004-01-11  Kazu Hirata  <[email protected]>
9302
9303         * elf32-h8300.c: Fix formatting.
9304
9305 2004-01-11  Kazu Hirata  <[email protected]>
9306
9307         * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
9308         dynamic object is present.  Declare r_symndx and h in an inner
9309         scope.
9310         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
9311
9312 2004-01-09  Daniel Jacobowitz  <[email protected]>
9313
9314         * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
9315         (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
9316         (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
9317         identically.  Do not emit PC24 relocations for shared libraries.
9318         (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
9319         identically.  Don't adjust pc_count.
9320         (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
9321         Set ELF_LINK_HASH_NEEDS_PLT for both.  Don't adjust pc_count; don't
9322         adjust count for branch relocations.
9323         (allocate_dynrelocs): Correct typo in call to
9324         WILL_CALL_FINISH_DYNAMIC_SYMBOL.  Never allocate space for
9325         PC24 or PLT32 relocs when linking.
9326
9327 2004-01-09  Dmitry Semyonov  <[email protected]>
9328
9329         * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
9330         relocation howto with ARM_26 one for consistency.
9331         (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
9332         that will be converted to ARM_26D ones, since we always want 'done'
9333         relocations to be reflected in section's data.
9334         (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
9335         offset.
9336         (_bfd_final_link_relocate): Do not modify "inplace" data, if not
9337         requested.
9338
9339 2004-01-08  Dmitry Semyonov  <[email protected]>
9340
9341         * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
9342         are not partial_inplace during a relocatable link.
9343
9344 2004-01-08  Kazu Hirata  <[email protected]>
9345
9346         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
9347         if no dynamic object is present.  Declare r_symndx and h in an
9348         inner scope.
9349
9350 2004-01-07  H.J. Lu  <[email protected]>
9351
9352         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
9353         trampoline if it is known out of range.
9354
9355 2004-01-06  Alexandre Oliva  <[email protected]>
9356
9357         2003-12-17  Alexandre Oliva  <[email protected]>
9358         * elf32-frv.c (_frv_osec_readonly_p): New.
9359         (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
9360         undefweak symbol.
9361         (_frv_count_got_plt_entries): Adjust expected count accordingly.
9362         (elf32_frv_relocate_section): Likewise.  Error out if attempting
9363         to emit rofixups or dynamic relocs in read-only segments.  Use
9364         _bfd_elf_section_offset to adjust r_offsets in rofixups and
9365         dynamic relocations.
9366         2003-12-12  Alexandre Oliva  <[email protected]>
9367         * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
9368         relocations or fixups involving merged sections correctly.  Avoid
9369         crash when undefined symbol is referenced by R_FRV_32 or
9370         R_FRV_FUNCDESC_VALUE.
9371         2003-12-02  Alexandre Oliva  <[email protected]>
9372         * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
9373         input section holding local symbol to addend of R_FRV_32 or
9374         R_FRV_FUNCDESC_VALUE dynamic relocation.
9375         2003-11-27  Alexandre Oliva  <[email protected]>
9376         * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
9377         (elf32_frv_always_size_sections): Don't store pointer to
9378         __stacksize symbol in sec_info.
9379         (elf32_frv_modify_segment_map): Look it up here.
9380         2003-11-26  Alexandre Oliva  <[email protected]>
9381         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
9382         of the lazy PLT entry, not only its offset, as the low word of a
9383         function descriptor.
9384         2003-11-10  Alexandre Oliva  <[email protected]>
9385         * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
9386         if a hash table entry already exists but is not a definition.
9387         2003-11-05  Alexandre Oliva  <[email protected]>
9388         * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
9389         (_frv_add_rofixup): Don't inline.
9390         (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
9391         for undefweak symbols.
9392         (elf32_frv_relocate_section): Avoid crash while computing
9393         relocation when linking with shared library.  Only emit rofixups
9394         and dynamic relocations for alloc&load sections.  Mark binaries
9395         with inter-segment relocations for relocation as a unit.
9396         (_frv_create_got_section): Rename .rofixup.got to .rofixup.
9397         (DEFAULT_STACK_SIZE): New.
9398         (_frv_count_got_plt_entries): Fix thinko in deciding whether to
9399         emit rofixups or dynamic relocs when linking dynamic non-PIE
9400         executables.
9401         (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
9402         shared libs too.  Reserve the last entry for the GOT pointer.
9403         (elf32_frv_finish_dynamic_sections): Emit it.
9404         (elf32_frv_always_size_sections): New.
9405         (elf32_frv_modify_segment_map): New.
9406         (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
9407         sections.
9408         (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
9409         (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
9410         (elf_backend_always_size_sections): New.
9411         (elf_backend_modify_segment_map): New.
9412         2003-10-31  Alexandre Oliva  <[email protected]>
9413         * config.bfd: Added frv-*-*linux*.
9414         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
9415         ABS section, instead of crashing.
9416         (elf32_frv_relocate_section): Don't crash before warning about
9417         different segments in non-PIC relocation.
9418         2003-10-17  Alexandre Oliva  <[email protected]>
9419         * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
9420         relocs to undefweak symbols.
9421         (elf32_frv_relocate_section): Ditto for undefined symbols.
9422         2003-10-06  Alexandre Oliva  <[email protected]>
9423         * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
9424         gotfixup section was created.
9425         2003-09-30  Alexandre Oliva  <[email protected]>
9426         * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
9427         FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
9428         complain_overflow_signed.
9429         * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
9430         have not been allocated.
9431         (_frv_emit_got_relocs_plt_entries): Return non-void.  Assert
9432         privfd only if dynamic sections were created.
9433         (elf32_frv_relocate_section): Compute gprel_segment, and use it
9434         for GPREL relocs.  When linking relocatable FDPIC executables,
9435         emit warnings for relocations that would be illegal on PIE or
9436         shared libraries.  Emit rofixup for R_FRV_32 only if input object
9437         is not FDPIC.
9438         (_frv_create_got_section): Define _gp symbol in the rofixup
9439         section.
9440         (elf32_frv_finish_dynamic_sections): If rofixups needed but
9441         dynamic sections missing, error out requesting -melf32frvfd.
9442         2003-09-19  Alexandre Oliva  <[email protected]>
9443         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
9444         computation of addends from section and global or local symbol
9445         value.  Change return type to bfd_boolean, and return a failure if
9446         a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
9447         nonzero addend is required.
9448         (elf32_frv_relocate_section): Likewise.  Print error for
9449         unsupported nonzero addends.
9450         2003-09-18  Alexandre Oliva  <[email protected]>
9451         * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
9452         force everything local.
9453         (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
9454         * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
9455         (frv_gotfixup_section): New.
9456         (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
9457         (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
9458         and relocsfdv.
9459         (_frv_add_rofixup): New.
9460         (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
9461         fdpic executables.  Use FRV_SYM_LOCAL more widely to simplify and
9462         improve some ugly conditions.
9463         (elf32_frv_relocate_section): Likewise.  Reject inter-segment
9464         relocations in fdpic.
9465         (_frv_create_got_section): Create .rofixup.got section.
9466         (struct _frv_dynamic_got_info): Added fixups.
9467         (_frv_count_got_plt_entries): Account in-GOT relocations into
9468         relocs32, relocsfd and relocsfdv.  Account them into relocs or
9469         fixups, as appropriate.
9470         (elf32_frv_size_dynamic_sections): Size rofixup section.  Simplify
9471         sizing of gotrel.
9472         (elf32_frv_finish_dynamic_sections): Verify that the right number
9473         of relocations and fixups was generated.
9474         (elf32_frv_check_relocs): Compute relocs32, relocsfd and
9475         relocsfdv.
9476         * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
9477         SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
9478         (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
9479         descriptor of a (formerly-)global symbol is local.
9480         (struct frv_pic_relocs_info): Adjust comments.
9481         (_frv_emit_got_relocs_plt_entries): Adjust.
9482         (elf32_frv_relocate_section): Likewise.
9483         (_frv_count_got_plt_entries): Likewise.
9484         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
9485         symbol's value to addend in the common preamble.  Decay dynamic
9486         symbols to section+offset if they bind or call locally, for GOT
9487         and FUNCDESC_VALUE, respectively.
9488         (elf32_frv_relocate_section): Likewise.
9489         (elf32_frv_check_relocs): Don't register as dynamic symbols of
9490         internal or hidden visibility.
9491         2003-09-17  Alexandre Oliva  <[email protected]>
9492         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
9493         argument, so as to not call _bfd_elf_rel_local_sym to compute it.
9494         (elf32_frv_relocate_section): Pass relocation addend in.  Use
9495         original relocation addend to look up the got relocs/plt entries
9496         table.  Do not call _bfd_elf_rel_local_sym.  Don't error out when
9497         processing relocations that reference .scommon symbols.
9498         2003-09-15  Alexandre Oliva  <[email protected]>
9499         Introduce support for dynamic linking.
9500         * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
9501         (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
9502         elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
9503         (frv_reloc_type_lookup): Return REL howtos for executables and
9504         dynamic libraries.
9505         (frv_info_to_howto_rel): New.
9506         (struct frv_elf_link_hash_table): New.
9507         (frv_hash_table, frv_got_section, frv_gotrel_section,
9508         frv_plt_section, frv_pltrel_section, frv_relocs_info,
9509         frv_got_initial_offset, frv_plt_initial_offset): New macros.
9510         (frv_elf_link_hash_table_create): New.
9511         (struct frv_pic_relocs_info): New.
9512         (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
9513         (frv_pic_relocs_info_find): New.
9514         (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
9515         New.
9516         (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
9517         (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
9518         (_frv_emit_got_relocs_plt_entries): New.
9519         (elf32_frv_relocate_section): Add support for dynamic linking.
9520         Handle new relocations.
9521         (_frv_create_got_section): New.
9522         (elf32_frv_create_dynamic_sections): New.
9523         (ELF_DYNAMIC_INTERPRETER): New.
9524         (struct _frv_dynamic_got_info): New.
9525         (_frv_count_got_plt_entries): New.
9526         (struct _frv_dynamic_got_plt_info): New.
9527         (_frv_compute_got_alloc_data): New.
9528         (_frv_get_got_entry, _frv_get_fd_entry): New.
9529         (_frv_assign_got_entries, _frv_assign_plt_entries): New.
9530         (_frv_resolve_final_relocs_info): New.
9531         (elf32_frv_size_dynamic_sections): New.
9532         (elf32_frv_finish_dynamic_sections): New.
9533         (elf32_frv_adjust_dynamic_symbol): New.
9534         (elf32_frv_finish_dynamic_symbol): New.
9535         (elf32_frv_check_relocs): Handle new relocs.  Explain how the
9536         whole thing works.
9537         (elf_info_to_howto_rel): Define.
9538         (bfd_elf32_bfd_link_hash_table_create): Define.
9539         (elf_backend_create_dynamic_sections): Define.
9540         (elf_backend_adjust_dynamic_symbol): Define.
9541         (elf_backend_size_dynamic_sections): Define.
9542         (elf_backend_finish_dynamic_symbol): Define.
9543         (elf_backend_finish_dynamic_sections): Define.
9544         (elf_backend_want_got_sym): Define.
9545         (elf_backend_got_header_size): Define.
9546         (elf_backend_want_got_plt): Define.
9547         (elf_backend_plt_readonly): Define.
9548         (elf_backend_want_plt_sym): Define.
9549         (elf_backend_plt_header_size): Define.
9550         (elf_backend_may_use_rel_p): Define.
9551         (elf_backend_may_use_rela_p): Define.
9552         (elf_backend_default_use_rela_p): Define.
9553         2003-08-08  Alexandre Oliva  <[email protected]>
9554         * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
9555         R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
9556         R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
9557         (frv_reloc_map): Map the corresponding BFD relocs to them.
9558         (frv_reloc_type_lookup): ... and back to BFD relocs.
9559         * reloc.c: New relocs.
9560         * bfd-in2.h, libbfd.h: Rebuilt.
9561         2003-08-04  Alexandre Oliva  <[email protected]>
9562         * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
9563         R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
9564         R_FRV_FUNCDESC_GOTLO): New.
9565         (frv_reloc_map): Map the corresponding BFD relocs to them.
9566         (frv_reloc_type_lookup): ... and back to BFD relocs.
9567         * reloc.c: New relocs.
9568         * bfd-in2.h, libbfd.h: Rebuilt.
9569
9570 2004-01-05  Maciej W. Rozycki  <[email protected]>
9571
9572         * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9573         targets to support pages of up to 64kB.
9574         (elf32_bed): Redefine to get a separate backend data structure for
9575         traditional targets.
9576         * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9577         targets to support pages of up to 64kB.
9578         (elf64_bed): Redefine to get a separate backend data structure for
9579         traditional targets.
9580         * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9581         targets to support pages of up to 64kB.
9582         (elf32_bed): Redefine to get a separate backend data structure for
9583         traditional targets.
9584
9585 2004-01-04  Mark Kettenis  <[email protected]>
9586
9587         * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
9588
9589 2004-01-02  Mark Kettenis  <[email protected]>
9590
9591         * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
9592         (elf_i386_grok_psinfo): Likewise.
9593
9594 2004-01-02  Bernardo Innocenti  <[email protected]>
9595
9596         * config.bfd: Add m68k-uClinux target.
9597
9598 2004-01-01  Grant Edwards <[email protected]>
9599
9600         * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
9601         * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
9602         (elf32_h8_gc_sweep_hook): New function.
9603         (elf_backend_gc_mark_hook): Define.
9604         (elf_backend_gc_sweep_hook): Define.
9605         (elf_backend_can_gc_sections): Define.
9606
9607 For older changes see ChangeLog-0203
9608 \f
9609 Local Variables:
9610 mode: change-log
9611 left-margin: 8
9612 fill-column: 74
9613 version-control: never
9614 End:
This page took 0.573223 seconds and 4 git commands to generate.