* ld-elfcomm/elfcomm.exp: Run $READELF not readelf.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
c35e54f4
BS
12008-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
2
3 * elf32-bfin.c (bfin_final_link_relocate): New function, wrapper around
4 _bfd_final_link_relocate that also handles R_pcrel24 relocs.
5 (bfinfdpic_relocate_section, bfin_relocate_section): Use it.
6
3348747a
NS
72008-03-25 Nathan Sidwell <nathan@codesourcery.com>
8
9 * elf32-arm.c (elf32_arm_final_link_relocate): Skip dynamic relocs
10 in vxworks tls_vars sections.
11 (allocate_dynrelocs, elf32_arm_size_dynamic_sections): Likewise.
12 * elf32-i386.c (allocate_dynrelocs,
13 elf_i386_size_dynamic_sections, elf_i386_relocate_section): Likewise.
14 * elf32-ppc.c (allocate_dynrelocs, ppc_elf_size_dynamic_sections,
15 ppc_elf_relocate_section): Likewise.
16 * elf32-sh.c (allocate_dynrelocs, sh_elf_size_dynamic_sections,
17 sh_elf_relocate_section): Likewise.
18 * elfxx-sparc.c (allocate_dynrelocs,
19 _bfd_sparc_elf_size_dynamic_sections,
20 _bfd_sparc_elf_relocate_section): Likewise.
21
a1f3c56e
AN
222008-03-21 Adam Nemet <anemet@caviumnetworks.com>
23
24 * elf.c (_bfd_elf_print_private_bfd_data): Use bfd_fprintf_vma to
25 print the values from the dynamic section.
26
51e38d68
RS
272008-03-20 Richard Sandiford <rsandifo@nildram.co.uk>
28
29 * elfxx-mips.c (MIPS_ELF_GNU_GOT1_MASK): New macro.
30 (_bfd_mips_elf_finish_dynamic_sections): Use it instead of 0x80000000.
31
c65be8d7
AM
322008-03-20 Alan Modra <amodra@bigpond.net.au>
33
34 * elf32-spu.c (spu_elf_create_sections): Remove output_bfd parameter.
35 (spu_elf_find_overlays, spu_elf_size_stubs): Likewise
36 (process_stubs, discover_functions, build_call_tree): Likewise.
37 (spu_elf_stack_analysis): Likewise.
38 (spu_elf_check_vma): Likewise. Move.
39 (struct call_info): Make "is_tail" a bitfield.
40 (insert_callee): Clear fun->start and set fun->is_func if we find
41 a non-tail call.
42 * elf32-spu.h (spu_elf_create_sections): Update prototype.
43 (spu_elf_find_overlays, spu_elf_size_stubs, spu_elf_check_vma): Ditto.
44
58c85be7
RW
452008-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
46
47 * aclocal.m4: Regenerate.
48 * configure: Likewise.
49 * Makefile.in: Likewise.
50
41bed6dd
L
512008-03-16 H.J. Lu <hongjiu.lu@intel.com>
52
53 PR ld/5789
54 PR ld/5943
55 * elf32-i386.c (elf_i386_relocate_section): Issue an error
56 for R_386_GOTOFF relocaton against undefined hidden/internal
57 symbols when building a shared object.
58
59 * elf64-x86-64.c (elf64_x86_64_relocate_section): Issue an
60 error for R_X86_64_PC8/R_X86_64_PC16/R_X86_64_PC32
61 relocaton against undefined hidden/internal symbols when
62 building a shared object.
63 (elf64_x86_64_finish_dynamic_symbol): Return FALSE when symbol
64 is referenced locally, but isn't defined in a regular file.
65
6ad2759d
L
662008-03-15 H.J. Lu <hongjiu.lu@intel.com>
67
68 * bfd-in.h (BFD_NO_FLAGS, HAS_RELOC, EXEC_P, HAS_LINENO,
69 HAS_DEBUG, HAS_SYMS, HAS_LOCALS, DYNAMIC, WP_TEXT, D_PAGED,
70 BFD_IS_RELAXABLE, BFD_TRADITIONAL_FORMAT, BFD_IN_MEMORY,
71 HAS_LOAD_PAGE, BFD_LINKER_CREATED): Moved to ...
72 * bfd.c: Here.
73
74 * bfd.c (bfd): Change cacheable, target_defaulted, opened_once,
75 mtime_set, no_export, output_has_begun and has_armap to bit
76 field.
77
78 * bfd-in2.h: Regenerated.
79
c04ea773
DJ
802008-03-14 Daniel Jacobowitz <dan@codesourcery.com>
81
82 * cache.c (close_one): Remove mtime hack.
83
0f2830ff
L
842008-03-14 H.J. Lu <hongjiu.lu@intel.com>
85
86 PR ld/5913
87 * elfxx-ia64.c (elfNN_ia64_tprel_base): Remove BFD_ASSERT.
88 (elfNN_ia64_dtprel_base): Likewise.
89 (elfNN_ia64_relocate_section): Go to missing_tls_sec if
90 tls_sec is NULL before calling elfNN_ia64_tprel_base or
91 elfNN_ia64_dtprel_base. Report unsupported TLS relocations.
92
fdba2fcd
AM
932008-03-14 Alan Modra <amodra@bigpond.net.au>
94
95 * elf32-spu.c (process_stubs, spu_elf_relocate_section): Move
96 common code to..
97 (maybe_needs_stub): ..here, a new function that also omits stubs
98 for .eh_frame, and..
99 (needs_ovl_stub): ..here. Create stubs for labels in code section
100 referenced by switch jump table.
101 (spu_elf_find_overlays): Set htab->ovly_load and htab->ovly_return.
102 (enum _insn_type): Delete.
103 (enum _stub_type): New.
104 (count_stub, build_stub): Adjust.
105 (allocate_spuear_stubs, build_spuear_stubs): Adjust.
106
72de5009
AM
1072008-03-13 Alan Modra <amodra@bigpond.net.au>
108
109 * elf.c (_bfd_elf_make_section_from_shdr): Remove unnecessary cast.
110 (_bfd_elf_assign_file_position_for_section): Simplify align.
111 (_bfd_elf_init_reloc_shdr): Ensure shift expression wide enough
112 for sh_addralign.
113 (elf_fake_sections, swap_out_syms): Likewise.
114 * elflink.c (bfd_elf_final_link): Likewise.
115
50e7d84b
AM
1162008-03-13 Alan Modra <amodra@bigpond.net.au>
117
118 * Makefile.am: Run "make dep-am".
119 * Makefile.in: Regenerate.
120 * po/SRC-POTFILES.in: Regenerate.
121
2774f1a6
BS
1222008-03-12 Bernd Schmidt <bernd.schmidt@analog.com>
123
124 From Jie Zhang <jie.zhang@analog.com>
125 * elf32-bfin.c (struct bfinfdpic_relocs_info): Make got17m4,
126 gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4, fdgoffhilo,
127 gotoff, call and sym not bitfields.
128 (bfinfdpic_gc_sweep_hook): New function; update the relocation
129 information for the relocations of the section being removed.
130 (bfinfdpic_check_relocs): Accumulate the number of relocations
131 which set got17m4, gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4,
132 fdgoffhilo, gotoff, call and sym fields.
133 (elf_backend_gc_sweep_hook): Redefine for FD-PIC.
134
4fbb74a6
AM
1352008-03-12 Alan Modra <amodra@bigpond.net.au>
136
137 PR 5900
138 * elf-bfd.h: Include elf/internal.h after elf/external.h.
139 * elfcode.h (elf_swap_symbol_in): Map reserved shndx range.
140 (elf_swap_symbol_out): Adjust SHN_XINDEX test.
141 (elf_swap_ehdr_out): Mask SHN_LORESERVE and SHN_XINDEX to values
142 seen in external structs.
143 (valid_section_index_p): Delete.
144 (elf_object_p): Don't increment section numbers over reserved range.
145 Simplify test for valid sh_link, sh_info and e_shstrndx fields.
146 (elf_write_shdrs_and_ehdr): Mask SHN_LORESERVE and SHN_XINDEX to values
147 seen in external structs. Don't increment section numbers over
148 reserved range.
149 * elf.c (bfd_elf_sym_name): Remove redundant tests on st_shndx.
150 (bfd_section_from_shdr): Likewise.
151 (group_signature): Range check before accessing elf_elfsections.
152 (_bfd_elf_setup_sections): Likewise.
153 (bfd_section_from_shdr): Likewise.
154 (bfd_section_from_shdr): Don't increment section number over
155 reserved sections.
156 (assign_file_positions_for_non_load_sections): Likewise.
157 (assign_file_positions_except_relocs): Likewise.
158 (_bfd_elf_write_object_contents): Likewise.
159 (assign_section_numbers): Likewise. Adjust for changed SHN_*.
160 (prep_headers): Delete unused variable.
161 * elflink.c (bfd_elf_link_record_local_dynamic_symbol): Adjust
162 for changed SHN_* values.
163 (check_dynsym, elf_link_input_bfd): Likewise.
164 (bfd_elf_final_link): Likewise. Don't skip over reserved section
165 range.
166 (elf_fixup_link_order): Check that sh_link field is valid.
167 * elf-hppa.h (elf_hppa_add_symbol_hook): Make "index" unsigned.
168 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Range check before
169 accesssing elf_elfsections.
170 * elf32-avr.c (elf32_avr_size_stubs): Likewise.
171 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
172 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Likewise.
173 * elf64-hppa.c (elf64_hppa_check_relocs): Adjust for changed
174 SHN_* defines. Test for SHN_BAD return from
175 _bfd_elf_section_from_bfd_section
176
cb33740c
AM
1772008-03-12 Alan Modra <amodra@bigpond.net.au>
178
179 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Update prototype.
180 * elf.c (_bfd_elf_section_from_bfd_section): Return unsigned int,
181 SHN_BAD on error.
182 (_bfd_elf_print_private_bfd_data): Test for SHN_BAD result from
183 _bfd_elf_section_from_bfd_section, not -1.
184 (swap_out_syms): Likewise.
185 * elflink.c (elf_link_add_object_symbols): Likewise.
186 (bfd_elf_get_bfd_needed_list): Likewise.
187 (bfd_elf_match_symbols_in_sections): Likewise.
188 (elf_link_add_object_symbols): Don't bother testing for symbols
189 using normal sections before calling bfd_section_from_elf_index.
190 (elf_link_input_bfd, bfd_elf_final_link): Likewise.
191 (bfd_elf_reloc_symbol_deleted_p): Likewise.
192 * elfcode.h (elf_slurp_symbol_table): Likewise.
193 * elf32-spu.c (get_sym_h): Likewise.
194 * elf32-xtensa.c (get_elf_r_symndx_section): Likewise.
195 * elf64-ppc.c (opd_entry_value, get_sym_h, ppc64_elf_edit_toc): Ditto.
196 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
197
5f5fb9ec
AM
1982008-03-11 Alan Modra <amodra@bigpond.net.au>
199
200 * elf32-spu.c (spu_elf_relocate_section): Test identical conditions
201 to those in process_stubs for overlay symbols.
202
b1cc4aeb
PB
2032008-03-09 Paul Brook <paul@codesourcery.com>
204
205 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
206 Tag_VFP_arch values.
207
12a0a0fd
PB
2082008-03-08 Paul Brook <paul@codesourcery.com>
209
210 * elf32-arm.c (insert_thumb_branch): Rewrite.
211 (elf32_thumb_to_arm_stub): Use new insert_thumb_branch.
212
39623e12
PB
2132008-03-07 Paul Brook <paul@codesourcery.com>
214
215 * elf32-arm.c (elf32_arm_howto_table_1): Fix bitmasks for MOVW and
216 MOVT relocations.
217 (elf32_arm_final_link_relocate): Fix off by one MOVW/MOVT sign
218 extension.
219 (elf32_arm_relocate_section): Handle MOVW and MOVT
220 relocations. Improve safety check for other weird relocations.
221 (elf32_arm_check_relocs): Only set h->needs_plt for branch/call
222 relocations.
223
77cba8a3 2242008-03-03 Bob Wilson <bob.wilson@acm.org>
50e7d84b 225
77cba8a3
BW
226 * xtensa-isa.c (xtensa_isa_num_pipe_stages): Make max_stage static and
227 only compute its value once.
50e7d84b 228
4a628337
AM
2292008-03-03 Alan Modra <amodra@bigpond.net.au>
230
231 * elf32-spu.c (struct got_entry): Add "addend" field.
232 (count_stub, build_stub): Use a new stub if relocation addend
233 differs from existing stubs for this symbol.
234 (process_stubs): Deal with addends.
235 (spu_elf_relocate_section, spu_elf_output_symbol_hook): Likewise.
236
d95edcac
L
2372008-03-02 H.J. Lu <hongjiu.lu@intel.com>
238
239 PR ld/5789
240 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true
241 for hidden and local symbols.
242
89200bf8
AM
2432008-03-03 Alan Modra <amodra@bigpond.net.au>
244
245 * elf32-ppc.c (allocate_dynrelocs): Discard relocs on
246 undefined symbols with internal or hidden visibility.
247 (ppc_elf_relocate_section): Likewise. Use SYMBOL_CALLS_LOCAL
248 rather than SYMBOL_REFERENCES_LOCAL on branches. Don't
249 return immediately on dynamic reloc error.
250
176a0d42
AM
2512008-03-01 Alan Modra <amodra@bigpond.net.au>
252
253 * elf64-ppc.c (build_plt_stub): Add relocs on plt call stubs
254 if emitrelocations.
255 (get_relocs): New function, split out from..
256 (ppc_build_one_stub): ..here. Add relocs on plt_branch stubs if
257 emitrelocations. Remove indx temp.
258 (ppc_size_one_stub): Count new stub relocs.
259 (ppc64_elf_size_stubs): Count new glink reloc.
260 (ppc64_elf_build_stubs): Emit glink reloc if emitrelocations.
261 (ppc64_elf_finish_dynamic_sections): Output glink relocs.
262 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Describe non-pic
263 glink code.
264
911f096e
AM
2652008-02-28 Alan Modra <amodra@bigpond.net.au>
266
267 * elf32-spu.c (mark_functions_via_relocs): Don't assume that
268 the "->start" pointer reaches to function origin, so that we
269 can handle functions split over more than two sections.
270 (build_call_tree): Likewise.
271 (pasted_function): Don't attempt to set fun->start back to the
272 function origin, just go back one section.
273
ad9563d6
CM
2742008-02-27 Catherine Moore <clm@codesourcery.com>
275
276 * elf.c ( _bfd_elf_print_private_bfd_data): Call
277 elf_backend_get_target_dtag if defined.
278 * elf32-mips.c (elf_backend_get_target_dtag): Define.
279 * elf64-mips.c: Likewise.
280 * elfn32-mips.c: Likewise.
281 * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New.
282 * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare.
283 * elf-bfd.h (elf_backend_get_target_dtag): Add prototype.
284 * elfxx-target.h (elf_backend_get_target_dtag): Add default.
911f096e 285 (elf_backend_data): Add elf_backend_get_target_dtag.
ad9563d6 286
625af618
AM
2872008-02-26 Alan Modra <amodra@bigpond.net.au>
288
289 * elf32-ppc.c (ppc_elf_check_relocs): Set pointer_equality_needed
290 for R_PPC_REL32 syms. Don't set non_got_ref on branch reloc syms,
291 and assume branch relocs are not dynamic when non-shared.
292 (readonly_dynrelocs): New function, split out from..
293 (maybe_set_textrel): ..here, renamed from old readonly_dynrelocs.
294 (ppc_elf_adjust_dynamic_symbol): For symbols generating plt entries,
295 clear non_got_ref..
296 (allocate_dynrelocs): ..and don't set u.def for undefined weak.
297 Do allow dynamic relocs on undefined symbols.
298 (ppc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
299 (ppc_elf_relocate_section): Mirror dynamic reloc changes in
300 check_relocs.
301 (ppc_elf_finish_dynamic_symbol): Don't give a warning on weak
302 plt symbols needing pointer_equality_needed.
303
1cd81501
AM
3042008-02-23 Alan Modra <amodra@bigpond.net.au>
305
306 * elf32-ppc.c (ppc_elf_check_relocs): Revert non_got_ref change.
307
0eb4a168
AM
3082008-02-23 Alan Modra <amodra@bigpond.net.au>
309
310 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Copy
311 pointer_equality_needed.
312 (ppc_elf_check_relocs): Split out non-branch relocs from others
313 that might emit dynamic relocs. Set pointer_equality_needed
314 for their symbols. Don't set non_got_ref on branch reloc symbols.
315 (ppc_elf_hash_symbol): New function.
316 (elf_backend_hash_symbol): Define.
317 (ppc_elf_finish_dynamic_symbol): Handle pointer_equality_needed.
318 Error if pointer_equality_needed on weak plt symbol.
319
3ae181ee
L
3202008-02-22 H.J. Lu <hongjiu.lu@intel.com>
321
322 PR ld/5788
323 * elflink.c (elf_create_symbuf): Correct buffer size and
324 position.
325
34b5e0b2
NC
3262008-02-22 Nick Clifton <nickc@redhat.com>
327
328 PR 868
3ae181ee 329 * dwarf2.c: Revert previous patch. All of the allocate memory is
34b5e0b2 330 on an obstack which will be freed at some other time.
0eb4a168 331
515ef31d
NC
3322008-02-20 Nick Clifton <nickc@redhat.com>
333
334 PR 868
335 * libbfd.c (bfd_realloc_or_free): New function. Performs like
336 bfd_realloc, but if the (re)allocation fails, the pointer is
337 freed.
338 * libbfd-in.h: Prototype.
339 * libbfd.h: Regenerate.
340 * bfdio.c (bfd_bwrite): Use the new function.
341 (bfd_seek): Likewise.
342 * bfdwin.c:(bfd_get_file_window): Likewise.
343 * elf-strtab.c (_bfd_elf_strtab_add): Likewise.
344 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
345 * elf32-xtensa.c (vsprintf_msg): Likewise.
346 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
347 * stabs.c (_bfd_link_seciton_stabs): Likewise.
348 * vms-misc.c (_bfd_vms_get_record): Likewise.
349 * vms-tir.c (check_section): Likewise.
350 * vms.c (vms_new_section_hook): Likewise.
351 * elf32-arm.c (elf32_arm_section_map_add): Check that the
352 allocation of sec_data->map succeeded before using it.
353 * elflink.c (elf_link_output_sym): Do not overwrite finfo->
354 symshndxbuf until it is known that the reallocation succeeded.
355
b42bf1e0
NC
3562008-02-20 Diogo de Carvalho Kraemer <diogo@kraemer.eng.br>
357 Nick Clifton <nickc@redhat.com>
358
359 PR 868
360 * dwarf2.c (read_abbrevs): Free the abbreviation table if we run
361 out of memory.
362 (decode_line_info): Free the line_info_table before returning a
363 failure result.
364 (_bfd_dwarf2_cleanup_debug_info): Free the abbreviation table.
365 Free the line table. Free the function table. Free the variable
366 table.
367
0a40daed
MK
3682008-02-17 Mark Kettenis <kettenis@gnu.org>
369
370 * elf.c (swap_out_syms): Avoid preprocessing directive within
371 macro arg.
372
3f001e84
JK
3732008-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
374
375 * elf.c (assign_file_positions_for_load_sections): Set the type of
376 PT_NOTE sections to SHT_NOTE.
377
37da76e8
AM
3782008-02-17 Ulrich Weigand <uweigand@de.ibm.com>
379
380 * simple.c (bfd_simple_get_relocated_section_contents): Set
381 link_info.output_bfd.
382
d74e4b29
NS
3832008-02-16 Nathan Sidwell <nathan@codesourcery.com>
384
385 * dwarf2.c (find_line): Don't trust debug information after an
386 unparseable compilation unit.
387
f856272b
AM
3882008-02-15 Alan Modra <amodra@bigpond.net.au>
389
390 PR 5765
391 * section.c (SEC_LINK_DUPLICATES): Correct. Renumber following flags.
392 * bfd-in2.h: Regenerate.
393
0c8d6e5c
AM
3942008-02-15 Alan Modra <amodra@bigpond.net.au>
395
396 * elf-bfd.h (enum elf_object_id): Add HPPA_ELF_TDATA.
397 * elf.c (bfd_elf_allocate_object): Don't check for already allocated
398 tdata.
399 * elf32-hppa.c (elf32_hppa_mkobject): New function.
400 (bfd_elf32_mkobject): Define.
401 * elf32-ppc.c (is_ppc_elf_target): Delete. Replace all uses with..
402 (is_ppc_elf): ..this new macro.
403 * elf64-ppc.c (is_ppc64_elf_target): Delete. Replace all uses with..
404 (is_ppc64_elf): ..this new macro.
405
f13a99db
AM
4062008-02-15 Alan Modra <amodra@bigpond.net.au>
407
408 * elflink.c: Replace all accesses to hash->creator field with
409 output_bfd->xvec.
410 * cofflink.c: Likewise.
411 * coff-h8300.c: Likewise.
412 * ecoff.c: Likewise.
413 * elf32-m68hc1x.c: Likewise.
414 * elf32-ppc.c: Likewise.
415 * elf64-alpha.c: Likewise.
416 * elf64-ppc.c: Likewise.
417 * elf64-sparc.c: Likewise.
418 * elfxx-mips.c: Likewise.
419 * i386linux.c: Likewise.
420 * m68klinux.c: Likewise.
421 * sparclinux.c: Likewise.
422 * sunos.c: Likewise.
423 * xcofflink.c: Likewise.
424 * linker.c: Likewise.
425 (_bfd_link_hash_table_init): Don't store creator.
426
e81819a5
NC
4272008-02-14 Peter Jones <pjones@redhat.com>
428
429 * efi-rtdrv-ia32.c: New file.
430 * efi-bsdrv-ia32.c: New file.
431 * efi-rtdrv-ia64.c: New file.
432 * efi-bsdrv-ia64.c: New file.
433 * efi-rtdrv-x86_64.c: New file.
434 * efi-bsdrv-x86_64.c: New file.
435 * peicode.h (pe_bfd_object_p): Add support for boot service and
436 runtime service drivers.
437 * libpei.h: Add macros for EFI formats, and rename the efi application
438 format macros to disambiguate.
439 * targets.c: Add bfd_target _vec externs.
440 (_bfd_tar): Add EFI _vec entries.
441 * config.bfd: Add EFI vectors into the selection routines.
442 * configure.in: add EFI _vec entries.
443 * configure: Regenerate.
444 * Makefile.am: Add EFI files.
445 * Makefile.in: Regenerate.
446
ab1579fd
NS
4472008-02-14 Nathan Sidwell <nathan@codesourcery.com>
448
449 * dwarf1.c (struct dwarf1_debug): Add syms member.
450 (alloc_dwarf1_unit, alloc_dwarf1_func): Check for out of memory.
451 (parse_line_table, _bfd_dwarf1_find_nearest_line): Relocate
452 section contents, check for out of memory.
453
454 * dwarf1.c (struct dwarf1_debug): Change data pointers to bfd_byte.
455 (parse_die): Change data pointers to bfd_byte.
456 (parse_line_table, parse_functions_in_unit): Likewise.
457
d40f3da9
AM
4582008-02-14 Alan Modra <amodra@bigpond.net.au>
459
460 * elflink.c (compute_bucket_count): Warning fixes.
461
f15557e4
DD
4622008-02-12 DJ Delorie <dj@redhat.com>
463
464 * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
465 relocation pointing to local symbol in merged section.
466
467 * elf32-iq2000.c (iq2000_elf_relocate_offset16): New.
468 (iq2000_elf_relocate_section): Call it.
469
0ffa91dd
NC
4702008-02-12 Nick Clifton <nickc@redhat.com>
471
472 PR ld/5692
473 * elf-bfd.h (enum elf_object_id): New enum, used to identify
474 target specific extensions to the elf_obj_tdata structure.
475 (struct elf_obj_tdata): New field 'object_id'.
476 (elf_object_id, elf_program_header_size, elf_symtab_hdr): New
477 macros for accessing fields in the elf_obj_tdata structure.
478 (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object.
479 (bfd_elf_allocate_object): New function.
480 * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object
481 and implement by calling bfd_elf_allocate_object.
482 (bfd_elf_allocate_object): New function: Allocates an
483 elf_obj_tdata structure, possibly with a target specific
484 extension.
485 * elfxx-target.h (bfd_elfNN_mkobject): Use
486 bfd_elf_make_generic_object as the default value.
487 * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata
488 for consistency with other, similar structures.
489 (is_arm_elf): New macro. Checks a BFD to make sure that is an ARM
490 ELF bfd.
491 (elf32_arm_mkobject): Call bfd_elf_allocate_object.
492 (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check
493 the bfd being processed.
494 (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
495 (bfd_elf32_arm_set_target_relocs): Likewise.
496 (bfd_elf32_arm_final_link_relocate): Likewise.
497 (bfd_elf32_arm_copy_private_bfd_data): Likewise.
498 (bfd_elf32_arm_merge_eabi_attributes): Likewise.
499 (bfd_elf32_arm_merge_private_bfd_data): Likewise.
500 (bfd_elf32_arm_check_relocs): Likewise.
501 (bfd_elf32_arm_gc_mark_extra_sections): Likewise.
502 (bfd_elf32_arm_size_dynamic_sections): Likewise.
503 (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr.
504 (bfd_elf32_arm_init_maps): Likewise.
505 (bfd_elf32_arm_final_link_relocate): Likewise.
506 (bfd_elf32_arm_relocate_section): Likewise.
507 (bfd_elf32_arm_gc_sweep_hook): Likewise.
508 (bfd_elf32_arm_check_relocs): Likewise.
509 (bfd_elf32_arm_size_dynamic_sections): Likewise.
510 * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object.
511 (is_i386_elf): New macro. Checks a BFD to make sure that is an x86
512 ELF bfd.
513 (elf_i386_check_relocs): Use is_i386_elf macro to check the bfd
514 being processed.
515 (elf_i386_size_dynamic_sections): Likewise.
516 (elf_i386_relocate_section): Likewise.
517 (elf_i386_check_relocs): Use elf_symtab_hdr.
518 (elf_i386_gc_sweep_hook): Likewise.
519 (elf_i386_size_dynamic_sections): Likewise.
520 (elf_i386_relocate_section): Likewise.
521 * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object.
522 (elf_create_pointer_linker_section): Use is_ppc_elf_target to
523 verify that the bfd before accessing target specific fields.
524 (ppc_elf_check_relocs): Likewise.
525 (elf_finish_pointer_linker_section): Likewise.
526 (elf_create_pointer_linker_section): Use elf_symtab_hdr.
527 (ppc_elf_check_relocs): Likewise.
528 (ppc_elf_gc_sweep_hook): Likewise.
529 (ppc_elf_tls_optimize): Likewise.
530 (ppc_elf_size_dynamic_sections): Likewise.
531 (ppc_elf_relax_section): Likewise.
532 (ppc_elf_relocate_section): Likewise.
533 * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment
534 reminding programmers to keep this structure in sync with the one
535 defined in elf64-s390.c.
536 (elf_s390_mkobject): Call bfd_elf_allocate_object.
537 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
538 ELF bfd.
539 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
540 being processed.
541 (elf_s390_size_dynamic_sections): Likewise.
542 (elf_s390_relocate_section): Likewise.
543 (elf_s390_check_relocs): Use elf_symtab_hdr.
544 (elf_s390_gc_sweep_hook): Likewise.
545 (elf_s390_size_dynamic_sections): Likewise.
0eb4a168 546 (elf_s390_relocate_section): Likewise.
0ffa91dd
NC
547 * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object.
548 (is_sh_elf): New macro. Checks a BFD to make sure that is an SH
549 ELF bfd.
550 (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the
551 bfd being processed.
552 (sh_elf_relocate_section): Likewise.
553 (sh_elf_check_relocs): Likewise.
554 (sh_elf_copy_private_data): Likewise.
555 (sh_elf_relax_section): Use elf_symtab_hdr.
556 (sh_elf_size_dynamic_sections): Likewise.
557 (sh_elf_relocate_section): Likewise.
558 (sh_elf_get_relocated_section_contents): Likewise.
559 (sh_elf_gc_sweep_hook): Likewise.
560 (sh_elf_check_relocs): Likewise.
561 * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object.
562 (is_alpha_elf): New macro. Checks a BFD to make sure that is an
563 Alpha ELF bfd.
564 (elf64_alpha_create_got_section): Use is_alpha_elf macro to check
565 the bfd being processed.
566 (elf64_alpha_create_dynamic_section): Likewise.
567 (elf64_alpha_check_relocs): Likewise.
568 (elf64_alpha_size_got_sections): Likewise.
569 (elf64_alpha_relax_section): Likewise.
570 (elf64_alpha_relocate_section): Likewise.
571 (elf64_alpha_final_link): Likewise.
572 (elf64_alpha_check_relocs): Use elf_symtab_hdr.
573 (elf64_alpha_relax_section): Likewise.
574 (elf64_alpha_relocate_section_r): Likewise.
575 (elf64_alpha_relocate_section): Likewise.
576 * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object.
577 (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd
578 being processed.
579 (opd_entry_value): Likewise.
580 (allocate_dynrelocs): Likewise.
581 (ppc64_elf_relocate_section): Likewise.
582 (ppc64_elf_check_relocs): Use elf_symtab_hdr.
583 (opd_entry_value): Likewise.
584 (ppc64_elf_gc_sweep_hook): Likewise.
585 (get_sym_h): Likewise.
586 (ppc64_elf_edit_opd): Likewise.
587 (ppc64_elf_tls_optimize): Likewise.
588 (ppc64_elf_edit_toc): Likewise.
589 (ppc64_elf_size_dynamic_sections): Likewise.
590 (toc_adjusting_stub_needed): Likewise.
591 (ppc64_elf_size_stubs): Likewise.
592 (ppc64_elf_relocate_section): Likewise.
593 * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment
594 reminding programmers to keep this structure in sync with the one
595 defined in elf32-s390.c.
596 (elf_s390_mkobject): Call bfd_elf_allocate_object.
597 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
598 ELF bfd.
599 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
600 being processed.
601 (elf_s390_size_dynamic_sections): Likewise.
0eb4a168 602 (elf_s390_relocate_section): Likewise.
0ffa91dd
NC
603 (elf_s390_check_relocs): Use elf_symtab_hdr.
604 (elf_s390_gc_sweep_hook): Likewise.
605 (elf_s390_size_dynamic_sections): Likewise.
606 (elf_s390_relocate_section): Likewise.
607 * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object.
608 (is_x86_64_elf): New macro. Checks a BFD to make sure that is an
609 x86_64 ELF bfd.
610 (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd
611 being processed.
612 (elf64_x86_64_size_dynamic_sections): Likewise.
613 (elf64_x86_64_relocate_section): Likewise.
614 (elf64_x86_64_check_relocs): Use elf_symtab_hdr.
615 (elf64_x86_64_gc_sweep_hook): Likewise.
616 (elf64_x86_64_size_dynamic_sections): Likewise.
617 (elf64_x86_64_relocate_section): Likewise.
618 * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object.
619 (is_sparc_elf): New macro. Checks a BFD to make sure that is a Sparc
620 ELF bfd.
621 (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the
622 bfd being processed.
623 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
624 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
625 (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr.
626 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
627 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
0eb4a168 628 (_bfd_sparc_elf_relocate_section): Likewise.
0ffa91dd 629
be4291f1
AM
6302008-02-12 Alan Modra <amodra@bigpond.net.au>
631
632 PR 5303, 5755
633 * arange-set.c: Delete.
634 * arange-set.h: Delete.
635 * dwarf2.c: Revert 2007-09-21 changes.
636 * Makefile.am: Likewise.
637 * Makefile.in: Regenerate.
638 * po/SRC-POTFILES.in: Regenerate.
639
7a84e3da
BS
6402008-02-11 Bernd Schmidt <bernd.schmidt@analog.com>
641
642 * elf32-bfin.c (bfin_relocate_section): Set up dynobj before using it
643 if necessary.
644 (elf32_bfin_merge_private_bfd_data): Simplify, and ensure object type
645 mismatches are detected.
646
ca889129
BS
647 * elf32-bfin.c (bfinfdpic_relocate_section): Take more care not to
648 emit invalid relocs or rofixup entries for deleted .eh_frame entries.
649
662ed161
DJ
6502008-02-11 Daniel Jacobowitz <dan@codesourcery.com>
651
652 * cache.c (cache_bread): Set bfd_error_file_truncated if EOF
653 was reached.
654 * srec.c (srec_scan): Calculate the checksum. Complain on mismatch.
655
2e444bea
AM
6562008-02-07 Alan Modra <amodra@bigpond.net.au>
657
658 * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling
659 of _ovly_buf_table size.
660 (spu_elf_build_stubs): Use low bit of .size as "present" bit.
661 Adjust initialisations relating to _ovly_buf_table.
662
d9ab3f29 6632008-02-04 Bob Wilson <bob.wilson@acm.org>
0eb4a168 664
d9ab3f29
BW
665 * elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid
666 relocation, do not continue processing it. Ignore R_XTENSA_ASM_EXPAND
667 relocations against dynamic symbols.
668 (elf_xtensa_finish_dynamic_sections): Do not fail if there is no
669 .xt.lit section.
0eb4a168 670
bb8541b9
L
6712008-02-04 Kai Tietz <kai.tietz@onevision.com>
672 H.J. Lu <hongjiu.lu@intel.com>
673
674 PR 5715
675 * warning.m4: Enable -Wno-format by default when using gcc on
676 mingw.
677 * configure: Regenerated.
678
6f179bd0
AN
6792008-02-04 Adam Nemet <anemet@caviumnetworks.com>
680
681 * archures.c: Update copyright.
682 (bfd_mach_mips_octeon): New macro.
683 * bfd-in2.h: Regenerate.
684 * elfxx-mips.c (_bfd_elf_mips_mach): Handle Octeon.
685 (mips_set_isa_flags): Likewise.
686 (mips_mach_extensions): Add Octeon.
687 * cpu-mips.c: Update copyright.
688 (I_mipsocteon): New enum constant.
689 (arch_info_struct): Add Octeon.
690
d16c7321
AM
6912008-02-04 Alan Modra <amodra@bigpond.net.au>
692
693 * elf32-spu.c (spu_elf_relocate_section): Correct return type.
694 Return error status on unexpected relocation errors.
695
e44a2c9c
AM
6962008-02-04 Alan Modra <amodra@bigpond.net.au>
697
698 PR ld/5692
699 * elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31. Instead abort
700 on non-ELF input.
701 * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue
702 processing on non-ELF input.
703
f8a52b59
BW
7042008-01-31 Marc Gauthier <marc@tensilica.com>
705
706 * config.bfd (xtensa*-*-*): Recognize processor variants.
707
b7c368d0
NC
7082008-01-31 Nick Clifton <nickc@redhat.com>
709
710 PR ld/5692
711 * elf.c (bfd_elf_get_elf_syms): Check the return value of
712 get_elf_backend_data.
713
00b2bfc1
NC
7142008-01-28 Fabian Groffen <grobian@gentoo.org>
715
716 * config.bfd (x86_64-*-solaris2): Add support for this target.
717
47f6dab9
AM
7182008-01-28 Alan Modra <amodra@bigpond.net.au>
719
720 Rewrite SPU overlay handling code. Put overlay calls stubs in the
721 overlays where possible. Use a faster call stub, or optionally at
722 compile time, a more compact stub. Double size of _ovly_buf_table
723 so that low bit of _ovly_table.buf can be used as a "present" bit.
724 Reserve an extra _ovly_table entry for index zero.
725 * elf32-spu.c: (struct spu_link_hash_table): Delete a number of fields,
726 add new ones.
727 (struct got_entry): New.
728 (struct spu_stub_hash_entry): Delete.
729 (stub_hash_newfunc, spu_elf_link_hash_table_free): Delete.
730 (spu_elf_link_hash_table_create): Adjust for struct changes.
731 (spu_stub_name): Delete.
732 (spu_elf_find_overlays): Don't track sections from overlay regions.
733 Instead set ovl_buf number in spu elf section data. Error if
734 overlays in one region don't start at the same address. Adjust
735 for struct _spu_elf_section_data changes.
736 (SIZEOF_STUB1, SIZEOF_STUB2, ILA_79, ILA_78): Delete.
737 (OVL_STUB_SIZE, BRSL, LNOP, ILA): Define.
738 (needs_ovl_stub): Adjust for struct _spu_elf_section_data changes.
739 (enum _insn_type): New.
740 (count_stub, build_stub): New functions.
741 (allocate_spuear_stubs): Use count_stub.
742 (build_spuear_stubs): Use build_stub.
743 (populate_stubs, sort_stubs): Delete.
744 (process_stubs): New function.
745 (write_one_stub): Delete.
746 (spu_elf_size_stubs, spu_elf_build_stubs): Rewrite.
747 (alloc_stack_info): Adjust for struct _spu_elf_section_data changes.
748 (maybe_insert_function, check_function_ranges): Likewise.
749 (find_function, pasted_function, build_call_tree): Likewise.
750 (spu_elf_stack_analysis, spu_elf_modify_segment_map): Likewise.
751 (spu_elf_modify_program_headers): Likewise.
752 (interesting_section): Detect stub sections differently. Delete
753 htab param, adjust all callers.
754 (spu_elf_relocate_section): Rewrite stub handling.
755 (spu_elf_output_symbol_hook): Likewise.
756 (bfd_elf32_bfd_link_hash_table_free): Delete.
757 * elf32-spu.h (struct _spu_elf_section_data): Move input-only and
758 output-only fields into a union. Add ovl_buf.
759 (spu_elf_size_stubs, spu_elf_build_stubs): Update prototypes.
760
c006d697
DD
7612008-01-25 DJ Delorie <dj@redhat.com>
762
763 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
764
6e3d6dc1
NC
7652008-01-25 Kai Tietz <kai.tietz@onevision.com>
766
767 * bfd-in.h: Add mingw I64 support.
768 * bfd-in2.h: Regenerated.
769 * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64.
770
fbb3bb98
AM
7712008-01-21 Alan Modra <amodra@bigpond.net.au>
772
773 PR 4453
774 * format.c (bfd_check_format_matches): Don't accept archives as
775 fully matching unless they have a map.
776
297d8443
AM
7772008-01-21 Alan Modra <amodra@bigpond.net.au>
778
779 * elflink.c (_bfd_elf_link_output_relocs): Correct error return.
780
66cd82b5
AM
7812008-01-21 Alan Modra <amodra@bigpond.net.au>
782
783 * ecoff.c (_bfd_ecoff_archive_p): Delete.
784 * libecoff.h (_bfd_ecoff_archive_p): Delete.
785 * coff-alpha.c (ecoffalpha_little_vec): Use bfd_generic_archive_p.
786 * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
787 (ecoff_biglittle_vec): Likewise.
788
85f7a9cb
AM
7892008-01-19 Alan Modra <amodra@bigpond.net.au>
790
791 PR 5646
792 * elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
793 non-NULL before dereferencing.
794
74f0fb50
AM
7952008-01-15 Alan Modra <amodra@bigpond.net.au>
796
797 PR 5604
798 * elf-bfd.h (struct elf_backend_data): Add gc_keep. Remove param
799 names from others.
800 (_bfd_elf_gc_keep): Declare.
801 * elfxx-target.h (elf_backend_gc_keep): Define.
802 (elfNN_bed): Init new field.
803 * elflink.c (_bfd_elf_gc_keep): New function.
804 (bfd_elf_gc_sections): Call gc_keep.
805 * elf64-ppc.c (elf_backend_gc_keep): Define.
806 (struct _ppc64_elf_section_data): Move .opd related fields to
807 a struct so they don't occupy the same storage. Adjust accesses
808 throughout file.
809 (ppc64_elf_gc_keep): New function, split out from..
810 (ppc64_elf_gc_mark_hook): ..here. Don't call _bfd_elf_gc_mark
811 to mark .opd section, just set gc_mark.
812 (ppc64_elf_edit_opd): Remove no_opd_opt parm. Don't set opd->adjust
813 unless we are changing .opd. Test non-NULL opd->adjust at all
814 accesses throughout file.
815 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
816
787daa7a
AM
8172008-01-15 Alan Modra <amodra@bigpond.net.au>
818
819 * bfd-in.h (BFD_HOST_LONG_LONG): Delete.
820 * bfd-in2.h: Regenerate.
821
7dda2462
TG
8222008-01-11 Tristan Gingold <gingold@adacore.com>
823 Eric Botcazou <ebotcazou@adacore.com>
824
825 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a
826 relocatable.
827 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
828 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
829 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
830 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
831 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
832 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
833 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
834 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
835 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
836 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
837 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
838 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
839 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise.
840 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
841 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
842 * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output
843 or executable output with relocations.
844
d2e2e649
NC
8452008-01-09 Nick Clifton <nickc@redhat.com>
846
847 PR gas/5552
848 * elf32-fr30.c (fr30_elf_howto_table): Set partial_inplace field
849 to FALSE for all relocs.
850
184d07da
RS
8512008-01-09 Richard Sandiford <rsandifo@nildram.co.uk>
852
853 PR ld/5526
854 * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged
855 fields. Rename u.cie.u.merged to u.cie.u.merged_with.
856 (eh_frame_sec_info): Add a cies field.
857 (eh_frame_hdr_info): Add a merge_cies field.
858 * elf-eh-frame.c (cie): Add a reloc_index member to the personality
859 union.
860 (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead
861 of hdr_info->cies.
862 (_bfd_elf_parse_eh_frame): Remove tmp_cie. Ccreate an array of
863 cie structures in all cases and use it instead of extended_cies.
864 If merging, store the cie array in sec_info->cies and point each
865 CIE's eh_fde_cie at the associated element. Do not try to
866 calculate the value of the personality routine here; record the
867 offset of the relocation instead. Do not merge CIEs here.
868 (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here...
869 (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead.
870 (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE.
871 (find_merged_cie): New function.
872 (_bfd_elf_gc_mark_fdes): Use it. Free sec_info->cies.
873
780b2360
NC
8742008-01-07 Nick Clifton <nickc@redhat.com>
875
876 PR binutils/5535
877 * vms.c (vms_close_and_cleanup): Check for the presence of a
878 vms_private_data_struct before examining any of its fields.
879
ace79388
L
8802008-01-07 H.J. Lu <hongjiu.lu@intel.com>
881
882 PR ld/5522
883 * elflink.c (elf_link_input_bfd): Don't write out a section if
884 its output section is marked with SEC_NEVER_LOAD.
885
6c7ac64e 886For older changes see ChangeLog-2007
56882138
AM
887\f
888Local Variables:
889mode: change-log
890left-margin: 8
891fill-column: 74
892version-control: never
893End:
This page took 0.481361 seconds and 4 git commands to generate.