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