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