1 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
3 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
5 2004-03-16 Mark Kettenis <kettenis@gnu.org>
7 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
10 2004-03-16 Alan Modra <amodra@bigpond.net.au>
12 * elflink.c (elf_link_read_relocs_from_section): Don't use
13 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
14 (_bfd_elf_link_read_relocs): ..to here.
15 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
17 2004-03-16 Alan Modra <amodra@bigpond.net.au>
19 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
20 values selected in configure.host. Require both to be defined
21 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
22 corresponding BFD_HOST vars with quotes.
23 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
24 Always require BFD_HOST_64_BIT_DEFINED.
25 <file_ptr type>: Find off_t size before emitting message. Combine
26 off_t and ftello64 conditional.
27 * configure: Regenerate.
29 2004-03-16 Alan Modra <amodra@bigpond.net.au>
31 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
32 aliasing warning. Remove trailing whitespace throughout file.
34 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
36 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
37 input_section in calls to get_dyn_name.
38 * 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
40 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
42 2004-03-15 Alan Modra <amodra@bigpond.net.au>
44 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
45 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
46 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
47 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
48 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
49 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
50 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
52 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
53 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
54 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
55 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
56 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
57 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
58 (read_8_bytes, read_indirect_string, read_address): Likewise.
59 (read_abbrevs, parse_comp_unit): Likewise.
60 * targets.c (struct bfd_target): Likewise.
61 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
62 * hppabsd-core.c: Likewise. Formatting.
63 * hpux-core.c: Likewise.
64 * irix-core.c: Likewise.
65 * netbsd-core.c: Likewise.
66 * osf-core.c: Likewise.
67 * ptrace-core.c: Likewise.
68 * sco5-core.c: Likewise.
69 * trad-core.c: Likewise.
70 * configure: Regenerate.
71 * bfd-in2.h: Regenerate.
73 2004-03-15 Alan Modra <amodra@bigpond.net.au>
75 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
76 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
77 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
78 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
79 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
80 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
81 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
82 * libbfd.c: Likewise in function definitions.
83 (bfd_put_8): Mask with 0xff rather than casting to char.
84 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
85 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
86 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
87 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
88 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
89 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
90 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
91 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
92 (H_GET_64, H_GET_32, H_GET_16): Likewise.
93 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
94 * archive.c (do_slurp_coff_armap): Update swap prototype.
95 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
96 (tic54x_getl_signed_32): Likewise.
97 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
98 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
99 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
100 (bfd_getp_signed_32, bfd_putp32): Likewise.
101 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
102 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
103 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
104 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
105 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
106 bfd_h_getx_signed_16, bfd_h_putx16.
107 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
108 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
109 * hpux-core.c: Likewise.
110 * irix-core.c: Likewise.
111 * netbsd-core.c: Likewise.
112 * osf-core.c: Likewise.
113 * ptrace-core.c: Likewise.
114 * sco5-core.c: Likewise.
115 * trad-core.c: Likewise.
116 * bfd-in2.h: Regenerate.
118 2004-03-15 Matt Thomas <matt@3am-software.com>
120 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
123 2004-03-13 Mark Kettenis <kettenis@gnu.org>
125 * config.bfd: Add x86_64-*-openbsd*.
126 * configure.in (x86_64-*-openbsd*): Set COREFILE to
128 * configure: Regenerate.
130 2004-03-12 Nick Clifton <nickc@redhat.com>
131 Dave Murphy <wintermute2k4@ntlworld.com>
133 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
134 if the input bfd does not contain any code.
136 2004-03-09 Steve Ellcey <sje@cup.hp.com>
138 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
140 2004-03-05 Fred Fish <fnf@redhat.com>
142 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
143 mips16 symbols to be even rather than testing first for even/odd.
144 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
146 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
148 * elf.c (map_sections_to_segments): Ignore .tbss sections for
151 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
153 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
154 undefined symbols as hash_new.
156 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
158 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
161 * bfd-in2.h: Regenerate.
163 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
165 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
167 (_frv_count_got_plt_entries): Initialize them.
168 (frv_pic_relocs_info_find): Add insert argument. Adjust all
170 (frv_pic_relocs_info_for_global): Likewise.
171 (frv_pic_relocs_info_for_local): Likewise.
172 (frv_pic_merge_early_relocs_info): New.
173 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
175 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
176 Check that we don't exceed the allocated count for entry.
177 (_frv_add_rofixup): Likewise.
178 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
179 (elf32_frv_finish_dynamic_sections): Improve error message in case
180 we emit too few rofixup entries.
182 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
184 * archures.c (bfd_mach_fr450): New.
185 * bfd-in2.h: Regenerate.
186 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
187 (arch_info_500): Link to it.
188 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
189 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
190 (frv_elf_arch_extension_p): New function.
191 (frv_elf_merge_private_bfd_data): Use it.
193 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
195 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
197 * elflink.h (is_global_data_symbol_definition): Moved to
199 (elf_link_is_defined_archive_symbol): Likewise.
200 (elf_link_add_archive_symbols): Likewise. Renamed to
201 _bfd_elf_link_add_archive_symbols.
203 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
204 of ELF symbol table entry from backend.
205 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
206 instead of elf_link_add_object_symbols.
208 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
210 * elf-bfd.h (struct elf_backend_data): Added
211 elf_backend_can_make_relative_eh_frame,
212 elf_backend_can_make_lsda_relative_eh_frame and
213 elf_backend_encode_eh_address.
214 (_bfd_elf_encode_eh_address): Declare.
215 (_bfd_elf_can_make_relative): Declare.
216 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
217 hooks to decide whether to attempt to make_relative and
219 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
220 (_bfd_elf_can_make_relative): New.
221 (_bfd_elf_encode_eh_address): New.
222 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
223 (frv_elf_encode_eh_address): New.
224 (elf_backend_can_make_relative_eh_frame): Define.
225 (elf_backend_can_make_lsda_relative_eh_frame): Define.
226 (elf_backend_encode_eh_address): Define.
228 (elf_backend_can_make_relative_eh_frame): Define.
229 (elf_backend_can_make_lsda_relative_eh_frame): Define.
230 (elf_backend_encode_eh_address): Define.
231 (elfNN_bed): Add them.
233 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
235 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
236 complain_on_overflow to signed.
238 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
240 * elflink.h (sort_symbol): New.
241 (elf_link_add_object_symbols): Use a sorted symbol array for
244 2004-02-27 Jakub Jelinek <jakub@redhat.com>
246 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
247 for pc relative relocs.
248 (elf_s390_relocate_section): Likewise.
249 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
250 for pc relative relocs.
251 (elf_s390_relocate_section): Likewise.
253 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
255 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
258 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
260 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
261 field to track if a relocation is against readonly section.
262 (count_dyn_reloc): Take a new argument for rent->reltext.
263 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
264 (get_reloc_section): Don't set ia64_info->reltext here.
265 (allocate_dynrel_entries): Set ia64_info->reltext here.
267 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
269 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
270 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
271 function's descriptor to symbol+offset, and map local undefweak
272 symbol to NULL function descriptor.
273 (elf32_frv_relocate_section): Likewise.
275 2004-02-23 Mark Kettenis <kettenis@gnu.org>
277 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
279 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
280 (netbsd_core_file_p): Set architecture from machine ID for
283 2004-02-23 Jakub Jelinek <jakub@redhat.com>
285 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
286 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
288 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
290 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
291 symbols with non-default visibility.
293 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
295 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
296 IMAGE_SCN_MEM_WRITE on known sections only.
298 2004-02-20 Jakub Jelinek <jakub@redhat.com>
300 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
301 symbols used in PIE relocs.
303 2004-02-19 Jakub Jelinek <jakub@redhat.com>
305 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
308 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
310 * configure.in: Update version to 2.15.90.
311 * configure: Regenerate.
313 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
314 Richard Sandiford <rsandifo@redhat.com>
316 * elfxx-mips.c (mips_elf_calculate_relocation): Use
317 _bfd_elf_symbol_refs_local_p to decide whether to decay
318 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
319 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
320 relocs if the symbol wasn't defined by a regular object file.
321 Don't check the symbol's dynindx.
323 2004-02-16 Andrew Cagney <cagney@redhat.com>
325 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
327 * bfd-in2.h: Re-generate.
329 2004-02-14 Andrew Cagney <cagney@redhat.com>
331 * configure.host (HDEFINES): When hppa*-*-hpux*, define
334 2004-02-13 Andrew Cagney <cagney@redhat.com>
336 * elf.c (vma_page_aligned_bias): New function.
337 (assign_file_positions_except_relocs)
338 (assign_file_positions_for_segments): Replace broken modulo
339 arithmetic with call to vma_page_aligned_bias.
341 2004-02-11 Andrew Cagney <cagney@redhat.com>
343 * bfd-in.h: Update copyright.
344 (bfd_tell): Change return type to file_ptr.
345 * bfd-in2.h: Re-generate.
346 * cache.c: Update copyright.
347 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
349 (close_one): Use real_ftell.
350 * bfdio.c: Update copyright.
351 (real_ftell, real_fseek): New functions.
352 (bfd_tell): Use real_fseek and real_ftell, change return type to
354 (bfd_seek): Use real_ftell and real_fseek, change type of
355 file_position to a file_ptr.
356 * libbfd-in.h: Update copyright.
357 (real_ftell, real_fseek): Declare.
358 * libbfd.h: Re-generate.
360 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
361 fseeko and fseeko64. Determine bfd_file_ptr.
362 * configure: Re-generate.
363 * config.in: Re-generate.
365 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
367 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
368 * elf32-h8300.c: Likewise.
370 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
371 Nick Clifton <nickc@redhat.com>
373 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
374 GOT entries with no associated GOT subsection.
376 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
378 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
379 * elf.c (swap_out_syms): Use it to decide whether local section
380 symbols should be named.
381 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
382 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
383 (elf_backend_name_local_section_symbols): Define.
384 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
386 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
388 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
389 (elfNN_ia64_relax_section): Optimize brl to br during the relax
392 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
394 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
395 to bfd_link_hash_entry passed by reference to
396 _bfd_generic_link_add_one_symbol.
398 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
400 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
401 relocations against dynamic symbols.
403 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
405 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
408 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
410 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
411 * bfd-in2.h, libbfd.h: Rebuilt.
413 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
415 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
416 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
417 flag has been cleared.
419 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
421 * coff-h8300.c: Add and adjust comments about relaxation.
422 * elf32-h8300.c: Likewise.
424 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
426 * coff-h8300.c: Fix comment typos.
427 * elf32-h8300.c: Likewise.
429 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
431 * coff-h8300.c: Add comments about relaxation.
432 * elf32-h8300.c: Likewise.
434 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
436 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
438 * aclocal.m4: Regenerate.
439 * configure: Regenerate.
441 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
443 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
444 mips_elf64_rtype_to_howto instead of using howto_table.
446 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
448 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
450 (elf32_arm_check_relocs): Don't increment the PLT refcount for
451 relocs which would not use the PLT.
453 2004-01-13 Alan Modra <amodra@bigpond.net.au>
455 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
456 (ppc64_elf_gc_sweep_hook): Likewise.
457 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
459 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
461 Adds linker relaxation support for bit manipulation insns like
462 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
464 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
465 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
466 * coff-h8300.c: Opcode for bit manipulation insn is checked in
467 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
469 2004-01-12 Alan Modra <amodra@bigpond.net.au>
471 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
473 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
475 * elf32-h8300.c: Fix formatting.
477 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
479 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
480 dynamic object is present. Declare r_symndx and h in an inner
482 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
484 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
486 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
487 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
488 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
489 identically. Do not emit PC24 relocations for shared libraries.
490 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
491 identically. Don't adjust pc_count.
492 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
493 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
494 adjust count for branch relocations.
495 (allocate_dynrelocs): Correct typo in call to
496 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
497 PC24 or PLT32 relocs when linking.
499 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
501 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
502 relocation howto with ARM_26 one for consistency.
503 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
504 that will be converted to ARM_26D ones, since we always want 'done'
505 relocations to be reflected in section's data.
506 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
508 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
511 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
513 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
514 are not partial_inplace during a relocatable link.
516 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
518 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
519 if no dynamic object is present. Declare r_symndx and h in an
522 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
524 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
525 trampoline if it is known out of range.
527 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
529 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
530 * elf32-frv.c (_frv_osec_readonly_p): New.
531 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
533 (_frv_count_got_plt_entries): Adjust expected count accordingly.
534 (elf32_frv_relocate_section): Likewise. Error out if attempting
535 to emit rofixups or dynamic relocs in read-only segments. Use
536 _bfd_elf_section_offset to adjust r_offsets in rofixups and
538 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
539 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
540 relocations or fixups involving merged sections correctly. Avoid
541 crash when undefined symbol is referenced by R_FRV_32 or
542 R_FRV_FUNCDESC_VALUE.
543 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
544 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
545 input section holding local symbol to addend of R_FRV_32 or
546 R_FRV_FUNCDESC_VALUE dynamic relocation.
547 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
548 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
549 (elf32_frv_always_size_sections): Don't store pointer to
550 __stacksize symbol in sec_info.
551 (elf32_frv_modify_segment_map): Look it up here.
552 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
553 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
554 of the lazy PLT entry, not only its offset, as the low word of a
556 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
557 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
558 if a hash table entry already exists but is not a definition.
559 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
560 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
561 (_frv_add_rofixup): Don't inline.
562 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
563 for undefweak symbols.
564 (elf32_frv_relocate_section): Avoid crash while computing
565 relocation when linking with shared library. Only emit rofixups
566 and dynamic relocations for alloc&load sections. Mark binaries
567 with inter-segment relocations for relocation as a unit.
568 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
569 (DEFAULT_STACK_SIZE): New.
570 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
571 emit rofixups or dynamic relocs when linking dynamic non-PIE
573 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
574 shared libs too. Reserve the last entry for the GOT pointer.
575 (elf32_frv_finish_dynamic_sections): Emit it.
576 (elf32_frv_always_size_sections): New.
577 (elf32_frv_modify_segment_map): New.
578 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
580 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
581 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
582 (elf_backend_always_size_sections): New.
583 (elf_backend_modify_segment_map): New.
584 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
585 * config.bfd: Added frv-*-*linux*.
586 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
587 ABS section, instead of crashing.
588 (elf32_frv_relocate_section): Don't crash before warning about
589 different segments in non-PIC relocation.
590 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
591 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
592 relocs to undefweak symbols.
593 (elf32_frv_relocate_section): Ditto for undefined symbols.
594 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
595 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
596 gotfixup section was created.
597 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
598 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
599 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
600 complain_overflow_signed.
601 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
602 have not been allocated.
603 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
604 privfd only if dynamic sections were created.
605 (elf32_frv_relocate_section): Compute gprel_segment, and use it
606 for GPREL relocs. When linking relocatable FDPIC executables,
607 emit warnings for relocations that would be illegal on PIE or
608 shared libraries. Emit rofixup for R_FRV_32 only if input object
610 (_frv_create_got_section): Define _gp symbol in the rofixup
612 (elf32_frv_finish_dynamic_sections): If rofixups needed but
613 dynamic sections missing, error out requesting -melf32frvfd.
614 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
615 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
616 computation of addends from section and global or local symbol
617 value. Change return type to bfd_boolean, and return a failure if
618 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
619 nonzero addend is required.
620 (elf32_frv_relocate_section): Likewise. Print error for
621 unsupported nonzero addends.
622 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
623 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
624 force everything local.
625 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
626 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
627 (frv_gotfixup_section): New.
628 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
629 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
631 (_frv_add_rofixup): New.
632 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
633 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
634 improve some ugly conditions.
635 (elf32_frv_relocate_section): Likewise. Reject inter-segment
636 relocations in fdpic.
637 (_frv_create_got_section): Create .rofixup.got section.
638 (struct _frv_dynamic_got_info): Added fixups.
639 (_frv_count_got_plt_entries): Account in-GOT relocations into
640 relocs32, relocsfd and relocsfdv. Account them into relocs or
641 fixups, as appropriate.
642 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
644 (elf32_frv_finish_dynamic_sections): Verify that the right number
645 of relocations and fixups was generated.
646 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
648 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
649 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
650 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
651 descriptor of a (formerly-)global symbol is local.
652 (struct frv_pic_relocs_info): Adjust comments.
653 (_frv_emit_got_relocs_plt_entries): Adjust.
654 (elf32_frv_relocate_section): Likewise.
655 (_frv_count_got_plt_entries): Likewise.
656 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
657 symbol's value to addend in the common preamble. Decay dynamic
658 symbols to section+offset if they bind or call locally, for GOT
659 and FUNCDESC_VALUE, respectively.
660 (elf32_frv_relocate_section): Likewise.
661 (elf32_frv_check_relocs): Don't register as dynamic symbols of
662 internal or hidden visibility.
663 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
664 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
665 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
666 (elf32_frv_relocate_section): Pass relocation addend in. Use
667 original relocation addend to look up the got relocs/plt entries
668 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
669 processing relocations that reference .scommon symbols.
670 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
671 Introduce support for dynamic linking.
672 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
673 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
674 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
675 (frv_reloc_type_lookup): Return REL howtos for executables and
677 (frv_info_to_howto_rel): New.
678 (struct frv_elf_link_hash_table): New.
679 (frv_hash_table, frv_got_section, frv_gotrel_section,
680 frv_plt_section, frv_pltrel_section, frv_relocs_info,
681 frv_got_initial_offset, frv_plt_initial_offset): New macros.
682 (frv_elf_link_hash_table_create): New.
683 (struct frv_pic_relocs_info): New.
684 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
685 (frv_pic_relocs_info_find): New.
686 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
688 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
689 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
690 (_frv_emit_got_relocs_plt_entries): New.
691 (elf32_frv_relocate_section): Add support for dynamic linking.
692 Handle new relocations.
693 (_frv_create_got_section): New.
694 (elf32_frv_create_dynamic_sections): New.
695 (ELF_DYNAMIC_INTERPRETER): New.
696 (struct _frv_dynamic_got_info): New.
697 (_frv_count_got_plt_entries): New.
698 (struct _frv_dynamic_got_plt_info): New.
699 (_frv_compute_got_alloc_data): New.
700 (_frv_get_got_entry, _frv_get_fd_entry): New.
701 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
702 (_frv_resolve_final_relocs_info): New.
703 (elf32_frv_size_dynamic_sections): New.
704 (elf32_frv_finish_dynamic_sections): New.
705 (elf32_frv_adjust_dynamic_symbol): New.
706 (elf32_frv_finish_dynamic_symbol): New.
707 (elf32_frv_check_relocs): Handle new relocs. Explain how the
709 (elf_info_to_howto_rel): Define.
710 (bfd_elf32_bfd_link_hash_table_create): Define.
711 (elf_backend_create_dynamic_sections): Define.
712 (elf_backend_adjust_dynamic_symbol): Define.
713 (elf_backend_size_dynamic_sections): Define.
714 (elf_backend_finish_dynamic_symbol): Define.
715 (elf_backend_finish_dynamic_sections): Define.
716 (elf_backend_want_got_sym): Define.
717 (elf_backend_got_header_size): Define.
718 (elf_backend_want_got_plt): Define.
719 (elf_backend_plt_readonly): Define.
720 (elf_backend_want_plt_sym): Define.
721 (elf_backend_plt_header_size): Define.
722 (elf_backend_may_use_rel_p): Define.
723 (elf_backend_may_use_rela_p): Define.
724 (elf_backend_default_use_rela_p): Define.
725 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
726 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
727 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
728 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
729 (frv_reloc_map): Map the corresponding BFD relocs to them.
730 (frv_reloc_type_lookup): ... and back to BFD relocs.
731 * reloc.c: New relocs.
732 * bfd-in2.h, libbfd.h: Rebuilt.
733 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
734 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
735 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
736 R_FRV_FUNCDESC_GOTLO): New.
737 (frv_reloc_map): Map the corresponding BFD relocs to them.
738 (frv_reloc_type_lookup): ... and back to BFD relocs.
739 * reloc.c: New relocs.
740 * bfd-in2.h, libbfd.h: Rebuilt.
742 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
744 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
745 targets to support pages of up to 64kB.
746 (elf32_bed): Redefine to get a separate backend data structure for
748 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
749 targets to support pages of up to 64kB.
750 (elf64_bed): Redefine to get a separate backend data structure for
752 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
753 targets to support pages of up to 64kB.
754 (elf32_bed): Redefine to get a separate backend data structure for
757 2004-01-04 Mark Kettenis <kettenis@gnu.org>
759 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
761 2004-01-02 Mark Kettenis <kettenis@gnu.org>
763 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
764 (elf_i386_grok_psinfo): Likewise.
766 2004-01-02 Bernardo Innocenti <bernie@develer.com>
768 * config.bfd: Add m68k-uClinux target.
770 2004-01-01 Grant Edwards <grante@visi.com>
772 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
773 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
774 (elf32_h8_gc_sweep_hook): New function.
775 (elf_backend_gc_mark_hook): Define.
776 (elf_backend_gc_sweep_hook): Define.
777 (elf_backend_can_gc_sections): Define.
779 For older changes see ChangeLog-0203
785 version-control: never