2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
4 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
5 section.
6 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
7 section.
8
9 2004-04-27 Alan Modra <amodra@bigpond.net.au>
10
11 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
12 structure field removed in 2004-04-24 patch.
13 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
14
15 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
16 Constify hdr arg.
17 * elf32-arm.h (elf32_arm_section_flags): Likewise.
18 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
19 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
20 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
21 field before calling elf_backend_section_flags.
22
23 2004-04-24 Chris Demetriou <cgd@broadcom.com>
24
25 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
26 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
27 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
28 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
29 and BFD_RELOC_32_PCREL.
30 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
31 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
32 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
33 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
34 (mips_elf_next_relocation): Move comment about matching HI/LO
35 relocations to...
36 (_bfd_mips_elf_relocate_section): Here. Remove handling for
37 R_MIPS_GNU_REL_HI16.
38
39 2004-04-23 Chris Demetriou <cgd@broadcom.com>
40
41 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
42 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
43 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
44 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
45 and update comments to reflect current usage.
46 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
47 and MIPS_R_SWITCH, as well as several empty entries. Update comment
48 for MIPS_R_PCREL16.
49 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
50 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
51 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
52 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
53 type number to be MIPS_R_PCREL16.
54 (mips_relocate_section): Remove support for link-time relaxation
55 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
56 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
57 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
58 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
59 relaxation of branches used by embedded-PIC.
60 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
61 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
62 related members, update comment.
63 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
64 code related to embedded-PIC.
65 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
66 initialization of now-removed 'adjust' member of
67 'struct ecoff_debug_info'.
68
69 2004-04-23 Chris Demetriou <cgd@broadcom.com>
70
71 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
72
73 2004-04-21 Philip Blundell <pb@nexus.co.uk>
74
75 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
76 relocs for locally defined symbols during -shared final link.
77 (elf32_arm_final_link_relocate): Likewise.
78
79 2004-04-22 Jakub Jelinek <jakub@redhat.com>
80
81 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
82 ELF_LINK_POINTER_EQUALITY_NEEDED.
83 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
84 if r_type is not R_X86_64_PC32.
85 (elf64_x86_64_finish_dynamic_symbol): If
86 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
87 SHN_UNDEF symbols.
88
89 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
90
91 * elf32-sh.c (sh_elf_plt_sym_val): New function.
92 (elf_backend_plt_sym_val): Define.
93
94 2004-04-22 Andrew Cagney <cagney@redhat.com>
95
96 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
97
98 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
99
100 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
101 make_bfd_asection.
102 * som.c (som_set_section_contents): Constantify second argument.
103 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
104 (som_object_setup): Rework to avoid warning.
105 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
106 Likewise.
107
108 2004-04-22 Andrew Cagney <cagney@redhat.com>
109
110 * cache.c (bfd_cache_close): Check for a previously closed file.
111
112 2004-04-22 Jakub Jelinek <jakub@redhat.com>
113
114 * bfd.c (bfd_get_synthetic_symtab): Define.
115 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
116 NAME##_get_synthetic_symtab.
117 (struct bfd_target): Add _bfd_get_synthetic_symtab.
118 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
119 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
120 relplt_name fields.
121 (_bfd_elf_get_synthetic_symtab): New prototype.
122 * elfcode.h (elf_get_synthetic_symtab): Define.
123 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
124 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
125 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
126 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
127 * bfd-in2.h: Rebuilt.
128 * libbfd.h: Rebuilt.
129 * elf32-i386.c (elf_i386_plt_sym_val): New function.
130 (elf_backend_plt_sym_val): Define.
131 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
132 (elf_backend_plt_sym_val): Define.
133 * elf32-s390.c (elf_s390_plt_sym_val): New function.
134 (elf_backend_plt_sym_val): Define.
135 * elf64-s390.c (elf_s390_plt_sym_val): New function.
136 (elf_backend_plt_sym_val): Define.
137 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
138 (elf_backend_plt_sym_val): Define.
139 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
140 (elf_backend_plt_sym_val): Define.
141 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
142 (elf_backend_plt_sym_val): Define.
143 * aout-target.h (MY_get_synthetic_symtab): Define.
144 * aout-tic30.c (MY_get_synthetic_symtab): Define.
145 * coff-rs6000.c (rs6000coff_vec): Add
146 _bfd_nodynamic_get_synthetic_symtab.
147 (pmac_xcoff_vec): Likewise.
148 * coff64-rs6000.c (rs6000coff64_vec): Add
149 _bfd_nodynamic_get_synthetic_symtab.
150 (aix5coff64_vec): Likewise.
151 * sunos.c (MY_get_synthetic_symtab): Define.
152 * vms.c (vms_get_synthetic_symtab): Define.
153
154 2004-04-22 Nick Clifton <nickc@redhat.com>
155
156 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
157
158 2004-04-22 Peter Barada <peter@the-baradas.com>
159
160 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
161 * bfd2-in.h: Regenerate.
162 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
163
164 2004-04-21 Chris Demetriou <cgd@broadcom.com>
165
166 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
167 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
168 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
169 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
170 * bfd-in2.h: Regenerate.
171
172 2004-04-21 Bob Wilson <bob.wilson@acm.org>
173
174 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
175 require relocations against a weak symbol to reference the same
176 symbol hash entry if not a final, static link.
177 (get_cached_value, add_value_map): Add final_static_link argument.
178 (remove_literals): Pass final_static_link argument as needed.
179
180 2004-04-21 Andrew Cagney <cagney@redhat.com>
181
182 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
183 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
184 (opncls_bwrite, opncls_bclose, opncls_bflush)
185 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
186 bfd iovec that uses function callbacks.
187 (bfd_close): Use the iovec's bclose.
188 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
189 (cache_bclose, cache_bflush, cache_bstat)
190 (cache_iovec): New functions and global variable, implement a
191 cache "iovec", where applicable set bfd_error.
192 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
193 * bfdio.c (struct bfd_iovec): Define.
194 (real_read): Delete function.
195 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
196 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
197 assume that bread and bwrite set bfd_error.
198 * bfd.c (struct bfd): Add "iovec", update comments.
199 * bfd-in2.h, libbfd.h: Re-generate.
200
201 2004-04-21 Andrew Cagney <cagney@redhat.com>
202
203 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
204
205 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
206
207 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
208 (bfd_elf_gc_sections): Fail if a shared object is being created.
209 Do not fail if dynamic sections have been created. Instead call
210 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
211 dynamically referenced symbols. Do not mark the whole graph
212 rooted at .eh_frame, only the section proper.
213
214 2004-04-20 DJ Delorie <dj@redhat.com>
215
216 * reloc.c: Add BFD_RELOC_32_SECREL.
217 * bfd-in2.h: Regenerate.
218 * libbfd.h: Likewise.
219 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
220 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
221 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
222
223 2004-04-19 Jakub Jelinek <jakub@redhat.com>
224
225 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
226 relocs against hidden/protected undefweak symbols properly.
227 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
228
229 2004-04-18 Mark Kettenis <kettenis@gnu.org>
230
231 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
232 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
233 core files.
234
235 2004-04-17 Brian Ford <ford@vss.fsi.com>
236
237 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
238 filepos for the SizeOfHeaders field.
239 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
240 overflow.
241 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
242
243 2004-04-16 Alan Modra <amodra@bigpond.net.au>
244
245 * simple.c (bfd_simple_get_relocated_section_contents): Don't
246 change reloc_done. Set and restore _cooked_size.
247 (RETURN): Delete.
248
249 2004-04-15 Mark Kettenis <kettenis@gnu.org>
250
251 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
252 core files.
253
254 2004-04-15 Nick Clifton <nickc@redhat.com>
255
256 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
257
258 2004-04-15 Alan Modra <amodra@bigpond.net.au>
259
260 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
261
262 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
263
264 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
265 when it is a definition.
266
267 2004-04-14 Alan Modra <amodra@bigpond.net.au>
268
269 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
270 when statically linking PIC code.
271 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
272
273 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
274
275 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
276 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
277 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
278 * configure: Regenerate.
279
280 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
281
282 * elflink.c: Include libiberty.h.
283 * Makefile.am (elflink.lo): Depend on libiberty.h.
284 * Makefile.in: Regenerate.
285
286 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
287
288 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
289 ".MIPS.stubs".
290
291 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
292
293 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
294 reserve the memory for dynamic linker
295
296 2004-04-05 Mark Kettenis <kettenis@gnu.org>
297
298 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
299 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
300
301 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
302
303 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
304 RELOC_FOR_GLOBAL_SYMBOL.
305 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
306
307 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
308
309 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
310 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
311
312 2004-04-01 Paul Brook <paul@codesourcery.com>
313
314 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
315 * elf32-arm.h (struct elf32_elf_section_map): New.
316 (struct _arm_elf_section_data): New.
317 (elf32_arm_section_data): Define.
318 (struct elf32_arm_link_hash_table): Add byteswap_code.
319 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
320 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
321 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
322 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
323 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
324 (bfd_elf32_new_section_hook, elf_backend_write_section,
325 elf_backend_link_output_symbol_hook): Define.
326
327 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
328
329 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
330 that keeps the characters in a B_INCL..B_EINCL range.
331 (_bfd_link_section_stabs): When computing the sum of the
332 characters in a B_INCL..B_EINCL range also keep a copy of those
333 characters. Use this information to distinguish between
334 include sections that have the same sum and the same length
335 but which are nevertheless unique.
336
337 2004-03-31 Paul Brook <paul@codesourcery.com>
338
339 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
340 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
341
342 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
343
344 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
345 to 'sum_chars' and add field 'num_chars'.
346 (_bfd_link_section_stabs): When computing the sum of the
347 characters in a B_INCL..B_EINCL range also keep a count of the
348 number of characters. Use this information to help distinguish
349 between include sections when have the same sum but which
350 nevertheless are still unique.
351
352 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
353
354 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
355
356 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
357 Tomer Levi <Tomer.Levi@nsc.com>
358
359 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
360 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
361 (BFD32_BACKENDS): Add elf32-cr16c.lo.
362 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
363 (cpu-cr16c.lo): New target.
364 (elf32-cr16c.lo): Likewise.
365 * Makefile.in: Regenerate.
366 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
367 (bfd_archures_list): Add bfd_cr16c_arch.
368 * config.bfd: Handle cr16c-*-elf*.
369 * configure.in: Handle bfd_elf32_cr16c_vec.
370 * configure: Regenerate.
371 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
372 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
373 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
374 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
375 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
376 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
377 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
378 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
379 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
380 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
381 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
382 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
383 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
384 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
385 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
386 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
387 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
388 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
389 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
390 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
391 * targets.c (bfd_elf32_cr16c_vec): Declare.
392 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
393 * cpu-cr16c.c: New file.
394 * elf32-cr16c.c: Likewise.
395 * libbfd.h: Regenerate.
396 * bfd-in2.h: Likewise.
397
398 2004-03-30 Jakub Jelinek <jakub@redhat.com>
399
400 * elf.c (map_sections_to_segments): Fix handling of .tbss.
401
402 2004-03-27 Alan Modra <amodra@bigpond.net.au>
403
404 * Makefile.am: Remove all mention of elflink.h.
405 * Makefile.in: Regenerate.
406 * bfd-in.h (bfd_elf_discard_info): Declare.
407 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
408 * bfd-in2.h: Regenerate.
409 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
410 bfd_elf32_link_record_dynamic_symbol,
411 bfd_elf64_link_record_dynamic_symbol,
412 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
413 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
414 _bfd_elf32_link_record_local_dynamic_symbol,
415 _bfd_elf64_link_record_local_dynamic_symbol,
416 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
417 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
418 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
419 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
420 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
421 _bfd_elf32_reloc_symbol_deleted_p,
422 _bfd_elf64_reloc_symbol_deleted_p): Delete.
423 (bfd_elf_link_record_dynamic_symbol,
424 bfd_elf_link_record_local_dynamic_symbol,
425 bfd_elf_final_link, bfd_elf_gc_sections,
426 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
427 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
428 bfd_elf_reloc_symbol_deleted_p): Declare.
429 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
430 * elf32-arm.h: Update for changed function names. Remove local
431 WILL_CALL_FINISH_DYNAMIC_SECTION define.
432 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
433 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
434 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
435 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
436 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
437 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
438 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
439 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
440 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
441 (bfd_elfNN_print_symbol): Define.
442 * elfcode.h: Don't include elflink.h.
443 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
444 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
445 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
446 elf_gc_record_vtinherit, elf_gc_record_vtentry,
447 elf_link_record_local_dynamic_symbol): Don't define.
448 * elflink.c: Update for changed function names. Move elflink.h
449 code here.
450 * elflink.h: Delete file.
451 * po/SRC-POTFILES.in: Regenerate.
452 * po/bfd.pot: Regenerate.
453
454 2004-03-27 Alan Modra <amodra@bigpond.net.au>
455
456 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
457 "name" for global syms accidentally removed in 2004-03-20 change.
458
459 2004-03-27 Alan Modra <amodra@bigpond.net.au>
460
461 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
462 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
463 where Elf_External_* is different for 64 and 32 bit, with
464 corresponding elf_size_info field.
465 (struct elf_final_link_info): Use "bfd_byte *" instead
466 of "Elf_External_Sym *" for external_syms and symbuf.
467 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
468 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
469 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
470 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
471 (elf_link_sort_cmp2): Adjust.
472 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
473 using ELF_R_SYM macro. Set u.sym_mask.
474 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
475 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
476 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
477 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
478 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
479 swap_syn_out functions. Rearrange dyn swap in/out switch.
480 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
481 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
482 (elf_link_flush_output_syms): Add elf_backend_data arg.
483 (elf_link_check_versioned_symbol): Likewise.
484 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
485 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
486 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
487 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
488 ELF_R_TYPE and ELF_R_INFO macros.
489 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
490 based on size rather than using ELF_R_INFO.
491 (elf_gc_mark): Set up r_sym_shift local var and use instead of
492 ELF_R_SYM macro.
493 (struct alloc_got_off_arg): New.
494 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
495 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
496 (elf_gc_allocate_got_offsets): Adjust.
497 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
498 ELF_R_SYM. Use bfd_section_from_elf_index.
499 (elf_bfd_discard_info): Set cookie.r_sym_shift.
500 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
501 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
502
503 2004-03-26 Stan Shebs <shebs@apple.com>
504
505 Remove MPW support, no longer used.
506 * config.bfd (powerpc-*-mpw*): Remove configuration.
507 * mpw-config.in, mpw-make.sed: Remove files.
508 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
509
510 2004-03-26 Alan Modra <amodra@bigpond.net.au>
511
512 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
513 (ppc64_elf_add_symbol_hook): New function.
514 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
515 const from Elf_Internal_Sym param.
516 * elflink.c (elf_link_add_object_symbols): Adjust.
517 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
518 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
519 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
520 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
521 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
522 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
523 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
524 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
525 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
526 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
527 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
528 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
529 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
530 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
531 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
532 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
533
534 2004-03-26 Alan Modra <amodra@bigpond.net.au>
535
536 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
537 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
538 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
539 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
540 (bfd_elf64_bfd_link_add_symbols): Delete.
541 (bfd_elf_link_add_symbols): Declare.
542 * elfcode.h (elf_bfd_link_add_symbols): Delete.
543 * elflink.c: Include safe-ctype.h.
544 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
545 make static.
546 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
547 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
548 static.
549 (elf_link_add_archive_symbols): Rename from
550 _bfd_elf_link_add_archive_symbols, make static.
551 (elf_link_add_object_symbols): New function. Corresponding
552 elflink.h function converted to use elf_size_info.
553 (bfd_elf_link_add_symbols): Likewise.
554 (bfd_elf_size_dynamic_sections): Adjust.
555 * elflink.h (elf_bfd_link_add_symbols): Delete.
556 (elf_link_add_object_symbols): Delete.
557 * elf32-gen.c (elf32_generic_link_add_symbols): Call
558 bfd_elf_link_add_symbols.
559 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
560
561 2004-03-25 Alan Modra <amodra@bigpond.net.au>
562
563 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
564 and chained shared libs only if dynsym. Clear dynsym on forced-local.
565
566 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
567 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
568 (_bfd_elf_add_dt_needed_tag): Declare.
569 (_bfd_elf_sort_symbol): Declare.
570 (_bfd_elf_finalize_dynstr): Declare.
571 (RELOC_FOR_GLOBAL_SYM): Formatting.
572 * elfcode.h (elf_add_dynamic_entry): Delete.
573 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
574 elflink.h function converted to use elf_size_info.
575 (_bfd_elf_add_dt_needed_tag): Likewise.
576 (_bfd_elf_sort_symbol): Likewise.
577 (_bfd_elf_finalize_dynstr): Likewise.
578 (compute_bucket_count): Likewise.
579 (bfd_elf_size_dynamic_sections): Likewise. Check result of
580 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
581 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
582 * elflink.h: ..here.
583 (sort_symbol, add_dt_needed_tag): Delete.
584 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
585 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
586 Update all users.
587 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
588 * elf32-cris.c (add_dynamic_entry): Likewise.
589 * elf32-hppa.c (add_dynamic_entry): Likewise.
590 * elf32-i370.c (add_dynamic_entry): Likewise.
591 * elf32-i386.c (add_dynamic_entry): Likewise.
592 * elf32-m32r.c (add_dynamic_entry): Likewise.
593 * elf32-m68k.c (add_dynamic_entry): Likewise.
594 * elf32-ppc.c (add_dynamic_entry): Likewise.
595 * elf32-s390.c (add_dynamic_entry): Likewise.
596 * elf32-sh.c (add_dynamic_entry): Likewise.
597 * elf32-sparc.c (add_dynamic_entry): Likewise.
598 * elf32-vax.c (add_dynamic_entry): Likewise.
599 * elf32-xtensa.c (add_dynamic_entry): Likewise.
600 * elf64-alpha.c (add_dynamic_entry): Likewise.
601 * elf64-hppa.c (add_dynamic_entry): Likewise.
602 * elf64-ppc.c (add_dynamic_entry): Likewise.
603 * elf64-s390.c (add_dynamic_entry): Likewise.
604 * elf64-sparc.c (add_dynamic_entry): Likewise.
605 * elf64-x86-64.c (add_dynamic_entry): Likewise.
606 * elfxx-ia64.c (add_dynamic_entry): Likewise.
607 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
608 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
609 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
610 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
611
612 2004-03-23 Paul Brook <paul@codesourcery.com>
613
614 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
615
616 2004-03-22 Bob Wilson <bob.wilson@acm.org>
617
618 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
619 literal tables and check for relocs outside of literal pools.
620 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
621 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
622 set DF_TEXTREL.
623 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
624 (elf_xtensa_relocate_section): Read literal tables and check for
625 dynamic relocations in read-only sections and not in literal pools.
626
627 2004-03-23 Alan Modra <amodra@bigpond.net.au>
628
629 PR 51.
630 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
631
632 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
633
634 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
635 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
636 not defined by the executable, or defined in a DSO.
637 <eliding run-time relocation of .got>: Initialize GOT entry for a
638 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
639 executable.
640 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
641 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
642 a PLT reloc to GOT for an executable.
643 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
644 .got for a DSO and explain why.
645 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
646 and unreferenced symbols for which a PLT is defined. Adjust
647 dynamic-symbol pruning correspondingly, to make sure we don't lose
648 a dynamic symbol also defined by a DSO.
649
650 2004-03-22 Alan Modra <amodra@bigpond.net.au>
651
652 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
653 and rel args. Group input and output args. Wrap to 80 columns.
654 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
655 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
656 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
657 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
658 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
659 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
660 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
661 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
662 RELOC_FOR_GLOBAL_SYMBOL invocation.
663
664 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
665
666 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
667 unresolved symbols in objects aren't allowed.
668
669 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
670 unresolved symbols.
671 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
672 (elf_hppa_unmark_useless_dynamic_symbols):
673 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
674 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
675 (elf32_hppa_relocate_section): Likewise.
676 * elf32-i370.c (i370_elf_relocate_section): Likewise.
677 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
678 * elf32-sh.c (sh_elf_relocate_section): Likewise.
679 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
680 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
681
682 * elf-m10200.c (mn10200_elf_relocate_section): Use
683 RELOC_FOR_GLOBAL_SYMBOL.
684 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
685 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
686 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
687 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
688 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
689 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
690 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
691 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
692 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
693 * elf32-v850.c (v850_elf_relocate_section): Likewise.
694 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
695 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
696
697 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
698
699 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
700 (final_link_relocate): Likewise.
701 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
702 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
703
704 2004-03-19 Alan Modra <amodra@bigpond.net.au>
705
706 * Makefile.am: Run "make dep-am".
707 * Makefile.in: Regenerate.
708 * aclocal.m4: Regenerate.
709 * config.in: Regenerate.
710 * po/bfd.pot: Regenerate.
711
712 2004-03-19 Alan Modra <amodra@bigpond.net.au>
713 H.J. Lu <hongjiu.lu@intel.com>
714
715 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
716 type and size change code to where it was previously. Remove
717 dt_needed param. Treat old weak syms as strong if new sym is
718 from a shared lib, even when old sym is from another shared
719 lib. Remove unnecessary tests of oldweak and newweak. Correct
720 comments.
721 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
722 _bfd_elf_merge_symbol calls.
723 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
724 dt_needed local var. Update comments.
725 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
726 (_bfd_elf_add_default_symbol): Likewise.
727
728 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
729 strong syms in one shared object overriding weak syms in another.
730
731 2004-03-18 Alan Modra <amodra@bigpond.net.au>
732
733 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
734 dyn_lib_class field. Rearrange for better packing.
735 (elf_dt_soname): Delete.
736 (elf_dyn_lib_class): Define.
737 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
738 (bfd_elf_set_dt_needed_soname): Delete.
739 (bfd_elf_set_dyn_lib_class): New function.
740 * elflink.h (add_dt_needed_tag): New function. Split out from..
741 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
742 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
743 initialization of soname.
744 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
745 elf_dt_soname.
746 * bfd-in.h (enum dynamic_lib_link_class): New.
747 (bfd_elf_set_dt_needed_soname): Delete.
748 (bfd_elf_set_dyn_lib_class): Declare.
749 * bfd-in2.h: Regenerate.
750
751 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
752 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
753 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
754 symbol loop. Instead use add_needed to flag tag as written.
755
756 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
757
758 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
759 logic for null_input_bfd detection.
760
761 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
762
763 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
764
765 2004-03-16 Mark Kettenis <kettenis@gnu.org>
766
767 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
768 code.
769
770 2004-03-16 Alan Modra <amodra@bigpond.net.au>
771
772 * elflink.c (elf_link_read_relocs_from_section): Don't use
773 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
774 (_bfd_elf_link_read_relocs): ..to here.
775 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
776
777 2004-03-16 Alan Modra <amodra@bigpond.net.au>
778
779 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
780 values selected in configure.host. Require both to be defined
781 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
782 corresponding BFD_HOST vars with quotes.
783 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
784 Always require BFD_HOST_64_BIT_DEFINED.
785 <file_ptr type>: Find off_t size before emitting message. Combine
786 off_t and ftello64 conditional.
787 * configure: Regenerate.
788
789 2004-03-16 Alan Modra <amodra@bigpond.net.au>
790
791 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
792 aliasing warning. Remove trailing whitespace throughout file.
793
794 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
795
796 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
797 input_section in calls to get_dyn_name.
798 * 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
799 local symbols.
800 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
801
802 2004-03-15 Alan Modra <amodra@bigpond.net.au>
803
804 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
805 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
806 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
807 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
808 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
809 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
810 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
811 when using long.
812 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
813 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
814 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
815 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
816 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
817 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
818 (read_8_bytes, read_indirect_string, read_address): Likewise.
819 (read_abbrevs, parse_comp_unit): Likewise.
820 * targets.c (struct bfd_target): Likewise.
821 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
822 * hppabsd-core.c: Likewise. Formatting.
823 * hpux-core.c: Likewise.
824 * irix-core.c: Likewise.
825 * netbsd-core.c: Likewise.
826 * osf-core.c: Likewise.
827 * ptrace-core.c: Likewise.
828 * sco5-core.c: Likewise.
829 * trad-core.c: Likewise.
830 * configure: Regenerate.
831 * bfd-in2.h: Regenerate.
832
833 2004-03-15 Alan Modra <amodra@bigpond.net.au>
834
835 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
836 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
837 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
838 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
839 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
840 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
841 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
842 * libbfd.c: Likewise in function definitions.
843 (bfd_put_8): Mask with 0xff rather than casting to char.
844 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
845 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
846 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
847 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
848 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
849 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
850 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
851 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
852 (H_GET_64, H_GET_32, H_GET_16): Likewise.
853 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
854 * archive.c (do_slurp_coff_armap): Update swap prototype.
855 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
856 (tic54x_getl_signed_32): Likewise.
857 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
858 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
859 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
860 (bfd_getp_signed_32, bfd_putp32): Likewise.
861 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
862 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
863 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
864 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
865 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
866 bfd_h_getx_signed_16, bfd_h_putx16.
867 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
868 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
869 * hpux-core.c: Likewise.
870 * irix-core.c: Likewise.
871 * netbsd-core.c: Likewise.
872 * osf-core.c: Likewise.
873 * ptrace-core.c: Likewise.
874 * sco5-core.c: Likewise.
875 * trad-core.c: Likewise.
876 * bfd-in2.h: Regenerate.
877
878 2004-03-15 Matt Thomas <matt@3am-software.com>
879
880 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
881 selected.
882
883 2004-03-13 Mark Kettenis <kettenis@gnu.org>
884
885 * config.bfd: Add x86_64-*-openbsd*.
886 * configure.in (x86_64-*-openbsd*): Set COREFILE to
887 netbsd-core.lo.
888 * configure: Regenerate.
889
890 2004-03-12 Nick Clifton <nickc@redhat.com>
891 Dave Murphy <wintermute2k4@ntlworld.com>
892
893 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
894 if the input bfd does not contain any code.
895
896 2004-03-09 Steve Ellcey <sje@cup.hp.com>
897
898 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
899
900 2004-03-05 Fred Fish <fnf@redhat.com>
901
902 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
903 mips16 symbols to be even rather than testing first for even/odd.
904 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
905
906 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
907
908 * elf.c (map_sections_to_segments): Ignore .tbss sections for
909 layout purposes.
910
911 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
912
913 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
914 undefined symbols as hash_new.
915
916 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
917
918 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
919 * cpu-sh.c: Ditto.
920 * elf32-sh.c: Ditto.
921 * bfd-in2.h: Regenerate.
922
923 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
924
925 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
926 dynrelocs.
927 (_frv_count_got_plt_entries): Initialize them.
928 (frv_pic_relocs_info_find): Add insert argument. Adjust all
929 callers.
930 (frv_pic_relocs_info_for_global): Likewise.
931 (frv_pic_relocs_info_for_local): Likewise.
932 (frv_pic_merge_early_relocs_info): New.
933 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
934 another.
935 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
936 Check that we don't exceed the allocated count for entry.
937 (_frv_add_rofixup): Likewise.
938 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
939 (elf32_frv_finish_dynamic_sections): Improve error message in case
940 we emit too few rofixup entries.
941
942 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
943
944 * archures.c (bfd_mach_fr450): New.
945 * bfd-in2.h: Regenerate.
946 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
947 (arch_info_500): Link to it.
948 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
949 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
950 (frv_elf_arch_extension_p): New function.
951 (frv_elf_merge_private_bfd_data): Use it.
952
953 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
954
955 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
956
957 * elflink.h (is_global_data_symbol_definition): Moved to
958 elflink.c.
959 (elf_link_is_defined_archive_symbol): Likewise.
960 (elf_link_add_archive_symbols): Likewise. Renamed to
961 _bfd_elf_link_add_archive_symbols.
962
963 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
964 of ELF symbol table entry from backend.
965 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
966 instead of elf_link_add_object_symbols.
967
968 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
969
970 * elf-bfd.h (struct elf_backend_data): Added
971 elf_backend_can_make_relative_eh_frame,
972 elf_backend_can_make_lsda_relative_eh_frame and
973 elf_backend_encode_eh_address.
974 (_bfd_elf_encode_eh_address): Declare.
975 (_bfd_elf_can_make_relative): Declare.
976 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
977 hooks to decide whether to attempt to make_relative and
978 make_lsda_relative.
979 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
980 (_bfd_elf_can_make_relative): New.
981 (_bfd_elf_encode_eh_address): New.
982 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
983 (frv_elf_encode_eh_address): New.
984 (elf_backend_can_make_relative_eh_frame): Define.
985 (elf_backend_can_make_lsda_relative_eh_frame): Define.
986 (elf_backend_encode_eh_address): Define.
987 * elfxx-target.h
988 (elf_backend_can_make_relative_eh_frame): Define.
989 (elf_backend_can_make_lsda_relative_eh_frame): Define.
990 (elf_backend_encode_eh_address): Define.
991 (elfNN_bed): Add them.
992
993 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
994
995 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
996 complain_on_overflow to signed.
997
998 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
999
1000 * elflink.h (sort_symbol): New.
1001 (elf_link_add_object_symbols): Use a sorted symbol array for
1002 weakdef.
1003
1004 2004-02-27 Jakub Jelinek <jakub@redhat.com>
1005
1006 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
1007 for pc relative relocs.
1008 (elf_s390_relocate_section): Likewise.
1009 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
1010 for pc relative relocs.
1011 (elf_s390_relocate_section): Likewise.
1012
1013 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
1014
1015 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
1016 count_dyn_reloc.
1017
1018 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
1019
1020 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
1021 field to track if a relocation is against readonly section.
1022 (count_dyn_reloc): Take a new argument for rent->reltext.
1023 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
1024 (get_reloc_section): Don't set ia64_info->reltext here.
1025 (allocate_dynrel_entries): Set ia64_info->reltext here.
1026
1027 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
1028
1029 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
1030 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
1031 function's descriptor to symbol+offset, and map local undefweak
1032 symbol to NULL function descriptor.
1033 (elf32_frv_relocate_section): Likewise.
1034
1035 2004-02-23 Mark Kettenis <kettenis@gnu.org>
1036
1037 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
1038 M_X86_64_NETBSD.
1039 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
1040 (netbsd_core_file_p): Set architecture from machine ID for
1041 selected machines.
1042
1043 2004-02-23 Jakub Jelinek <jakub@redhat.com>
1044
1045 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
1046 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
1047
1048 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
1049
1050 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
1051 symbols with non-default visibility.
1052
1053 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
1054
1055 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
1056 IMAGE_SCN_MEM_WRITE on known sections only.
1057
1058 2004-02-20 Jakub Jelinek <jakub@redhat.com>
1059
1060 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
1061 symbols used in PIE relocs.
1062
1063 2004-02-19 Jakub Jelinek <jakub@redhat.com>
1064
1065 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
1066 .plt sh_entsize.
1067
1068 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
1069
1070 * configure.in: Update version to 2.15.90.
1071 * configure: Regenerate.
1072
1073 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
1074 Richard Sandiford <rsandifo@redhat.com>
1075
1076 * elfxx-mips.c (mips_elf_calculate_relocation): Use
1077 _bfd_elf_symbol_refs_local_p to decide whether to decay
1078 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
1079 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
1080 relocs if the symbol wasn't defined by a regular object file.
1081 Don't check the symbol's dynindx.
1082
1083 2004-02-16 Andrew Cagney <cagney@redhat.com>
1084
1085 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
1086 @bfd_file_ptr@.
1087 * bfd-in2.h: Re-generate.
1088
1089 2004-02-14 Andrew Cagney <cagney@redhat.com>
1090
1091 * configure.host (HDEFINES): When hppa*-*-hpux*, define
1092 _LARGEFILE64_SOURCE.
1093
1094 2004-02-13 Andrew Cagney <cagney@redhat.com>
1095
1096 * elf.c (vma_page_aligned_bias): New function.
1097 (assign_file_positions_except_relocs)
1098 (assign_file_positions_for_segments): Replace broken modulo
1099 arithmetic with call to vma_page_aligned_bias.
1100
1101 2004-02-11 Andrew Cagney <cagney@redhat.com>
1102
1103 * bfd-in.h: Update copyright.
1104 (bfd_tell): Change return type to file_ptr.
1105 * bfd-in2.h: Re-generate.
1106 * cache.c: Update copyright.
1107 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
1108 parameter.
1109 (close_one): Use real_ftell.
1110 * bfdio.c: Update copyright.
1111 (real_ftell, real_fseek): New functions.
1112 (bfd_tell): Use real_fseek and real_ftell, change return type to
1113 file_ptr.
1114 (bfd_seek): Use real_ftell and real_fseek, change type of
1115 file_position to a file_ptr.
1116 * libbfd-in.h: Update copyright.
1117 (real_ftell, real_fseek): Declare.
1118 * libbfd.h: Re-generate.
1119
1120 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
1121 fseeko and fseeko64. Determine bfd_file_ptr.
1122 * configure: Re-generate.
1123 * config.in: Re-generate.
1124
1125 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
1126
1127 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
1128 * elf32-h8300.c: Likewise.
1129
1130 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
1131 Nick Clifton <nickc@redhat.com>
1132
1133 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
1134 GOT entries with no associated GOT subsection.
1135
1136 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
1137
1138 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
1139 * elf.c (swap_out_syms): Use it to decide whether local section
1140 symbols should be named.
1141 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
1142 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
1143 (elf_backend_name_local_section_symbols): Define.
1144 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
1145
1146 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
1147
1148 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
1149 (elfNN_ia64_relax_section): Optimize brl to br during the relax
1150 finalize pass.
1151
1152 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
1153
1154 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
1155 to bfd_link_hash_entry passed by reference to
1156 _bfd_generic_link_add_one_symbol.
1157
1158 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
1159
1160 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
1161 relocations against dynamic symbols.
1162
1163 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
1164
1165 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
1166 change.
1167
1168 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
1169
1170 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
1171 * bfd-in2.h, libbfd.h: Rebuilt.
1172
1173 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
1174
1175 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
1176 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
1177 flag has been cleared.
1178
1179 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
1180
1181 * coff-h8300.c: Add and adjust comments about relaxation.
1182 * elf32-h8300.c: Likewise.
1183
1184 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
1185
1186 * coff-h8300.c: Fix comment typos.
1187 * elf32-h8300.c: Likewise.
1188
1189 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
1190
1191 * coff-h8300.c: Add comments about relaxation.
1192 * elf32-h8300.c: Likewise.
1193
1194 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1195
1196 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
1197 throughout.
1198 * aclocal.m4: Regenerate.
1199 * configure: Regenerate.
1200
1201 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
1202
1203 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
1204 mips_elf64_rtype_to_howto instead of using howto_table.
1205
1206 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
1207
1208 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
1209 the .plt section.
1210 (elf32_arm_check_relocs): Don't increment the PLT refcount for
1211 relocs which would not use the PLT.
1212
1213 2004-01-13 Alan Modra <amodra@bigpond.net.au>
1214
1215 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
1216 (ppc64_elf_gc_sweep_hook): Likewise.
1217 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
1218
1219 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
1220
1221 Adds linker relaxation support for bit manipulation insns like
1222 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
1223 bst, btst, bxor.
1224 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
1225 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
1226 * coff-h8300.c: Opcode for bit manipulation insn is checked in
1227 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
1228
1229 2004-01-12 Alan Modra <amodra@bigpond.net.au>
1230
1231 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
1232
1233 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
1234
1235 * elf32-h8300.c: Fix formatting.
1236
1237 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
1238
1239 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
1240 dynamic object is present. Declare r_symndx and h in an inner
1241 scope.
1242 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
1243
1244 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
1245
1246 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
1247 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
1248 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
1249 identically. Do not emit PC24 relocations for shared libraries.
1250 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
1251 identically. Don't adjust pc_count.
1252 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
1253 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
1254 adjust count for branch relocations.
1255 (allocate_dynrelocs): Correct typo in call to
1256 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
1257 PC24 or PLT32 relocs when linking.
1258
1259 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
1260
1261 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
1262 relocation howto with ARM_26 one for consistency.
1263 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
1264 that will be converted to ARM_26D ones, since we always want 'done'
1265 relocations to be reflected in section's data.
1266 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
1267 offset.
1268 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
1269 requested.
1270
1271 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
1272
1273 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
1274 are not partial_inplace during a relocatable link.
1275
1276 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
1277
1278 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
1279 if no dynamic object is present. Declare r_symndx and h in an
1280 inner scope.
1281
1282 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
1283
1284 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
1285 trampoline if it is known out of range.
1286
1287 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
1288
1289 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
1290 * elf32-frv.c (_frv_osec_readonly_p): New.
1291 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
1292 undefweak symbol.
1293 (_frv_count_got_plt_entries): Adjust expected count accordingly.
1294 (elf32_frv_relocate_section): Likewise. Error out if attempting
1295 to emit rofixups or dynamic relocs in read-only segments. Use
1296 _bfd_elf_section_offset to adjust r_offsets in rofixups and
1297 dynamic relocations.
1298 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
1299 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
1300 relocations or fixups involving merged sections correctly. Avoid
1301 crash when undefined symbol is referenced by R_FRV_32 or
1302 R_FRV_FUNCDESC_VALUE.
1303 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
1304 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
1305 input section holding local symbol to addend of R_FRV_32 or
1306 R_FRV_FUNCDESC_VALUE dynamic relocation.
1307 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
1308 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
1309 (elf32_frv_always_size_sections): Don't store pointer to
1310 __stacksize symbol in sec_info.
1311 (elf32_frv_modify_segment_map): Look it up here.
1312 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
1313 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
1314 of the lazy PLT entry, not only its offset, as the low word of a
1315 function descriptor.
1316 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
1317 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
1318 if a hash table entry already exists but is not a definition.
1319 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
1320 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
1321 (_frv_add_rofixup): Don't inline.
1322 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
1323 for undefweak symbols.
1324 (elf32_frv_relocate_section): Avoid crash while computing
1325 relocation when linking with shared library. Only emit rofixups
1326 and dynamic relocations for alloc&load sections. Mark binaries
1327 with inter-segment relocations for relocation as a unit.
1328 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
1329 (DEFAULT_STACK_SIZE): New.
1330 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
1331 emit rofixups or dynamic relocs when linking dynamic non-PIE
1332 executables.
1333 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
1334 shared libs too. Reserve the last entry for the GOT pointer.
1335 (elf32_frv_finish_dynamic_sections): Emit it.
1336 (elf32_frv_always_size_sections): New.
1337 (elf32_frv_modify_segment_map): New.
1338 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
1339 sections.
1340 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
1341 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
1342 (elf_backend_always_size_sections): New.
1343 (elf_backend_modify_segment_map): New.
1344 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
1345 * config.bfd: Added frv-*-*linux*.
1346 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
1347 ABS section, instead of crashing.
1348 (elf32_frv_relocate_section): Don't crash before warning about
1349 different segments in non-PIC relocation.
1350 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
1351 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
1352 relocs to undefweak symbols.
1353 (elf32_frv_relocate_section): Ditto for undefined symbols.
1354 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
1355 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
1356 gotfixup section was created.
1357 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
1358 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
1359 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
1360 complain_overflow_signed.
1361 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
1362 have not been allocated.
1363 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
1364 privfd only if dynamic sections were created.
1365 (elf32_frv_relocate_section): Compute gprel_segment, and use it
1366 for GPREL relocs. When linking relocatable FDPIC executables,
1367 emit warnings for relocations that would be illegal on PIE or
1368 shared libraries. Emit rofixup for R_FRV_32 only if input object
1369 is not FDPIC.
1370 (_frv_create_got_section): Define _gp symbol in the rofixup
1371 section.
1372 (elf32_frv_finish_dynamic_sections): If rofixups needed but
1373 dynamic sections missing, error out requesting -melf32frvfd.
1374 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
1375 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
1376 computation of addends from section and global or local symbol
1377 value. Change return type to bfd_boolean, and return a failure if
1378 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
1379 nonzero addend is required.
1380 (elf32_frv_relocate_section): Likewise. Print error for
1381 unsupported nonzero addends.
1382 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
1383 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
1384 force everything local.
1385 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
1386 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
1387 (frv_gotfixup_section): New.
1388 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
1389 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
1390 and relocsfdv.
1391 (_frv_add_rofixup): New.
1392 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
1393 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
1394 improve some ugly conditions.
1395 (elf32_frv_relocate_section): Likewise. Reject inter-segment
1396 relocations in fdpic.
1397 (_frv_create_got_section): Create .rofixup.got section.
1398 (struct _frv_dynamic_got_info): Added fixups.
1399 (_frv_count_got_plt_entries): Account in-GOT relocations into
1400 relocs32, relocsfd and relocsfdv. Account them into relocs or
1401 fixups, as appropriate.
1402 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
1403 sizing of gotrel.
1404 (elf32_frv_finish_dynamic_sections): Verify that the right number
1405 of relocations and fixups was generated.
1406 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
1407 relocsfdv.
1408 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
1409 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
1410 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
1411 descriptor of a (formerly-)global symbol is local.
1412 (struct frv_pic_relocs_info): Adjust comments.
1413 (_frv_emit_got_relocs_plt_entries): Adjust.
1414 (elf32_frv_relocate_section): Likewise.
1415 (_frv_count_got_plt_entries): Likewise.
1416 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
1417 symbol's value to addend in the common preamble. Decay dynamic
1418 symbols to section+offset if they bind or call locally, for GOT
1419 and FUNCDESC_VALUE, respectively.
1420 (elf32_frv_relocate_section): Likewise.
1421 (elf32_frv_check_relocs): Don't register as dynamic symbols of
1422 internal or hidden visibility.
1423 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
1424 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
1425 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
1426 (elf32_frv_relocate_section): Pass relocation addend in. Use
1427 original relocation addend to look up the got relocs/plt entries
1428 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
1429 processing relocations that reference .scommon symbols.
1430 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
1431 Introduce support for dynamic linking.
1432 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
1433 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
1434 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
1435 (frv_reloc_type_lookup): Return REL howtos for executables and
1436 dynamic libraries.
1437 (frv_info_to_howto_rel): New.
1438 (struct frv_elf_link_hash_table): New.
1439 (frv_hash_table, frv_got_section, frv_gotrel_section,
1440 frv_plt_section, frv_pltrel_section, frv_relocs_info,
1441 frv_got_initial_offset, frv_plt_initial_offset): New macros.
1442 (frv_elf_link_hash_table_create): New.
1443 (struct frv_pic_relocs_info): New.
1444 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
1445 (frv_pic_relocs_info_find): New.
1446 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
1447 New.
1448 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
1449 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
1450 (_frv_emit_got_relocs_plt_entries): New.
1451 (elf32_frv_relocate_section): Add support for dynamic linking.
1452 Handle new relocations.
1453 (_frv_create_got_section): New.
1454 (elf32_frv_create_dynamic_sections): New.
1455 (ELF_DYNAMIC_INTERPRETER): New.
1456 (struct _frv_dynamic_got_info): New.
1457 (_frv_count_got_plt_entries): New.
1458 (struct _frv_dynamic_got_plt_info): New.
1459 (_frv_compute_got_alloc_data): New.
1460 (_frv_get_got_entry, _frv_get_fd_entry): New.
1461 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
1462 (_frv_resolve_final_relocs_info): New.
1463 (elf32_frv_size_dynamic_sections): New.
1464 (elf32_frv_finish_dynamic_sections): New.
1465 (elf32_frv_adjust_dynamic_symbol): New.
1466 (elf32_frv_finish_dynamic_symbol): New.
1467 (elf32_frv_check_relocs): Handle new relocs. Explain how the
1468 whole thing works.
1469 (elf_info_to_howto_rel): Define.
1470 (bfd_elf32_bfd_link_hash_table_create): Define.
1471 (elf_backend_create_dynamic_sections): Define.
1472 (elf_backend_adjust_dynamic_symbol): Define.
1473 (elf_backend_size_dynamic_sections): Define.
1474 (elf_backend_finish_dynamic_symbol): Define.
1475 (elf_backend_finish_dynamic_sections): Define.
1476 (elf_backend_want_got_sym): Define.
1477 (elf_backend_got_header_size): Define.
1478 (elf_backend_want_got_plt): Define.
1479 (elf_backend_plt_readonly): Define.
1480 (elf_backend_want_plt_sym): Define.
1481 (elf_backend_plt_header_size): Define.
1482 (elf_backend_may_use_rel_p): Define.
1483 (elf_backend_may_use_rela_p): Define.
1484 (elf_backend_default_use_rela_p): Define.
1485 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
1486 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
1487 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
1488 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
1489 (frv_reloc_map): Map the corresponding BFD relocs to them.
1490 (frv_reloc_type_lookup): ... and back to BFD relocs.
1491 * reloc.c: New relocs.
1492 * bfd-in2.h, libbfd.h: Rebuilt.
1493 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
1494 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
1495 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
1496 R_FRV_FUNCDESC_GOTLO): New.
1497 (frv_reloc_map): Map the corresponding BFD relocs to them.
1498 (frv_reloc_type_lookup): ... and back to BFD relocs.
1499 * reloc.c: New relocs.
1500 * bfd-in2.h, libbfd.h: Rebuilt.
1501
1502 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1503
1504 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
1505 targets to support pages of up to 64kB.
1506 (elf32_bed): Redefine to get a separate backend data structure for
1507 traditional targets.
1508 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
1509 targets to support pages of up to 64kB.
1510 (elf64_bed): Redefine to get a separate backend data structure for
1511 traditional targets.
1512 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
1513 targets to support pages of up to 64kB.
1514 (elf32_bed): Redefine to get a separate backend data structure for
1515 traditional targets.
1516
1517 2004-01-04 Mark Kettenis <kettenis@gnu.org>
1518
1519 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
1520
1521 2004-01-02 Mark Kettenis <kettenis@gnu.org>
1522
1523 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
1524 (elf_i386_grok_psinfo): Likewise.
1525
1526 2004-01-02 Bernardo Innocenti <bernie@develer.com>
1527
1528 * config.bfd: Add m68k-uClinux target.
1529
1530 2004-01-01 Grant Edwards <grante@visi.com>
1531
1532 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
1533 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
1534 (elf32_h8_gc_sweep_hook): New function.
1535 (elf_backend_gc_mark_hook): Define.
1536 (elf_backend_gc_sweep_hook): Define.
1537 (elf_backend_can_gc_sections): Define.
1538
1539 For older changes see ChangeLog-0203
1540 \f
1541 Local Variables:
1542 mode: change-log
1543 left-margin: 8
1544 fill-column: 74
1545 version-control: never
1546 End:
This page took 0.059146 seconds and 5 git commands to generate.