2008-07-22 Simon Baldwin <simonb@google.com>
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
bda987c2
CD
12008-07-22 Simon Baldwin <simonb@google.com>
2
3 * elflink.c (elf_link_output_extsym): Set st_size to zero for
4 symbols from dynamic libraries.
5
88ba32a0
L
62008-07-21 H.J. Lu <hongjiu.lu@intel.com>
7
8 PR ld/4424
9 * elflink.c (_bfd_elf_merge_symbol): Call bed->relocs_compatible
10 to check if 2 inputs are compatible.
11
37c43c55
NC
122008-07-21 Sterling Augustine <sterling@tensilica.com>
13
14 * elf.c (assign_file_positions_for_load_sections): Print vma in
15 error message about overlapping section vmas.
16
50403a1f
L
172008-07-21 H.J. Lu <hongjiu.lu@intel.com>
18
19 PR ld/6747
20 * elf32-frv.c (elf32_frv_relocate_section): Revert the change
21 for PR ld/6446 checked in by accident on May 21, 2008.
22
799c00e0
NC
232008-07-21 Nick Clifton <nickc@redhat.com>
24
25 * coff-sh.c (bfd_pe_print_pdata): Define to NULL for non
26 COFF_WITH_PE based SH ports.
27 * libpei.h (_bfd_XX_print_ce_compressed_pdata): Prototype.
28 * arm-wince-pe.c (bfd_pe_print_pdata): Use
29 _bfd_pe_print_ce_compressed_pdata.
30 (slurp_symcache, cleanup_syms, pe_print_ce_compressed_pdata): Move
31 to...
32 * peXXigen.c: ... here and rename pe_print_ce_compressed_pdata to
33 _bfd_XX_print_ce_compressed_pdata.
34
f60e73e9
AM
352008-07-21 Alan Modra <amodra@bigpond.net.au>
36
37 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Drop
38 unwanted zero terminators.
39
dc1859a6
AM
402008-07-21 Alan Modra <amodra@bigpond.net.au>
41
42 * elf32-spu.c (spu_elf_relocate_section): Expand
43 RELOC_FOR_GLOBAL_SYMBOL. Don't warn about undefined symbols for
44 R_SPU_PPU32 and R_SPU_PPU64 relocations.
45
89eeb0bc
LM
462008-07-21 Luis Machado <luisgpm@br.ibm.com>
47
48 * elf-bfd.h: Declare elfcore_write_ppc_vsx.
49 * elf.c (elfcore_grok_ppc_vsx): New function.
50 (elfcore_write_ppc_vsx): New function
51 (elfcore_grok_note): Handle VSX notes.
52 (elfcore_write_register_note): Handle VSX notes.
53
a9dc9481
JM
542008-07-18 Joseph Myers <joseph@codesourcery.com>
55
56 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add new parameter.
57 * bfd-in2.h: Regenerate.
58 * elf32-arm.c (struct elf_arm_obj_tdata): Add field
59 no_wchar_size_warning.
60 (bfd_elf32_arm_set_target_relocs): Add new parameter
61 no_wchar_warn.
62 (elf32_arm_merge_eabi_attributes): Give a warning, not an error,
63 for conflicting wchar_t attributes. Do not warn if
64 --no-wchar-size-warning. Make diagnostic text more specific.
65
6cee0a6f
L
662008-07-18 H.J. Lu <hongjiu.lu@intel.com>
67
68 PR ld/6748
69 * elf32-arm.c (elf32_arm_link_hash_table_create): Initialize
70 new fields added for ARM long call support.
71
2b5c217d
NC
722008-07-18 Danny Backx <dannybackx@users.sourceforge.net>
73
74 * pe-arm-wince.c (pe_print_compressed_pdata): Define new function to
75 print compressed pdata structure as described on MSDN. This only
76 applies to a limited set of architectures (ARM, SH4).
77 (slurp_symtab, my_symbol_for_address): Define static helper
78 functions for pe_print_compressed_pdata.
79 * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_print_pdata field.
80 (bfd_coff_have_print_pdata, bfd_coff_print_pdata): Define.
81 * bfd/peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add check on
82 bfd_coff_backend_data, call the function if non-null.
83 * pei-mcore.c: Add target dependent initialisation for
84 bfd_coff_backend_data.
85 * coff-sh.c: Likewise.
86 * coff64-rs6000.c: Likewise.
87 * coff-rs6000.c: Likewise.
88 * libcoff-in.h: Likewise.
89 * cf-i386lynx.c: Likewise.
90 * coff-alpha.c: Likewise.
91 * coff-apollo.c: Likewise.
92 * coff-arm.c: Likewise.
93 * coff-aux.c: Likewise.
94 * coff-h8300.c: Likewise.
95 * coff-h8500.c: Likewise.
96 * coff-i386.c: Likewise.
97 * coff-i860.c: Likewise.
98 * coff-i960.c: Likewise.
99 * coff-ia64.c: Likewise.
100 * coff-m68k.c: Likewise.
101 * coff-m88k.c: Likewise.
102 * coff-maxq.c: Likewise.
103 * coff-mips.c: Likewise.
104 * coff-or32.c: Likewise.
105 * coff-sparc.c: Likewise.
106 * coff-tic30.c: Likewise.
107 * coff-tic4x.c: Likewise.
108 * coff-tic54x.c: Likewise.
109 * coff-tic80.c: Likewise.
110 * coff-w65.c: Likewise.
111 * coff-we32k.c: Likewise.
112 * coff-x86_64.c: Likewise.
113 * coff-z80.c: Likewise.
114 * coff-z8k.c: Likewise.
115 * pe-mcore.c: Likewise.
116 * pe-mips.c: Likewise.
117 * pe-ppc.c: Likewise.
118 * peXXigen.c: Likewise.
dc1859a6 119 * pei-ppc.c: Likewise.
2b5c217d
NC
120 * libcoff.h: Regenerate.
121
c96a8570
BS
1222008-07-16 Bernd Schmidt <bernd.schmidt@analog.com>
123
124 * elf32-bfin.c (bfin_check_relocs, bfin_relocate_section,
125 bfin_final_link_relocate, bfin_gc_mark_hook, bfin_gc_sweep_hook,
126 ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE,
127 struct _bfinfdpic_dynamic_got_info): Moved around to keep FD-PIC code
128 separate from non-FD-PIC.
129
605d18d4
DD
1302008-07-14 DJ Delorie <dj@redhat.com>
131
132 * elf-m10300.c (mn10300_elf_final_link_relocate): Correct overflow
133 checks for PCREL8, PCREL16, GOTPC16, GOTOFF16, PLT16, and GOT16
134 relocs.
135 (mn10300_elf_relax_section): Correct jump offset check when target
136 is in a different section.
137
b0a0b978
JZ
1382008-07-15 Jie Zhang <jie.zhang@analog.com>
139
140 * elf32-bfin.c (elf32_bfin_special_sections[]): New.
141 (elf_backend_special_sections): Define.
142
aaf30c25
CS
1432008-07-13 Craig Silverstein <csilvers@google.com>
144
08b78292 145 PR binutils/6743
aaf30c25
CS
146 * dwarf2.c (struct dwarf2_debug): New variable info_ptr_memory.
147 (find_line): Use info_ptr_memory instead of sec_info_ptr.
148 (_bfd_dwarf2_cleanup_debug_info): Likewise.
149
1bac266e
JZ
1502008-07-12 Jie Zhang <jie.zhang@analog.com>
151
152 Revert
153 2008-07-12 Jie Zhang <jie.zhang@analog.com>
154 * elf.c (_bfd_elf_map_sections_to_segments): Don't put
155 executable sections into the same segment with other
156 read only sections if --sep-code.
157 * elf32-bfin.c (elf32_bfin_code_in_l1): New variable.
158 (elf32_bfin_data_in_l1): New variable.
159 (elf32_bfin_final_write_processing): New.
160 (elf32_bfin_special_sections[]): New.
161 (elf_backend_final_write_processing): Define.
162 (elf_backend_special_sections): Define.
163
8c684578
JZ
1642008-07-12 Jie Zhang <jie.zhang@analog.com>
165
166 * elf.c (_bfd_elf_map_sections_to_segments): Don't put
167 executable sections into the same segment with other
168 read only sections if --sep-code.
169 * elf32-bfin.c (elf32_bfin_code_in_l1): New variable.
170 (elf32_bfin_data_in_l1): New variable.
171 (elf32_bfin_final_write_processing): New.
172 (elf32_bfin_special_sections[]): New.
173 (elf_backend_final_write_processing): Define.
174 (elf_backend_special_sections): Define.
175
3076cd1f
AS
1762008-07-11 Andreas Schwab <schwab@suse.de>
177
178 * dwarf2.c (read_section): Take pointer to bfd_size_type instead
179 of unsigned long as last parameter.
180 (struct dwarf2_debug): Define dwarf_abbrev_size, dwarf_line_size,
181 dwarf_str_size and dwarf_ranges_size as bfd_size_type instead of
182 unsigned long.
183
0a61c8c2
RS
1842008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
185
186 * elfxx-mips.c (mips_elf_calculate_relocation): Calculate GP and GP0
187 for all relocation types. Allow any type of relocation to refer to
188 __gnu_local_gp.
189
30c09090
RS
1902008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
191
192 * elfxx-mips.c (mips_elf_check_mips16_stubs): Use ELF_ST_IS_MIPS16.
193 (mips_elf_calculate_relocation): Likewise.
194 (_bfd_mips_elf_add_symbol_hook): Likewise.
195 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
196 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
197
355d10dc
AS
1982008-07-10 Andreas Schwab <schwab@suse.de>
199
200 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Add missing
201 paren.
202
1b315056
CS
2032008-07-09 Craig Silverstein <csilvers@google.com>
204
205 * Makefile.am (BFD32_LIBS): Add compress.lo.
206 (BFD32_LIBS_CFILES): Add compress.c.
207 (BFD_H_FILES): Likewise.
208 * Makefile.in: Regenerate.
209 * bfd-in2.h: Regenerate.
210 * config.in: Add HAVE_ZLIB_H
211 * configure.in: Add test for libz and zlib.h
212 * configure: Regenerate.
213 * dwarf2.c (read_section): New function.
214 (read_indirect_string): Call new function read_section.
215 (read_abbrevs): Likewise.
216 (decode_line_info): Likewise.
217 (read_debug_ranges): Likewise.
218 (find_line): Call new function read_section when just one
219 .zdebug_info section is found, otherwise read and compress
220 multiple sections.
221 (_bfd_dwarf2_cleanup_debug_info): Free sec_info_ptr.
222 * elf.c (_bfd_elf_make_section_from_shdr): Add zdebug prefix.
223 (special_sections_z): New struct.
224 (special_sections): Refer to special_sections_z.
225 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Recognize
226 sections named .zdebug_*.
227 (_bfd_mips_elf_fake_sections): Likewise.
228 * compress.c: New file.
229 (bfd_uncompress_section_contents): New function.
dc1859a6 230
329dcd78
NC
2312008-07-07 Christophe Lyon <christophe.lyon@st.com>
232
233 * elf32-arm.c (arm_type_of_stub): Don't crash on local symbols in
234 the presence of a PLT.
235
c29aae59
AM
2362008-07-07 Alan Modra <amodra@bigpond.net.au>
237
238 * bfd.c (bfd_demangle): Always trim off bfd_get_symbol_leading_char.
239
7382d32a
AM
2402008-07-02 Alan Modra <amodra@bigpond.net.au>
241
242 * elf32-ppc.c (is_pic_glink_stub): New function.
243 (ppc_elf_get_synthetic_symtab): Don't generate symbols when
244 multiple shared/pie stubs per plt entry.
245
cb53bf42
RS
2462008-06-30 Richard Sandiford <rdsandiford@googlemail.com>
247
248 * elf.c (_bfd_elf_get_synthetic_symtab): Increment p by
249 bed->s->int_rels_per_ext_rel.
250
6ba2a415
RS
2512008-06-30 Richard Sandiford <rdsandiford@googlemail.com>
252
253 * syms.c (BSF_SYNTHETIC): New flag.
254 * elf.c (_bfd_elf_get_synthetic_symtab): Set it.
255 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Likewise.
256 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
257 * bfd-in.h (bfd_asymbol_flavour): Return bfd_target_unknown_flavour
258 for synthetic symbols.
259 * bfd-in2.h: Regenerate.
260
3dccd7b7
DJ
2612008-06-30 Daniel Jacobowitz <dan@codesourcery.com>
262
263 * elf32-arm.c (record_arm_to_thumb_glue, record_thumb_to_arm_glue):
264 Expand comments.
265 (arm_map_one_stub): Use | 1 when setting the low bit.
266
f57718b4
AS
2672008-06-29 Andreas Schwab <schwab@suse.de>
268
269 * elf32-m68k.c (elf_m68k_relocate_section): Don't ignore existing
270 addend on _GLOBAL_OFFSET_TABLE_.
271
7413f23f
DJ
2722008-06-24 Daniel Jacobowitz <dan@codesourcery.com>
273
274 * elf32-arm.c (STUB_ENTRY_NAME): Define.
275 (arm_thumb_thumb_long_branch_stub): Use bx instead of b.n.
276 (arm_pic_long_branch_stub): Mention R_ARM_REL32 instead of
277 R_ARM_ABS32.
278 (struct elf32_arm_stub_hash_entry): Add output_name.
279 (arm_build_one_stub): Move offsets into the offset argument
280 of _bfd_final_link_relocate. Correct offset for
281 arm_thumb_arm_v4t_stub_long_branch.
282 (elf32_arm_size_stubs): Set stub_entry->output_name.
283 (elf32_arm_ouput_plt_map_sym): Rename to elf32_arm_output_map_sym.
284 Update all callers.
285 (elf32_arm_output_stub_sym): New.
286 (arm_map_one_stub): Correct formatting. Use elf32_arm_output_stub_sym.
287
7c39fb20
AM
2882008-06-20 Alan Modra <amodra@bigpond.net.au>
289
290 * elf32-spu.c (needs_ovl_stub): Correctly return nonovl_stub for
291 non-branch insns.
292
f3c29e8a
AM
2932008-06-20 Alan Modra <amodra@bigpond.net.au>
294
295 * elf32-spu.c (build_stub): Allow wraparound on stub branches.
296 (allocate_spuear_stubs, build_spuear_stubs): Return value from
297 count_stub/build_stub.
298 (spu_elf_build_stubs): Correct location of stub reloc error message.
299
de73c611
SR
3002008-06-18 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
301
dc1859a6 302 * elf32-cr16.c (ELF_MACHINE_ALT1): Define to EM_CR16_OLD.
de73c611 303
7a283e07
RW
3042008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
305
306 * configure: Regenerate.
307
99302af9
AM
3082008-06-17 Alan Modra <amodra@bigpond.net.au>
309
310 * elf32-spu.c (struct spu_link_hash_table): Add extra_stack_space.
311 (spu_elf_check_vma): Add extra_stack_space param, copy to htab.
312 (spu_elf_auto_overlay): Use it.
313 (RECURSE_UNMARK): Define as 0.
314 (unmark_overlay_section): Heed RECURSE_UNMARK.
315 * elf32-spu.h (spu_elf_check_vma): Update prototype.
316
ff7eeb89
DD
3172008-06-12 DJ Delorie <dj@redhat.com>
318
319 * elf32-m32c.c (ELF_MACHINE_ALT1): Define as EM_M32C_OLD.
320
c13bb2ea
PB
3212008-06-09 Paul Brook <paul@codesourcery.com>
322
323 bfd/
324 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Allow BE8 shared
325 libraries.
326
f4ac8484
DJ
3272008-06-09 Christophe Lyon <christophe.lyon@st.com>
328
329 * elf32-arm.c (arm_stub_is_thumb): Define.
330 (elf32_arm_final_link_relocate): Handle near mode switching stubs.
331
6a267715
AM
3322008-06-07 Alan Modra <amodra@bigpond.net.au>
333
334 * elf32-spu.c (spu_elf_auto_overlay): Add valid area below sp
335 to stack calculation.
336
23684067
PB
3372008-06-06 Paul Brook <paul@codesourcery.com>
338
339 bfd/
340 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Reject BE8 input.
341
97407faf
AM
3422008-06-06 Alan Modra <amodra@bigpond.net.au>
343
344 * elf32-spu.c (spu_elf_auto_overlay): Relax requirement that
345 file names be unique. Specify archive:path in overlay script.
346
7cfbafbc
AM
3472008-06-05 Alan Modra <amodra@bigpond.net.au>
348
349 PR ld/6590
350 * elf64-ppc.c (ppc_build_one_stub): Correct reloc offsets.
351
0f0a5e58
AM
3522008-06-04 Alan Modra <amodra@bigpond.net.au>
353
354 * elf.c (ignore_section_sym): Don't test section sym value here.
355 (elf_map_symbols): Instead check zero value here as was done prior
356 to 2006-05-26 change.
357
696b7ad2
NC
3582008-06-04 Nick Clifton <nickc@redhat.com>
359
360 PR ld/6019
361 * elf32-avr.c (elf32_avr_relax_section): Handle the case where
362 there are no local symbols.
363
1f27ab8d
AM
3642008-06-04 Alan Modra <amodra@bigpond.net.au>
365
366 * elf32-spu.c (get_sym_h): Don't attempt to read global syms.
367 (process_stubs): Likewise.
368 (discover_functions): Don't used cached symbols.
369 (maybe_insert_function): Correct condition under which function
370 array is realloc'd.
371 (mark_functions_via_relocs): Delete unused variable.
372
adfef0bd
NC
3732008-05-30 Frediano Ziglio <frediano.ziglio@vodafone.com>
374 Nick Clifton <nickc@redhat.com>
375
376 PR ld/6511
377 * elf64-hppa.c (allocate_global_data_opd): Default to using the
378 dynamic symbol table for local function names in shared libraries.
379
11701589
JK
3802008-05-29 Jan Kratochvil <jan.kratochvil@redhat.com>
381
382 * elf.c (assign_file_positions_for_load_sections): Adjust pre-section
383 gaps based on VMA and P_VADDR instead of LMA and P_PADDR addresses.
384
124b52c6
AM
3852008-05-28 Alan Modra <amodra@bigpond.net.au>
386
387 * elf32-spu.c (spu_elf_object_p): New function.
388 (elf_backend_object_p): Define.
389 (build_stub): Correct second word of 8 byte overlay stubs.
390 (spu_elf_relocate_section): Formatting.
391
bb864ac1
CES
3922008-05-24 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
393
394 * elf.c (elfcore_write_register_note): New function.
395 * elf-bfd.h (elfcore_write_register_note): New prototype.
396
da5938a2
NC
3972008-05-22 Christophe Lyon <christophe.lyon@st.com>
398
399 * elf32-arm.c (arm_type_of_stub): Ignore STT_SECTION symbols.
400 (elf32_arm_stub_add_mapping_symbol): Remove.
401 (elf32_arm_add_stub): Don't generate mapping symbols. Change
402 prototype.
403 (elf32_arm_size_stubs): Use new elf32_arm_add_stub
404 prototype. Don't generate thumb to arm glue for calls.
405 (arm_map_one_stub): Define.
406 (elf32_arm_output_arch_local_syms): Generate mapping symbols for
407 long calls stubs.
dc1859a6 408
c2f950c8
L
4092008-05-21 Nick Clifton <nickc@redhat.com>
410
411 * elf32-arm.c (group_sections): Reformat comments.
412
413 PR ld/6446
414 * elf32-frv.c (elf32_frv_relocate_section): Set EF_FRV_PIC by
415 default (for FDPIC). Clear it if any inter-segment relocations
416 are found.
417
418 * elf64-hppa.c (elf64_hppa_finalize_opd): Check NULL return
419 from elf_link_hash_lookup.
420
7fb9f789 4212008-05-21 Maxim Kuvyrkov <maxim@codesourcery.com>
dc1859a6 422
7fb9f789
NC
423 Add multi-GOT support for m68k.
424 * elf32-m68k.c (struct elf_m68k_link_hash_entry: got_entry_key,
425 glist): New fields.
426 (struct elf_m68k_got_entry_key, struct elf_m68k_got_entry,
427 struct elf_m68k_got, struct elf_m68k_bfd2got_entry,
428 struct elf_m68k_multi_got): New data structures.
429 (struct elf_m68k_link_hash_table: local_gp_p, use_neg_got_offsets_p,
430 allow_multigot_p, multi_got_): New fields.
431 (elf_m68k_multi_got): New macro.
432 (elf_m68k_link_hash_newfunc): Initialize new fields of
433 struct elf_m68k_link_hash_entry.
434 (elf_m68k_link_hash_table_create): Initialize new fields of
435 struct elf_m68k_link_hash_table.
436 (elf_m68k_link_hash_table_free): New static function implementing hook.
437 (elf_m68k_init_got, elf_m68k_clear_got, elf_m68k_create_empty_got): New
dc1859a6 438 static functions for struct elf_m68k_got.
7fb9f789
NC
439 (elf_m68k_init_got_entry_key, elf_m68k_got_entry_hash,
440 elf_m68k_got_entry_eq): New static functions for
441 struct elf_m68k_got_entry.
442 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT,
443 ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): New macros.
444 (enum elf_m68k_get_entry_howto): New enum.
445 (elf_m68k_get_got_entry, elf_m68k_update_got_entry_type,
446 elf_m68k_remove_got_entry_type): New static functions for
447 struct elf_m68k_got_entry.
448 (elf_m68k_add_entry_to_got): New static function.
449 (elf_m68k_bfd2got_entry_hash, elf_m68k_bfd2got_entry_eq,
450 elf_m68k_bfd2got_entry_del, elf_m68k_get_bfd2got_entry): New static
451 functions for struct elf_m68k_bfd2got_entry.
452 (struct elf_m68k_can_merge_gots_arg, elf_m68k_can_merge_gots_1,
453 elf_m68k_can_merge_gots): New traversal.
454 (struct elf_m68k_merge_gots_arg, elf_m68k_merge_gots_1,
455 elf_m68k_merge_gots): Ditto.
456 (struct elf_m68k_finalize_got_offsets_arg,
457 elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Ditto.
458 (struct elf_m68k_partition_multi_got_arg,
459 elf_m68k_partition_multi_got_1, elf_m68k_init_symndx2h_1,
460 elf_m68k_partition_multi_got): Ditto.
461 (elf_m68k_find_got_entry_ptr, elf_m68k_remove_got_entry): New static
462 functions.
463 (elf_m68k_copy_indirect_symbol): New static function implementing
464 a hook.
465 (elf_m68k_check_relocs): Update to add entries to multi-GOT.
466 (elf_m68k_gc_sweep_hook): Update to remove entries from multi-GOT.
467 (elf_m68k_always_size_sections): Assign BFDs to GOTs.
468 (elf_m68k_relocate_section): Update to properly handle GOT relocations.
469 (elf_m68k_finish_dynamic_symbol): Update to traverse all GOT entries
470 of a global symbol.
471 (bfd_elf_m68k_set_target_options): New function.
472 (bfd_elf32_bfd_link_hash_table_free): Define hook.
473 (bfd_elf32_bfd_final_link): Change expansion to bfd_elf_final_link
474 to skip generic calculation of GOT offsets.
475 (elf_backend_copy_indirect_symbol): Define hook.
476 * bfd-in.h (bfd_elf_m68k_set_target_options): Declare function.
477 * bfd-in2.h: Regenerate.
478