fb9c2aa8c48b3fe72fc497383b6e5a111bc8a0b3
[binutils-gdb.git] / bfd / ChangeLog
1 2004-10-22 Mark Kettenis <kettenis@gnu.org>
2
3 * config.bfd: Add mips64*-*-openbsd.
4
5 2004-10-21 Bob Wilson <bob.wilson@acm.org>
6
7 * elf32-xtensa.c (ebb_propose_action): Put declarations before
8 statements.
9
10 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
11
12 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
13 * configure: Regenerate.
14
15 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
16
17 PR 463
18 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
19 to linker reloc_overflow callback.
20 (aout_link_input_section_ext): Likewise.
21 (aout_link_reloc_link_order): Likewise.
22 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
23 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
24 Likewise.
25 (alpha_relocate_section): Likewise.
26 * coff-arm.c (coff_arm_relocate_section): Likewise.
27 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
28 * coff-h8500.c (extra_case): Likewise.
29 * coff-i960.c (coff_i960_relocate_section): Likewise.
30 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
31 * coff-mips.c (mips_relocate_section): Likewise.
32 * coff-or32.c (coff_or32_relocate_section): Likewise.
33 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
34 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
35 * coff-sh.c (sh_relocate_section): Likewise.
36 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
37 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
38 * coff-z8k.c (extra_case): Likewise.
39 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
40 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
41 (_bfd_coff_generic_relocate_section): Likewise.
42 * ecoff.c (ecoff_reloc_link_order): Likewise.
43 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
44 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
45 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
46 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
47 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
48 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
49 * elf32-cris.c (cris_elf_relocate_section): Likewise.
50 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
51 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
52 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
53 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
54 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
55 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
56 * elf32-i370.c (i370_elf_relocate_section): Likewise.
57 * elf32-i386.c (elf_i386_relocate_section): Likewise.
58 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
59 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
60 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
61 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
62 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
63 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
64 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
65 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
66 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
67 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
68 * elf32-s390.c (elf_s390_relocate_section): Likewise.
69 * elf32-sh.c (sh_elf_relocate_section): Likewise.
70 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
71 * elf32-v850.c (v850_elf_relocate_section): Likewise.
72 * elf32-vax.c (elf_vax_relocate_section): Likewise.
73 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
74 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
75 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
76 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
77 * elf64-s390.c (elf_s390_relocate_section): Likewise.
78 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
79 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
80 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
81 * elflink.c (elf_reloc_link_order): Likewise.
82 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
83 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
84 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
85 * linker.c (_bfd_generic_reloc_link_order): Likewise.
86 * pdp11.c (pdp11_aout_link_input_section): Likewise.
87 (aout_link_reloc_link_order): Likewise.
88 * reloc.c (bfd_generic_get_relocated_section_contents):
89 Likewise.
90 * xcofflink.c (xcoff_reloc_link_order): Likewise.
91 * simple.c (simple_dummy_reloc_overflow): Updated.
92
93 2004-10-20 Andreas Schwab <schwab@suse.de>
94
95 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
96 (elf_backend_plt_sym_val): Define.
97
98 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
99
100 * config.bfd: Set targ_underscore=yes for PE COFF targets
101
102 2004-10-19 Alan Modra <amodra@bigpond.net.au>
103
104 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
105 (ppc64_elf_edit_opd): Likewise.
106
107 2004-10-18 Mark Mitchell <mark@codesourcery.com>
108
109 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
110 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
111 set SEC_ALLOC and SEC_LOAD.
112
113 2004-10-18 Nick Clifton <nickc@redhat.com>
114
115 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
116 'name' for relocs against both local and global symbols.
117
118 2004-10-16 Daniel Jacobowitz <dan@debian.org>
119
120 * bfd-in2.h: Regenerate.
121 * bfd.c (struct bfd): Add no_export.
122 * elflink.c (elf_link_add_object_symbols): Handle no_export.
123
124 2004-10-15 Alan Modra <amodra@bigpond.net.au>
125
126 * config.bfd: Whitespace cleanup.
127 * Makefile.am: Run "make dep-am"
128 * Makefile.in: Regenerate.
129
130 2004-10-15 Jakub Jelinek <jakub@redhat.com>
131
132 * elflink.c (struct already_linked_section): Removed.
133 (try_match_symbols_in_sections, already_linked): Removed.
134 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
135 prefix of section names when finding already_linked_table
136 chain. Compare section names. Instead of calling already_linked,
137 do it inline and only for sections in the same already_linked_list.
138
139 2004-10-15 Alan Modra <amodra@bigpond.net.au>
140
141 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
142 parameter. If called after _bfd_elf_write_section_eh_frame,
143 don't allow a -2 return unless need_* bit is already set, and
144 handle offsets adjusted for output_offset.
145 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
146 * elf.c (_bfd_elf_section_offset): Update call.
147
148 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
149
150 PR 440
151 * coffcode.h (coff_compute_section_file_positions): Cast to
152 bfd_vma when computing page alignment.
153
154 2004-10-13 Mark Mitchell <mark@codesourcery.com>
155
156 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
157 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
158
159 2004-10-12 Mark Mitchell <mark@codesourcery.com>
160
161 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
162 relocations use a virtual address, not a section offset.
163
164 2004-10-12 Bob Wilson <bob.wilson@acm.org>
165
166 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
167 (narrow_instruction, widen_instruction): Remove unnecessary calls to
168 xtensa_format_encode.
169 (ebb_propose_action): Inline call to ebb_add_proposed_action.
170 (ebb_add_proposed_action): Delete.
171
172 2004-10-12 Bob Wilson <bob.wilson@acm.org>
173
174 * elf32-xtensa.c: Use ISO C90 formatting.
175
176 2004-10-12 Paul Brook <paul@codesourcery.com>
177
178 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
179 message.
180
181 2004-10-12 Paul Brook <paul@codesourcery.com>
182
183 * elf32-arm.h: Support EABI version 4 objects.
184
185 2004-10-12 Alan Modra <amodra@bigpond.net.au>
186
187 PR 325
188 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
189 Don't mark as default.
190 (bfd_x86_64_arch): Don't mark as default.
191
192 2004-10-12 Alan Modra <amodra@bigpond.net.au>
193
194 * elflink.c (enum action_discarded): New.
195 (elf_section_complain_discarded): Delete.
196 (elf_action_discarded): New function subsuming the above and also
197 controlling reloc behaviour.
198 (elf_link_input_bfd): Use it.
199
200 2004-10-11 Jakub Jelinek <jakub@redhat.com>
201
202 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
203 (special_sections): Add .gnu.liblist and .gnu.conflict.
204 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
205
206 2004-10-11 Alan Modra <amodra@bigpond.net.au>
207
208 PR 233
209 * elflink.c (elf_link_input_bfd): Try harder to support
210 relocations against symbols in removed linkonce sections.
211
212 2004-10-11 Alan Modra <amodra@bigpond.net.au>
213
214 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
215
216 PR 354
217 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
218 sections do not reference symbols in non-SEC_ALLOC sections.
219
220 2004-10-11 Alan Modra <amodra@bigpond.net.au>
221
222 PR 437
223 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
224 (_bfd_elf_link_omit_section_dynsym): Formatting.
225
226 2004-10-10 Alan Modra <amodra@bigpond.net.au>
227
228 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
229 * libbfd.h: Regnerate.
230 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
231 * elf32-frv.c: Likewise.
232 * elf32-m32r.c: Likewise.
233 * elf32-ppc.c: Likewise.
234 * elf64-hppa.c: Likewise.
235 * elfxx-ia64.c: Likewise.
236 * opncls.c: Likewise.
237
238 2004-10-10 Alan Modra <amodra@bigpond.net.au>
239
240 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
241 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
242 offsets stored in struct eh_cie_fde entries before doing other
243 work.
244
245 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
246 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
247 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
248 setting offsets for removed CIEs. Don't set "sec", instead set
249 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
250 CIE in hdr_info. Only set make_relative and make_lsda_relative
251 for CIEs. Use pointers rather than array indices.
252 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
253 make_lsda_relative, need_* on cie_inf for FDEs.
254 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
255 section output_offset. Delete cie_offset, instead use cie_inf
256 pointer to CIE entry. Use need_relative and need_lsda_relative on
257 CIE entry for FDEs. Use pointers rather than array indices.
258
259 2004-10-09 Alan Modra <amodra@bigpond.net.au>
260
261 * coff-rs6000.c (rs6000coff_vec): Add initializer for
262 bfd_is_target_special_symbol.
263 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
264 * som.c (som_bfd_is_target_special_symbol): Define.
265
266 2004-10-08 Nick Clifton <nickc@redhat.com>
267
268 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
269 * configure: Regenerate.
270 * bfd-in2.h: Regenerate.
271 * syms.c (bfd_is_target_special_symbol): New interface function.
272 Returns true when a symbol should be considered to be special.
273 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
274 the symbol jump table.
275 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
276 Return true iff the symbol is a mapping symbol.
277 (bfd_elf32_bfd_is_target_special_symbol): Define.
278 * elfxx-target.h: Provide a default definition for
279 bfd_is_target_special_symbol.
280 * aout-target.h: Likewise.
281 * aout-tic30.c: Likewise.
282 * binary.c: Likewise.
283 * coffcode.h: Likewise.
284 * i386msdos.c: Likewise.
285 * ieee.c: Likewise.
286 * ihex.c: Likewise.
287 * libaout.h: Likewise.
288 * libbfd-in.h: Likewise
289 * libecoff.h: Likewise.
290 * mach-o.c: Likewise.
291 * mmo.c: Likewise.
292 * nlm-target.h: Likewise.
293 * oasys.c: Likewise.
294 * pef.c: Likewise.
295 * ppcboot.c: Likewise.
296 * srec.c: Likewise.
297 * tekhex.c: Likewise.
298 * versados.c: Likewise.
299 * vms.c: Likewise.
300 * xcoff-target.h: Likewise.
301 * xsym.c: Likewise.
302 * libbfd.h: Regenerate.
303
304 2004-10-08 Daniel Jacobowitz <dan@debian.org>
305
306 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
307 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
308 (elf_backend_section_from_shdr): Define.
309
310 2004-10-08 Alan Modra <amodra@bigpond.net.au>
311
312 * syms.c (bfd_is_local_label): Return false for file symbols.
313
314 2004-10-07 Bob Wilson <bob.wilson@acm.org>
315 David Heine <dlheine@tensilica.com>
316
317 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
318 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
319 (elf32xtensa_no_literal_movement): New global variable.
320 (elf_howto_table): Add entries for new relocations.
321 (elf_xtensa_reloc_type_lookup): Handle new relocations.
322 (property_table_compare): When addresses are equal, compare sizes and
323 various property flags.
324 (property_table_matches): New.
325 (xtensa_read_table_entries): Extend to read new property tables. Add
326 output_addr parameter to indicate that output addresses should be used.
327 Use bfd_get_section_limit.
328 (elf_xtensa_find_property_entry): New.
329 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
330 (elf_xtensa_check_relocs): Handle new relocations.
331 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
332 relocations. Use new xtensa-isa.h functions.
333 (build_encoding_error_message): Remove encode_result parameter. Add
334 new target_address parameter used to detect alignment errors.
335 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
336 error handling. Use new is_operand_relocation function.
337 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
338 Use underbar macro for error messages. Formatting.
339 (get_const16_opcode): New.
340 (get_l32r_opcode): Add a separate flag for initialization.
341 (get_relocation_opnd): Operand number is no longer explicit in the
342 relocation. Change to decode the opcode and analyze its operands.
343 (get_relocation_slot): New.
344 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
345 Use new xtensa-isa.h functions to handle multislot instructions.
346 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
347 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
348 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
349 check_loop_aligned, check_branch_target_aligned_address, narrowable,
350 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
351 get_single_format, init_op_single_format_table): New.
352 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
353 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
354 (contract_asm_expansion): Add error_message parameter and pass it to
355 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
356 with R_XTENSA_SLOT0_OP.
357 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
358 instructions. Use new xtensa-isa.h functions.
359 (r_reloc struct): Add new virtual_offset field.
360 (r_reloc_init): Add contents and content_length parameters. Set
361 virtual_offset field to zero. Add contents to target_offset field for
362 partial_inplace relocations.
363 (r_reloc_is_defined): Check for null.
364 (print_r_reloc): New debug function.
365 (source_reloc struct): Replace xtensa_operand field with pair of the
366 opcode and the operand position. Add is_abs_literal field.
367 (init_source_reloc): Specify operand by opcode/position pair. Set
368 is_abs_literal field.
369 (source_reloc_compare): When target_offsets are equal, compare other
370 fields to make sorting predictable.
371 (literal_value struct): Add is_abs_literal field.
372 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
373 (init_literal_value): New.
374 (is_same_value): Replace with ...
375 (literal_value_equal): ... this function. Add comparisons of
376 virtual_offset and is_abs_literal fields.
377 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
378 failure. Initialize has_last_loc field.
379 (value_map_hash_table_delete): New.
380 (hash_literal_value): Rename to ...
381 (literal_value_hash): ... this. Include is_abs_literal flag and
382 virtual_offset field in the hash value.
383 (get_cached_value): Rename to ...
384 (value_map_get_cached_value): ... this. Update calls to
385 literal_value_hash and literal_value_equal.
386 (add_value_map): Check for allocation failure. Update calls to
387 value_map_get_cached_value and literal_value_hash.
388 (text_action, text_action_list, text_action_t): New types.
389 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
390 text_action_add, text_action_add_literal, offset_with_removed_text,
391 offset_with_removed_text_before_fill, find_insn_action,
392 print_action_list, print_removed_literals): New.
393 (offset_with_removed_literals): Delete.
394 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
395 fix_array, fix_array_count, allocated_relocs, relocs_count, and
396 allocated_relocs_count fields.
397 (init_xtensa_relax_info): Initialize new fields.
398 (reloc_bfd_fix struct): Add new translated field.
399 (reloc_bfd_fix_init): Add translated parameter and use it to set the
400 translated field.
401 (fix_compare, cache_fix_array): New.
402 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
403 section via get_xtensa_relax_info. Use cache_fix_array to set up
404 sorted fix_array and use bsearch instead of linear search.
405 (section_cache_t): New struct.
406 (init_section_cache, section_cache_section, clear_section_cache): New.
407 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
408 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
409 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
410 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
411 New.
412 (retrieve_contents): Use bfd_get_section_limit.
413 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
414 to compute_removed_literals. Free value_map_hash_table when no longer
415 needed.
416 (analyze_relocations): Check is_relaxable_asm_section flag. Call
417 compute_text_actions for all sections.
418 (find_relaxable_sections): Mark sections as relaxable if they contain
419 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
420 call. Increment relax_info src_count field only for appropriate
421 relocation types. Remove is_literal_section check.
422 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
423 r_reloc_init and find_associated_l32r_irel. Check
424 is_relaxable_asm_section flag. Handle L32R instructions with absolute
425 literals. Pass is_abs_literal flag to init_source_reloc.
426 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
427 CONST16 instructions. Adjust calls to r_reloc_init and
428 pcrel_reloc_fits. Handle weak symbols conservatively.
429 (find_associated_l32r_irel): Add bfd parameter and pass it to
430 is_l32r_relocation.
431 (compute_text_actions, compute_ebb_proposed_actions,
432 compute_ebb_actions, check_section_ebb_pcrels_fit,
433 check_section_ebb_reduces, text_action_add_proposed,
434 compute_fill_extra_space): New.
435 (remove_literals): Replace with ...
436 (compute_removed_literals): ... this function. Call
437 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
438 Call xtensa_read_table_entries to get the property table. Skip
439 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
440 is_removable_literal, remove_dead_literal, and
441 identify_literal_placement functions.
442 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
443 instead of linear search.
444 (is_removable_literal, remove_dead_literal,
445 identify_literal_placement): New.
446 (relocations_reach): Update check for literal not referenced by any
447 PC-relative relocations. Adjust call to pcrel_reloc_fits.
448 (coalesce_shared_literal, move_shared_literal): New.
449 (relax_section): Use bfd_get_section_limit. Call
450 translate_section_fixes. Update calls to r_reloc_init and
451 offset_with_removed_text. Check new is_relaxable_asm_section flag.
452 Add call to pin_internal_relocs. Add special handling for
453 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
454 info to calculate new addend_displacement variable. Replace code for
455 deleting literals with more general code to perform the actions
456 determined by the action_list for the section.
457 (translate_section_fixes, translate_reloc_bfd_fix): New.
458 (translate_reloc): Check new is_relaxable_asm_section flag. Call
459 find_removed_literal only if is_operand_relocation. Update call to
460 offset_with_removed_text. Use new target_offset and removed_bytes
461 variables.
462 (move_literal): New.
463 (relax_property_section): Use bfd_get_section_limit. Set new
464 is_full_prop_section flag and handle new property tables. Update calls
465 to r_reloc_init and offset_with_removed_text. Check
466 is_relaxable_asm_section flag. Handle expansion of zero-sized
467 unreachable entries, with use of offset_with_removed_text_before_fill.
468 For relocatable links, combine entries only for literal tables.
469 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
470 calls to offset_with_removed_text. Translate st_size field for
471 function symbols.
472 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
473 failure. Add contents parameter. Update call to get_bfd_fix. Update
474 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
475 R_XTENSA_ASM_EXPAND relocs.
476 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
477 call to get_bfd_fix. Include offset from contents for partial_inplace
478 relocations.
479 (is_reloc_sym_weak): New.
480 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
481 (prop_sec_len): New.
482 (xtensa_is_property_section): Handle new property sections.
483 (is_literal_section): Delete.
484 (internal_reloc_compare): When r_offset matches, compare r_info and
485 r_addend to make sorting predictable.
486 (internal_reloc_matches): New.
487 (xtensa_get_property_section_name): Handle new property sections.
488 (xtensa_get_property_predef_flags): New.
489 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
490 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
491 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
492 (xtisa_errno, xtisa_error_msg): New variables.
493 (xtensa_isa_errno, xtensa_isa_error_msg): New.
494 (xtensa_insnbuf_alloc): Add error handling.
495 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
496 use xtensa_format_decode. Add error handling.
497 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
498 instruction length to find the number of bytes to copy.
499 (xtensa_isa_init): Add error handling. Replace calls to
500 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
501 tables in the xtensa_modules structure.
502 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
503 xtensa_extend_isa): Delete.
504 (xtensa_isa_free): Change to only free lookup tables.
505 (opname_lookup_compare): Replace with ...
506 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
507 (xtensa_insn_maxlength): Rename to ...
508 (xtensa_isa_maxlength): ... this.
509 (xtensa_insn_length): Delete.
510 (xtensa_insn_length_from_first_byte): Replace with ...
511 (xtensa_isa_length_from_chars): ... this function.
512 (xtensa_num_opcodes): Rename to ...
513 (xtensa_isa_num_opcodes): ... this.
514 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
515 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
516 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
517 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
518 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
519 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
520 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
521 (xtensa_opcode_lookup): Add error handling.
522 (xtensa_decode_insn): Replace with ...
523 (xtensa_opcode_decode): ... this function, with new format and
524 slot parameters. Add error handling.
525 (xtensa_encode_insn): Replace with ...
526 (xtensa_opcode_encode): ... this function, which does the encoding via
527 one of the entries in the "encode_fns" array. Add error handling.
528 (xtensa_opcode_name): Add error handling.
529 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
530 xtensa_opcode_is_call): New.
531 (xtensa_num_operands): Replace with ...
532 (xtensa_opcode_num_operands): ... this function. Add error handling.
533 (xtensa_opcode_num_stateOperands,
534 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
535 xtensa_opcode_funcUnit_use, xtensa_operand_name,
536 xtensa_operand_is_visible): New.
537 (xtensa_get_operand, xtensa_operand_kind): Delete.
538 (xtensa_operand_inout): Add error handling and special-case for
539 "sout" operands.
540 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
541 operate on one slot of an instruction. Added error handling.
542 (xtensa_operand_encode): Handle default operands with no encoding
543 functions. Check for success by comparing against decoded value.
544 Add error handling.
545 (xtensa_operand_decode): Handle default operands. Return decoded value
546 through argument pointer. Add error handling.
547 (xtensa_operand_is_register, xtensa_operand_regfile,
548 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
549 (xtensa_operand_isPCRelative): Rename to ...
550 (xtensa_operand_is_PCrelative): ... this. Add error handling.
551 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
552 through argument pointer. Add error handling.
553 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
554 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
555 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
556 xtensa_regfile_shortname, xtensa_regfile_view_parent,
557 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
558 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
559 xtensa_state_is_exported, xtensa_sysreg_lookup,
560 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
561 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
562 xtensa_interface_num_bits, xtensa_interface_inout,
563 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
564 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
565 * xtensa-modules.c: Rewrite to use new data structures.
566 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
567 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
568 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
569 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
570 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
571 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
572 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
573 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
574 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
575 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
576 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
577 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
578 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
579 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
580 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
581 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
582 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
583 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
584 * Makefile.in: Regenerate.
585 * bfd-in2.h: Likewise.
586 * libbfd.h: Likewise.
587
588 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
589
590 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
591 against the absolute section.
592 (mips_elf64_write_rela): Likewise.
593
594 2004-10-07 Jan Beulich <jbeulich@novell.com>
595
596 * elf.c (elf_find_function): Don't generally check for matching
597 section, just for non-file symbols. Remove redunant comparison
598 for the latter.
599 * elf32-arm.h (arm_elf_find_function): Likewise.
600
601 2004-10-07 Jeff Baker <jbaker@qnx.com>
602
603 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
604 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
605 was specified.
606
607 2004-10-04 Roland McGrath <roland@redhat.com>
608
609 * hash.c (bfd_hash_set_default_size): Use const for table.
610 Use size_t instead of int for variable compared to sizeof results.
611
612 2004-10-05 Alan Modra <amodra@bigpond.net.au>
613
614 PR 425
615 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
616
617 2004-10-01 Paul Brook <paul@codesourcery.com>
618
619 * elf32-arm.h (elf32_arm_fake_sections,
620 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
621 functions.
622 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
623
624 2004-10-01 Alan Modra <amodra@bigpond.net.au>
625
626 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
627 need_lsda_relative.
628 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
629 need_relative or need_lsda_relative if we are processing an
630 offset for a reloc on a FDE initial loc or LSDA field
631 respectively.
632 (_bfd_elf_write_section_eh_frame): Test need_relative and
633 need_lsda_relative in place of corresponding make_* field
634 when deciding to use pc-relative encodings.
635
636 2004-09-30 Paul Brook <paul@codesourcery.com>
637
638 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
639 target2 relocation type.
640
641 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
642
643 PR 414
644 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
645
646 2004-09-30 Paul Brook <paul@codesourcery.com>
647
648 * reloc.c: Add BFD_RELOC_ARM_SMI.
649 * bfd-in2.h: Regenerate.
650 * libbfd.h: Ditto.
651
652 2004-09-24 Alan Modra <amodra@bigpond.net.au>
653
654 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
655 vma and output offset to address.
656 * simple.c (simple_save_output_info): Only set output section
657 and offset for debug sections, or those not already set up by
658 the linker.
659 (bfd_simple_get_relocated_section_contents): Update comment.
660
661 2004-09-24 Alan Modra <amodra@bigpond.net.au>
662
663 * elf.c (IS_LOADED): Delete.
664 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
665 Restore SEC_HAS_CONTENTS test to the one place it was used prior
666 to 2004-09-22.
667
668 2004-09-23 Alan Modra <amodra@bigpond.net.au>
669
670 PR gas/396
671 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
672 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
673 redundant assignment of EM_SPARC.
674
675 2004-09-22 Brian Ford <ford@vss.fsi.com>
676
677 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
678 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
679 constants.
680 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
681
682 2004-09-22 Alan Modra <amodra@bigpond.net.au>
683
684 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
685 (elf_backend_modify_segment_map): Don't define.
686
687 2004-09-22 Alan Modra <amodra@bigpond.net.au>
688
689 * elf.c (IS_LOADED): Define.
690 (assign_file_positions_for_segments): Don't round up file offset of
691 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
692 Delete code handling link script adjustment of lma. Do the adjust
693 in later code handling similar ajustments. Remove dead code error
694 check. Warn if section lma would require a negative offset
695 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
696 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
697 update voff in section loop. Change voff in segment loop to be an
698 adjustment on top of "off". Set sec->filepos and update "off" later.
699 Test for loadable sections consistently using IS_LOADED. Similarly,
700 test for alloc-only sections other than .tbss consistently.
701 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
702 Tidy PT_NOTE handling. Use %B and %A in error messages.
703 (assign_file_positions_except_relocs): Use %B in error message.
704
705 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
706
707 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
708 (CONFIG_STATUS_DEPENDENCIES): New.
709 (Makefile): Removed.
710 (config.status): Likewise.
711 * Makefile.in: Regenerated.
712
713 2004-09-17 Paul Brook <paul@codesourcery.com>
714
715 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
716 (bfd_elf32_arm_process_before_allocation): Update prototype.
717 * bfd-in2.h: Regenerate.
718 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
719 (elf32_arm_link_hash_table_create): Set it.
720 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
721 (bfd_elf32_arm_set_target_relocs): New function.
722 (arm_real_reloc_type): New function.
723 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
724 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
725 (elf32_arm_gc_sweep_hook): Ditto.
726 (elf32_arm_check_relocs): Ditto.
727 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
728 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
729 R_ARM_GOT_TARGET2.
730 (elf32_arm_got_prel): New variable.
731 (elf32_arm_howto_from_type): New function.
732 (elf32_arm_info_to_howto): Use it.
733 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
734 BFD_RELOC_ARM_TARGET2.
735 * libbfd.h: Regenerate.
736 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
737
738 2004-09-17 Alan Modra <amodra@bigpond.net.au>
739
740 * ecoff.c: Update u.undef.next refs.
741 * elf64-ppc.c: Likewise.
742 * elflink.c: Likewise.
743 * linker.c: Likewise.
744 * xcofflink.c: Likewise.
745
746 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
747 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
748 fields to indirect struct.
749 * elf-m10300.c: Update u.weakdef refs.
750 * elf32-arm.h: Likewise.
751 * elf32-cris.c: Likewise.
752 * elf32-frv.c: Likewise.
753 * elf32-hppa.c: Likewise.
754 * elf32-i370.c: Likewise.
755 * elf32-i386.c: Likewise.
756 * elf32-m32r.c: Likewise.
757 * elf32-m68k.c: Likewise.
758 * elf32-ppc.c: Likewise.
759 * elf32-s390.c: Likewise.
760 * elf32-sh.c: Likewise.
761 * elf32-sparc.c: Likewise.
762 * elf32-vax.c: Likewise.
763 * elf32-xtensa.c: Likewise.
764 * elf64-alpha.c: Likewise.
765 * elf64-hppa.c: Likewise.
766 * elf64-ppc.c: Likewise.
767 * elf64-s390.c: Likewise.
768 * elf64-sh64.c: Likewise.
769 * elf64-sparc.c: Likewise.
770 * elf64-x86-64.c: Likewise.
771 * elfxx-ia64.c: Likewise.
772 * elfxx-mips.c: Likewise.
773 * elflink.c: Likewise. Also u.elf_hash_value.
774 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
775 indirection.
776 (elf_gc_smash_unused_vtentry_relocs): Likewise.
777 (bfd_elf_gc_record_vtinherit): Alloc vtable.
778 (bfd_elf_gc_record_vtentry): Likewise.
779 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
780
781 2004-09-17 Alan Modra <amodra@bigpond.net.au>
782
783 * Makefile.am: Run "make dep-am".
784 * Makefile.in: Regenerate.
785 * bfd-in2.h: Regenerate.
786 * po/SRC-POTFILES.in: Regenerate.
787 * po/bfd.pot: Regenerate.
788
789 2004-09-16 Alan Modra <amodra@bigpond.net.au>
790
791 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
792 with bitfields. Make "type" and "other" bitfields too.
793 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
794 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
795 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
796 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
797 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
798 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
799 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
800 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
801 * elf-hppa.h: Update all uses of elf_link_hash_flags.
802 * elf-m10300.c: Likewise.
803 * elf.c: Likewise.
804 * elf32-arm.h: Likewise.
805 * elf32-cris.c: Likewise.
806 * elf32-frv.c: Likewise.
807 * elf32-hppa.c: Likewise.
808 * elf32-i370.c: Likewise.
809 * elf32-i386.c: Likewise.
810 * elf32-m32r.c: Likewise.
811 * elf32-m68k.c: Likewise.
812 * elf32-ppc.c: Likewise.
813 * elf32-s390.c: Likewise.
814 * elf32-sh-symbian.c: Likewise.
815 * elf32-sh.c: Likewise.
816 * elf32-sh64.c: Likewise.
817 * elf32-sparc.c: Likewise.
818 * elf32-vax.c: Likewise.
819 * elf32-xtensa.c: Likewise.
820 * elf64-alpha.c: Likewise.
821 * elf64-hppa.c: Likewise.
822 * elf64-ppc.c: Likewise.
823 * elf64-s390.c: Likewise.
824 * elf64-sh64.c: Likewise.
825 * elf64-sparc.c: Likewise.
826 * elf64-x86-64.c: Likewise.
827 * elflink.c: Likewise.
828 * elfxx-ia64.c: Likewise.
829 * elfxx-mips.c: Likewise.
830 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
831 * configure: Regenerate.
832 * aclocal.m4: Regenerate.
833
834 2004-09-16 Alan Modra <amodra@bigpond.net.au>
835
836 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
837 around uses of R_ARM_TARGET1.
838 (elf32_arm_check_relocs): Likewise.
839
840 2004-09-13 Paul Brook <paul@codesourcery.com>
841
842 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
843 prototype.
844 * bfd-in2.h: Regenerate.
845 * libbfd.h: Regenerate.
846 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
847 (elf32_arm_link_hash_table_create): Set target1_is_rel.
848 (bfd_elf32_arm_process_before_allocation): Ditto.
849 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
850 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
851 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
852 * reloc.c: Ditto.
853
854 2004-09-10 Joel Brobecker <brobecker@gnat.com>
855
856 * hpux-core.c (thread_section_p): New function.
857 (hpux_core_core_file_p): Fix computation of offset in call
858 to bfd_seek. Create a ".reg" section from an arbitrary
859 ".reg/<id>" section if none was created after having read
860 all sections.
861
862 2004-09-11 Andreas Schwab <schwab@suse.de>
863
864 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
865 * aclocal.m4: Rebuild.
866 * configure: Rebuild.
867
868 2004-09-10 Joel Brobecker <brobecker@gnat.com>
869
870 * section.c (bfd_sections_find_if): Fix parameter name in
871 comment to match code.
872
873 2004-09-10 Alan Modra <amodra@bigpond.net.au>
874
875 * elf.c (assign_file_positions_except_relocs): Assign relocs
876 stored in a bfd section.
877
878 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
879
880 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
881 h->gotplt_refcount to 0, not -1.
882
883 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
884
885 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
886 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
887 symname.
888 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
889 handle symbol visibility here.
890
891 2004-09-07 Alan Modra <amodra@bigpond.net.au>
892
893 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
894 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
895 callers.
896 (ppc_stub_name): Remove trailing "+0" on stub name.
897 (create_linkage_sections): Create relocations for
898 branch lookup table when --emit-relocs as well as when --shared.
899 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
900 relbrlt test. For --emit-stub-syms, always output a sym even when
901 one already exists on a plt call stub. Put stub type in the stub
902 symbol name.
903 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
904 test.
905 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
906 reloc_count in stub sections. Adjust relbrlt test.
907 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
908 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
909 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
910 for relocs against discarded symbols. Fix comments.
911
912 2004-09-06 Mark Mitchell <mark@codesourcery.com>
913
914 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
915 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
916 from ...
917 (map_sections_to_segments): ... here. Use it. Assign a file
918 position to the .dynamic section if it is not loadable, but part
919 of the PT_DYNAMIC segment.
920 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
921 offsets, not VMAs, for the BPABI. Do not fill in the header in
922 the .got.plt section for the BPABI.
923 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
924 PT_DYNAMIC segment.
925 (elf_backend_want_got_plt): Define to zero for Symbian OS.
926
927 2004-09-06 Nick Clifton <nickc@redhat.com>
928
929 * elflink.c (elf_link_add_object_symbols): Set the error code to
930 bfd_error_wrong_format when the input format does not match the
931 output format.
932
933 2004-09-06 Alan Modra <amodra@bigpond.net.au>
934
935 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
936 (ppc64_elf_check_directives): ..here.
937 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
938 before accessing ppc64_elf_tdata.
939 (ppc64_elf_finish_dynamic_sections): And here too.
940
941 2004-09-04 Alan Modra <amodra@bigpond.net.au>
942
943 * bfd.c (_bfd_default_error_handler): Correct loop exit.
944
945 2004-09-03 Mark Mitchell <mark@codesourcery.com>
946
947 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
948 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
949 (bfd_elf32_littlearm_symbian_vec): Likewise.
950 * configure: Regenerated.
951 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
952 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
953 (PLT_ENTRY_SIZE): Likewise.
954 (bfd_vma_elf32_arm_symbian_plt_entry): New
955 variable.
956 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
957 and symbian_p.
958 (create_got_section): Don't create sections when generating BPABI
959 objects.
960 (elf32_arm_create_dynamic_sections): Tidy.
961 (elf32_arm_link_hash_table_create): Set plt_header_size,
962 plt_entry_size, and symbian_p.
963 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
964 generating BPABI objects.
965 (allocate_dynrelocs): Use htab->plt_header_size, not
966 PLT_HEADER_SIZE. Do not add to .got.plt when
967 generating BPABI objects.
968 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
969 * elfarm-nabi.c: Add SymbianOS target vectors.
970 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
971 (_bfd_elf_link_create_dynamic_sections): Likewise.
972 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
973 (elfNN_bed): Use it.
974 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
975 (bfd_elf32_littlearm_symbian_vec): Likewise.
976 (_bfd_target_vector): Add them.
977
978 2004-09-03 Nick Clifton <nickc@redhat.com>
979
980 PR 360
981 * coffcode.h (handle_COMDAT): Replace abort with an warning
982 message and allow the scan to continue.
983
984 2004-09-02 Alan Modra <amodra@bigpond.net.au>
985
986 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
987 in when reading relocs, not our sorted syms. Remove unnecessary
988 var.
989
990 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
991
992 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
993
994 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
995
996 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
997 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
998 replace uses of *_alias with *_noncanonical.
999 * aclocal.m4: Rebuild with aclocal 1.4p6.
1000 * Makefile.in: Rebuild with automake 1.4p6.
1001 * doc/Makefile.in: Rebuild with automake 1.4p6.
1002 * configure.in: Autoupdate with autoupdate 2.59.
1003 * config.in: Regenerate with autoheader 2.59.
1004 * configure: Regnerate with autoconf 2.59.
1005
1006 2004-08-28 Alan Modra <amodra@bigpond.net.au>
1007
1008 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
1009 symbol pointer arrays before modifying.
1010
1011 2004-08-28 Alan Modra <amodra@bigpond.net.au>
1012
1013 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
1014 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
1015 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
1016 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
1017 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
1018 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
1019 Use both symbol tables on non-relocatable objects. Use a common
1020 error exit. Fix "mid" warning.
1021 * libbfd.h: Regenerate.
1022 * bfd-in2.h: Regenerate.
1023
1024 2004-08-28 Alan Modra <amodra@bigpond.net.au>
1025
1026 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
1027 object file.
1028 (struct sfpr_def_parms): Save some space.
1029 (sfpr_define): Here too.
1030
1031 * elf64-ppc.c (compare_symbols): Put section syms first.
1032 (sym_exists_at): New function.
1033 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
1034 points only for relocatable files. Use .opd section contents
1035 otherwise. Generally clean up the code.
1036
1037 2004-08-27 Alan Modra <amodra@bigpond.net.au>
1038
1039 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
1040 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
1041 (struct sfpr_def_parms): New.
1042 (sfpr_define): New function.
1043 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
1044 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
1045 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
1046 (savefpr1_tail, restfpr1_tail): New functions.
1047 (savevr, savevr_tail, restvr, restvr_tail): New functions.
1048 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
1049 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
1050 code. Define all ABI mandated _save and _rest functions.
1051
1052 2004-08-26 Paul Brook <paul@codesourcery.com>
1053
1054 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
1055
1056 2004-08-26 Alan Modra <amodra@bigpond.net.au>
1057
1058 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
1059 TRUE or FALSE.
1060
1061 2004-08-26 Alan Modra <amodra@bigpond.net.au>
1062
1063 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
1064 that pcrel correction is applied for R_386_PC32.
1065
1066 2004-08-25 Alan Modra <amodra@bigpond.net.au>
1067
1068 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
1069 for R_386_32 and R_386_PC32 relocs against symbols defined in
1070 discarded sections.
1071
1072 2004-08-25 Dmitry Diky <diwil@spec.ru>
1073
1074 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
1075 Add new relocations.
1076 * bfd-in2.h: Regenerate.
1077 * libbfd.h: Regenerate.
1078 * elf32-msp430.c: Clean-up code.
1079 (elf_msp430_howto_table): Add new relocation entries.
1080 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
1081 (msp430_elf_relax_section): New function.
1082 (msp430_elf_relax_delete_bytes): New function.
1083 (msp430_elf_symbol_address_p): New function.
1084
1085 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1086
1087 * elf32-m32r.c (m32r_elf_relocate_section): Handle
1088 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
1089
1090 2004-08-20 Daniel Jacobowitz <dan@debian.org>
1091
1092 * elflink.c (_bfd_elf_section_already_linked): Handle
1093 SEC_LINK_DUPLICATES_SAME_CONTENTS.
1094
1095 2004-08-19 Mark Mitchell <mark@codesourcery.com>
1096
1097 * config.bfd (arm*-*-symbianelf*): New target.
1098 (arm*-*-eabi*): Likewise.
1099
1100 2004-08-19 Alan Modra <amodra@bigpond.net.au>
1101
1102 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
1103 "struct ppc_link_hash_entry *".
1104 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
1105 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
1106
1107 2004-08-19 Jakub Jelinek <jakub@redhat.com>
1108
1109 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
1110 entries (where fd_aux overlaps next entry's fd_func).
1111 Add non_overlapping argument, use it.
1112 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
1113 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
1114 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
1115 as indexes into opd_sym_map/opd_adjust array.
1116 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
1117
1118 2004-08-18 Alan Modra <amodra@bigpond.net.au>
1119
1120 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
1121 if we can look up their function descriptor in a regular file.
1122
1123 2004-08-18 Nick Clifton <nickc@redhat.com>
1124
1125 PR 324
1126 * cofflink.c (coff_link_add_symbols): Check that the comdat
1127 pointer in the coff_section_data structure has been initialised
1128 before using it.
1129
1130 2004-08-18 Alan Modra <amodra@bigpond.net.au>
1131
1132 PR 338
1133 * elflink.c (bfd_elf_record_link_assignment): Add comment about
1134 changing bfd_link_hash_undefined to bfd_link_hash_new.
1135
1136 2004-08-17 Jakub Jelinek <jakub@redhat.com>
1137
1138 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
1139 if not yet defined.
1140 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
1141 (synthetic_opd, synthetic_relocatable): New variables.
1142 (compare_symbols, compare_relocs): New helper routines.
1143 (ppc64_elf_get_synthetic_symtab): New function.
1144 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
1145 to relsyms.
1146 * bfd-in2.h: Regenerated.
1147 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
1148 to relsyms. Return 0 if abfd is relocatable.
1149
1150 2004-08-17 Alan Modra <amodra@bigpond.net.au>
1151
1152 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
1153
1154 2004-08-17 Nick Clifton <nickc@redhat.com>
1155
1156 * (is_arm_mapping_symbol_name): New function - return true
1157 when a symbol name matches the requirements for an ARM mapping
1158 symbol name.
1159 (arm_elf_find_function): New function based on
1160 elf_find_function in elf.c but skipping ARM mapping symbols
1161 and including thumb function symbols.
1162 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
1163 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
1164
1165 2004-08-17 Alan Modra <amodra@bigpond.net.au>
1166
1167 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
1168 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
1169 (ppc64_elf_brtaken_reloc): Here too.
1170
1171 2004-08-17 Alan Modra <amodra@bigpond.net.au>
1172
1173 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
1174 symbol visibility.
1175 (ppc64_elf_check_directives): Check that we have the right hash
1176 table before proceeding.
1177
1178 2004-08-17 Alan Modra <amodra@bigpond.net.au>
1179
1180 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
1181 (adjust_opd_syms): Attach opd syms for deleted entries to one of
1182 the sections that will be discarded.
1183
1184 2004-08-16 Alan Modra <amodra@bigpond.net.au>
1185
1186 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
1187
1188 2004-08-16 Alan Modra <amodra@bigpond.net.au>
1189
1190 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
1191 free space available.
1192
1193 2004-08-16 Alan Modra <amodra@bigpond.net.au>
1194
1195 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
1196 occurrences with bfd_byte * thoughout file.
1197
1198 * coff-rs6000.c (do_shared_object_padding): Warning fix.
1199 (xcoff_write_armap_big): Likewise.
1200 (xcoff_write_archive_contents_old): Likewise.
1201 (xcoff_write_archive_contents_big): Likewise.
1202
1203 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
1204
1205 2004-08-13 Nick Clifton <nickc@redhat.com>
1206
1207 * elf32-arm.h: Convert to ISO C90.
1208
1209 2004-08-13 Alan Modra <amodra@bigpond.net.au>
1210
1211 PR 293
1212 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
1213 zero the plt field.
1214
1215 2004-08-13 Alan Modra <amodra@bigpond.net.au>
1216
1217 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
1218 (bfd_archive_filename, bfd_get_section_ident): Delete.
1219 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
1220 bfd_archive_filename.
1221 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
1222 to warn about symbols in discarded sections. Use _bfd_error_handler.
1223 * aout-adobe.c (aout_adobe_callback): See below.
1224 * aout-cris.c (swap_ext_reloc_in): ..
1225 * coff-arm.c (find_thumb_glue, find_arm_glue,
1226 coff_arm_relocate_section, bfd_arm_process_before_allocation,
1227 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
1228 coff_arm_copy_private_bfd_data): ..
1229 * coff-i860.c (i860_reloc_processing): ..
1230 * coff-mcore.c (mcore_coff_unsupported_reloc,
1231 coff_mcore_relocate_section): ..
1232 * coff-ppc.c (coff_ppc_relocate_section): ..
1233 * coff-rs6000.c (xcoff_create_csect_from_smclas
1234 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
1235 sh_swap_insns, sh_relocate_section): ..
1236 * coff-tic54x.c (tic54x_reloc_processing): ..
1237 * coff-tic80.c (coff_tic80_relocate_section): ..
1238 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
1239 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
1240 coff_slurp_symbol_table, coff_classify_symbol,
1241 coff_slurp_reloc_table): ..
1242 * coffgen.c (_bfd_coff_read_string_table): ..
1243 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
1244 _bfd_coff_generic_relocate_section): ..
1245 * cpu-arm.c (bfd_arm_merge_machines): ..
1246 * cpu-sh.c (sh_merge_bfd_arch): ..
1247 * elf-hppa.h (elf_hppa_relocate_section): ..
1248 * elf.c (bfd_elf_string_from_elf_section, setup_group,
1249 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
1250 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
1251 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
1252 * elf32-arm.h (find_thumb_glue, find_arm_glue,
1253 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
1254 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
1255 elf32_arm_relocate_section, elf32_arm_set_private_flags,
1256 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
1257 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
1258 cris_elf_merge_private_bfd_data
1259 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
1260 * elf32-gen.c (elf32_generic_link_add_symbols): ..
1261 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
1262 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
1263 elf32_hppa_relocate_section): ..
1264 * elf32-i370.c (i370_elf_merge_private_bfd_data,
1265 i370_elf_check_relocs, i370_elf_relocate_section): ..
1266 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
1267 elf_i386_relocate_section): ..
1268 * elf32-m32r.c (m32r_elf_relocate_section,
1269 m32r_elf_merge_private_bfd_data): ..
1270 * elf32-m68hc1x.c (m68hc12_add_stub,
1271 _bfd_m68hc11_elf_merge_private_bfd_data): ..
1272 * elf32-m68k.c (elf_m68k_relocate_section): ..
1273 * elf32-mcore.c (mcore_elf_unsupported_reloc,
1274 mcore_elf_relocate_section): ..
1275 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
1276 ppc_elf_check_relocs, ppc_elf_relocate_section,
1277 ppc_elf_begin_write_processing): ..
1278 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
1279 elf_s390_relocate_section): ..
1280 * elf32-sh-symbian.c (sh_symbian_import_as,
1281 sh_symbian_process_embedded_commands,
1282 sh_symbian_relocate_section): ..
1283 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
1284 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
1285 sh_elf_merge_private_data): ..
1286 * elf32-sparc.c (elf32_sparc_check_relocs,
1287 elf32_sparc_relocate_section,
1288 elf32_sparc_merge_private_bfd_data): ..
1289 * elf32-v850.c (v850_elf_check_relocs,
1290 v850_elf_merge_private_bfd_data): ..
1291 * elf32-xtensa.c (elf_xtensa_check_relocs,
1292 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
1293 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
1294 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
1295 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
1296 * elf64-gen.c (elf64_generic_link_add_symbols): ..
1297 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
1298 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
1299 ppc64_elf_relocate_section): ..
1300 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
1301 elf_s390_relocate_section): ..
1302 * elf64-sh64.c (sh_elf64_relocate_section): ..
1303 * elf64-sparc.c (sparc64_elf_check_relocs,
1304 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
1305 sparc64_elf_merge_private_bfd_data): ..
1306 * elf64-x86-64.c (elf64_x86_64_check_relocs,
1307 elf64_x86_64_relocate_section): ..
1308 * elflink.c (_bfd_elf_add_default_symbol,
1309 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
1310 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
1311 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
1312 elf_get_linked_section_vma, elf_fixup_link_order,
1313 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
1314 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
1315 * elfxx-ia64.c (elfNN_ia64_relax_section,
1316 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
1317 * elfxx-mips.c (mips_elf_perform_relocation,
1318 _bfd_mips_elf_check_relocs,
1319 _bfd_mips_elf_merge_private_bfd_data): ..
1320 * ieee.c (ieee_slurp_external_symbols): ..
1321 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
1322 * libbfd.c (_bfd_generic_verify_endian_match): ..
1323 * linker.c (_bfd_generic_link_add_one_symbol,
1324 _bfd_generic_section_already_linked): ..
1325 * pdp11.c (translate_to_native_sym_flags): ..
1326 * pe-mips.c (coff_pe_mips_relocate_section): ..
1327 * peicode.h (pe_ILF_build_a_bfd): ..
1328 * srec.c (srec_bad_byte): ..
1329 * stabs.c (_bfd_link_section_stabs): ..
1330 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
1331 Replace all uses of bfd_archive_filename and bfd_get_section_ident
1332 with corresponding %B and %A in _bfd_error_handler format string.
1333 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
1334 calls to use %A and %B. Fix "against symbol .. from section" and
1335 similar error messages. Combine multiple _bfd_error_handler calls
1336 where they were separated due to bfd_archive_filename deficiencies.
1337 * bfd-in2.h: Regenerate.
1338
1339 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
1340
1341 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
1342 relocation.
1343
1344 2004-08-10 Alan Modra <amodra@bigpond.net.au>
1345
1346 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
1347 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
1348 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
1349 Add twiddled_syms.
1350 (link_hash_newfunc): Init was_undefined.
1351 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
1352 Use undefweak instead.
1353 (ppc64_elf_check_directives): Fix undefs chain.
1354 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
1355 references.
1356 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
1357 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
1358 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
1359
1360 2004-08-09 Jakub Jelinek <jakub@redhat.com>
1361
1362 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
1363 error, test input_section flags rather than sec.
1364
1365 2004-08-09 Alan Modra <amodra@bigpond.net.au>
1366
1367 * elf-bfd.h (struct elf_backend_data): Add
1368 elf_backend_archive_symbol_lookup.
1369 (_bfd_elf_archive_symbol_lookup): Declare.
1370 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
1371 (elf_link_add_archive_symbols): ..extracted from here. Call the
1372 backend version.
1373 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
1374 (elfNN_bed): Init new field.
1375 * elf64-ppc.c (elf_backend_check_directives): Define.
1376 (elf_backend_archive_symbol_lookup): Define.
1377 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
1378 a ppc_link_hash_entry pointer.
1379 (get_fdh): Move.
1380 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
1381 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
1382 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
1383 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
1384 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
1385 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
1386 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
1387 descriptor symbols.
1388
1389 2004-08-09 Alan Modra <amodra@bigpond.net.au>
1390
1391 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
1392 (ppc64_elf_add_symbol_hook): Test for NULL section.
1393 (get_sym_h): Formatting.
1394 (ppc64_elf_size_stubs): Include reloc addend in value stored as
1395 stub target_value.
1396
1397 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
1398 long branch stubs with code handling plt and r2off branch stubs.
1399
1400 2004-08-09 Alan Modra <amodra@bigpond.net.au>
1401
1402 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
1403 * elflink.c (elf_link_input_bfd): Formatting.
1404 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
1405 all callers.
1406 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
1407 (link_hash_newfunc): Don't set it.
1408 (ppc64_elf_copy_indirect_symbol): Nor copy it.
1409 (ppc64_elf_mark_entry_syms): Delete.
1410 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
1411 sections. Use get_opd_info.
1412 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
1413
1414 2004-08-09 Alan Modra <amodra@bigpond.net.au>
1415
1416 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
1417
1418 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
1419 (func_desc_adjust): Don't set have_undefweak.
1420 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
1421 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
1422
1423 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
1424 "struct ppc_link_hash_entry *". Adjust all references.
1425 (ppc64_elf_hide_symbol): Correct a comment.
1426
1427 * elf64-ppc.c (get_opd_info): New function.
1428 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
1429 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
1430 before calling get_fdh. Test fdh rather than h before dereferencing
1431 fdh. Mark removed symbols in opd_adjust.
1432 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
1433 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
1434 opd symbols.
1435 (ppc64_elf_output_symbol_hook): Likewise.
1436
1437 2004-08-06 Paul Brook <paul@codesourcery.com>
1438
1439 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
1440 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
1441 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
1442 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
1443 and BFD_RELOC_ARM_SBREL32.
1444 * bfd-in2.h, bbfd.h: Regenerate.
1445
1446 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1447
1448 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
1449 the dynamic link symbol actually in use.
1450
1451 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
1452
1453 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
1454
1455 2004-07-31 Joel Brobecker <brobecker@gnat.com>
1456 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1457
1458 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
1459 SHN_MIPS_TEXT and SHN_MIPS_DATA.
1460
1461 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
1462 Nick Clifton <nickc@redhat.com>
1463
1464 PR 290
1465 * bfd.c (_bfd_default_error_handler): Make it global.
1466
1467 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
1468
1469 * elf.c (assign_section_numbers): Cope gracefully with sections
1470 which have SHF_LINK_ORDER set but no sh_link set up.
1471 * elflink.c (elf_get_linked_section_vma): Likewise.
1472
1473 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
1474 it to NULL.
1475
1476 * elfxx-target.h (elf_backend_link_order_error_handler): New.
1477 Set it to _bfd_default_error_handler.
1478 (elfNN_bed): Add elf_backend_link_order_error_handler.
1479
1480 * libbfd-in.h (_bfd_default_error_handler): New.
1481
1482 * libbfd.h: Regenerated.
1483
1484 2004-07-30 Jakub Jelinek <jakub@redhat.com>
1485
1486 * archures.c (bfd_mach_sparc_64bit_p): Define.
1487 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
1488 * bfd-in2.h: Rebuilt.
1489
1490 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
1491
1492 Introduce SH2a support.
1493 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
1494 * archures.c (bfd_mach_sh2a_nofpu): New.
1495 * bfd-in2.h: Rebuilt.
1496 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
1497 (arch_info_struct): Add sh2a_nofpu.
1498 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
1499 2003-12-29 DJ Delorie <dj@redhat.com>
1500 * reloc.c: Add relocs for sh2a.
1501 * bfd-in2.h: Regenerate.
1502 * libbfd.hh: Regenerate.
1503 2003-12-01 Michael Snyder <msnyder@redhat.com>
1504 * archures.c (bfd_mach_sh2a): New.
1505 * bfd-in2.h: Rebuilt.
1506 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
1507 (SH2A_NEXT): New.
1508 (arch_info_struct): Add sh2a.
1509 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
1510
1511 2004-07-28 Nick Clifton <nickc@redhat.com>
1512 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1513
1514 PR 273
1515 * som.c (setup_sections): Improve estimation of space sizes in
1516 relocatable objects.
1517
1518 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
1519 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
1520 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
1521 to targ_selvecs.
1522 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
1523 * configure: Regenerate.
1524 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
1525 case that accepts OSABI=NetBSD and OSABI=SysV.
1526 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
1527 the base of .got or .data (if .got does not exist).
1528 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
1529 set OSABI=NetBSD.
1530 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
1531 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
1532 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
1533 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
1534
1535 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
1536
1537 PR 161/251
1538 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
1539 (elf_sec_group): Defined.
1540 (bfd_elf_match_symbols_in_sections): New prototype.
1541 (_bfd_elf_setup_group_pointers): Likewise.
1542
1543 * elf.c (bfd_elf_discard_group): Abort.
1544 (bfd_elf_set_group_contents): Also include relocation sections.
1545 Remove zero-fill for ld -r.
1546 (_bfd_elf_setup_group_pointers): New function.
1547 (elf_sort_elf_symbol): Likewise.
1548 (elf_sym_name_compare): Likewise.
1549 (bfd_elf_match_symbols_in_sections): Likewise.
1550
1551 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
1552
1553 * elflink.c (match_group_member): New.
1554 (elf_link_input_bfd): Check group member for discarded section.
1555 (try_match_symbols_in_sections): New function.
1556 (already_linked): Likewise.
1557 (_bfd_elf_section_already_linked): Support mixing comdat group
1558 and linkonce section.
1559
1560 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
1561 * linker.c (bfd_section_already_linked_table_traverse): New.
1562
1563 * libbfd.h: Regenerated.
1564
1565 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
1566
1567 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
1568 BFD_RELOC_CRX_SWITCH32.
1569 * bfd-in2.h: Regenerate.
1570 * libbfd.h: Regenerate.
1571 * elf32-crx.c: Support relocation/relaxation of
1572 BFD_RELOC_CRX_SWITCH* types.
1573
1574 2004-07-27 Alan Modra <amodra@bigpond.net.au>
1575
1576 * elf64-ppc.c: Correct "Linker stubs" comment.
1577
1578 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
1579
1580 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
1581 linked-to section.
1582 (elf_linked_to_section): New.
1583
1584 * elf.c (assign_section_numbers): Set up sh_link for
1585 SHF_LINK_ORDER.
1586
1587 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
1588 to sh_link for SHT_IA_64_UNWIND sections.
1589
1590 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
1591
1592 * elflink.c (elf_fixup_link_order): Add _() to error message.
1593
1594 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
1595
1596 * elflink.c (elf_fixup_link_order): Issue a warning and flag
1597 an error if failed.
1598
1599 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
1600
1601 * aout-adobe.c (aout_32_section_already_linked): Defined.
1602 * aout-target.h (MY_section_already_linked): Likewise.
1603 * aout-tic30.c (MY_section_already_linked): Likewise.
1604 * binary.c (binary_section_already_linked): Likewise.
1605 * bout.c (b_out_section_already_linked): Likewise.
1606 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
1607 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
1608 * coffcode.h (coff_section_already_linked): Likewise.
1609 * i386msdos.c (msdos_section_already_linked): Likewise.
1610 * i386os9k.c (os9k_section_already_linked): Likewise.
1611 * ieee.c (ieee_section_already_linked): Likewise.
1612 * ihex.c (ihex_section_already_linked): Likewise.
1613 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
1614 * mmo.c (mmo_section_already_linked): Likewise.
1615 * nlm-target.h (nlm_section_already_linked): Likewise.
1616 * oasys.c (oasys_section_already_linked): Likewise.
1617 * pef.c (bfd_pef_section_already_linked): Likewise.
1618 * ppcboot.c (ppcboot_section_already_linked): Likewise.
1619 * som.c (som_bfd_discard_group): Likewise.
1620 * srec.c (srec_section_already_linked): Likewise.
1621 * tekhex.c (tekhex_section_already_linked): Likewise.
1622 * versados.c (versados_section_already_linked): Likewise.
1623 * vms.c (vms_section_already_linked): Likewise.
1624 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
1625 * xsym.c (bfd_sym_section_already_linked): Likewise.
1626
1627 * bfd-in.h (bfd_section_already_linked_table_init): New.
1628 (bfd_section_already_linked_table_free): Likewise.
1629
1630 * coff-rs6000.c (rs6000coff_vec): Add
1631 _bfd_generic_section_already_linked.
1632 (pmac_xcoff_vec): Likewise.
1633 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1634 (aix5coff64_vec): Likewise.
1635
1636 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
1637 * elflink.c (_bfd_elf_section_already_linked): New function.
1638
1639 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
1640
1641 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
1642 (_bfd_generic_section_already_linked): New.
1643 (bfd_section_already_linked_hash_entry): Likewise.
1644 (bfd_section_already_linked): Likewise.
1645 (bfd_section_already_linked_table_lookup): Likewise.
1646 (bfd_section_already_linked_table_insert): Likewise.
1647
1648 * linker.c (bfd_section_already_linked): New.
1649 (_bfd_section_already_linked_table): Likewise.
1650 (bfd_section_already_linked_table_lookup): Likewise.
1651 (bfd_section_already_linked_table_insert): Likewise.
1652 (already_linked_newfunc): Likewise.
1653 (bfd_section_already_linked_table_init): Likewise.
1654 (bfd_section_already_linked_table_free): Likewise.
1655 (_bfd_generic_section_already_linked): Likewise.
1656
1657 * section.c (bfd_section): Remove comdat.
1658 (bfd_comdat_info): Moved to ...
1659 * bfd-in.h (coff_comdat_info): Here.
1660 (bfd_coff_get_comdat_section): New.
1661 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
1662 * libcoff-in.h (coff_section_tdata): Add comdat.
1663 * coffcode.h (handle_COMDAT): Updated.
1664 * cofflink.c (coff_link_add_symbols): Likewise.
1665 * ecoff.c (bfd_debug_section): Likewise.
1666
1667 * targets.c (bfd_target): Add _section_already_linked.
1668 (BFD_JUMP_TABLE_LINK): Updated.
1669
1670 * bfd-in2.h: Regenerated.
1671 * libbfd.h: Likewise.
1672 * libcoff.h: Likewise.
1673
1674 2003-07-21 Paul Brook <paul@codesourcery.com>
1675
1676 * elflink.c (elf_get_linked_section_vma, compare_link_order,
1677 elf_fixup_link_order): New functions.
1678 (bfd_elf_final_link): Call elf_fixup_link_order.
1679
1680 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
1681
1682 * elf-bfd.h (ELF_COMMON_DEF_P): New.
1683 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
1684 common definitions.
1685 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
1686 _bfd_elf_symbol_refs_local_p.
1687 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
1688 symbols.
1689
1690 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
1691
1692 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
1693 DYN_NO_NEEDED.
1694 (bfd_elf_get_dyn_lib_class): New prototype.
1695 * elf.c (bfd_elf_get_dyn_lib_class): New function.
1696
1697 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
1698 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
1699 entry is needed. Issue an error if a DT_NEEDED entry is needed
1700 for a file marked DYN_NO_NEEDED.
1701 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
1702 for DT_NEEDED tags.
1703
1704 * bfd-in2.h: Regenerated.
1705
1706 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1707
1708 * elflink.c (elf_section_complain_discarded): Don't complain in
1709 .PARISC.unwind.
1710
1711 2004-07-10 James E Wilson <wilson@specifixinc.com>
1712
1713 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
1714 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
1715 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
1716 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
1717 Fix callers.
1718 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
1719 bfd_put_64 to bfd_putl64.
1720 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
1721
1722 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
1723
1724 PR 240
1725 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
1726 .init/.fini sections when trying to relax it.
1727
1728 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
1729
1730 * elf.c (assign_file_positions_for_segments): Make sure the
1731 .dynamic section is the first section in the PT_DYNAMIC segment.
1732
1733 2004-07-09 Nick Clifton <nickc@redhat.com>
1734
1735 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
1736 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
1737 sh_elf_get_flags_from_mach functions so that they do not conflict
1738 when this target is built with other sh-elf targets.
1739 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
1740 suppression of this function.
1741 (sh_elf_find_flags): Likewise.
1742
1743 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
1744
1745 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
1746 (ALL_MACHINES_CFILES): Add cpu-crx.c.
1747 (BFD32_BACKENDS): Add elf32-crx.lo.
1748 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
1749 (cpu-crx.lo): New target.
1750 (elf32-crx.lo): New target.
1751 * Makefile.in: Regenerate.
1752 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
1753 (bfd_archures_list): Add bfd_crx_arch.
1754 * bfd-in2.h: Regenerate.
1755 * config.bfd: Handle crx-*-elf*, crx*.
1756 * configure.in: Handle bfd_elf32_crx_vec.
1757 * configure: Regenerate.
1758 * cpu-crx.c: New file.
1759 * elf32-crx.c: Likewise.
1760 * libbfd.h: Regenerate.
1761 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
1762 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
1763 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
1764 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
1765 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
1766 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
1767 * targets.c (bfd_elf32_crx_vec): Declare.
1768 (bfd_target_vector): Add bfd_elf32_crx_vec.
1769
1770 2004-07-06 Nick Clifton <nickc@redhat.com>
1771
1772 * config.bfd: Add sh-symbian-elf target.
1773 * configure.in: Add bfd_elf32_shl_symbian_vec.
1774 * configure: Regenerate.
1775 * elf-bfd.h (struct elf_backend_data): Add new field
1776 'check_directives'.
1777 * elflink.c (elf_link_add_object_symbols): Invoke the
1778 check_directives function, if defined.
1779 * elfxx-target.h: Provide a default, NULL definition for
1780 check_directives.
1781 * targets.c: Add bfd_elf32_shl_symbian_vec.
1782 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
1783 definition.
1784 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
1785 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
1786 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
1787 not already been defined.
1788 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
1789 * sh-symbian.c: New file. Provide functions to support the
1790 * sh-symbian-elf target.
1791 * Makefile.am: Add elf32-sh-symbian.c
1792 * Makefile.in: Regenerate.
1793
1794 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
1795
1796 * elf32-sh.c: Include ../opcodes/sh-opc.h.
1797 * Makefile.am: Ran make dep-am.
1798 * Makefile.in: Ran make dep-in.
1799
1800 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
1801
1802 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
1803 externals properly.
1804
1805 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
1806
1807 * config.bfd: Add want64 to configuration target s390-*-linux*.
1808
1809 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
1810
1811 * bfd.c (bfd_get_section_ident): New.
1812
1813 * elflink.c (elf_link_read_relocs_from_section): Call
1814 bfd_get_section_ident to identify the section when reporting
1815 error.
1816 (_bfd_elf_link_output_relocs): Likewise.
1817 (elf_link_output_extsym): Likewise.
1818 (elf_link_input_bfd): Likewise.
1819 (bfd_elf_gc_record_vtinherit): Likewise.
1820
1821 * bfd-in2.h: Regenerated.
1822
1823 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
1824 Nick Clifton <nickc@redhat.com>
1825
1826 PR 204
1827 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
1828 of section symbols to mips_elf_sort_hash_table ().
1829
1830 2004-07-01 Alan Modra <amodra@bigpond.net.au>
1831
1832 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
1833 change. Comment.
1834 (elf_section_complain_discarded): New function. Handle
1835 .gcc_except_table too.
1836 (elf_link_input_bfd): Rewrite handling of relocs against symbols
1837 in discarded sections.
1838 * elf-bfd.h (elf_discarded_section): Protect macro arg.
1839
1840 2004-06-30 James E Wilson <wilson@specifixinc.com>
1841
1842 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
1843 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
1844
1845 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
1846
1847 PR 233
1848 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
1849 local references to discarded sections and report their
1850 locations.
1851
1852 2004-06-30 Alan Modra <amodra@bigpond.net.au>
1853
1854 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
1855 sec_info_type, test section name instead.
1856
1857 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
1858
1859 PR 240
1860 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
1861 in .init/.fini sections.
1862
1863 2004-06-29 Bob Wilson <bob.wilson@acm.org>
1864
1865 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
1866 bfd_get_section_limit.
1867
1868 2004-06-29 Bob Wilson <bob.wilson@acm.org>
1869
1870 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
1871 output section size.
1872
1873 2004-06-29 Alan Modra <amodra@bigpond.net.au>
1874
1875 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
1876 rawsize.
1877 (mmix_elf_perform_relocation): Adjust for above change.
1878 (mmix_elf_relocate_section): Likewise.
1879 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
1880 (mmix_elf_get_section_contents): Delete.
1881 (bfd_elf64_get_section_contents): Delete.
1882 (mmix_elf_relocate_section): Zero stub area.
1883 * linker.c (default_indirect_link_order): Alloc max of section size
1884 and rawsize.
1885 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
1886 * section.c (bfd_malloc_and_get_section): Likewise.
1887 (struct bfd_section): Update rawsize comment.
1888 * bfd-in2.h: Regenerate.
1889
1890 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
1891
1892 2004-06-29 Alan Modra <amodra@bigpond.net.au>
1893
1894 * bfd-in.h (bfd_get_section_limit): Define.
1895 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
1896 (_bfd_final_link_relocate): Use bfd_get_section_limit.
1897 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
1898 * coff-arm.c (coff_arm_relocate_section): Likewise.
1899 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
1900 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
1901 (bfd_ns32k_final_link_relocate): Likewise.
1902 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
1903 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
1904 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
1905 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
1906 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
1907 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
1908 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
1909 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
1910 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
1911 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
1912 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
1913 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
1914 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
1915 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
1916 * elf32-v850.c (v850_elf_reloc): Likewise.
1917 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
1918 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
1919 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
1920 * elf64-mips.c (mips_elf64_gprel32_reloc)
1921 (mips16_gprel_reloc): Likewise.
1922 * elf64-mmix.c (mmix_elf_reloc): Likewise.
1923 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
1924 * elf64-sparc.c (init_insn_reloc): Likewise.
1925 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
1926 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
1927 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
1928 (_bfd_mips_elf_generic_reloc): Likewise.
1929 * bfd-in2.h: Regenerate.
1930
1931 2004-06-28 Alan Modra <amodra@bigpond.net.au>
1932
1933 * bfd-in.h (struct stab_info): Move from stabs.c.
1934 * stabs.c (struct stab_link_includes_table): Delete.
1935 (stab_link_includes_lookup): Delete.
1936 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
1937 level of indirection from sinfo parm.
1938 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
1939 stabstr section. Adjust hash table accesses.
1940 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
1941 alloc. Adjust stab_info test.
1942 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
1943 (_bfd_coff_final_link): Adjust stab_info test.
1944 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
1945 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
1946 in place.
1947 * libcoff-in.h (struct coff_link_hash_table): Likewise.
1948 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
1949 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
1950 stabstr section. Adjust stab_info test.
1951 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
1952 (_bfd_write_stab_strings): Adjust prototypes.
1953 * libbfd.h: Regenerate.
1954 * libcoff.h: Regenerate.
1955 * bfd-in2.h: Regenerate.
1956
1957 2004-06-27 Mark Kettenis <kettenis@gnu.org>
1958
1959 From Miod Vallat <miod@online.fr>:
1960 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
1961
1962 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
1963
1964 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
1965 (struct elf32_mn10300_link_hash_entry): Remove
1966 pcrel_relocs_copied.
1967 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
1968 R_MN10300_32. Don't adjust pcrel_relocs_copied.
1969 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
1970 and gotoff relocations if the symbol doesn't bind locally. Use
1971 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
1972 relocation for PCREL32.
1973 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
1974 to test whether a symbol binds locally.
1975 (elf32_mn10300_link_hash_newfunc): Don't initialize
1976 pcrel_relocs_copied.
1977 (_bfd_mn10300_elf_discard_copies): Delete.
1978 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
1979
1980 2004-06-26 Mark Kettenis <kettenis@gnu.org>
1981
1982 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
1983
1984 2004-06-25 Joel Brobecker <brobecker@gnat.com>
1985
1986 * som.c (som_set_reloc_info): Correct small typo.
1987
1988 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1989
1990 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
1991 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
1992 (m32r_elf_gcsweep_hook): Likewise.
1993 (m32r_elf_check_relocs): Likewise.
1994 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
1995 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
1996 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
1997 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
1998 * bfd-in2.h: Regenerated.
1999 * libbfd.h: Regenerated.
2000
2001 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
2002
2003 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
2004 relocation symbol.
2005 (elf64_x86_64_relocate_section): Issue an error for
2006 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
2007 against global symbols when building shared library.
2008
2009 2004-06-24 Alan Modra <amodra@bigpond.net.au>
2010
2011 * section.c (struct sec): Rename "_cooked_size" to "size".
2012 Rename "_raw_size" to "rawsize".
2013 (STD_SECTION): Adjust comments.
2014 (bfd_set_section_size, bfd_get_section_contents): Use size.
2015 (bfd_malloc_and_get_section): New function.
2016 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
2017 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
2018 Correctly free reloc and contents memory.
2019 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
2020 and fake CIE now that we can shink section size to zero.
2021 (_bfd_elf_write_section_eh_frame): Likewise..
2022 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
2023 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
2024 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
2025 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
2026 unneeded indirection.
2027 * elf.c (_bfd_elf_section_offset): .. and update call.
2028 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
2029 * libbfd.h: Regenerate.
2030 * bfd-in2.h: Regenerate.
2031
2032 Replace occurrences of "_raw_size" and "_cooked_size" in most places
2033 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
2034 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
2035 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
2036 Similarly use "rawsize", if non-zero, in reloc functions to validate
2037 reloc addresses. Use new bfd_malloc_and_get_section in most places
2038 where bfd_get_section_contents was called. Expand all occurrences of
2039 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
2040 grok_prstatus and similar functions to "size".
2041 * aix386-core.c (aix386_core_file_p): ..
2042 * aix5ppc-core.c (xcoff64_core_p): ..
2043 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
2044 aout_adobe_set_section_contents): ..
2045 * aout-target.h (callback): ..
2046 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
2047 MY_bfd_final_link): ..
2048 * aoutf1.h (sunos4_core_file_p): ..
2049 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
2050 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
2051 final_link, aout_link_input_section): ..
2052 * binary.c (binary_object_p, binary_canonicalize_symtab,
2053 binary_set_section_contents): ..
2054 * bout.c (b_out_callback, b_out_write_object_contents,
2055 b_out_set_section_contents, b_out_bfd_relax_section,
2056 b_out_bfd_get_relocated_section_contents): ..
2057 * cisco-core.c (cisco_core_file_validate): ..
2058 * coff-alpha.c (alpha_ecoff_object_p,
2059 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
2060 * coff-arm.c (coff_arm_relocate_section,
2061 bfd_arm_allocate_interworking_sections): ..
2062 * coff-h8300.c (h8300_reloc16_extra_cases,
2063 h8300_bfd_link_add_symbols): ..
2064 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
2065 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
2066 ppc_bfd_coff_final_link): ..
2067 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
2068 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
2069 sh_align_loads, sh_coff_get_relocated_section_contents): ..
2070 * coff64-rs6000.c (xcoff64_write_object_contents,
2071 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
2072 * coffcode.h (coff_compute_section_file_positions,
2073 coff_write_object_contents): ..
2074 * coffgen.c (make_a_section_from_file, coff_write_symbols,
2075 coff_section_symbol, build_debug_section): ..
2076 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
2077 process_embedded_commands, _bfd_coff_link_input_bfd,
2078 _bfd_coff_write_global_sym): ..
2079 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
2080 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
2081 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
2082 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
2083 _bfd_dwarf2_find_nearest_line): ..
2084 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
2085 ecoff_compute_section_file_positions,
2086 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
2087 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
2088 _bfd_elf_discard_section_eh_frame_hdr,
2089 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
2090 _bfd_elf_write_section_eh_frame,
2091 _bfd_elf_write_section_eh_frame_hdr): ..
2092 * elf-hppa.h (elf_hppa_sort_unwind): ..
2093 * elf-m10200.c (mn10200_elf_relax_section,
2094 mn10200_elf_relax_delete_bytes,
2095 mn10200_elf_get_relocated_section_contents): ..
2096 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
2097 mn10300_elf_check_relocs, mn10300_elf_relax_section,
2098 mn10300_elf_relax_delete_bytes,
2099 mn10300_elf_get_relocated_section_contents,
2100 _bfd_mn10300_elf_adjust_dynamic_symbol,
2101 _bfd_mn10300_elf_discard_copies,
2102 _bfd_mn10300_elf_size_dynamic_sections,
2103 _bfd_mn10300_elf_finish_dynamic_sections): ..
2104 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
2105 _bfd_elf_make_section_from_phdr, elf_fake_sections,
2106 bfd_elf_set_group_contents, map_sections_to_segments,
2107 elf_sort_sections, assign_file_positions_for_segments,
2108 SECTION_SIZE, copy_private_bfd_data,
2109 _bfd_elf_get_dynamic_reloc_upper_bound,
2110 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
2111 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
2112 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
2113 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
2114 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
2115 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
2116 bfd_elf32_arm_process_before_allocation,
2117 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
2118 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
2119 elf32_arm_write_section): ..
2120 * elf32-cris.c (cris_elf_grok_prstatus,
2121 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
2122 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
2123 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
2124 elf_cris_discard_excess_dso_dynamics,
2125 elf_cris_discard_excess_program_dynamics): ..
2126 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
2127 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
2128 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
2129 _frv_create_got_section, _frvfdpic_assign_plt_entries,
2130 elf32_frvfdpic_size_dynamic_sections,
2131 elf32_frvfdpic_modify_segment_map,
2132 elf32_frvfdpic_finish_dynamic_sections): ..
2133 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
2134 elf32_h8_get_relocated_section_contents): ..
2135 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
2136 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
2137 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
2138 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
2139 elf32_hppa_finish_dynamic_sections): ..
2140 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
2141 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
2142 i370_elf_finish_dynamic_sections): ..
2143 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
2144 allocate_dynrelocs, elf_i386_size_dynamic_sections,
2145 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
2146 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
2147 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
2148 * elf32-ip2k.c (ip2k_is_switch_table_128,
2149 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
2150 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
2151 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
2152 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
2153 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
2154 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
2155 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
2156 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
2157 m32r_elf_get_relocated_section_contents): ..
2158 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
2159 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
2160 m68hc11_elf_relax_delete_bytes): ..
2161 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
2162 m68hc12_elf_size_one_stub): ..
2163 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
2164 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
2165 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
2166 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
2167 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
2168 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
2169 elf32_mips_grok_prstatus): ..
2170 * elf32-or32.c (or32_elf_consth_reloc): ..
2171 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
2172 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
2173 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
2174 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
2175 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
2176 ppc_elf_final_write_processing): ..
2177 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
2178 allocate_dynrelocs, elf_s390_size_dynamic_sections,
2179 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
2180 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
2181 sh_elf_relax_delete_bytes, sh_elf_align_loads,
2182 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
2183 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
2184 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
2185 * elf32-sh64-com.c (sh64_address_in_cranges,
2186 sh64_get_contents_type): ..
2187 * elf32-sh64.c (sh64_find_section_for_address,
2188 sh64_elf_final_write_processing): ..
2189 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
2190 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
2191 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
2192 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
2193 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
2194 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
2195 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
2196 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
2197 elf_vax_finish_dynamic_sections): ..
2198 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
2199 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
2200 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
2201 xstormy16_elf_finish_dynamic_sections): ..
2202 * elf32-xtensa.c (xtensa_read_table_entries,
2203 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
2204 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
2205 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
2206 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
2207 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
2208 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
2209 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
2210 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
2211 xtensa_callback_required_dependence): ..
2212 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
2213 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
2214 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
2215 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
2216 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
2217 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
2218 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
2219 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
2220 * elf64-hppa.c (allocate_dynrel_entries,
2221 elf64_hppa_size_dynamic_sections,
2222 elf64_hppa_finish_dynamic_sections): ..
2223 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
2224 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
2225 elf64_mips_grok_prstatus): ..
2226 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
2227 mmix_elf_relocate_section, mmix_elf_final_link,
2228 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
2229 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
2230 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
2231 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
2232 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
2233 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
2234 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
2235 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
2236 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
2237 ppc64_elf_finish_dynamic_sections): ..
2238 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
2239 allocate_dynrelocs, elf_s390_size_dynamic_sections,
2240 elf_s390_finish_dynamic_sections): ..
2241 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
2242 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
2243 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
2244 sh64_elf64_finish_dynamic_sections): ..
2245 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
2246 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
2247 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
2248 sparc64_elf_finish_dynamic_symbol,
2249 sparc64_elf_finish_dynamic_sections): ..
2250 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
2251 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
2252 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
2253 elf64_x86_64_finish_dynamic_sections): ..
2254 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
2255 * elfcode.h (elf_slurp_reloc_table): ..
2256 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
2257 elf_finalize_dynstr, elf_link_add_object_symbols,
2258 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
2259 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
2260 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
2261 elf32_mips_grok_prstatus): ..
2262 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
2263 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
2264 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
2265 elfNN_ia64_finish_dynamic_sections): ..
2266 * elfxx-mips.c (mips_elf_create_procedure_table,
2267 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
2268 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
2269 mips_elf_global_got_index, mips_elf_multi_got,
2270 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
2271 mips_elf_allocate_dynamic_relocations,
2272 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
2273 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
2274 _bfd_mips_elf_always_size_sections,
2275 _bfd_mips_elf_size_dynamic_sections,
2276 _bfd_mips_elf_finish_dynamic_symbol,
2277 _bfd_mips_elf_finish_dynamic_sections,
2278 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
2279 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
2280 _bfd_elf_mips_get_relocated_section_contents,
2281 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
2282 * hp300hpux.c (callback): ..
2283 * hppabsd-core.c (make_bfd_asection): ..
2284 * hpux-core.c (make_bfd_asection): ..
2285 * i386linux.c (linux_link_create_dynamic_sections,
2286 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
2287 * i386msdos.c (msdos_write_object_contents): ..
2288 * i386os9k.c (os9k_callback, os9k_write_object_contents,
2289 os9k_set_section_contents): ..
2290 * ieee.c (parse_expression, ieee_slurp_external_symbols,
2291 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
2292 ieee_write_section_part, do_with_relocs, do_as_repeat,
2293 do_without_relocs, ieee_write_debug_part, init_for_output,
2294 ieee_set_section_contents): ..
2295 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
2296 * irix-core.c (do_sections, make_bfd_asection): ..
2297 * libaout.h (aout_section_merge_with_text_p): ..
2298 * libbfd.c (_bfd_generic_get_section_contents,
2299 _bfd_generic_get_section_contents_in_window): ..
2300 * linker.c (default_indirect_link_order): ..
2301 * lynx-core.c (make_bfd_asection): ..
2302 * m68klinux.c (linux_link_create_dynamic_sections,
2303 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
2304 * mach-o.c (bfd_mach_o_make_bfd_section,
2305 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
2306 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
2307 bfd_mach_o_scan_read_segment): ..
2308 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
2309 _bfd_merge_sections): ..
2310 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
2311 mmo_map_set_sizes, mmo_canonicalize_symtab,
2312 mmo_internal_write_section, mmo_write_object_contents): ..
2313 * netbsd-core.c (netbsd_core_file_p): ..
2314 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
2315 nlm_alpha_set_public_section): ..
2316 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
2317 * nlm32-sparc.c (nlm_sparc_write_import): ..
2318 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
2319 nlm_compute_section_file_positions): ..
2320 * oasys.c (oasys_object_p, oasys_slurp_section_data,
2321 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
2322 * opncls.c (get_debug_link_info): ..
2323 * osf-core.c (make_bfd_asection): ..
2324 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
2325 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
2326 final_link, aout_link_input_section): ..
2327 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
2328 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
2329 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
2330 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
2331 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
2332 * ptrace-core.c (ptrace_unix_core_file_p): ..
2333 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
2334 _bfd_final_link_relocate, bfd_generic_relax_section,
2335 bfd_generic_get_relocated_section_contents): ..
2336 * reloc16.c (bfd_coff_reloc16_relax_section,
2337 bfd_coff_reloc16_get_relocated_section_c): ..
2338 * riscix.c (riscix_some_aout_object_p): ..
2339 * rs6000-core.c (read_hdr, make_bfd_asection): ..
2340 * sco5-core.c (make_bfd_asection): ..
2341 * simple.c (bfd_simple_get_relocated_section_contents): ..
2342 * som.c (som_object_setup, setup_sections, som_prep_headers,
2343 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
2344 som_set_reloc_info, som_get_section_contents,
2345 som_bfd_link_split_section): ..
2346 * sparclinux.c (linux_link_create_dynamic_sections,
2347 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
2348 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
2349 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
2350 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
2351 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
2352 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
2353 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
2354 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
2355 sunos_finish_dynamic_link): ..
2356 * syms.c (_bfd_stab_section_find_nearest_line): ..
2357 * tekhex.c (first_phase, tekhex_set_section_contents,
2358 tekhex_write_object_contents): ..
2359 * trad-core.c (trad_unix_core_file_p): ..
2360 * versados.c (process_esd, process_otr, process_otr): ..
2361 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
2362 * vms-misc.c (add_new_contents): ..
2363 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
2364 * vms.c (vms_set_section_contents): ..
2365 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
2366 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
2367 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
2368 * xsym.c (bfd_sym_scan): .. See above.
2369
2370 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
2371
2372 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
2373 calling _bfd_merged_section_offset only for section symbols.
2374
2375 2004-06-22 Alan Modra <amodra@bigpond.net.au>
2376
2377 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
2378 for handling SEC_MERGE symbols in relax_section.
2379
2380 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
2381
2382 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
2383 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
2384 linked together. Mark the result as h8300sx code.
2385
2386 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
2387
2388 * elf-bfd.h (struct elf_backend_data): Added
2389 elf_backend_omit_section_dynsym.
2390 (_bfd_elf_link_omit_section_dynsym): Declare.
2391 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
2392 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
2393 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
2394 (_bfd_elf_link_renumber_dynsyms): ... this function.
2395 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
2396 _bfd_elf_link_omit_section_dynsym).
2397 (elfNN_bed): Added elf_backend_omit_section_dynsym.
2398
2399 2004-06-21 Nick Clifton <nickc@redhat.com>
2400
2401 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
2402 flags.
2403
2404 2004-06-17 Jerome Guitton <guitton@gnat.com>
2405
2406 * bfd-in.h (bfd_cache_close_all): New function declaration.
2407 * bfd-in2.h: Regenerate.
2408 * cache.c (bfd_cache_close_all): New function definition.
2409
2410 2004-06-16 Mark Kettenis <kettenis@gnu.org>
2411
2412 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
2413 4.10 and beyond.
2414 * configure: Regenerate.
2415
2416 2004-06-16 Daniel Jacobowitz <dan@debian.org>
2417
2418 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
2419 the pre-existing section.
2420
2421 2004-06-15 Alan Modra <amodra@bigpond.net.au>
2422
2423 * section.c (struct sec): Remove usused flags. Reorganize a little.
2424 (bfd_get_section_size_before_reloc): Delete.
2425 (bfd_get_section_size_after_reloc): Delete.
2426 (STD_SECTION): Update.
2427 (bfd_get_section_size_now): Delete.
2428 (bfd_set_section_contents): Don't referece reloc_done.
2429 (bfd_get_section_contents): Remove reloc_done comment.
2430 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
2431 reloc_done.
2432 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
2433 * ecoff.c (bfd_debug_section): Update initializer.
2434 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
2435 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
2436 * bfd-in.h (bfd_section_size): Expand.
2437 (bfd_get_section_size): New macro.
2438 * bfd-in2.h: Regenerate.
2439 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
2440 bfd_get_section_size_before_reloc with bfd_get_section_size.
2441 * coffcode.h (coff_write_object_contents): Likewise.
2442 * coffgen.c (build_debug_section): Likewise.
2443 * dwarf1.c (parse_line_table): Likewise.
2444 (_bfd_dwarf1_find_nearest_line): Likewise.
2445 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
2446 * i386msdos.c (msdos_write_object_contents): Likewise.
2447 * pdp11.c (squirt_out_relocs): Likewise.
2448 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
2449 * elf64-mmix.c (mmix_elf_final_link): Update comment.
2450
2451 2004-06-14 Chris Demetriou <cgd@broadcom.com>
2452
2453 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
2454 removal) with updated comment.
2455 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
2456 BFD_RELOC_32_PCREL.
2457 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
2458 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
2459
2460 2004-06-12 Alan Modra <amodra@bigpond.net.au>
2461
2462 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
2463 overflow on branches to undefweaks.
2464
2465 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2466
2467 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
2468 as ecoff_section_data() does not return a valid lvalue.
2469
2470 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
2471
2472 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
2473 (elf_link_add_object_symbols): Likewise.
2474
2475 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
2476 (elf_backend_reloc_type_class): New.
2477
2478 2004-06-08 Mark Kettenis <kettenis@gnu.org>
2479
2480 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
2481 netbsd-core.lo.
2482 * configure: Regenerate.
2483
2484 2004-06-07 Daniel Jacobowitz <dan@debian.org>
2485
2486 From: Albert Chin-A-Young <china@thewrittenword.com>
2487 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
2488 to unsigned int.
2489
2490 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
2491
2492 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
2493 change.
2494
2495 2004-05-28 DJ Delorie <dj@redhat.com>
2496
2497 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
2498 for linking, but otherwise adjust reloc for merged sections.
2499
2500 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
2501
2502 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
2503 _bfd_merged_section_offset for local symbols.
2504
2505 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
2506
2507 * Makefile.am: Regenerate dependencies.
2508 * Makefile.in: Regenerate.
2509 * archures.c: Add bfd_mach_sh3_nommu .
2510 * bfd-in2.h: Regenerate.
2511 * cpu-sh.c: Add sh3-nommu architecture.
2512 (bfd_to_arch_table): Create new table.
2513 (sh_get_arch_from_bfd_mach): Create new function.
2514 (sh_get_arch_up_from_bfd_mach): Create new function.
2515 (sh_merge_bfd_arch): Create new function.
2516 * elf32-sh.c (sh_ef_bfd_table): Add table.
2517 (sh_elf_check_relocs): Replace switch statement with
2518 use of sh_ef_bfd_table .
2519 (sh_elf_get_flags_from_mach): Add new function.
2520 (sh_find_elf_flags): Likewise.
2521 (sh_elf_copy_private_data): Replace most of non-elf contents
2522 with a call to sh_merge_bfd_arch() .
2523
2524 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
2525
2526 * Makefile.am (bfdver.h): Use explicit filename, not $< .
2527 * Makefile.in: Regenerate.
2528
2529 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
2530
2531 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
2532 custom calling conventions for dynamic symbols.
2533 (mn10300_elf_relax_section): Avoid relaxing a function as a local
2534 symbol if it's an alias to a global one.
2535
2536 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
2537
2538 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
2539 change.
2540
2541 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
2542
2543 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
2544 loop over hashes.
2545
2546 2004-05-26 Alan Modra <amodra@bigpond.net.au>
2547
2548 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
2549 for SHT_GROUP sections.
2550
2551 2004-05-25 Alan Modra <amodra@bigpond.net.au>
2552
2553 * elflink.c (elf_link_add_object_symbols): Don't set up merge
2554 section data here..
2555 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
2556 * merge.c: Formatting. Remove unnecessary casts. Expand
2557 bfd_get_section_alignment macro.
2558 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
2559 use throughout file.
2560 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
2561 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
2562 section name to determine sinfo group, instead test output section
2563 and alignment.
2564 (_bfd_merge_sections): Add struct bfd_link_info param. Call
2565 _bfd_strip_section_from_output rather than just twiddling flags.
2566 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
2567 (_bfd_merge_sections): Update prototype.
2568 * libbfd.h: Regenerate.
2569
2570 2004-05-24 Mark Kettenis <kettenis@gnu.org>
2571
2572 * netbsd-core.c: Correctly indent section that sets architecture
2573 from machine ID.
2574
2575 From Miod Vallat <miod@online.fr>:
2576 * m88kopenbsd.c: New file.
2577 * targets.c (m88k_openbsd_vec): New.
2578 * config.bfd: Add m88k-*-openbsd*.
2579 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
2580 (m88kopenbsd_vec): New.
2581 * configure: Regenerate.
2582 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
2583 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
2584 Run "make dep-am".
2585 * Makefile.in: Regenerate.
2586 * po/SRC-POTFILES.in: Regenerate.
2587
2588 2004-05-24 Nick Clifton <nickc@redhat.com>
2589
2590 * hash.c: Remove bogus node "Changing the default Hash Table Size"
2591 introduced by hash table size patch.
2592
2593 2004-05-22 Ben Elliston <bje@au.ibm.com>
2594
2595 * configure.in (is_release): Remove.
2596 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
2597 (AC_OUTPUT): Don't output bfdver.h from version.h.
2598 * configure: Regenerate.
2599 * Makefile.am (RELEASE): New variable.
2600 (bfdver.h): New target.
2601 * Makefile.in: Regenerate.
2602 * doc/Makefile.in: Likewise.
2603
2604 2004-05-22 Ben Elliston <bje@au.ibm.com>
2605
2606 * Makefile.am (config.status): Don't depend on version.h.
2607 * Makefile.in: Regenerate.
2608
2609 2004-05-22 Alan Modra <amodra@bigpond.net.au>
2610
2611 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
2612 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
2613 * libbfd.h: Regenerate.
2614 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
2615 (_bfd_elf_rel_local_sym): Likewise.
2616 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
2617 (elf_link_input_bfd): Likewise.
2618 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
2619 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2620 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2621 (elfNN_ia64_relocate_section): Likewise.
2622
2623 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
2624
2625 * hash.c (bfd_default_hash_table_size): New variable.
2626 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
2627 (bfd_hash_set_default_size): New function. Set the default size
2628 to a selected prime number close to the argument. Document new
2629 function.
2630 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
2631 * bfd-in2.h: Regenerate.
2632 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
2633 * Makefile.in: Regenerate.
2634
2635 2004-05-21 Mark Kettenis <kettenis@gnu.org>
2636
2637 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
2638 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
2639 arm, m68k, m88k and hppa core files.
2640
2641 2004-05-21 Nick Clifton <nickc@redhat.com>
2642
2643 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
2644 (bfd_bwrite): Likewise.
2645 (bfd_tell): Likewise.
2646 (bfd_flush): Likewise.
2647 (bfd_stat): Likewise.
2648 (bfd_seek): Likewise.
2649 (bfd_get_mtime): Likewise.
2650 (bfd_get_size): Likewise.
2651
2652 2004-05-19 Ben Elliston <bje@au.ibm.com>
2653
2654 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
2655
2656 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
2657
2658 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
2659 (bfd_generic_openr_next_archived_file): Likewise.
2660
2661 2004-05-17 Bob Wilson <bob.wilson@acm.org>
2662
2663 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
2664 section names by inserting a new substring after .gnu.linkonce, except
2665 for .gnu.linkonce.t.* where the "t." is replaced.
2666
2667 2004-05-17 Adam Nemet <anemet@lnxw.com>
2668
2669 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
2670 (m68-*-lynxos* case): Likewise.
2671 (powerpc-*-lyxnos* case): New case.
2672 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
2673
2674 2004-05-17 David Heine <dlheine@tensilica.com>
2675
2676 * aout-target.h (MY_bfd_copy_private_header_data): Define.
2677 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
2678 * bfd.c (bfd_copy_private_header_data): Define.
2679 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
2680 interface.
2681 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
2682 * coffcode.h (coff_bfd_copy_private_header_data): Define.
2683 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
2684 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
2685 segments by calling copy_private_bfd_data.
2686 (_bfd_elf_copy_private_header_data): Define.
2687 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
2688 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
2689 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
2690 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
2691 * mmo.c (mmo_bfd_copy_private_header_data): Define.
2692 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
2693 * som.c (som_bfd_copy_private_header_data): Define.
2694 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
2695 * vms.c (vms_bfd_copy_private_header_data): Define.
2696 * bfd-in2.h: Regenerate.
2697 * libbfd.h: Regenerate.
2698
2699 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2700
2701 * elfxx-mips.c (MINUS_TWO): Define.
2702 (mips_elf_higher, mips_elf_highest,
2703 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
2704 some bfd_vma values.
2705 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
2706
2707 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2708
2709 * som.c (log2): Rename to exact_log2. Adjust all callers.
2710
2711 2004-05-13 Paul Brook <paul@codesourcery.com>
2712
2713 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
2714 dwarf3 format CIE entries. Remove comment about the size of the
2715 ra_column field. It is now correctly deduced.
2716
2717 2004-05-13 Joel Sherrill <joel@oarcorp.com>
2718
2719 * config.bfd (or32-*-rtems*): Switch to elf.
2720
2721 2004-05-13 Nick Clifton <nickc@redhat.com>
2722
2723 * po/fr.po: Updated French translation.
2724
2725 2004-05-11 Jakub Jelinek <jakub@redhat.com>
2726
2727 * elflink.c (elf_bfd_final_link): Don't output STT_SECTION symbol
2728 into .dynsym if elf_section_data (sec)->dynindx <= 0.
2729 Adjust counting of last_local.
2730 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
2731 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
2732 created by the linker nor !SHF_ALLOC.
2733
2734 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
2735 DT_PLTGOT to the start of the .got.plt section instead of the
2736 .got output section. Set sh_entsize for .got section in addition
2737 to .got.plt.
2738 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
2739 is at sgot->output_section->vma.
2740 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
2741 DT_PLTGOT to the start of the .got.plt section instead of the
2742 .got output section.
2743 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
2744 is at sgot->output_section->vma. Set sh_entsize for .got section
2745 in addition to .got.plt.
2746 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
2747 (bfd_section_from_phdr): Likewise.
2748 (map_sections_to_segments): Likewise.
2749 (assign_file_positions_for_segments): Likewise.
2750 (get_program_header_size): Likewise.
2751 * elflink.c (bfd_elf_size_dynamic_sections): Set
2752 elf_tdata (output_bfd)->relro from info->relro.
2753 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
2754
2755 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
2756
2757 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
2758 a zero symndx for which we hadn't accounted a dynamic relocation.
2759 (_frvfdpic_add_rofixup): Likewise.
2760
2761 2004-05-07 Brian Ford <ford@vss.fsi.com>
2762 DJ Delorie <dj@redhat.com>
2763
2764 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
2765 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
2766 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
2767 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
2768
2769 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
2770
2771 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
2772 immediately if there's no link info.
2773 (elf32_frvfdpic_copy_private_bfd_data): New.
2774 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
2775
2776 2004-05-06 Zack Weinberg <zack@codesourcery.com>
2777
2778 * dwarf2.c (add_line_info): Also set info->filename to NULL if
2779 filename argument is null; do not call strlen on a null pointer.
2780
2781 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
2782
2783 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
2784 special case.
2785
2786 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
2787
2788 * configure.in (bfd_elf32_frvfdpic_vec): New.
2789 * configure: Rebuilt.
2790 * targets.c (bfd_elf32_frvfdpic_vec): New.
2791 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
2792 on the latter.
2793 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
2794 frvfdpic instead of frv. Rearrange elf-target macros such that
2795 the FDPIC-specific ones are only defined for this new target
2796 vector.
2797 (bfd_elf32_frvfdpic_vec): Declare.
2798 (IS_FDPIC): New.
2799 (elf32_frv_relocate_section): Use it to enable segment checking
2800 and to control rofixup emission. Add output section vma to
2801 applied relocation in non-LOAD non-ALLOC sections. Use
2802 _bfd_error_handler for errors.
2803 (_frv_create_got_section): Create .rel.got and .rofixup only in
2804 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
2805 linker script.
2806 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
2807 (elf32_frvfdpic_modify_segment_map): Likewise.
2808 (elf32_frv_finish_dynamic_sections): New, do-nothing.
2809 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
2810 error message if we miscompute the rofixup size.
2811 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
2812 (frvfdpic_elf_encode_eh_address): Likewise.
2813 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
2814 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
2815 relocs. Reject unknown relocation types.
2816 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
2817 (frv_elf_merge_private_bfd_data): Likewise.
2818 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
2819 0x4000 for newly-added elf32-frvfdpic.
2820
2821 2004-05-05 Nick Clifton <nickc@redhat.com>
2822
2823 PR/136
2824 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
2825 returning NULL as most users of this function do not check its
2826 return value.
2827 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
2828 of bfd_cache_lookup().
2829 * sco5-core.c (sco5_core_file_p): Likewise.
2830 * trad-core.c (trad_unix_core_file_p): Likewise.
2831
2832 2004-05-05 Nick Clifton <nickc@redhat.com>
2833
2834 * cache.c (bfd_cache_lookup): Improve formatting.
2835 * archive.c: Fix formatting.
2836
2837 2004-05-05 Peter Barada <peter@the-baradas.com>
2838
2839 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
2840 * cpu-m68k.c(bfd_m68k_arch): Likewise.
2841 * bfd-in2.h(bfd_architecture): Regenerate.
2842
2843 2004-05-03 Alan Modra <amodra@bigpond.net.au>
2844
2845 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
2846 SEC_MERGE sections.
2847 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
2848 those against discarded link-once and SEC_MERGE section symbols.
2849
2850 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
2851
2852 * section.c (bfd_get_section_by_name_if): New.
2853 * bfd-in2.h: Regenerated.
2854
2855 2004-05-02 Alan Modra <amodra@bigpond.net.au>
2856
2857 * som.c (som_bfd_is_group_section): Define.
2858
2859 2004-05-01 Alan Modra <amodra@bigpond.net.au>
2860
2861 * section.c (bfd_make_section_anyway): Copy the whole
2862 bfd_hash_entry, not just "next" from existing entry.
2863
2864 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
2865
2866 * elf.c (bfd_section_from_shdr): Maintain the section order in
2867 a section group.
2868 (special_sections): Add ".note.GNU-stack".
2869 (elf_fake_sections): Handle section group for relocatable
2870 link..
2871
2872 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
2873
2874 * section.c (bfd_sections_find_if): New.
2875 * bfd-in2.h: Regenerated.
2876
2877 2004-04-30 Alan Modra <amodra@bigpond.net.au>
2878
2879 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
2880
2881 * elf-bfd.h (bfd_elf_is_group_section): Declare.
2882 * elf.c (bfd_elf_is_group_section): New function.
2883 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
2884 * section.c (bfd_generic_is_group_section): New function.
2885 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
2886 (BFD_JUMP_TABLE_LINK): Adjust.
2887 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
2888 * aout-target.h (MY_bfd_is_group_section): Define.
2889 * aout-tic30.c (MY_bfd_is_group_section): Define.
2890 * bfd.c (bfd_is_group_section): Define.
2891 * binary.c (binary_bfd_is_group_section): Define.
2892 * bout.c (b_out_bfd_is_group_section): Define.
2893 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
2894 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
2895 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
2896 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
2897 * coffcode.h (coff_bfd_is_group_section): Define.
2898 * i386msdos.c (msdos_bfd_is_group_section): Define.
2899 * i386os9k.c (os9k_bfd_is_group_section): Define.
2900 * ieee.c (ieee_bfd_is_group_section): Define.
2901 * ihex.c (ihex_bfd_is_group_section): Define.
2902 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
2903 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
2904 * mmo.c (mmo_bfd_is_group_section): Define.
2905 * nlm-target.h (nlm_bfd_is_group_section): Define.
2906 * oasys.c (oasys_bfd_is_group_section): Define.
2907 * pef.c (bfd_pef_bfd_is_group_section): Define.
2908 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
2909 * srec.c (srec_bfd_is_group_section): Define.
2910 * tekhex.c (tekhex_bfd_is_group_section): Define.
2911 * versados.c (versados_bfd_is_group_section): Define.
2912 * vms.c (vms_bfd_is_group_section): Define.
2913 * xsym.c (bfd_sym_bfd_is_group_section): Define.
2914 * bfd-in2.h: Regenerate.
2915 * libbfd.h: Regenerate.
2916
2917 2004-04-30 Alan Modra <amodra@bigpond.net.au>
2918
2919 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
2920
2921 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
2922
2923 * configure.in: Update version to 2.15.91.
2924 * configure: Regenerate.
2925
2926 2004-04-29 Brian Ford <ford@vss.fsi.com>
2927
2928 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
2929 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
2930 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
2931 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
2932 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
2933 .gnu.linkonce.wi. sections.
2934 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
2935 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
2936 .gnu.linkonce.wi..
2937 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
2938 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2939
2940 2004-04-28 Chris Demetriou <cgd@broadcom.com>
2941
2942 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
2943 * bfd-in2.h: Regenerate.
2944 * libbfd.h: Likewise.
2945
2946 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2947
2948 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
2949 dup_common fields.
2950 (setup_sections): Use som_subspace_dictionary_record struct instead
2951 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
2952 is_comdat, is_common or dup_common.
2953 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
2954 is_comdat, is_common and dup_common in section subspace_dict from
2955 copy_data.
2956 (som_begin_writing): Use som_subspace_dictionary_record struct.
2957 (som_finish_writing): Likewise.
2958 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
2959 is_common and dup_common flags in info for symbol. Add comment
2960 regarding linker support for these fields. Slightly reorganize
2961 function.
2962 (som_build_and_write_symbol_table): Set is_comdat, is_common and
2963 dup_common fields in symbol table from symbol info.
2964 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
2965 arguments. Set corresponding fields in copy_data. Change all callers.
2966 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
2967 symbol table.
2968 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
2969 * som.h (som_subspace_dictionary_record): Define.
2970 (som_copyable_section_data_struct): Add is_comdat, is_common and
2971 dup_common fields.
2972 (som_section_data_struct): Use som_subspace_dictionary_record struct
2973 instead of subspace_dictionary_record.
2974 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
2975
2976 2004-04-27 Bob Wilson <bob.wilson@acm.org>
2977
2978 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
2979 if set. Check reloc_done flag before applying relocations. Use
2980 output addresses, both when applying relocations and when comparing
2981 against the specified section.
2982 (elf_xtensa_relocate_section): Use output address to check if dynamic
2983 reloc is in a literal pool. Set section's reloc_done flag.
2984
2985 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
2986
2987 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
2988 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
2989 section.
2990 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
2991 section.
2992
2993 2004-04-27 Alan Modra <amodra@bigpond.net.au>
2994
2995 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
2996 structure field removed in 2004-04-24 patch.
2997 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
2998
2999 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
3000 Constify hdr arg.
3001 * elf32-arm.h (elf32_arm_section_flags): Likewise.
3002 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
3003 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
3004 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
3005 field before calling elf_backend_section_flags.
3006
3007 2004-04-24 Chris Demetriou <cgd@broadcom.com>
3008
3009 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
3010 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
3011 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
3012 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
3013 and BFD_RELOC_32_PCREL.
3014 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
3015 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
3016 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
3017 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
3018 (mips_elf_next_relocation): Move comment about matching HI/LO
3019 relocations to...
3020 (_bfd_mips_elf_relocate_section): Here. Remove handling for
3021 R_MIPS_GNU_REL_HI16.
3022
3023 2004-04-23 Chris Demetriou <cgd@broadcom.com>
3024
3025 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
3026 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
3027 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
3028 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
3029 and update comments to reflect current usage.
3030 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
3031 and MIPS_R_SWITCH, as well as several empty entries. Update comment
3032 for MIPS_R_PCREL16.
3033 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
3034 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
3035 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
3036 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
3037 type number to be MIPS_R_PCREL16.
3038 (mips_relocate_section): Remove support for link-time relaxation
3039 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
3040 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
3041 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
3042 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
3043 relaxation of branches used by embedded-PIC.
3044 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
3045 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
3046 related members, update comment.
3047 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
3048 code related to embedded-PIC.
3049 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
3050 initialization of now-removed 'adjust' member of
3051 'struct ecoff_debug_info'.
3052
3053 2004-04-23 Chris Demetriou <cgd@broadcom.com>
3054
3055 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
3056
3057 2004-04-21 Philip Blundell <pb@nexus.co.uk>
3058
3059 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
3060 relocs for locally defined symbols during -shared final link.
3061 (elf32_arm_final_link_relocate): Likewise.
3062
3063 2004-04-22 Jakub Jelinek <jakub@redhat.com>
3064
3065 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
3066 ELF_LINK_POINTER_EQUALITY_NEEDED.
3067 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
3068 if r_type is not R_X86_64_PC32.
3069 (elf64_x86_64_finish_dynamic_symbol): If
3070 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
3071 SHN_UNDEF symbols.
3072
3073 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3074
3075 * elf32-sh.c (sh_elf_plt_sym_val): New function.
3076 (elf_backend_plt_sym_val): Define.
3077
3078 2004-04-22 Andrew Cagney <cagney@redhat.com>
3079
3080 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
3081
3082 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3083
3084 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
3085 make_bfd_asection.
3086 * som.c (som_set_section_contents): Constantify second argument.
3087 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
3088 (som_object_setup): Rework to avoid warning.
3089 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
3090 Likewise.
3091
3092 2004-04-22 Andrew Cagney <cagney@redhat.com>
3093
3094 * cache.c (bfd_cache_close): Check for a previously closed file.
3095
3096 2004-04-22 Jakub Jelinek <jakub@redhat.com>
3097
3098 * bfd.c (bfd_get_synthetic_symtab): Define.
3099 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
3100 NAME##_get_synthetic_symtab.
3101 (struct bfd_target): Add _bfd_get_synthetic_symtab.
3102 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
3103 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
3104 relplt_name fields.
3105 (_bfd_elf_get_synthetic_symtab): New prototype.
3106 * elfcode.h (elf_get_synthetic_symtab): Define.
3107 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
3108 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
3109 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
3110 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
3111 * bfd-in2.h: Rebuilt.
3112 * libbfd.h: Rebuilt.
3113 * elf32-i386.c (elf_i386_plt_sym_val): New function.
3114 (elf_backend_plt_sym_val): Define.
3115 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
3116 (elf_backend_plt_sym_val): Define.
3117 * elf32-s390.c (elf_s390_plt_sym_val): New function.
3118 (elf_backend_plt_sym_val): Define.
3119 * elf64-s390.c (elf_s390_plt_sym_val): New function.
3120 (elf_backend_plt_sym_val): Define.
3121 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
3122 (elf_backend_plt_sym_val): Define.
3123 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
3124 (elf_backend_plt_sym_val): Define.
3125 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
3126 (elf_backend_plt_sym_val): Define.
3127 * aout-target.h (MY_get_synthetic_symtab): Define.
3128 * aout-tic30.c (MY_get_synthetic_symtab): Define.
3129 * coff-rs6000.c (rs6000coff_vec): Add
3130 _bfd_nodynamic_get_synthetic_symtab.
3131 (pmac_xcoff_vec): Likewise.
3132 * coff64-rs6000.c (rs6000coff64_vec): Add
3133 _bfd_nodynamic_get_synthetic_symtab.
3134 (aix5coff64_vec): Likewise.
3135 * sunos.c (MY_get_synthetic_symtab): Define.
3136 * vms.c (vms_get_synthetic_symtab): Define.
3137
3138 2004-04-22 Nick Clifton <nickc@redhat.com>
3139
3140 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
3141
3142 2004-04-22 Peter Barada <peter@the-baradas.com>
3143
3144 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
3145 * bfd2-in.h: Regenerate.
3146 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
3147
3148 2004-04-21 Chris Demetriou <cgd@broadcom.com>
3149
3150 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
3151 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
3152 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
3153 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
3154 * bfd-in2.h: Regenerate.
3155
3156 2004-04-21 Bob Wilson <bob.wilson@acm.org>
3157
3158 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
3159 require relocations against a weak symbol to reference the same
3160 symbol hash entry if not a final, static link.
3161 (get_cached_value, add_value_map): Add final_static_link argument.
3162 (remove_literals): Pass final_static_link argument as needed.
3163
3164 2004-04-21 Andrew Cagney <cagney@redhat.com>
3165
3166 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
3167 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
3168 (opncls_bwrite, opncls_bclose, opncls_bflush)
3169 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
3170 bfd iovec that uses function callbacks.
3171 (bfd_close): Use the iovec's bclose.
3172 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
3173 (cache_bclose, cache_bflush, cache_bstat)
3174 (cache_iovec): New functions and global variable, implement a
3175 cache "iovec", where applicable set bfd_error.
3176 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
3177 * bfdio.c (struct bfd_iovec): Define.
3178 (real_read): Delete function.
3179 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
3180 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
3181 assume that bread and bwrite set bfd_error.
3182 * bfd.c (struct bfd): Add "iovec", update comments.
3183 * bfd-in2.h, libbfd.h: Re-generate.
3184
3185 2004-04-21 Andrew Cagney <cagney@redhat.com>
3186
3187 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
3188
3189 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
3190
3191 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
3192 (bfd_elf_gc_sections): Fail if a shared object is being created.
3193 Do not fail if dynamic sections have been created. Instead call
3194 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
3195 dynamically referenced symbols. Do not mark the whole graph
3196 rooted at .eh_frame, only the section proper.
3197
3198 2004-04-20 DJ Delorie <dj@redhat.com>
3199
3200 * reloc.c: Add BFD_RELOC_32_SECREL.
3201 * bfd-in2.h: Regenerate.
3202 * libbfd.h: Likewise.
3203 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
3204 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
3205 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
3206
3207 2004-04-19 Jakub Jelinek <jakub@redhat.com>
3208
3209 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
3210 relocs against hidden/protected undefweak symbols properly.
3211 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3212
3213 2004-04-18 Mark Kettenis <kettenis@gnu.org>
3214
3215 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
3216 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
3217 core files.
3218
3219 2004-04-17 Brian Ford <ford@vss.fsi.com>
3220
3221 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
3222 filepos for the SizeOfHeaders field.
3223 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
3224 overflow.
3225 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
3226
3227 2004-04-16 Alan Modra <amodra@bigpond.net.au>
3228
3229 * simple.c (bfd_simple_get_relocated_section_contents): Don't
3230 change reloc_done. Set and restore _cooked_size.
3231 (RETURN): Delete.
3232
3233 2004-04-15 Mark Kettenis <kettenis@gnu.org>
3234
3235 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
3236 core files.
3237
3238 2004-04-15 Nick Clifton <nickc@redhat.com>
3239
3240 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
3241
3242 2004-04-15 Alan Modra <amodra@bigpond.net.au>
3243
3244 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
3245
3246 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
3247
3248 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
3249 when it is a definition.
3250
3251 2004-04-14 Alan Modra <amodra@bigpond.net.au>
3252
3253 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
3254 when statically linking PIC code.
3255 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3256
3257 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3258
3259 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
3260 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
3261 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
3262 * configure: Regenerate.
3263
3264 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
3265
3266 * elflink.c: Include libiberty.h.
3267 * Makefile.am (elflink.lo): Depend on libiberty.h.
3268 * Makefile.in: Regenerate.
3269
3270 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
3271
3272 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
3273 ".MIPS.stubs".
3274
3275 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
3276
3277 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
3278 reserve the memory for dynamic linker
3279
3280 2004-04-05 Mark Kettenis <kettenis@gnu.org>
3281
3282 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
3283 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
3284
3285 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
3286
3287 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
3288 RELOC_FOR_GLOBAL_SYMBOL.
3289 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
3290
3291 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
3292
3293 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
3294 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
3295
3296 2004-04-01 Paul Brook <paul@codesourcery.com>
3297
3298 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
3299 * elf32-arm.h (struct elf32_elf_section_map): New.
3300 (struct _arm_elf_section_data): New.
3301 (elf32_arm_section_data): Define.
3302 (struct elf32_arm_link_hash_table): Add byteswap_code.
3303 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
3304 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
3305 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
3306 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
3307 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
3308 (bfd_elf32_new_section_hook, elf_backend_write_section,
3309 elf_backend_link_output_symbol_hook): Define.
3310
3311 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
3312
3313 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
3314 that keeps the characters in a B_INCL..B_EINCL range.
3315 (_bfd_link_section_stabs): When computing the sum of the
3316 characters in a B_INCL..B_EINCL range also keep a copy of those
3317 characters. Use this information to distinguish between
3318 include sections that have the same sum and the same length
3319 but which are nevertheless unique.
3320
3321 2004-03-31 Paul Brook <paul@codesourcery.com>
3322
3323 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
3324 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
3325
3326 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
3327
3328 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
3329 to 'sum_chars' and add field 'num_chars'.
3330 (_bfd_link_section_stabs): When computing the sum of the
3331 characters in a B_INCL..B_EINCL range also keep a count of the
3332 number of characters. Use this information to help distinguish
3333 between include sections when have the same sum but which
3334 nevertheless are still unique.
3335
3336 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
3337
3338 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
3339
3340 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
3341 Tomer Levi <Tomer.Levi@nsc.com>
3342
3343 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
3344 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
3345 (BFD32_BACKENDS): Add elf32-cr16c.lo.
3346 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
3347 (cpu-cr16c.lo): New target.
3348 (elf32-cr16c.lo): Likewise.
3349 * Makefile.in: Regenerate.
3350 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
3351 (bfd_archures_list): Add bfd_cr16c_arch.
3352 * config.bfd: Handle cr16c-*-elf*.
3353 * configure.in: Handle bfd_elf32_cr16c_vec.
3354 * configure: Regenerate.
3355 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
3356 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
3357 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
3358 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
3359 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
3360 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
3361 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
3362 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
3363 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
3364 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
3365 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
3366 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
3367 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
3368 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
3369 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
3370 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
3371 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
3372 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
3373 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
3374 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
3375 * targets.c (bfd_elf32_cr16c_vec): Declare.
3376 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
3377 * cpu-cr16c.c: New file.
3378 * elf32-cr16c.c: Likewise.
3379 * libbfd.h: Regenerate.
3380 * bfd-in2.h: Likewise.
3381
3382 2004-03-30 Jakub Jelinek <jakub@redhat.com>
3383
3384 * elf.c (map_sections_to_segments): Fix handling of .tbss.
3385
3386 2004-03-27 Alan Modra <amodra@bigpond.net.au>
3387
3388 * Makefile.am: Remove all mention of elflink.h.
3389 * Makefile.in: Regenerate.
3390 * bfd-in.h (bfd_elf_discard_info): Declare.
3391 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
3392 * bfd-in2.h: Regenerate.
3393 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
3394 bfd_elf32_link_record_dynamic_symbol,
3395 bfd_elf64_link_record_dynamic_symbol,
3396 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
3397 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
3398 _bfd_elf32_link_record_local_dynamic_symbol,
3399 _bfd_elf64_link_record_local_dynamic_symbol,
3400 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
3401 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
3402 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
3403 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
3404 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
3405 _bfd_elf32_reloc_symbol_deleted_p,
3406 _bfd_elf64_reloc_symbol_deleted_p): Delete.
3407 (bfd_elf_link_record_dynamic_symbol,
3408 bfd_elf_link_record_local_dynamic_symbol,
3409 bfd_elf_final_link, bfd_elf_gc_sections,
3410 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
3411 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
3412 bfd_elf_reloc_symbol_deleted_p): Declare.
3413 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3414 * elf32-arm.h: Update for changed function names. Remove local
3415 WILL_CALL_FINISH_DYNAMIC_SECTION define.
3416 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
3417 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
3418 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
3419 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
3420 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
3421 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
3422 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
3423 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
3424 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
3425 (bfd_elfNN_print_symbol): Define.
3426 * elfcode.h: Don't include elflink.h.
3427 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
3428 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
3429 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
3430 elf_gc_record_vtinherit, elf_gc_record_vtentry,
3431 elf_link_record_local_dynamic_symbol): Don't define.
3432 * elflink.c: Update for changed function names. Move elflink.h
3433 code here.
3434 * elflink.h: Delete file.
3435 * po/SRC-POTFILES.in: Regenerate.
3436 * po/bfd.pot: Regenerate.
3437
3438 2004-03-27 Alan Modra <amodra@bigpond.net.au>
3439
3440 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
3441 "name" for global syms accidentally removed in 2004-03-20 change.
3442
3443 2004-03-27 Alan Modra <amodra@bigpond.net.au>
3444
3445 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
3446 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
3447 where Elf_External_* is different for 64 and 32 bit, with
3448 corresponding elf_size_info field.
3449 (struct elf_final_link_info): Use "bfd_byte *" instead
3450 of "Elf_External_Sym *" for external_syms and symbuf.
3451 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
3452 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
3453 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
3454 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
3455 (elf_link_sort_cmp2): Adjust.
3456 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
3457 using ELF_R_SYM macro. Set u.sym_mask.
3458 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
3459 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
3460 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
3461 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
3462 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
3463 swap_syn_out functions. Rearrange dyn swap in/out switch.
3464 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
3465 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
3466 (elf_link_flush_output_syms): Add elf_backend_data arg.
3467 (elf_link_check_versioned_symbol): Likewise.
3468 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
3469 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
3470 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
3471 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
3472 ELF_R_TYPE and ELF_R_INFO macros.
3473 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
3474 based on size rather than using ELF_R_INFO.
3475 (elf_gc_mark): Set up r_sym_shift local var and use instead of
3476 ELF_R_SYM macro.
3477 (struct alloc_got_off_arg): New.
3478 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
3479 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
3480 (elf_gc_allocate_got_offsets): Adjust.
3481 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
3482 ELF_R_SYM. Use bfd_section_from_elf_index.
3483 (elf_bfd_discard_info): Set cookie.r_sym_shift.
3484 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
3485 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
3486
3487 2004-03-26 Stan Shebs <shebs@apple.com>
3488
3489 Remove MPW support, no longer used.
3490 * config.bfd (powerpc-*-mpw*): Remove configuration.
3491 * mpw-config.in, mpw-make.sed: Remove files.
3492 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
3493
3494 2004-03-26 Alan Modra <amodra@bigpond.net.au>
3495
3496 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
3497 (ppc64_elf_add_symbol_hook): New function.
3498 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
3499 const from Elf_Internal_Sym param.
3500 * elflink.c (elf_link_add_object_symbols): Adjust.
3501 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
3502 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
3503 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
3504 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
3505 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
3506 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
3507 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
3508 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
3509 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
3510 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
3511 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
3512 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
3513 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
3514 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
3515 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
3516 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
3517
3518 2004-03-26 Alan Modra <amodra@bigpond.net.au>
3519
3520 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
3521 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
3522 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
3523 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
3524 (bfd_elf64_bfd_link_add_symbols): Delete.
3525 (bfd_elf_link_add_symbols): Declare.
3526 * elfcode.h (elf_bfd_link_add_symbols): Delete.
3527 * elflink.c: Include safe-ctype.h.
3528 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
3529 make static.
3530 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
3531 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
3532 static.
3533 (elf_link_add_archive_symbols): Rename from
3534 _bfd_elf_link_add_archive_symbols, make static.
3535 (elf_link_add_object_symbols): New function. Corresponding
3536 elflink.h function converted to use elf_size_info.
3537 (bfd_elf_link_add_symbols): Likewise.
3538 (bfd_elf_size_dynamic_sections): Adjust.
3539 * elflink.h (elf_bfd_link_add_symbols): Delete.
3540 (elf_link_add_object_symbols): Delete.
3541 * elf32-gen.c (elf32_generic_link_add_symbols): Call
3542 bfd_elf_link_add_symbols.
3543 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
3544
3545 2004-03-25 Alan Modra <amodra@bigpond.net.au>
3546
3547 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
3548 and chained shared libs only if dynsym. Clear dynsym on forced-local.
3549
3550 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
3551 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
3552 (_bfd_elf_add_dt_needed_tag): Declare.
3553 (_bfd_elf_sort_symbol): Declare.
3554 (_bfd_elf_finalize_dynstr): Declare.
3555 (RELOC_FOR_GLOBAL_SYM): Formatting.
3556 * elfcode.h (elf_add_dynamic_entry): Delete.
3557 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
3558 elflink.h function converted to use elf_size_info.
3559 (_bfd_elf_add_dt_needed_tag): Likewise.
3560 (_bfd_elf_sort_symbol): Likewise.
3561 (_bfd_elf_finalize_dynstr): Likewise.
3562 (compute_bucket_count): Likewise.
3563 (bfd_elf_size_dynamic_sections): Likewise. Check result of
3564 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
3565 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
3566 * elflink.h: ..here.
3567 (sort_symbol, add_dt_needed_tag): Delete.
3568 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
3569 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
3570 Update all users.
3571 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
3572 * elf32-cris.c (add_dynamic_entry): Likewise.
3573 * elf32-hppa.c (add_dynamic_entry): Likewise.
3574 * elf32-i370.c (add_dynamic_entry): Likewise.
3575 * elf32-i386.c (add_dynamic_entry): Likewise.
3576 * elf32-m32r.c (add_dynamic_entry): Likewise.
3577 * elf32-m68k.c (add_dynamic_entry): Likewise.
3578 * elf32-ppc.c (add_dynamic_entry): Likewise.
3579 * elf32-s390.c (add_dynamic_entry): Likewise.
3580 * elf32-sh.c (add_dynamic_entry): Likewise.
3581 * elf32-sparc.c (add_dynamic_entry): Likewise.
3582 * elf32-vax.c (add_dynamic_entry): Likewise.
3583 * elf32-xtensa.c (add_dynamic_entry): Likewise.
3584 * elf64-alpha.c (add_dynamic_entry): Likewise.
3585 * elf64-hppa.c (add_dynamic_entry): Likewise.
3586 * elf64-ppc.c (add_dynamic_entry): Likewise.
3587 * elf64-s390.c (add_dynamic_entry): Likewise.
3588 * elf64-sparc.c (add_dynamic_entry): Likewise.
3589 * elf64-x86-64.c (add_dynamic_entry): Likewise.
3590 * elfxx-ia64.c (add_dynamic_entry): Likewise.
3591 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
3592 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
3593 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
3594 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
3595
3596 2004-03-23 Paul Brook <paul@codesourcery.com>
3597
3598 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
3599
3600 2004-03-22 Bob Wilson <bob.wilson@acm.org>
3601
3602 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
3603 literal tables and check for relocs outside of literal pools.
3604 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
3605 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
3606 set DF_TEXTREL.
3607 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
3608 (elf_xtensa_relocate_section): Read literal tables and check for
3609 dynamic relocations in read-only sections and not in literal pools.
3610
3611 2004-03-23 Alan Modra <amodra@bigpond.net.au>
3612
3613 PR 51.
3614 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
3615
3616 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
3617
3618 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
3619 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
3620 not defined by the executable, or defined in a DSO.
3621 <eliding run-time relocation of .got>: Initialize GOT entry for a
3622 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
3623 executable.
3624 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
3625 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
3626 a PLT reloc to GOT for an executable.
3627 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
3628 .got for a DSO and explain why.
3629 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
3630 and unreferenced symbols for which a PLT is defined. Adjust
3631 dynamic-symbol pruning correspondingly, to make sure we don't lose
3632 a dynamic symbol also defined by a DSO.
3633
3634 2004-03-22 Alan Modra <amodra@bigpond.net.au>
3635
3636 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
3637 and rel args. Group input and output args. Wrap to 80 columns.
3638 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
3639 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
3640 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
3641 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
3642 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
3643 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
3644 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
3645 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
3646 RELOC_FOR_GLOBAL_SYMBOL invocation.
3647
3648 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
3649
3650 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
3651 unresolved symbols in objects aren't allowed.
3652
3653 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
3654 unresolved symbols.
3655 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
3656 (elf_hppa_unmark_useless_dynamic_symbols):
3657 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3658 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
3659 (elf32_hppa_relocate_section): Likewise.
3660 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3661 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3662 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3663 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3664 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
3665
3666 * elf-m10200.c (mn10200_elf_relocate_section): Use
3667 RELOC_FOR_GLOBAL_SYMBOL.
3668 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
3669 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
3670 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3671 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
3672 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3673 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
3674 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3675 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
3676 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3677 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3678 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3679 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
3680
3681 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3682
3683 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
3684 (final_link_relocate): Likewise.
3685 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
3686 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
3687
3688 2004-03-19 Alan Modra <amodra@bigpond.net.au>
3689
3690 * Makefile.am: Run "make dep-am".
3691 * Makefile.in: Regenerate.
3692 * aclocal.m4: Regenerate.
3693 * config.in: Regenerate.
3694 * po/bfd.pot: Regenerate.
3695
3696 2004-03-19 Alan Modra <amodra@bigpond.net.au>
3697 H.J. Lu <hongjiu.lu@intel.com>
3698
3699 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
3700 type and size change code to where it was previously. Remove
3701 dt_needed param. Treat old weak syms as strong if new sym is
3702 from a shared lib, even when old sym is from another shared
3703 lib. Remove unnecessary tests of oldweak and newweak. Correct
3704 comments.
3705 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
3706 _bfd_elf_merge_symbol calls.
3707 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
3708 dt_needed local var. Update comments.
3709 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
3710 (_bfd_elf_add_default_symbol): Likewise.
3711
3712 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
3713 strong syms in one shared object overriding weak syms in another.
3714
3715 2004-03-18 Alan Modra <amodra@bigpond.net.au>
3716
3717 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
3718 dyn_lib_class field. Rearrange for better packing.
3719 (elf_dt_soname): Delete.
3720 (elf_dyn_lib_class): Define.
3721 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
3722 (bfd_elf_set_dt_needed_soname): Delete.
3723 (bfd_elf_set_dyn_lib_class): New function.
3724 * elflink.h (add_dt_needed_tag): New function. Split out from..
3725 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
3726 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
3727 initialization of soname.
3728 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
3729 elf_dt_soname.
3730 * bfd-in.h (enum dynamic_lib_link_class): New.
3731 (bfd_elf_set_dt_needed_soname): Delete.
3732 (bfd_elf_set_dyn_lib_class): Declare.
3733 * bfd-in2.h: Regenerate.
3734
3735 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
3736 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
3737 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
3738 symbol loop. Instead use add_needed to flag tag as written.
3739
3740 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
3741
3742 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
3743 logic for null_input_bfd detection.
3744
3745 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
3746
3747 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
3748
3749 2004-03-16 Mark Kettenis <kettenis@gnu.org>
3750
3751 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
3752 code.
3753
3754 2004-03-16 Alan Modra <amodra@bigpond.net.au>
3755
3756 * elflink.c (elf_link_read_relocs_from_section): Don't use
3757 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
3758 (_bfd_elf_link_read_relocs): ..to here.
3759 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
3760
3761 2004-03-16 Alan Modra <amodra@bigpond.net.au>
3762
3763 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
3764 values selected in configure.host. Require both to be defined
3765 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
3766 corresponding BFD_HOST vars with quotes.
3767 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
3768 Always require BFD_HOST_64_BIT_DEFINED.
3769 <file_ptr type>: Find off_t size before emitting message. Combine
3770 off_t and ftello64 conditional.
3771 * configure: Regenerate.
3772
3773 2004-03-16 Alan Modra <amodra@bigpond.net.au>
3774
3775 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
3776 aliasing warning. Remove trailing whitespace throughout file.
3777
3778 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3779
3780 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
3781 input_section in calls to get_dyn_name.
3782 * 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
3783 local symbols.
3784 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
3785
3786 2004-03-15 Alan Modra <amodra@bigpond.net.au>
3787
3788 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
3789 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
3790 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
3791 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
3792 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
3793 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
3794 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
3795 when using long.
3796 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
3797 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
3798 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
3799 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
3800 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
3801 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
3802 (read_8_bytes, read_indirect_string, read_address): Likewise.
3803 (read_abbrevs, parse_comp_unit): Likewise.
3804 * targets.c (struct bfd_target): Likewise.
3805 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
3806 * hppabsd-core.c: Likewise. Formatting.
3807 * hpux-core.c: Likewise.
3808 * irix-core.c: Likewise.
3809 * netbsd-core.c: Likewise.
3810 * osf-core.c: Likewise.
3811 * ptrace-core.c: Likewise.
3812 * sco5-core.c: Likewise.
3813 * trad-core.c: Likewise.
3814 * configure: Regenerate.
3815 * bfd-in2.h: Regenerate.
3816
3817 2004-03-15 Alan Modra <amodra@bigpond.net.au>
3818
3819 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
3820 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
3821 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
3822 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
3823 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
3824 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
3825 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
3826 * libbfd.c: Likewise in function definitions.
3827 (bfd_put_8): Mask with 0xff rather than casting to char.
3828 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
3829 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
3830 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
3831 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
3832 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
3833 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
3834 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
3835 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
3836 (H_GET_64, H_GET_32, H_GET_16): Likewise.
3837 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
3838 * archive.c (do_slurp_coff_armap): Update swap prototype.
3839 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
3840 (tic54x_getl_signed_32): Likewise.
3841 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
3842 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
3843 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
3844 (bfd_getp_signed_32, bfd_putp32): Likewise.
3845 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
3846 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
3847 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
3848 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
3849 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
3850 bfd_h_getx_signed_16, bfd_h_putx16.
3851 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
3852 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
3853 * hpux-core.c: Likewise.
3854 * irix-core.c: Likewise.
3855 * netbsd-core.c: Likewise.
3856 * osf-core.c: Likewise.
3857 * ptrace-core.c: Likewise.
3858 * sco5-core.c: Likewise.
3859 * trad-core.c: Likewise.
3860 * bfd-in2.h: Regenerate.
3861
3862 2004-03-15 Matt Thomas <matt@3am-software.com>
3863
3864 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
3865 selected.
3866
3867 2004-03-13 Mark Kettenis <kettenis@gnu.org>
3868
3869 * config.bfd: Add x86_64-*-openbsd*.
3870 * configure.in (x86_64-*-openbsd*): Set COREFILE to
3871 netbsd-core.lo.
3872 * configure: Regenerate.
3873
3874 2004-03-12 Nick Clifton <nickc@redhat.com>
3875 Dave Murphy <wintermute2k4@ntlworld.com>
3876
3877 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
3878 if the input bfd does not contain any code.
3879
3880 2004-03-09 Steve Ellcey <sje@cup.hp.com>
3881
3882 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
3883
3884 2004-03-05 Fred Fish <fnf@redhat.com>
3885
3886 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
3887 mips16 symbols to be even rather than testing first for even/odd.
3888 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
3889
3890 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
3891
3892 * elf.c (map_sections_to_segments): Ignore .tbss sections for
3893 layout purposes.
3894
3895 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
3896
3897 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
3898 undefined symbols as hash_new.
3899
3900 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
3901
3902 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
3903 * cpu-sh.c: Ditto.
3904 * elf32-sh.c: Ditto.
3905 * bfd-in2.h: Regenerate.
3906
3907 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
3908
3909 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
3910 dynrelocs.
3911 (_frv_count_got_plt_entries): Initialize them.
3912 (frv_pic_relocs_info_find): Add insert argument. Adjust all
3913 callers.
3914 (frv_pic_relocs_info_for_global): Likewise.
3915 (frv_pic_relocs_info_for_local): Likewise.
3916 (frv_pic_merge_early_relocs_info): New.
3917 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
3918 another.
3919 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
3920 Check that we don't exceed the allocated count for entry.
3921 (_frv_add_rofixup): Likewise.
3922 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
3923 (elf32_frv_finish_dynamic_sections): Improve error message in case
3924 we emit too few rofixup entries.
3925
3926 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
3927
3928 * archures.c (bfd_mach_fr450): New.
3929 * bfd-in2.h: Regenerate.
3930 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
3931 (arch_info_500): Link to it.
3932 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
3933 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
3934 (frv_elf_arch_extension_p): New function.
3935 (frv_elf_merge_private_bfd_data): Use it.
3936
3937 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
3938
3939 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
3940
3941 * elflink.h (is_global_data_symbol_definition): Moved to
3942 elflink.c.
3943 (elf_link_is_defined_archive_symbol): Likewise.
3944 (elf_link_add_archive_symbols): Likewise. Renamed to
3945 _bfd_elf_link_add_archive_symbols.
3946
3947 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
3948 of ELF symbol table entry from backend.
3949 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
3950 instead of elf_link_add_object_symbols.
3951
3952 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
3953
3954 * elf-bfd.h (struct elf_backend_data): Added
3955 elf_backend_can_make_relative_eh_frame,
3956 elf_backend_can_make_lsda_relative_eh_frame and
3957 elf_backend_encode_eh_address.
3958 (_bfd_elf_encode_eh_address): Declare.
3959 (_bfd_elf_can_make_relative): Declare.
3960 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
3961 hooks to decide whether to attempt to make_relative and
3962 make_lsda_relative.
3963 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
3964 (_bfd_elf_can_make_relative): New.
3965 (_bfd_elf_encode_eh_address): New.
3966 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
3967 (frv_elf_encode_eh_address): New.
3968 (elf_backend_can_make_relative_eh_frame): Define.
3969 (elf_backend_can_make_lsda_relative_eh_frame): Define.
3970 (elf_backend_encode_eh_address): Define.
3971 * elfxx-target.h
3972 (elf_backend_can_make_relative_eh_frame): Define.
3973 (elf_backend_can_make_lsda_relative_eh_frame): Define.
3974 (elf_backend_encode_eh_address): Define.
3975 (elfNN_bed): Add them.
3976
3977 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
3978
3979 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
3980 complain_on_overflow to signed.
3981
3982 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
3983
3984 * elflink.h (sort_symbol): New.
3985 (elf_link_add_object_symbols): Use a sorted symbol array for
3986 weakdef.
3987
3988 2004-02-27 Jakub Jelinek <jakub@redhat.com>
3989
3990 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
3991 for pc relative relocs.
3992 (elf_s390_relocate_section): Likewise.
3993 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
3994 for pc relative relocs.
3995 (elf_s390_relocate_section): Likewise.
3996
3997 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
3998
3999 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
4000 count_dyn_reloc.
4001
4002 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
4003
4004 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
4005 field to track if a relocation is against readonly section.
4006 (count_dyn_reloc): Take a new argument for rent->reltext.
4007 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
4008 (get_reloc_section): Don't set ia64_info->reltext here.
4009 (allocate_dynrel_entries): Set ia64_info->reltext here.
4010
4011 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
4012
4013 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
4014 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
4015 function's descriptor to symbol+offset, and map local undefweak
4016 symbol to NULL function descriptor.
4017 (elf32_frv_relocate_section): Likewise.
4018
4019 2004-02-23 Mark Kettenis <kettenis@gnu.org>
4020
4021 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
4022 M_X86_64_NETBSD.
4023 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
4024 (netbsd_core_file_p): Set architecture from machine ID for
4025 selected machines.
4026
4027 2004-02-23 Jakub Jelinek <jakub@redhat.com>
4028
4029 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
4030 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
4031
4032 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
4033
4034 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
4035 symbols with non-default visibility.
4036
4037 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
4038
4039 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
4040 IMAGE_SCN_MEM_WRITE on known sections only.
4041
4042 2004-02-20 Jakub Jelinek <jakub@redhat.com>
4043
4044 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
4045 symbols used in PIE relocs.
4046
4047 2004-02-19 Jakub Jelinek <jakub@redhat.com>
4048
4049 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
4050 .plt sh_entsize.
4051
4052 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
4053
4054 * configure.in: Update version to 2.15.90.
4055 * configure: Regenerate.
4056
4057 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
4058 Richard Sandiford <rsandifo@redhat.com>
4059
4060 * elfxx-mips.c (mips_elf_calculate_relocation): Use
4061 _bfd_elf_symbol_refs_local_p to decide whether to decay
4062 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
4063 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
4064 relocs if the symbol wasn't defined by a regular object file.
4065 Don't check the symbol's dynindx.
4066
4067 2004-02-16 Andrew Cagney <cagney@redhat.com>
4068
4069 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
4070 @bfd_file_ptr@.
4071 * bfd-in2.h: Re-generate.
4072
4073 2004-02-14 Andrew Cagney <cagney@redhat.com>
4074
4075 * configure.host (HDEFINES): When hppa*-*-hpux*, define
4076 _LARGEFILE64_SOURCE.
4077
4078 2004-02-13 Andrew Cagney <cagney@redhat.com>
4079
4080 * elf.c (vma_page_aligned_bias): New function.
4081 (assign_file_positions_except_relocs)
4082 (assign_file_positions_for_segments): Replace broken modulo
4083 arithmetic with call to vma_page_aligned_bias.
4084
4085 2004-02-11 Andrew Cagney <cagney@redhat.com>
4086
4087 * bfd-in.h: Update copyright.
4088 (bfd_tell): Change return type to file_ptr.
4089 * bfd-in2.h: Re-generate.
4090 * cache.c: Update copyright.
4091 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
4092 parameter.
4093 (close_one): Use real_ftell.
4094 * bfdio.c: Update copyright.
4095 (real_ftell, real_fseek): New functions.
4096 (bfd_tell): Use real_fseek and real_ftell, change return type to
4097 file_ptr.
4098 (bfd_seek): Use real_ftell and real_fseek, change type of
4099 file_position to a file_ptr.
4100 * libbfd-in.h: Update copyright.
4101 (real_ftell, real_fseek): Declare.
4102 * libbfd.h: Re-generate.
4103
4104 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
4105 fseeko and fseeko64. Determine bfd_file_ptr.
4106 * configure: Re-generate.
4107 * config.in: Re-generate.
4108
4109 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
4110
4111 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
4112 * elf32-h8300.c: Likewise.
4113
4114 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
4115 Nick Clifton <nickc@redhat.com>
4116
4117 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
4118 GOT entries with no associated GOT subsection.
4119
4120 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
4121
4122 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
4123 * elf.c (swap_out_syms): Use it to decide whether local section
4124 symbols should be named.
4125 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
4126 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
4127 (elf_backend_name_local_section_symbols): Define.
4128 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
4129
4130 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
4131
4132 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
4133 (elfNN_ia64_relax_section): Optimize brl to br during the relax
4134 finalize pass.
4135
4136 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
4137
4138 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
4139 to bfd_link_hash_entry passed by reference to
4140 _bfd_generic_link_add_one_symbol.
4141
4142 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
4143
4144 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
4145 relocations against dynamic symbols.
4146
4147 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
4148
4149 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
4150 change.
4151
4152 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
4153
4154 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
4155 * bfd-in2.h, libbfd.h: Rebuilt.
4156
4157 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
4158
4159 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
4160 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
4161 flag has been cleared.
4162
4163 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
4164
4165 * coff-h8300.c: Add and adjust comments about relaxation.
4166 * elf32-h8300.c: Likewise.
4167
4168 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
4169
4170 * coff-h8300.c: Fix comment typos.
4171 * elf32-h8300.c: Likewise.
4172
4173 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
4174
4175 * coff-h8300.c: Add comments about relaxation.
4176 * elf32-h8300.c: Likewise.
4177
4178 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4179
4180 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
4181 throughout.
4182 * aclocal.m4: Regenerate.
4183 * configure: Regenerate.
4184
4185 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
4186
4187 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
4188 mips_elf64_rtype_to_howto instead of using howto_table.
4189
4190 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
4191
4192 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
4193 the .plt section.
4194 (elf32_arm_check_relocs): Don't increment the PLT refcount for
4195 relocs which would not use the PLT.
4196
4197 2004-01-13 Alan Modra <amodra@bigpond.net.au>
4198
4199 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
4200 (ppc64_elf_gc_sweep_hook): Likewise.
4201 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
4202
4203 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
4204
4205 Adds linker relaxation support for bit manipulation insns like
4206 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
4207 bst, btst, bxor.
4208 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
4209 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
4210 * coff-h8300.c: Opcode for bit manipulation insn is checked in
4211 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
4212
4213 2004-01-12 Alan Modra <amodra@bigpond.net.au>
4214
4215 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
4216
4217 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
4218
4219 * elf32-h8300.c: Fix formatting.
4220
4221 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
4222
4223 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
4224 dynamic object is present. Declare r_symndx and h in an inner
4225 scope.
4226 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
4227
4228 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
4229
4230 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
4231 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
4232 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
4233 identically. Do not emit PC24 relocations for shared libraries.
4234 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
4235 identically. Don't adjust pc_count.
4236 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
4237 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
4238 adjust count for branch relocations.
4239 (allocate_dynrelocs): Correct typo in call to
4240 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
4241 PC24 or PLT32 relocs when linking.
4242
4243 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
4244
4245 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
4246 relocation howto with ARM_26 one for consistency.
4247 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
4248 that will be converted to ARM_26D ones, since we always want 'done'
4249 relocations to be reflected in section's data.
4250 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
4251 offset.
4252 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
4253 requested.
4254
4255 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
4256
4257 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
4258 are not partial_inplace during a relocatable link.
4259
4260 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
4261
4262 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
4263 if no dynamic object is present. Declare r_symndx and h in an
4264 inner scope.
4265
4266 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
4267
4268 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
4269 trampoline if it is known out of range.
4270
4271 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
4272
4273 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
4274 * elf32-frv.c (_frv_osec_readonly_p): New.
4275 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
4276 undefweak symbol.
4277 (_frv_count_got_plt_entries): Adjust expected count accordingly.
4278 (elf32_frv_relocate_section): Likewise. Error out if attempting
4279 to emit rofixups or dynamic relocs in read-only segments. Use
4280 _bfd_elf_section_offset to adjust r_offsets in rofixups and
4281 dynamic relocations.
4282 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
4283 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
4284 relocations or fixups involving merged sections correctly. Avoid
4285 crash when undefined symbol is referenced by R_FRV_32 or
4286 R_FRV_FUNCDESC_VALUE.
4287 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
4288 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
4289 input section holding local symbol to addend of R_FRV_32 or
4290 R_FRV_FUNCDESC_VALUE dynamic relocation.
4291 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
4292 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
4293 (elf32_frv_always_size_sections): Don't store pointer to
4294 __stacksize symbol in sec_info.
4295 (elf32_frv_modify_segment_map): Look it up here.
4296 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
4297 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
4298 of the lazy PLT entry, not only its offset, as the low word of a
4299 function descriptor.
4300 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
4301 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
4302 if a hash table entry already exists but is not a definition.
4303 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
4304 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
4305 (_frv_add_rofixup): Don't inline.
4306 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
4307 for undefweak symbols.
4308 (elf32_frv_relocate_section): Avoid crash while computing
4309 relocation when linking with shared library. Only emit rofixups
4310 and dynamic relocations for alloc&load sections. Mark binaries
4311 with inter-segment relocations for relocation as a unit.
4312 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
4313 (DEFAULT_STACK_SIZE): New.
4314 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
4315 emit rofixups or dynamic relocs when linking dynamic non-PIE
4316 executables.
4317 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
4318 shared libs too. Reserve the last entry for the GOT pointer.
4319 (elf32_frv_finish_dynamic_sections): Emit it.
4320 (elf32_frv_always_size_sections): New.
4321 (elf32_frv_modify_segment_map): New.
4322 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
4323 sections.
4324 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
4325 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
4326 (elf_backend_always_size_sections): New.
4327 (elf_backend_modify_segment_map): New.
4328 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
4329 * config.bfd: Added frv-*-*linux*.
4330 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
4331 ABS section, instead of crashing.
4332 (elf32_frv_relocate_section): Don't crash before warning about
4333 different segments in non-PIC relocation.
4334 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
4335 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
4336 relocs to undefweak symbols.
4337 (elf32_frv_relocate_section): Ditto for undefined symbols.
4338 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
4339 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
4340 gotfixup section was created.
4341 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
4342 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
4343 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
4344 complain_overflow_signed.
4345 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
4346 have not been allocated.
4347 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
4348 privfd only if dynamic sections were created.
4349 (elf32_frv_relocate_section): Compute gprel_segment, and use it
4350 for GPREL relocs. When linking relocatable FDPIC executables,
4351 emit warnings for relocations that would be illegal on PIE or
4352 shared libraries. Emit rofixup for R_FRV_32 only if input object
4353 is not FDPIC.
4354 (_frv_create_got_section): Define _gp symbol in the rofixup
4355 section.
4356 (elf32_frv_finish_dynamic_sections): If rofixups needed but
4357 dynamic sections missing, error out requesting -melf32frvfd.
4358 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
4359 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
4360 computation of addends from section and global or local symbol
4361 value. Change return type to bfd_boolean, and return a failure if
4362 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
4363 nonzero addend is required.
4364 (elf32_frv_relocate_section): Likewise. Print error for
4365 unsupported nonzero addends.
4366 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
4367 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
4368 force everything local.
4369 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
4370 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
4371 (frv_gotfixup_section): New.
4372 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
4373 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
4374 and relocsfdv.
4375 (_frv_add_rofixup): New.
4376 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
4377 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
4378 improve some ugly conditions.
4379 (elf32_frv_relocate_section): Likewise. Reject inter-segment
4380 relocations in fdpic.
4381 (_frv_create_got_section): Create .rofixup.got section.
4382 (struct _frv_dynamic_got_info): Added fixups.
4383 (_frv_count_got_plt_entries): Account in-GOT relocations into
4384 relocs32, relocsfd and relocsfdv. Account them into relocs or
4385 fixups, as appropriate.
4386 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
4387 sizing of gotrel.
4388 (elf32_frv_finish_dynamic_sections): Verify that the right number
4389 of relocations and fixups was generated.
4390 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
4391 relocsfdv.
4392 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
4393 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
4394 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
4395 descriptor of a (formerly-)global symbol is local.
4396 (struct frv_pic_relocs_info): Adjust comments.
4397 (_frv_emit_got_relocs_plt_entries): Adjust.
4398 (elf32_frv_relocate_section): Likewise.
4399 (_frv_count_got_plt_entries): Likewise.
4400 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
4401 symbol's value to addend in the common preamble. Decay dynamic
4402 symbols to section+offset if they bind or call locally, for GOT
4403 and FUNCDESC_VALUE, respectively.
4404 (elf32_frv_relocate_section): Likewise.
4405 (elf32_frv_check_relocs): Don't register as dynamic symbols of
4406 internal or hidden visibility.
4407 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
4408 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
4409 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
4410 (elf32_frv_relocate_section): Pass relocation addend in. Use
4411 original relocation addend to look up the got relocs/plt entries
4412 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
4413 processing relocations that reference .scommon symbols.
4414 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
4415 Introduce support for dynamic linking.
4416 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
4417 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
4418 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
4419 (frv_reloc_type_lookup): Return REL howtos for executables and
4420 dynamic libraries.
4421 (frv_info_to_howto_rel): New.
4422 (struct frv_elf_link_hash_table): New.
4423 (frv_hash_table, frv_got_section, frv_gotrel_section,
4424 frv_plt_section, frv_pltrel_section, frv_relocs_info,
4425 frv_got_initial_offset, frv_plt_initial_offset): New macros.
4426 (frv_elf_link_hash_table_create): New.
4427 (struct frv_pic_relocs_info): New.
4428 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
4429 (frv_pic_relocs_info_find): New.
4430 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
4431 New.
4432 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
4433 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
4434 (_frv_emit_got_relocs_plt_entries): New.
4435 (elf32_frv_relocate_section): Add support for dynamic linking.
4436 Handle new relocations.
4437 (_frv_create_got_section): New.
4438 (elf32_frv_create_dynamic_sections): New.
4439 (ELF_DYNAMIC_INTERPRETER): New.
4440 (struct _frv_dynamic_got_info): New.
4441 (_frv_count_got_plt_entries): New.
4442 (struct _frv_dynamic_got_plt_info): New.
4443 (_frv_compute_got_alloc_data): New.
4444 (_frv_get_got_entry, _frv_get_fd_entry): New.
4445 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
4446 (_frv_resolve_final_relocs_info): New.
4447 (elf32_frv_size_dynamic_sections): New.
4448 (elf32_frv_finish_dynamic_sections): New.
4449 (elf32_frv_adjust_dynamic_symbol): New.
4450 (elf32_frv_finish_dynamic_symbol): New.
4451 (elf32_frv_check_relocs): Handle new relocs. Explain how the
4452 whole thing works.
4453 (elf_info_to_howto_rel): Define.
4454 (bfd_elf32_bfd_link_hash_table_create): Define.
4455 (elf_backend_create_dynamic_sections): Define.
4456 (elf_backend_adjust_dynamic_symbol): Define.
4457 (elf_backend_size_dynamic_sections): Define.
4458 (elf_backend_finish_dynamic_symbol): Define.
4459 (elf_backend_finish_dynamic_sections): Define.
4460 (elf_backend_want_got_sym): Define.
4461 (elf_backend_got_header_size): Define.
4462 (elf_backend_want_got_plt): Define.
4463 (elf_backend_plt_readonly): Define.
4464 (elf_backend_want_plt_sym): Define.
4465 (elf_backend_plt_header_size): Define.
4466 (elf_backend_may_use_rel_p): Define.
4467 (elf_backend_may_use_rela_p): Define.
4468 (elf_backend_default_use_rela_p): Define.
4469 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
4470 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
4471 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
4472 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
4473 (frv_reloc_map): Map the corresponding BFD relocs to them.
4474 (frv_reloc_type_lookup): ... and back to BFD relocs.
4475 * reloc.c: New relocs.
4476 * bfd-in2.h, libbfd.h: Rebuilt.
4477 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
4478 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
4479 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
4480 R_FRV_FUNCDESC_GOTLO): New.
4481 (frv_reloc_map): Map the corresponding BFD relocs to them.
4482 (frv_reloc_type_lookup): ... and back to BFD relocs.
4483 * reloc.c: New relocs.
4484 * bfd-in2.h, libbfd.h: Rebuilt.
4485
4486 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4487
4488 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
4489 targets to support pages of up to 64kB.
4490 (elf32_bed): Redefine to get a separate backend data structure for
4491 traditional targets.
4492 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
4493 targets to support pages of up to 64kB.
4494 (elf64_bed): Redefine to get a separate backend data structure for
4495 traditional targets.
4496 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
4497 targets to support pages of up to 64kB.
4498 (elf32_bed): Redefine to get a separate backend data structure for
4499 traditional targets.
4500
4501 2004-01-04 Mark Kettenis <kettenis@gnu.org>
4502
4503 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
4504
4505 2004-01-02 Mark Kettenis <kettenis@gnu.org>
4506
4507 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
4508 (elf_i386_grok_psinfo): Likewise.
4509
4510 2004-01-02 Bernardo Innocenti <bernie@develer.com>
4511
4512 * config.bfd: Add m68k-uClinux target.
4513
4514 2004-01-01 Grant Edwards <grante@visi.com>
4515
4516 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
4517 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
4518 (elf32_h8_gc_sweep_hook): New function.
4519 (elf_backend_gc_mark_hook): Define.
4520 (elf_backend_gc_sweep_hook): Define.
4521 (elf_backend_can_gc_sections): Define.
4522
4523 For older changes see ChangeLog-0203
4524 \f
4525 Local Variables:
4526 mode: change-log
4527 left-margin: 8
4528 fill-column: 74
4529 version-control: never
4530 End: