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