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