cbd41d03c1cd8df43e6e8d8fbbcdb3c3b501914a
[external/binutils.git] / bfd / ChangeLog
1 2004-02-09  Christian Vogel <vogelchr@vogel.cx>
2             Nick Clifton  <nickc@redhat.com>
3
4         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
5         GOT entries with no associated GOT subsection.
6
7 2004-02-09  Richard Sandiford  <rsandifo@redhat.com>
8
9         * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
10         * elf.c (swap_out_syms): Use it to decide whether local section
11         symbols should be named.
12         * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
13         * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
14         (elf_backend_name_local_section_symbols): Define.
15         * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
16
17 2004-01-30  H.J. Lu  <hongjiu.lu@intel.com>
18
19         * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
20         (elfNN_ia64_relax_section): Optimize brl to br during the relax
21         finalize pass.
22
23 2004-01-30  Alexandre Oliva  <aoliva@redhat.com>
24
25         * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
26         to bfd_link_hash_entry passed by reference to
27         _bfd_generic_link_add_one_symbol.
28
29 2004-01-25  H.J. Lu  <hongjiu.lu@intel.com>
30
31         * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
32         relocations against dynamic symbols.
33
34 2004-01-23  Daniel Jacobowitz  <drow@mvista.com>
35
36         * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
37         change.
38
39 2004-01-21  Tom Rix  <tcrix@worldnet.att.net>
40
41         * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
42         * bfd-in2.h, libbfd.h: Rebuilt.
43
44 2004-01-20  Danny Smith  <dannysmith@users.sourceforge.net>
45
46         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
47         IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
48         flag has been cleared.
49
50 2004-01-19  Kazu Hirata  <kazu@cs.umass.edu>
51
52         * coff-h8300.c: Add and adjust comments about relaxation.
53         * elf32-h8300.c: Likewise.
54
55 2004-01-16  Kazu Hirata  <kazu@cs.umass.edu>
56
57         * coff-h8300.c: Fix comment typos.
58         * elf32-h8300.c: Likewise.
59
60 2004-01-16  Kazu Hirata  <kazu@cs.umass.edu>
61
62         * coff-h8300.c: Add comments about relaxation.
63         * elf32-h8300.c: Likewise.
64
65 2004-01-14  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
66
67         * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
68         throughout.
69         * aclocal.m4: Regenerate.
70         * configure: Regenerate.
71
72 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
73
74         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
75         mips_elf64_rtype_to_howto instead of using howto_table.
76
77 2004-01-13  Daniel Jacobowitz  <drow@mvista.com>
78
79         * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
80         the .plt section.
81         (elf32_arm_check_relocs): Don't increment the PLT refcount for
82         relocs which would not use the PLT.
83
84 2004-01-13  Alan Modra  <amodra@bigpond.net.au>
85
86         * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
87         (ppc64_elf_gc_sweep_hook): Likewise.
88         (ppc64_elf_size_dynamic_sections): Test for .plt directly.
89
90 2004-01-12  Anil Paranjpe  <anilp1@KPITCummins.com>
91
92         Adds linker relaxation support for bit manipulation insns like
93         band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
94         bst, btst, bxor.
95         * elf32-h8300.c: Opcode for bit manipulation insn is checked in
96         elf32_h8_relax_section function while relxation for aa:16 and aa:32.
97         * coff-h8300.c: Opcode for bit manipulation insn is checked in
98         h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
99
100 2004-01-12  Alan Modra  <amodra@bigpond.net.au>
101
102         * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
103
104 2004-01-11  Kazu Hirata  <kazu@cs.umass.edu>
105
106         * elf32-h8300.c: Fix formatting.
107
108 2004-01-11  Kazu Hirata  <kazu@cs.umass.edu>
109
110         * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
111         dynamic object is present.  Declare r_symndx and h in an inner
112         scope.
113         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
114
115 2004-01-09  Daniel Jacobowitz  <drow@mvista.com>
116
117         * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
118         (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
119         (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
120         identically.  Do not emit PC24 relocations for shared libraries.
121         (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
122         identically.  Don't adjust pc_count.
123         (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
124         Set ELF_LINK_HASH_NEEDS_PLT for both.  Don't adjust pc_count; don't
125         adjust count for branch relocations.
126         (allocate_dynrelocs): Correct typo in call to
127         WILL_CALL_FINISH_DYNAMIC_SYMBOL.  Never allocate space for
128         PC24 or PLT32 relocs when linking.
129
130 2004-01-09  Dmitry Semyonov  <Dmitry.Semyonov@oktet.ru>
131
132         * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
133         relocation howto with ARM_26 one for consistency.
134         (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
135         that will be converted to ARM_26D ones, since we always want 'done'
136         relocations to be reflected in section's data.
137         (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
138         offset.
139         (_bfd_final_link_relocate): Do not modify "inplace" data, if not
140         requested.
141
142 2004-01-08  Dmitry Semyonov  <Dmitry.Semyonov@oktet.ru>
143
144         * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
145         are not partial_inplace during a relocatable link.
146
147 2004-01-08  Kazu Hirata  <kazu@cs.umass.edu>
148
149         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
150         if no dynamic object is present.  Declare r_symndx and h in an
151         inner scope.
152
153 2004-01-07  H.J. Lu  <hongjiu.lu@intel.com>
154
155         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
156         trampoline if it is known out of range.
157
158 2004-01-06  Alexandre Oliva  <aoliva@redhat.com>
159
160         2003-12-17  Alexandre Oliva  <aoliva@redhat.com>
161         * elf32-frv.c (_frv_osec_readonly_p): New.
162         (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
163         undefweak symbol.
164         (_frv_count_got_plt_entries): Adjust expected count accordingly.
165         (elf32_frv_relocate_section): Likewise.  Error out if attempting
166         to emit rofixups or dynamic relocs in read-only segments.  Use
167         _bfd_elf_section_offset to adjust r_offsets in rofixups and
168         dynamic relocations.
169         2003-12-12  Alexandre Oliva  <aoliva@redhat.com>
170         * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
171         relocations or fixups involving merged sections correctly.  Avoid
172         crash when undefined symbol is referenced by R_FRV_32 or
173         R_FRV_FUNCDESC_VALUE.
174         2003-12-02  Alexandre Oliva  <aoliva@redhat.com>
175         * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
176         input section holding local symbol to addend of R_FRV_32 or
177         R_FRV_FUNCDESC_VALUE dynamic relocation.
178         2003-11-27  Alexandre Oliva  <aoliva@redhat.com>
179         * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
180         (elf32_frv_always_size_sections): Don't store pointer to
181         __stacksize symbol in sec_info.
182         (elf32_frv_modify_segment_map): Look it up here.
183         2003-11-26  Alexandre Oliva  <aoliva@redhat.com>
184         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
185         of the lazy PLT entry, not only its offset, as the low word of a
186         function descriptor.
187         2003-11-10  Alexandre Oliva  <aoliva@redhat.com>
188         * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
189         if a hash table entry already exists but is not a definition.
190         2003-11-05  Alexandre Oliva  <aoliva@redhat.com>
191         * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
192         (_frv_add_rofixup): Don't inline.
193         (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
194         for undefweak symbols.
195         (elf32_frv_relocate_section): Avoid crash while computing
196         relocation when linking with shared library.  Only emit rofixups
197         and dynamic relocations for alloc&load sections.  Mark binaries
198         with inter-segment relocations for relocation as a unit.
199         (_frv_create_got_section): Rename .rofixup.got to .rofixup.
200         (DEFAULT_STACK_SIZE): New.
201         (_frv_count_got_plt_entries): Fix thinko in deciding whether to
202         emit rofixups or dynamic relocs when linking dynamic non-PIE
203         executables.
204         (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
205         shared libs too.  Reserve the last entry for the GOT pointer.
206         (elf32_frv_finish_dynamic_sections): Emit it.
207         (elf32_frv_always_size_sections): New.
208         (elf32_frv_modify_segment_map): New.
209         (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
210         sections.
211         (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
212         (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
213         (elf_backend_always_size_sections): New.
214         (elf_backend_modify_segment_map): New.
215         2003-10-31  Alexandre Oliva  <aoliva@redhat.com>
216         * config.bfd: Added frv-*-*linux*.
217         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
218         ABS section, instead of crashing.
219         (elf32_frv_relocate_section): Don't crash before warning about
220         different segments in non-PIC relocation.
221         2003-10-17  Alexandre Oliva  <aoliva@redhat.com>
222         * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
223         relocs to undefweak symbols.
224         (elf32_frv_relocate_section): Ditto for undefined symbols.
225         2003-10-06  Alexandre Oliva  <aoliva@redhat.com>
226         * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
227         gotfixup section was created.
228         2003-09-30  Alexandre Oliva  <aoliva@redhat.com>
229         * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
230         FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
231         complain_overflow_signed.
232         * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
233         have not been allocated.
234         (_frv_emit_got_relocs_plt_entries): Return non-void.  Assert
235         privfd only if dynamic sections were created.
236         (elf32_frv_relocate_section): Compute gprel_segment, and use it
237         for GPREL relocs.  When linking relocatable FDPIC executables,
238         emit warnings for relocations that would be illegal on PIE or
239         shared libraries.  Emit rofixup for R_FRV_32 only if input object
240         is not FDPIC.
241         (_frv_create_got_section): Define _gp symbol in the rofixup
242         section.
243         (elf32_frv_finish_dynamic_sections): If rofixups needed but
244         dynamic sections missing, error out requesting -melf32frvfd.
245         2003-09-19  Alexandre Oliva  <aoliva@redhat.com>
246         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
247         computation of addends from section and global or local symbol
248         value.  Change return type to bfd_boolean, and return a failure if
249         a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
250         nonzero addend is required.
251         (elf32_frv_relocate_section): Likewise.  Print error for
252         unsupported nonzero addends.
253         2003-09-18  Alexandre Oliva  <aoliva@redhat.com>
254         * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
255         force everything local.
256         (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
257         * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
258         (frv_gotfixup_section): New.
259         (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
260         (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
261         and relocsfdv.
262         (_frv_add_rofixup): New.
263         (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
264         fdpic executables.  Use FRV_SYM_LOCAL more widely to simplify and
265         improve some ugly conditions.
266         (elf32_frv_relocate_section): Likewise.  Reject inter-segment
267         relocations in fdpic.
268         (_frv_create_got_section): Create .rofixup.got section.
269         (struct _frv_dynamic_got_info): Added fixups.
270         (_frv_count_got_plt_entries): Account in-GOT relocations into
271         relocs32, relocsfd and relocsfdv.  Account them into relocs or
272         fixups, as appropriate.
273         (elf32_frv_size_dynamic_sections): Size rofixup section.  Simplify
274         sizing of gotrel.
275         (elf32_frv_finish_dynamic_sections): Verify that the right number
276         of relocations and fixups was generated.
277         (elf32_frv_check_relocs): Compute relocs32, relocsfd and
278         relocsfdv.
279         * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
280         SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
281         (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
282         descriptor of a (formerly-)global symbol is local.
283         (struct frv_pic_relocs_info): Adjust comments.
284         (_frv_emit_got_relocs_plt_entries): Adjust.
285         (elf32_frv_relocate_section): Likewise.
286         (_frv_count_got_plt_entries): Likewise.
287         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
288         symbol's value to addend in the common preamble.  Decay dynamic
289         symbols to section+offset if they bind or call locally, for GOT
290         and FUNCDESC_VALUE, respectively.
291         (elf32_frv_relocate_section): Likewise.
292         (elf32_frv_check_relocs): Don't register as dynamic symbols of
293         internal or hidden visibility.
294         2003-09-17  Alexandre Oliva  <aoliva@redhat.com>
295         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
296         argument, so as to not call _bfd_elf_rel_local_sym to compute it.
297         (elf32_frv_relocate_section): Pass relocation addend in.  Use
298         original relocation addend to look up the got relocs/plt entries
299         table.  Do not call _bfd_elf_rel_local_sym.  Don't error out when
300         processing relocations that reference .scommon symbols.
301         2003-09-15  Alexandre Oliva  <aoliva@redhat.com>
302         Introduce support for dynamic linking.
303         * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
304         (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
305         elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
306         (frv_reloc_type_lookup): Return REL howtos for executables and
307         dynamic libraries.
308         (frv_info_to_howto_rel): New.
309         (struct frv_elf_link_hash_table): New.
310         (frv_hash_table, frv_got_section, frv_gotrel_section,
311         frv_plt_section, frv_pltrel_section, frv_relocs_info,
312         frv_got_initial_offset, frv_plt_initial_offset): New macros.
313         (frv_elf_link_hash_table_create): New.
314         (struct frv_pic_relocs_info): New.
315         (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
316         (frv_pic_relocs_info_find): New.
317         (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
318         New.
319         (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
320         (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
321         (_frv_emit_got_relocs_plt_entries): New.
322         (elf32_frv_relocate_section): Add support for dynamic linking.
323         Handle new relocations.
324         (_frv_create_got_section): New.
325         (elf32_frv_create_dynamic_sections): New.
326         (ELF_DYNAMIC_INTERPRETER): New.
327         (struct _frv_dynamic_got_info): New.
328         (_frv_count_got_plt_entries): New.
329         (struct _frv_dynamic_got_plt_info): New.
330         (_frv_compute_got_alloc_data): New.
331         (_frv_get_got_entry, _frv_get_fd_entry): New.
332         (_frv_assign_got_entries, _frv_assign_plt_entries): New.
333         (_frv_resolve_final_relocs_info): New.
334         (elf32_frv_size_dynamic_sections): New.
335         (elf32_frv_finish_dynamic_sections): New.
336         (elf32_frv_adjust_dynamic_symbol): New.
337         (elf32_frv_finish_dynamic_symbol): New.
338         (elf32_frv_check_relocs): Handle new relocs.  Explain how the
339         whole thing works.
340         (elf_info_to_howto_rel): Define.
341         (bfd_elf32_bfd_link_hash_table_create): Define.
342         (elf_backend_create_dynamic_sections): Define.
343         (elf_backend_adjust_dynamic_symbol): Define.
344         (elf_backend_size_dynamic_sections): Define.
345         (elf_backend_finish_dynamic_symbol): Define.
346         (elf_backend_finish_dynamic_sections): Define.
347         (elf_backend_want_got_sym): Define.
348         (elf_backend_got_header_size): Define.
349         (elf_backend_want_got_plt): Define.
350         (elf_backend_plt_readonly): Define.
351         (elf_backend_want_plt_sym): Define.
352         (elf_backend_plt_header_size): Define.
353         (elf_backend_may_use_rel_p): Define.
354         (elf_backend_may_use_rela_p): Define.
355         (elf_backend_default_use_rela_p): Define.
356         2003-08-08  Alexandre Oliva  <aoliva@redhat.com>
357         * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
358         R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
359         R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
360         (frv_reloc_map): Map the corresponding BFD relocs to them.
361         (frv_reloc_type_lookup): ... and back to BFD relocs.
362         * reloc.c: New relocs.
363         * bfd-in2.h, libbfd.h: Rebuilt.
364         2003-08-04  Alexandre Oliva  <aoliva@redhat.com>
365         * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
366         R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
367         R_FRV_FUNCDESC_GOTLO): New.
368         (frv_reloc_map): Map the corresponding BFD relocs to them.
369         (frv_reloc_type_lookup): ... and back to BFD relocs.
370         * reloc.c: New relocs.
371         * bfd-in2.h, libbfd.h: Rebuilt.
372
373 2004-01-05  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
374
375         * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
376         targets to support pages of up to 64kB.
377         (elf32_bed): Redefine to get a separate backend data structure for
378         traditional targets.
379         * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
380         targets to support pages of up to 64kB.
381         (elf64_bed): Redefine to get a separate backend data structure for
382         traditional targets.
383         * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
384         targets to support pages of up to 64kB.
385         (elf32_bed): Redefine to get a separate backend data structure for
386         traditional targets.
387
388 2004-01-04  Mark Kettenis  <kettenis@gnu.org>
389
390         * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
391
392 2004-01-02  Mark Kettenis  <kettenis@gnu.org>
393
394         * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
395         (elf_i386_grok_psinfo): Likewise.
396
397 2004-01-02  Bernardo Innocenti  <bernie@develer.com>
398
399         * config.bfd: Add m68k-uClinux target.
400
401 2004-01-01  Grant Edwards <grante@visi.com>
402
403         * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
404         * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
405         (elf32_h8_gc_sweep_hook): New function.
406         (elf_backend_gc_mark_hook): Define.
407         (elf_backend_gc_sweep_hook): Define.
408         (elf_backend_can_gc_sections): Define.
409
410 For older changes see ChangeLog-0203
411 \f
412 Local Variables:
413 mode: change-log
414 left-margin: 8
415 fill-column: 74
416 version-control: never
417 End: