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