2008-11-12 Tristan Gingold <gingold@adacore.com>
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2008-11-12 Tristan Gingold <gingold@adacore.com>
2
3 * bfd.c (bfd_get_sign_extend_vma): Return 0 for mach-o.
4
5 2008-11-11 Alan Modra <amodra@bigpond.net.au>
6
7 * elf.c (assign_file_positions_for_non_load_sections): Consolidate
8 PT_GNU_RELRO handling.
9
10 2008-11-11 Alan Modra <amodra@bigpond.net.au>
11
12 PR 7012
13 * dwarf2.c (find_line): Don't keep stale pointers into realloc'd
14 memory. Return on errors. Fix memory leak.
15 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_str_buffer.
16
17 2008-11-10 Andreas Schwab <schwab@suse.de>
18
19 PR 7011
20 * elf.c (assign_file_positions_for_non_load_sections): Handle
21 PT_GNU_RELRO specially.
22
23 2008-11-06 Joel Sherrill <joel.sherrill@oarcorp.com>
24
25 * config.bfd: Add m32c-*-rtems* and m32r-*-rtems*.
26
27 2008-11-06 Tom Tromey <tromey@redhat.com>
28
29 * configure, config.in: Rebuild.
30 * configure.in: Check for fileno.
31 * bfdio.c (close_on_exec): New function.
32 (real_fopen): Use it.
33 (FD_CLOEXEC): New define.
34
35 2008-11-06 Tristan Gingold <gingold@adacore.com>
36
37 * mach-o.h (BFD_MACH_O_NO_SECT): Add; reorders the macros.
38 (BFD_MACH_O_SYM_NTYPE, BFD_MACH_O_SYM_NSECT,
39 BFD_MACH_O_SYM_NDESC): New macros.
40 (bfd_mach_o_i386_thread_flavour): Define according to the latest
41 definition from system header.
42 (bfd_mach_o_load_command_type): Add BFD_MACH_O_LC_RPATH,
43 BFD_MACH_O_LC_CODE_SIGNATURE.
44 (BFD_MACH_O_SECTION_TYPE_MASK, BFD_MACH_O_SECTION_ATTRIBUTES_MASK,
45 BFD_MACH_O_SECTION_ATTRIBUTES_SYS, BFD_MACH_O_SECTION_ATTRIBUTES_USR,
46 BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
47 BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
48 BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): Add.
49 (bfd_mach_o_segment_command): Add room for a nul terminator in
50 segname field.
51 (BFD_MACH_O_PROT_READ, BFD_MACH_O_PROT_WRITE,
52 BFD_MACH_O_PROT_EXECUTE): Add.
53 (INDIRECT_SYMBOL_LOCAL): Renames to BFD_MACH_O_INDIRECT_SYMBOL_LOCAL.
54 (INDIRECT_SYMBOL_ABS): Renames to BFD_MACH_O_INDIRECT_SYMBOL_ABS.
55 (bfd_mach_o_uuid_command): Add the structure.
56 (bfd_mach_o_load_command): Add uuid field.
57 (bfd_get_mach_o_data): New macro.
58 * mach-o.c (bfd_mach_o_bfd_print_private_bfd_data): New function which
59 replaces the macro.
60 (SECTION_TYPE, SECTION_ATTRIBUTES, SECTION_ATTRIBUTES_USR,
61 S_ATTR_PURE_INSTRUCTIONS, SECTION_ATTRIBUTES_SYS,
62 S_ATTR_SOME_INSTRUCTIONS, S_ATTR_EXT_RELOC, S_ATTR_LOC_RELOC): Renamed
63 and moved to mach-o.h.
64 (N_STAB, N_TYPE, N_EXT, N_UNDF, N_ABS, N_TEXT, N_DATA, N_BSS,
65 N_SECT, N_INDR): Removed as they duplicated macros in mach-o.h.
66 (bfd_mach_o_print_symbol): Print much more details.
67 (bfd_mach_o_make_bfd_section): Add prot argument, use canonical
68 dwarf name for dwarf sections. Precisely set section flags.
69 (bfd_mach_o_scan_read_section_32): Add prot argument.
70 (bfd_mach_o_scan_read_section_64): Ditto.
71 (bfd_mach_o_scan_read_section): Ditto.
72 (bfd_mach_o_scan_read_symtab_symbol): Set section for debugging
73 stabs, set BSF_GLOBAL and LOCAL flags correctly. Fix section
74 for N_SECT symbols.
75 (bfd_mach_o_i386_flavour_string): Reindent and adjust for new
76 names.
77 (bfd_mach_o_scan_read_symtab): Set HAS_SYMS flags on bfd if there
78 are symbols.
79 (bfd_mach_o_scan_read_uuid): New function.
80 (bfd_mach_o_scan_read_segment): Add a trailing nul. Segments
81 flags are now simply HAS_CONTENTS. Pass protection to
82 bfd_mach_o_scan_read_section.
83 (bfd_mach_o_scan_read_command): Decode UUID command.
84 (bfd_mach_o_flatten_sections): Add comments. Fix flavour names.
85 (bfd_mach_o_scan): Set flags according to file type.
86 (mach_o_fat_archentry): Remove abfd field.
87 (bfd_mach_o_archive_p): Remove initialization of abfd field.
88 (bfd_mach_o_openr_next_archived_file): Find previous archive
89 by position and not by bfd (as former bfds may have been freed).
90 Give architecture name to archived file.
91 * mach-o-target.c (TARGET_NAME): Use generic archive for non fat
92 targets.
93
94 2008-10-30 Jay Krell <jay.krell@cornell.edu>
95
96 * cache.c (cache_bread): Cast void * pointer before performing
97 arithmetic on it.
98
99 2008-10-20 Alan Modra <amodra@bigpond.net.au>
100
101 * elf64-ppc.c (ppc64_elf_process_dot_syms): Renamed from
102 ppc64_elf_check_directives.
103 * elf32-sh-symbian.c (sh_symbian_process_directives): Combine..
104 (sh_symbian_check_directives): ..this
105 (bfd_elf32_sh_symbian_process_directives) ..and this function.
106
107 2008-10-20 Alan Modra <amodra@bigpond.net.au>
108
109 * elflink.c (bfd_elf_final_link): Move code reading relocs to..
110 * elf32-spu.c (spu_elf_count_relocs): ..here. Adjust params.
111 * elf-bfd.h (struct elf_backend_data): Update elf_backend_count_relocs
112 params.
113
114 2008-10-20 Alan Modra <amodra@bigpond.net.au>
115
116 * elflink.c (bfd_elf_final_link): Use d_ptr rather than d_val
117 where Elf_Internal_Dyn holds an address.
118
119 2008-10-10 Nathan Froyd <froydnj@codesourcery.com>
120
121 * elf32-ppc.c (ppc_elf_merge_obj_attributes): Merge
122 Tag_GNU_Power_ABI_Struct_Return.
123
124 2008-10-09 Kai Tietz <kai.tietz@onevision.com>
125
126 * cofflink.c (_bfd_coff_generic_relocate_section): Dump bfd_vma
127 sized addresses instead of long sized.
128
129 2008-10-09 Alan Modra <amodra@bigpond.net.au>
130
131 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't attempt to
132 read plt relocs if no dynamic syms.
133
134 2008-10-08 Nick Clifton <nickc@redhat.com>
135
136 * configure.in (ALL_LINGUAS): Add "id".
137 * configure: Regenerate.
138 * po/id.po: New Indonesian translation.
139
140 2008-10-08 Alan Modra <amodra@bigpond.net.au>
141
142 * elf.c (assign_file_positions_for_load_sections): When checking
143 a segment for contents, don't assume that a non-TLS nobits section
144 must only be followed by nobits sections.
145
146 2008-10-04 Hans-Peter Nilsson <hp@axis.com>
147
148 * elf32-cris.c (TLSHOWTO32, TLSHOWTO16): New macros.
149 (cris_elf_howto_table): Add entries for R_CRIS_32_GOT_GD,
150 R_CRIS_16_GOT_GD, R_CRIS_32_GD, R_CRIS_DTP, R_CRIS_32_DTPREL,
151 R_CRIS_16_DTPREL, R_CRIS_DTPMOD, R_CRIS_32_GOT_TPREL,
152 R_CRIS_16_GOT_TPREL, R_CRIS_32_TPREL, R_CRIS_16_TPREL.
153 (cris_reloc_map): Similarly.
154 * reloc.c (bfd_reloc_code_type): Add entries for
155 BFD_RELOC_CRIS_32_GOT_GD, BFD_RELOC_CRIS_16_GOT_GD,
156 BFD_RELOC_CRIS_32_GD, BFD_RELOC_CRIS_DTP,
157 BFD_RELOC_CRIS_32_DTPREL, BFD_RELOC_CRIS_16_DTPREL,
158 BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_GOT_TPREL,
159 BFD_RELOC_CRIS_16_GOT_TPREL, BFD_RELOC_CRIS_32_TPREL,
160 BFD_RELOC_CRIS_16_TPREL.
161 * libbfd.h, bfd-in2.h: Regenerate.
162
163 2008-10-03 Alan Modra <amodra@bigpond.net.au>
164
165 PR 6931
166 * elf.c (bfd_elf_set_group_contents): Assign sh_info for ld -r when
167 the signature symbol is global.
168 * elflink.c (elf_link_input_bfd): Ensure group signature symbol
169 is output when ld -r. Set group sh_info when local.
170 * linker.c (default_indirect_link_order): Handle group sections
171 specially.
172
173 2008-09-30 Wesley W. Terpstra <wesley@terpstra.ca>
174 Nick Clifton <nickc@redhat.com>
175
176 * coffgen.c (coff_write_symbols): Check to see if a symbol's flags
177 do not match it class and if necessary update the class.
178 (null_error_handler): New function. Suppresses the generation of
179 bfd error messages.
180 * coff64-rs6000.c (bfd_xcoff_backend_data): Update comment.
181
182 2008-09-30 Alan Modra <amodra@bigpond.net.au>
183
184 * Makefile.am: Run "make dep-am".
185 * Makefile.in: Regenerate.
186
187 2008-09-30 Alan Modra <amodra@bigpond.net.au>
188
189 * elflink.c (elf_link_add_object_symbols): Don't ignore returned
190 value of check_directives.
191
192 2008-09-29 Peter O'Gorman <pogma@thewrittenword.com>
193 Steve Ellcey <sje@cup.hp.com>
194
195 * configure: Regenerate for new libtool.
196 * aclocal.m4: Ditto.
197 * Makefile.in: Ditto.
198 * doc/Makefile.in: Ditto.
199
200 2008-09-29 Alan Modra <amodra@bigpond.net.au>
201
202 PR 6789
203 * elf.c (assign_file_positions_for_load_sections): Call
204 _bfd_elf_map_sections_to_segments, not elf_modify_segment_map.
205 (get_program_header_size): Protect against NULL info.
206 (_bfd_elf_map_sections_to_segments): Likewise.
207 * elf32-spu.c (spu_elf_additional_program_headers): Likewise.
208
209 2008-09-29 Nick Clifton <nickc@redhat.com>
210
211 * po/vi.po: Updated Vietnamese translation.
212
213 2008-09-28 Alan Modra <amodra@bigpond.net.au>
214
215 * elf.c (_bfd_elf_init_private_section_data): Tweak union copy.
216 (bfd_section_from_shdr): Don't change SHT_GROUP section name.
217 * elflink.c (section_signature): New function.
218 (_bfd_elf_section_already_linked): Use it.
219
220 2008-09-19 Alan Modra <amodra@bigpond.net.au>
221
222 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Handle vxworks
223 _GLOBAL_OFFSET_TABLE_ in .got.plt section. Add BFD_ASSERTs.
224
225 2008-09-17 Bob Wilson <bob.wilson@acm.org>
226
227 * elf32-xtensa.c (elf_xtensa_check_relocs): Check for negative
228 refcount.
229
230 2008-09-17 Jan Kratochvil <jan.kratochvil@redhat.com>
231
232 PR 6893 - Do not consider FDEs for discarded sections as invalid.
233 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): New REQUIRE_CLEARED_RELOCS.
234 Consider FDEs with cleared relocations as valid and ignorable.
235
236 2008-09-16 H.J. Lu <hongjiu.lu@intel.com>
237
238 PR ld/6877
239 * elflink.c (_bfd_elf_merge_symbol): Allow a common symbol to
240 override the function in a shared library.
241
242 2008-09-16 Alan Modra <amodra@bigpond.net.au>
243
244 PR 6844
245 * elf32-ppc.c (SYM_VAL): Define. Use throughout to find symbol vma.
246 (ppc_elf_relocate_section): Correct GOT offset calculation.
247 (ppc_elf_finish_dynamic_symbol): Use PPC_HA and PPC_LO.
248 (ppc_elf_finish_dynamic_sections): Likewise. Error if
249 htab->elf.hgot symbol is not defined in htab->got section.
250
251 2008-09-16 Alan Modra <amodra@bigpond.net.au>
252
253 PR 6888
254 * elf32-ppc.c (ppc_elf_relocate_section): Handle NULL symbol section
255 on R_PPC_TOC16, R_PPC_SDAREL16, R_PPC_EMB_SDA2REL, R_PPC_EMB_SDA21,
256 R_PPC_EMB_RELSDA, R_PPC_SECTOFF* relocs.
257
258 2008-09-11 Jan Kratochvil <jan.kratochvil@redhat.com>
259
260 Fix loading large elf64 binaries on 32bit hosts.
261 * configure.in: Call AC_SYS_LARGEFILE.
262 * config.in: Regenerate.
263 * configure: Regenerate.
264
265 2008-09-08 Tom Tromey <tromey@redhat.com>
266
267 * elfxx-mips.c (mips16_stub_symndx) <sec>: Mark argument as
268 unused.
269
270 2008-09-08 H.J. Lu <hongjiu.lu@intel.com>
271 Daniel Jacobowitz <dan@codesourcery.com>
272
273 PR ld/3191
274 * dwarf2.c (struct adjusted_section): Renamed from struct
275 loadable_section.
276 (struct dwarf2_debug): Adjust for renaming. Add version field.
277 (read_attribute_value): Correctly handle DW_FORM_ref_addr for
278 DWARF3.
279 (find_abstract_instance_name): Pass a pointer to
280 attribute instead of offset. For DW_FORM_ref_addr, get the
281 entry at the offset from the .debug_info section.
282 (scan_unit_for_symbols): Update.
283 (parse_comp_unit): Allow DWARF3. Save the version.
284 (unset_sections): Update for renaming.
285 (place_sections): Likewise. Set new VMAs for DWARF sections
286 also.
287
288 2008-09-08 Tristan Gingold <gingold@adacore.com>
289
290 * configure.in: Update version to 2.19.50
291 * configure: Regenerated.
292
293 2008-09-05 Daniel Jacobowitz <dan@codesourcery.com>
294
295 * dwarf2.c: Change leading whitespace to tabs.
296
297 2008-09-05 Tristan Gingold <gingold@adacore.com>
298
299 Add MacOSX 64 bits support.
300 * mach-o.h (bfd_mach_o_ppc_thread_flavour): Add
301 BFD_MACH_O_PPC_THREAD_STATE_64.
302 (bfd_mach_o_i386_thread_flavour): Add BFD_MACH_O_x86_THREAD_STATE64,
303 BFD_MACH_O_x86_FLOAT_STATE64, BFD_MACH_O_x86_EXCEPTION_STATE64,
304 BFD_MACH_O_x86_THREAD_STATE, BFD_MACH_O_x86_FLOAT_STATE,
305 BFD_MACH_O_x86_EXCEPTION_STATE.
306 (bfd_mach_o_load_command_type): Add
307 BFD_MACH_O_LC_SEGMENT_64, BFD_MACH_O_LC_ROUTINES_64,
308 BFD_MACH_O_LC_UUID.
309 (BFD_MACH_O_CPU_IS64BIT): Added.
310 (bfd_mach_o_cpu_type): Add BFD_MACH_O_CPU_TYPE_POWERPC_64,
311 BFD_MACH_O_CPU_TYPE_X86_64.
312 (bfd_mach_o_header): Add version field.
313 (bfd_mach_o_section) Add reserved3 field.
314 (bfd_mach_o_segment_command): Add initprot and maxprot fields.
315
316 * mach-o.c (N_TEXT, N_DATA, N_BSS): Added.
317 (bfd_mach_o_version): New function.
318 (bfd_mach_o_valid): Handle 64bits cpus.
319 (bfd_mach_o_write_header): handler 64bits headers.
320 (bfd_mach_o_scan_write_section_32, bfd_mach_o_scan_write_section_64):
321 New functions (from bfd_mach_o_scan_write_section) to handle both
322 flavors.
323 (bfd_mach_o_scan_write_segment): Parameter wide added to support
324 both flavors.
325 (bfd_mach_o_write_contents): Support both flavors.
326 (bfd_mach_o_read_header): Ditto.
327 (bfd_mach_o_scan_read_section_32, bfd_mach_o_scan_read_section_64):
328 New functions (from bfd_mach_o_scan_read_section) to support both
329 flavors.
330 (bfd_mach_o_scan_read_symtab_symbol): Support both flavors.
331 (bfd_mach_o_scan_read_symtab): Ditto.
332 (bfd_mach_o_scan_read_segment): Parameter wide added to support
333 both flavors.
334 (bfd_mach_o_scan_read_segment_32, bfd_mach_o_scan_read_segment_64):
335 New functions to call bfd_mach_o_scan_read_segment.
336 (bfd_mach_o_flatten_sections): Support both flavors.
337 (bfd_mach_o_scan_start_address): Ditto.
338 (bfd_mach_o_scan): Ditto.
339 (bfd_mach_o_lookup_section): Ditto.
340
341 2008-08-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
342
343 * elf-hppa.h (elf_hppa_reloc_final_type): Handle R_PARISC_GPREL64,
344 R_PARISC_SEGREL32 and R_PARISC_SEGREL64.
345 * som.c (som_fixup_formats): Add R_DATA_GPREL fixup.
346 (som_hppa_howto_table): Likewise.
347 (hppa_som_gen_reloc_type): In case R_HPPA_GOTOFF, detect R_DATA_GPREL
348 final type.
349 (som_write_fixups): Handle R_DATA_GPREL.
350
351 2008-08-26 Nick Clifton <nickc@redhat.com>
352
353 * elf32-arm.c: Fix up comment describing Thumb to ARM interworking
354 stub.
355
356 2008-08-25 Christophe Lyon <christophe.lyon@st.com>
357
358 * elf32-arm.c (arm_thumb_arm_v4t_short_branch_stub): Define.
359 (elf32_arm_stub_type): Add arm_thumb_arm_v4t_stub_short_branch.
360 (arm_type_of_stub): Handle armv4t short branches. Update
361 prototype.
362 (arm_stub_is_thumb): Handle arm_thumb_arm_v4t_stub_short_branch.
363 (arm_build_one_stub): Likewise.
364 (arm_size_one_stub): Likewise.
365 (elf32_arm_size_stubs): Use new arm_type_of_stub prototype.
366 (arm_map_one_stub): Handle arm_thumb_arm_v4t_stub_short_branch.
367
368 2008-08-24 Andreas Schwab <schwab@suse.de>
369
370 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Do proper
371 extension when calculating difference of offsets.
372
373 2008-08-24 Alan Modra <amodra@bigpond.net.au>
374
375 * configure.in: Update a number of obsolete autoconf macros.
376 * aclocal.m4: Regenerate.
377
378 2008-08-23 Andreas Schwab <schwab@suse.de>
379
380 * opncls.c (find_separate_debug_file): Use the canonical
381 absolute name of the bfd object for finding the debug file in
382 the global debugfile directory.
383
384 2008-08-22 Jakub Jelinek <jakub@redhat.com>
385
386 Fix PR ld/3290 regression for cross-files DW_FORM_ref_addr relocations.
387 * elflink.c (elf_link_add_object_symbols): Make debug symbols local
388 now only for non-RELOCATABLE targets.
389
390 2008-08-20 Bob Wilson <bob.wilson@acm.org>
391
392 * elf-bfd.h (elf_object_id): Add XTENSA_ELF_TDATA.
393 * elf32-xtensa.c (elf_howto_table): Add TLS relocations.
394 (elf_xtensa_reloc_type_lookup): Likewise.
395 (TCB_SIZE): Define.
396 (elf_xtensa_link_hash_entry): New.
397 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE, GOT_TLS_ANY): Define.
398 (elf_xtensa_hash_entry): Define.
399 (elf_xtensa_obj_tdata): New.
400 (elf_xtensa_tdata): Define.
401 (elf_xtensa_local_got_tls_type): Define.
402 (elf_xtensa_local_tlsfunc_refcounts): Define.
403 (is_xtensa_elf): Define.
404 (elf_xtensa_mkobject): New.
405 (elf_xtensa_link_hash_table): Add tlsbase field.
406 (elf_xtensa_link_hash_newfunc): New.
407 (elf_xtensa_link_hash_table_create): Use elf_xtensa_link_hash_newfunc.
408 Create an entry for "_TLS_MODULE_BASE_" and save it in tlsbase field.
409 (elf_xtensa_copy_indirect_symbol): New.
410 (elf_xtensa_check_relocs): Rewrite to handle TLS relocations.
411 (elf_xtensa_gc_sweep_hook): Likewise.
412 (elf_xtensa_allocate_dynrelocs): Optimize away GOT entries for
413 TLSDESC_FN relocations when an IE reference is seen.
414 (elf_xtensa_allocate_local_got_size): Likewise.
415 (elf_xtensa_always_size_sections): New.
416 (dtpoff_base, tpoff): New.
417 (elf_xtensa_do_reloc): Handle TLS relocations.
418 (replace_tls_insn): New.
419 (IS_XTENSA_TLS_RELOC): Define.
420 (elf_xtensa_relocate_section): Handle TLS relocations.
421 (get_indirect_call_dest_reg): New.
422 (bfd_elf32_mkobject): Define.
423 (elf_backend_always_size_sections): New.
424 (elf_backend_copy_indirect_symbol): New.
425 * reloc.c (BFD_RELOC_XTENSA_TLSDESC_FN, BFD_RELOC_XTENSA_TLSDESC_ARG)
426 (BFD_RELOC_XTENSA_TLS_DTPOFF, BFD_RELOC_XTENSA_TLS_TPOFF)
427 (BFD_RELOC_XTENSA_TLS_FUNC, BFD_RELOC_XTENSA_TLS_ARG)
428 (BFD_RELOC_XTENSA_TLS_CALL): New.
429 * bfd-in2.h: Regenerate.
430 * libbfd.h: Regenerate.
431
432 2008-08-18 Richard Sandiford <rdsandiford@googlemail.com>
433
434 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Copy MIPS16
435 stub information.
436
437 2008-08-17 Nick Clifton <nickc@redhat.com>
438
439 * elf32-arm.c: Tidy up the code.
440 (bfd_elf32_arm_allocate_interworking_sections): Move common code
441 into...
442 (arm_allocate_glue_section_space): ... New function.
443 (bfd_elf32_arm_add_glue_sections_to_bfd): Move common code
444 into...
445 (arm_make_glue_section): ... New function.
446
447 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Handle the situation
448 where the sym_hashes are not available.
449
450 2008-08-17 Alan Modra <amodra@bigpond.net.au>
451
452 * bfd.c (struct _bfd): Correct outsymbols comment.
453 * bfd-in2.h: Regenerate.
454 * linker.c (bfd_generic_link_read_symbols): Renamed from..
455 (generic_link_read_symbols): ..this, and made global.
456
457 2008-08-15 Alan Modra <amodra@bigpond.net.au>
458
459 PR 6526
460 * configure.in: Invoke AC_USE_SYSTEM_EXTENSIONS.
461 * Makefile.in: Regenerate.
462 * aclocal.m4: Regenerate.
463 * config.in: Regenerate.
464 * configure: Regenerate.
465
466 2008-08-14 Jaka Močnik <jaka@xlab.si>
467
468 * coffgen.c (coff_find_nearest_line): Correct cached line index.
469
470 2008-08-12 Alan Modra <amodra@bigpond.net.au>
471
472 * elf32-ppc.c (allocate_dynrelocs): Ignore dyn_relocs when
473 !dynamic_sections_created. Don't make symbols with got
474 references dynamic if !dynamic_sections_created.
475 * elf64-ppc.c (allocate_dynrelocs): Likewise. Alloc dynamic
476 relocs on undefined symbols.
477 (ppc64_elf_relocate_section): Allow dynamic relocs on
478 undefined symbols.
479
480 2008-08-11 Alan Modra <amodra@bigpond.net.au>
481
482 * elf64-ppc.c (toc_adjusting_stub_needed): Any call via the plt
483 needs r2 valid, not just those to external syms.
484
485 2008-08-09 Pedro Alves <pedro@codesourcery.com>
486
487 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Cast stat
488 st_mtime to long before comparison.
489
490 2008-08-08 Anatoly Sokolov <aesok@post.ru>
491
492 * archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
493 bfd_mach_avr51): New.
494 * bfd-in2.h: Regenerate.
495 * cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
496 architectures. Change comments to match architecture comments in GCC.
497 (compatible): Add test for new AVR architectures.
498 * elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
499 bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
500 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
501 E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
502
503
504 2008-08-08 Richard Sandiford <rdsandiford@googlemail.com>
505 Daniel Jacobowitz <dan@codesourcery.com>
506 Catherine Moore <clm@codesourcery.com>
507 Mark Shinwell <shinwell@codesourcery.com>
508 Maxim Kuvyrkov <maxim@codesourcery.com>
509
510 * elf32-mips.c (mips_vxworks_copy_howto_rela): Replace with...
511 (elf_mips_copy_howto): ...this howto. Clear the size fields.
512 (mips_vxworks_jump_slot_howto_rela): Replace with...
513 (elf_mips_jump_slot_howto): ...this howto.
514 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
515 and BFD_RELOC_MIPS_JUMP_SLOT.
516 (bfd_elf32_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
517 "R_MIPS_JUMP_SLOT".
518 (mips_elf32_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT.
519 (elf_backend_plt_readonly): Define.
520 (elf_backend_plt_sym_val): Define for non-VxWorks targets.
521 (mips_vxworks_bfd_reloc_type_lookup): Delete.
522 (mips_vxworks_bfd_reloc_name_lookup): Likewise.
523 (mips_vxworks_rtype_to_howto): Likewise.
524 (elf_backend_want_dynbss): Don't define for VxWorks.
525 (elf_backend_plt_readonly): Likewise.
526 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
527 (bfd_elf32_bfd_reloc_name_lookup): Likewise.
528 (elf_backend_mips_rtype_to_howto): Likewise.
529 (elf_backend_adjust_dynamic_symbol): Likewise.
530 (elf_backend_got_symbol_offset): Don't define.
531 * elfn32-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto): New.
532 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
533 and BFD_RELOC_MIPS_JUMP_SLOT.
534 (bfd_elf32_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
535 "R_MIPS_JUMP_SLOT".
536 (mips_elf32_n32_rtype_to_howto): Handle R_MIPS_COPY and
537 R_MIPS_JUMP_SLOT.
538 (elf_backend_rela_plts_and_copies_p, elf_backend_plt_readonly)
539 (elf_backend_plt_sym_val): Define.
540 * elf64-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto): New.
541 (bfd_elf64_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
542 and BFD_RELOC_MIPS_JUMP_SLOT.
543 (bfd_elf64_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
544 "R_MIPS_JUMP_SLOT".
545 (mips_elf64_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT.
546 (elf_backend_rela_plts_and_copies_p, elf_backend_plt_readonly)
547 (elf_backend_plt_sym_val): Define.
548 * elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Delete.
549 (_bfd_mips_elf_use_plts_and_copy_relocs, _bfd_mips_elf_init_stubs)
550 (_bfd_mips_elf_plt_sym_val, _bfd_mips_post_process_headers): Declare.
551 * elfxx-mips.c (mips_elf_la25_stub): New structure.
552 (LA25_LUI, LA25_J, LA25_ADDIU): New macros.
553 (mips_elf_link_hash_entry): Add "la25_stubs", "has_static_relocs"
554 and "has_nonpic_branches" fields. Remove "is_relocation_target" and
555 "is_branch_target".
556 (mips_elf_link_hash_table): Add blank lines. Add
557 "use_plts_and_copy_relocs", "reserved_gotno", "strampoline",
558 "la25_stubs" and "add_stub_section" fields.
559 (mips_htab_traverse_info): New structure.
560 (PIC_OBJECT_P, MIPS_ELF_LOAD_WORD): New macros.
561 (MIPS_RESERVED_GOTNO): Delete.
562 (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry)
563 (mips_n64_exec_plt0_entry, mips_exec_plt_entry): New tables.
564 (mips_elf_link_hash_newfunc): Update after the changes to
565 mips_elf_link_hash_entry.
566 (mips_elf_check_mips16_stubs): Replace the DATA parameter with
567 an INFO parameter. Don't look through warnings symbols here;
568 do it in mips_elf_check_symbols instead.
569 (mips_elf_create_stub_symbol): New function.
570 (mips_elf_la25_stub_hash, mips_elf_la25_stub_eq): New functions.
571 (_bfd_mips_elf_init_stubs, mips_elf_local_pic_function_p): Likewise.
572 (mips_elf_add_la25_intro, mips_elf_add_la25_trampoline): Likewise.
573 (mips_elf_add_la25_stub, mips_elf_check_symbols): New functions.
574 (mips_elf_gotplt_index): Check for VxWorks.
575 (mips_elf_output_dynamic_relocation): Take the relocation index
576 as an extra parameter. Do not increment reloc_count here.
577 (mips_elf_initialize_tls_slots): Update the calls to
578 mips_elf_output_dynamic_relocation accordingly.
579 (mips_elf_multi_got): Use htab->reserved_gotno instead of
580 MIPS_RESERVED_GOTNO.
581 (mips_elf_create_got_section): Don't allocate reserved GOT
582 entries here. Unconditionally create .got.plt, but don't
583 set its alignment here.
584 (mips_elf_relocation_needs_la25_stub): New function.
585 (mips_elf_calculate_relocation): Redirect branches and jumps to
586 a non-PIC stub if one exists. Check !h->has_static_relocs instead
587 of !htab->is_vxworks when deciding whether to create dynamic
588 relocations for R_MIPS_32, R_MIPS_REL32 and R_MIPS_64.
589 (_bfd_mips_elf_create_dynamic_sections): Unconditionally call
590 _bfd_elf_create_dynamic_sections. Unconditionally set up
591 htab->splt and htab->sdynbss. Set htab->srelplt to ".rel.plt"
592 if !htab->is_vxworks. Add non-VxWorks values of
593 htab->plt_header_size and htab->plt_entry_size.
594 (_bfd_mips_elf_check_relocs): Set pointer_equality_needed for
595 non-branch static relocations. Set has_nonpic_branches when an la25
596 stub might be required. Set can_make_dynamic_p to TRUE if R_MIPS_32,
597 R_MIPS_REL32 and R_MIPS_64 relocations can be made dynamic,
598 rather than duplicating the condition. Do not make them dynamic
599 for read-only sections in non-PIC executable objects.
600 Do not protect this code with dynobj == NULL || htab->sgot == NULL;
601 handle each group of cases separately. Add a default case that
602 sets has_static_relocs for non-GOT relocations that cannot be
603 made dynamic. Don't set is_relocation_target and is_branch_target.
604 Reject non-PIC static relocations in shared objects.
605 (_bfd_mips_vxworks_adjust_dynamic_symbol): Fold into...
606 (_bfd_mips_elf_adjust_dynamic_symbol): ...here, using
607 htab->use_plts_and_copy_relocs instead of htab->is_vxworks
608 to select PLT and copy-reloc handling. Set the alignment of
609 .plt and .got.plt when allocating the first entry. Generalize
610 code to handle REL as well as RELA sections and 64-bit as well as
611 32-bit GOT entries. Complain if we find a static-only reloc
612 against an externally-defined symbol and if we cannot create
613 dynamic relocations for it. Allocate copy relocs using
614 mips_elf_allocate_dynamic_relocations on non-VxWorks targets.
615 Set possibly_dynamic_relocs to 0 when using PLTs or copy relocs.
616 Skip reserved .got.plt entries.
617 (_bfd_mips_elf_always_size_sections): Use mips_elf_check_symbols
618 instead of mips_elf_check_mips16_stubs to process each symbol.
619 Do the traversal for relocatable objects too.
620 (mips_elf_lay_out_got): Use htab->reserved_gotno instead of
621 MIPS_RESERVED_GOTNO.
622 (_bfd_mips_elf_size_dynamic_sections): Exclude sdynbss if it
623 is empty. Extend the DT_PLTREL, DT_JMPREL and DT_PLTRELSZ handling
624 to non-VxWorks targets. Only add DT_REL{,A}, DT_REL{,A}SZ and
625 DT_REL{,A}ENT if .rel.dyn is nonempty. Create a symbol for the
626 PLT. Allocate a nop at the end of the PLT. Allocate DT_MIPS_PLTGOT.
627 (mips_elf_create_la25_stub_info): New function.
628 (_bfd_mips_elf_finish_dynamic_symbol): Write out PLT entries
629 and copy relocs where necessary. Check pointer_equality_needed.
630 (mips_finish_exec_plt): New function.
631 (_bfd_mips_elf_finish_dynamic_sections): Always set DT_PLTGOT
632 to the beginning of htab->sgot. Use htab->reserved_gotno instead
633 of MIPS_RESERVED_GOTNO. Assert htab->use_plts_and_copy_relocs
634 instead of htab->is_vxworks for DT_PLTREL, DT_PLTRELSZ and DT_JMPREL.
635 Set DT_PLTREL to DT_REL instead of DT_RELA on non-VxWorks targets.
636 Use mips_finish_exec_plt to create non-VxWorks PLT headers. Set
637 DT_MIPS_PLTGOT.
638 (_bfd_mips_elf_copy_indirect_symbol): Copy has_static_relocs
639 from the indirect symbol to the direct symbol. Also copy
640 has_nonpic_branches for indirect symbols.
641 (_bfd_mips_elf_get_target_dtag): Handle DT_MIPS_PLTGOT and
642 DT_MIPS_RWPLT.
643 (_bfd_mips_elf_link_hash_table_create): Initialize the new
644 mips_elf_link_hash_table fields.
645 (_bfd_mips_vxworks_link_hash_table_create): Set
646 use_plts_and_copy_relocs to TRUE. Use TRUE rather than 1
647 when setting is_vxworks.
648 (_bfd_mips_elf_use_plts_and_copy_relocs): New function.
649 (_bfd_mips_elf_final_link): Call mips_elf_create_la25_stub for
650 each la25_stub.
651 (_bfd_mips_elf_merge_private_bfd_data): Treat dynamic objects
652 as PIC. Generalize message about linking PIC and non-PIC.
653 (_bfd_mips_elf_plt_sym_val, _bfd_mips_post_process_headers): New
654 functions.
655 * reloc.c: Update comment near BFD_RELOC_MIPS_JUMP_SLOT.
656 * bfd-in2.h: Regenerated.
657
658 2008-08-08 Alan Modra <amodra@bigpond.net.au>
659
660 * elf.c (bfd_elf_get_elf_syms): Don't leak memory on error.
661 * elflink.c (_bfd_elf_link_read_relocs): bfd_release on error.
662 (elf_link_add_object_symbols): Don't leak memory on error.
663 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
664 (elf_fixup_link_order): Free sections.
665
666 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
667
668 * elf-bfd.h (elf_backend_data): Add a "rela_plts_and_copies_p" field.
669 * elfxx-target.h (elf_backend_rela_plts_and_copies_p): New macro.
670 (elfNN_bed): Use it.
671 * elf.c (_bfd_elf_get_synthetic_symtab): Use rela_plts_and_copies_p
672 instead of default_use_rela_p to choose between ".rel.plt" and
673 ".rela.plt".
674 * elflink.c (_bfd_elf_create_dynamic_sections): Use
675 rela_plts_and_copies_p instead of default_use_rela_p to choose
676 between ".rel.plt" and ".rela.plt", and between ".rel.bss" and
677 ".rela.bss".
678
679 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
680
681 * elf-bfd.h (MIPS_ELF_TDATA): New elf_object_id.
682 * elf32-mips.c (bfd_elf32_mkobject): Define.
683 * elf64-mips.c (bfd_elf64_mkobject): Likewise.
684 * elfn32-mips.c (bfd_elf32_mkobject): Likewise.
685 * elfxx-mips.h (_bfd_mips_elf_mkobject): Declare.
686 * elfxx-mips.c (is_mips_elf): New macro.
687 (_bfd_mips_elf_mkobject): New function.
688 (_bfd_mips_elf_final_link): Use is_mips_elf.
689 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
690
691 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
692
693 * elfxx-mips.c (mips_elf_record_relocs): Defer allocation of a
694 global GOT entry when deferring allocation of dynamic relocations.
695 (allocate_dynrelocs): When allocating deferred dynamic relocations,
696 also do the deferred allocation of a GOT entry.
697
698 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
699
700 * elfxx-mips.c (mips_got_info): Add a "reloc_only_gotno" field.
701 (mips_elf_got_section): Delete.
702 (mips_elf_sort_hash_table): Use g->reloc_only_gotno to decide
703 how many reloc-only entries there are.
704 (mips_elf_count_got_symbols): Adjust g->reloc_only_gotno as
705 well as g->global_gotno.
706 (mips_elf_make_got_per_bfd): Initialize reloc_only_gotno.
707 (mips_elf_multi_got): Likewise. Use gg->reloc_only_gotno
708 rather than gg->assigned_gotno to store the number of
709 reloc-only GOT entries.
710 (mips_elf_create_got_section): Remove the MAYBE_EXCLUDE parameter.
711 Initialize reloc_only_gotno.
712 (mips_elf_calculate_relocation): Check htab->got_info instead of
713 dynobj when deciding whether to call mips_elf_adjust_gp,
714 (_bfd_mips_elf_create_dynamic_sections): Adjust the call
715 to mips_elf_create_got_section.
716 (mips_elf_record_relocs): Likewise. Remove redundant
717 "dynobj == NULL" code. Do not use mips_elf_create_got_section
718 or mips_elf_record_global_got_symbol for R_MIPS_32, R_MIPS_REL32
719 and R_MIPS_64; limit global_got_area to GGA_RELOC_ONLY instead.
720 (_bfd_mips_elf_finish_dynamic_symbol): Use htab->sgot instead
721 of mips_elf_got_section.
722 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
723 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
724 Move the initial assignment of G to the block that uses it;
725 it is used for an unrelated purpose later.
726
727 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
728
729 * elfxx-mips.c (count_section_dynsyms): Move before the new first use.
730 (mips_elf_sort_hash_table): Take the output bfd as a parameter.
731 Remove the MAX_LOCAL parameter. Exit early if there are no
732 dynamic symbols, if there is no dynobj, or if there is no
733 GOT section. Use count_section_dynsyms instead of MAX_LOCAL.
734 Assert == rather than <= when checking hsd.max_unref_got_dynindx.
735 Also assert that g->global_gotno is right.
736 (mips_elf_count_forced_local_got_symbols): Rename to...
737 (mips_elf_count_got_symbols): ...and count global GOT entries too.
738 Set the global_got_area of a forced-local GGA_RELOC_ONLY symbol
739 to GGA_NONE.
740 (mips_elf_multi_got): Don't sort the symbol table.
741 (mips_elf_lay_out_got): Likewise. Use mips_elf_count_got_symbols
742 to count the number of global GOT entries.
743 (_bfd_mips_elf_final_link): Unconditionally call
744 mips_elf_sort_hash_table.
745
746 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
747
748 * elfxx-mips.c (GGA_NORMAL, GGA_RELOC_ONLY, GGA_NONE): New macros.
749 (mips_elf_link_hash_entry): Add a "global_got_area" field.
750 (mips_elf_link_hash_newfunc): Initialize it.
751 (mips_elf_sort_hash_table_f): Use h->global_got_area instead of
752 h->root.got.offset. Do not handle forced_local symbols specially.
753 (mips_elf_record_global_got_symbol): Set h->global_got_area
754 instead of h->root.got.offset.
755 (mips_elf_recreate_got): Assert that h->global_got_area == GGA_NONE
756 for indirect and warning symbols.
757 (mips_elf_count_forced_local_got_symbols): Change the argument
758 from a "elf_link_hash_entry" to "mips_elf_link_hash_entry".
759 Use and set h->global_got_area instead of h->root.got.offset.
760 Set it to GGA_NONE for all forced-local symbols.
761 (mips_elf_set_global_got_offset): Set h->global_got_area
762 instead of h->root.got.offset. Use g->global_got_area instead
763 of a combination of dynindx, forced_local and tls_type.
764 (mips_elf_multi_got): Remove disabled code. Pass GGA_* values to
765 mips_elf_set_global_got_offset.
766 (mips_elf_lay_out_got): Use mips_elf_link_hash_traverse instead
767 of elf_link_hash_traverse.
768 (_bfd_mips_elf_copy_indirect_symbol): Copy the indirect symbol's
769 global_got_area to the direct symbol if the latter's value is higher.
770 Set the indirect symbol's area to GGA_NONE.
771
772 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
773
774 * elf32-mips.c (elf_backend_hide_symbol): Delete.
775 * elfn32-mips.c (elf_backend_hide_symbol): Likewise.
776 * elf64-mips.c (elf_backend_hide_symbol): Likewise.
777 * elfxx-mips.h (elf_backend_hide_symbol): Likewise.
778 * elfxx-mips.c (mips_elf_link_hash_entry): Remove "forced_local"
779 and add "needs_lazy_stub".
780 (mips_elf_link_hash_newfunc): Update accordingly.
781 (mips_elf_link_hash_table): Remove "computed_got_sizes" and
782 add "lazy_stub_count".
783 (_bfd_mips_elf_link_hash_table_create): Update accordingly.
784 (mips_elf_output_extsym): Use hd->needs_lazy_stub to detect
785 cases where a lazy stub is being used.
786 (mips_elf_sort_hash_table_f): Use h->root.forced_local instead
787 of h->forced_local.
788 (mips_elf_record_global_got_symbol): Use _bfd_elf_link_hash_hide_symbol
789 instead of _bfd_mips_elf_hide_symbol. Do not increment local_gotno
790 here.
791 (mips_elf_allocate_dynamic_relocations): Move before new first use.
792 (mips_elf_check_recreate_got, mips_elf_recreate_got): New functions.
793 (mips_elf_resolve_final_got_entries): Move earlier in file. Make at
794 most two passes over the hash table. Use mips_elf_check_recreate_got
795 to see if there are any indirect or warning entries and
796 mips_elf_recreate_got to create a new GOT without them.
797 Return a boolean success value.
798 (mips_elf_count_forced_local_got_entries): New function.
799 (mips_elf_make_got_per_bfd): Check h->root.forced_local instead of
800 h->forced_local.
801 (mips_elf_set_global_got_offset): Likewise.
802 (mips_elf_set_no_stub): Replace with...
803 (mips_elf_forbid_lazy_stubs): ...this new function.
804 (mips_elf_resolve_final_got_entry): Delete.
805 (mips_elf_multi_got): Fix formatting. Use mips_elf_forbid_lazy_stubs
806 instead of mips_elf_set_no_stub. Move the code that sets
807 global offsets and allocates dynamic relocations from the main
808 _bfd_mips_elf_size_dynamic_sections loop to here.
809 (_bfd_mips_elf_adjust_dynamic_symbol): Do not allocate room in
810 .MIPS.stubs here; just set hmips->needs_lazy_stub and increment
811 htab->lazy_stub_count.
812 (_bfd_mips_elf_always_size_sections): Move the stub-estimation
813 code to mips_elf_estimate_stub_size and the GOT-sizing code to
814 mips_elf_lay_out_got. Do not call these functions here.
815 (mips_elf_estimate_stub_size): New function, split
816 out from _bfd_mips_elf_always_size_sections. Call
817 mips_elf_resolve_final_got_entries earlier. Count the number
818 of forced-local entries. Do not add stub sizes to loadable_size;
819 after this patch, the stub sizes are already included in the main
820 estimate. Allocate dynamic relocations here rather than in the
821 main _bfd_mips_elf_size_dynamic_sections loop.
822 (mips_elf_estimate_stub_size): New function, split out from
823 _bfd_mips_elf_always_size_sections.
824 (mips_elf_allocate_lazy_stub): New function.
825 (mips_elf_lay_out_lazy_stubs): Likewise.
826 (_bfd_mips_elf_size_dynamic_sections): Call mips_elf_estimate_stub_size,
827 mips_elf_lay_out_got and mips_elf_lay_out_lazy_stubs. Do not handle
828 the allocation of sreldyn specially.
829 (_bfd_mips_elf_hide_symbol): Delete.
830
831 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
832
833 * elfxx-mips.c (allocate_dynrelocs): Ignore indirect and warning
834 symbols.
835
836 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
837
838 * elfxx-mips.c (mips_elf_link_hash_entry): Move bfd_boolean
839 fields to the end of the structure and make them single-bit
840 bitfields.
841 (mips_elf_link_hash_newfunc): Make the initialization statements
842 follow the new field order.
843
844 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
845
846 * elfxx-mips.c (_mips_elf_section_data): Remove the "u.got_info" field.
847 (mips_elf_link_hash_table): Add "sgot" and "got_info" fields.
848 (_bfd_mips_elf_link_hash_table_create): Initialize them.
849 (mips_elf_got_section): Always apply the !maybe_excluded behavior.
850 (mips_elf_got_info): Delete.
851 (mips_elf_initialize_tls_slots): Remove the DYNOBJ local variable.
852 Adjust the call to mips_elf_got_section.
853 (mips_elf_local_got_index): Don't call mips_elf_got_info.
854 Update the call to mips_elf_create_local_got_entry.
855 Use htab->got_info.
856 (mips_elf_global_got_index): Don't call mips_elf_got_info;
857 use htab->got_info and htab->sgot instead.
858 (mips_elf_got_page): Don't call mips_elf_got_info. Update the
859 call to mips_elf_create_local_got_entry.
860 (mips_elf_got16_entry): Likewise.
861 (mips_elf_got_offset_from_index): Replace with DYNOBJ parameter
862 with an INFO parameter. Don't call mips_elf_got_info; use htab->sgot
863 and htab->got_info instead.
864 (mips_elf_create_local_got_entry): Remove the GG and SGOT parameters.
865 Use htab->sgot and htab->got_info.
866 (mips_elf_sort_hash_table): Remove the DYNOBJ local variable.
867 Don't call mips_elf_got_info; use htab->got_info instead.
868 (mips_elf_record_global_got_symbol): Turn G from a paramter to
869 a local variable and read it from htab->got_info.
870 (mips_elf_record_local_got_symbol): Replace the G parameter with
871 an INFO parameter. Make G a local variable and read it from
872 htab->got_info instead.
873 (mips_elf_record_got_page_entry): Likewise.
874 (mips_elf_multi_got): Remove the G parameter and make it a local
875 variable instead. Read it from htab->got_info.
876 (mips_elf_create_got_section): Cache the GOT section in htab->sgot.
877 Store the GOT information in htab->got_info.
878 (mips_elf_calculate_relocation): Don't call mips_elf_got_section
879 and mips_elf_got_info; use htab->sgot and htab->got_info instead.
880 Adjust the calls to mips_elf_got_offset_from_index and
881 mips_elf_adjust_gp.
882 (_bfd_mips_elf_check_relocs): Remove the G and SGOT local variables.
883 Adjust the calls to mips_elf_record_local_got_symbol,
884 mips_elf_record_global_got_symbol and mips_elf_record_got_page_entry.
885 Use htab->sgot.
886 (_bfd_mips_elf_always_size_sections): Remove the DYNOBJ local variable.
887 Don't call mips_elf_got_info; use htab->sgot and htab->got_info instead.
888 Update the call to mips_elf_multi_got.
889 (_bfd_mips_elf_size_dynamic_sections): Don't call mips_elf_got_info;
890 use htab->got_info instead.
891 (_bfd_mips_elf_finish_dynamic_symbol): Update the call to
892 mips_elf_got_section. Get the got_info from the hash table
893 rather than the GOT section.
894 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
895 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
896 (_bfd_mips_elf_hide_symbol): Don't call mips_elf_got_section;
897 get the got_info from the hash table instead. Remove the GOT
898 local variable.
899 (_bfd_mips_elf_final_link): Likewise. Also remove the DYNOBJ
900 local variable.
901
902 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
903
904 * elfxx-mips.c (mips_elf_link_hash_table): Add an "sstubs" field.
905 (_bfd_mips_elf_create_dynamic_sections): Use it to cache the stubs
906 section. Don't check whether the section already exists.
907 (_bfd_mips_elf_adjust_dynamic_symbol): Use htab->sstubs.
908 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
909 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
910 (_bfd_mips_elf_size_dynamic_sections): Likewise. Don't add the
911 dummy stub to an empty section.
912 (_bfd_mips_elf_link_hash_table_create): Initialize the "sstubs" field.
913
914 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
915
916 * reloc.c (BFD_RELOC_MIPS16_GOT16, BFD_RELOC_MIPS16_CALL16): Declare.
917 * libbfd.h, bfd-in2.h: Regenerate.
918 * elf32-mips.c (elf_mips16_howto_table_rel): Fill in reserved
919 R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
920 (mips16_reloc_map): Add mappings.
921 * elf64-mips.c (mips16_elf64_howto_table_rel): Fill in reserved
922 R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
923 (mips16_elf64_howto_table_rela): Likewise.
924 (mips16_reloc_map): Add mappings.
925 * elfn32-mips.c (elf_mips16_howto_table_rel): Fill in reserved
926 R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
927 (elf_mips16_howto_table_rela): Likewise.
928 (mips16_reloc_map): Add mappings.
929 * elfxx-mips.c (mips_elf_create_shadow_symbol): New function.
930 (section_allows_mips16_refs_p): Likewise.
931 (mips16_stub_symndx): Likewise.
932 (mips_elf_check_mips16_stubs): Treat the data argument as a
933 bfd_link_info. Mark every dynamic symbol as needing MIPS16 stubs
934 and create a "shadow" symbol for the original MIPS16 definition.
935 (mips16_reloc_p, got16_reloc_p, call16_reloc_p, hi16_reloc_p)
936 (lo16_reloc_p, mips16_call_reloc_p): New functions.
937 (_bfd_mips16_elf_reloc_unshuffle): Use mips16_reloc_p to generalize
938 relocation checks.
939 (_bfd_mips16_elf_reloc_shuffle): Likewise.
940 (_bfd_mips_elf_lo16_reloc): Handle R_MIPS16_GOT16.
941 (mips_elf_got16_entry): Add comment.
942 (mips_elf_calculate_relocation): Use hi16_reloc_p,
943 lo16_reloc_p, mips16_call_reloc_p, call16_reloc_p and got16_reloc_p
944 to generalize relocation checks. Use section_allows_mips16_refs_p
945 instead of mips16_stub_section_p. Handle R_MIPS16_CALL16 and
946 R_MIPS16_GOT16, allowing the former to refer directly to a
947 MIPS16 function if its stub is not needed.
948 (mips16_stub_section_p): Delete.
949 (_bfd_mips_elf_symbol_processing): Convert odd-valued function
950 symbols into even MIPS16 symbols.
951 (mips_elf_add_lo16_rel_addend): Use mips16_reloc_p to generalize
952 a relocation check.
953 (_bfd_mips_elf_check_relocs): Calculate "bed" and "rel_end"
954 earlier in the function. Use mips16_stub_symndx to identify
955 the target function. Avoid out-of-bounds accesses when the
956 stub has no relocations; report an error instead. Use
957 section_allows_mips16_refs_p instead of mips16_stub_section_p.
958 Use mips16_call_reloc_p and got16_reloc_p to generalize relocation
959 checks. Handle R_MIPS16_CALL16 and R_MIPS16_GOT16. Don't create
960 dynamic relocations for absolute references to __gnu_local_gp.
961 (_bfd_mips_elf_always_size_sections): Pass a bfd_link_info as
962 the argument to mips_elf_check_mips16_stubs. Generalize comment.
963 (_bfd_mips_elf_relocate_section): Use hi16_reloc_p and got16_reloc_p
964 to generalize relocation checks.
965 (_bfd_mips_elf_finish_dynamic_symbol): If a dynamic MIPS16 function
966 symbol has a non-MIPS16 stub, redirect the symbol to the stub.
967 Fix an overly long line. Don't give dynamic symbols type STO_MIPS16.
968 (_bfd_mips_elf_gc_sweep_hook): Handle R_MIPS16_CALL16 and
969 R_MIPS16_GOT16.
970
971 2008-08-06 Alan Modra <amodra@bigpond.net.au>
972
973 * elf32-ppc.c (ppc_elf_relax_section): Clear R_PPC_PLTREL24 addend.
974 (ppc_elf_relocate_section <R_PPC_RELAX32_PLT>): Don't bother here.
975
976 2008-08-05 Alan Modra <amodra@bigpond.net.au>
977 Jaka Močnik <jaka@xlab.si>
978
979 * coffcode.h (coff_slurp_line_table): bfd_alloc lineno_cache first
980 so that we don't inadvertently free it. Use bfd_alloc for sort
981 arrays, and memcpy sorted line table.
982
983 2008-08-04 Alan Modra <amodra@bigpond.net.au>
984
985 * elf32-spu.c (spu_elf_auto_overlay): Use the maximum possible
986 if --fixed-space request is too large.
987
988 2008-08-04 Alan Modra <amodra@bigpond.net.au>
989
990 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Set LC_ALL=C.
991 * Makefile.in: Regenerate.
992 * po/SRC-POTFILES.in: Regenerate.
993
994 2008-08-02 Alan Modra <amodra@bigpond.net.au>
995
996 * elf32-spu.c (mark_overlay_section): Move code calculating
997 max_overlay_size to correct block.
998 (spu_elf_auto_overlay): Don't use %x in einfo error message.
999
1000 2008-08-01 Alan Modra <amodra@bigpond.net.au>
1001 Jan Kratochvil <jan.kratochvil@redhat.com>
1002
1003 * elfcore.h (elf_core_file_p): Ensure we have a backend match
1004 with the correct arch size before rejecting the generic fallback.
1005 * elfcode.h (elf_object_p): Likewise. Ensure arch size matches
1006 before accepting a target.
1007
1008 2008-08-01 Alan Modra <amodra@bigpond.net.au>
1009
1010 PR 6774
1011 * elf.c (rewrite_elf_program_header): Don't wrap p_paddr to
1012 include file or program headers.
1013
1014 2008-07-30 Alan Modra <amodra@bigpond.net.au>
1015
1016 * coff-ppc.c, coffgen.c, ecoff.c, ecofflink.c, elf.c, elf32-frv.c,
1017 elf32-iq2000.c, elf32-m32c.c, elf32-mep.c, elf32-mt.c,
1018 elf32-sh-symbian.c, elf64-hppa.c, mach-o.c, peXXigen.c, pef.c,
1019 ppcboot.c, vms-misc.c, xsym.c: Silence gcc warnings.
1020
1021 2008-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1022
1023 * elfxx-mips.c (mips_elf_calculate_relocation): Avoid generating
1024 relocations for undefined weak symbols with non-default visibility.
1025 (_bfd_mips_elf_check_relocs): Use possibly_dynamic_relocs for
1026 global symbols in shared libraries.
1027 (allocate_dynrelocs): New function.
1028 (_bfd_mips_elf_adjust_dynamic_symbol): Do not handle
1029 possibly_dynamic_relocs here.
1030 (_bfd_mips_elf_size_dynamic_sections): Call allocate_dynrelocs.
1031
1032 2008-07-28 Alexandre Oliva <aoliva@redhat.com>
1033
1034 * elf32-i386.c (struct elf_i386_link_hash_table): Added field
1035 tls_module_base.
1036 (elf_i386_link_hash_table_create): Initialize it.
1037 (elf_i386_always_size_sections): Set it.
1038 (set_tls_module_base): New.
1039 (elf_i386_relocate_sections): Call it.
1040 * elf64-x86-64.c (struct elf64_x86_64_link_hash_table): Added
1041 field tls_module_base.
1042 (elf64_x86_64_link_hash_table_create): Initialize it.
1043 (elf64_x86_64_always_size_sections): Set it.
1044 (set_tls_module_base): New.
1045 (elf64_x86_64_relocate_sections): Call it.
1046 Reported by Cary Coutant <ccoutant@google.com>
1047
1048 2008-07-28 Ineiev <ineiev@yahoo.co.uk>
1049
1050 * elf32-arm.c (arm_map_one_stub): Declare variables at beginning
1051 of block.
1052 * elf32-avr.c (get_local_syms): Likewise.
1053
1054 2008-07-28 Alan Modra <amodra@bigpond.net.au>
1055
1056 PR 6769
1057 * bfd-in.h (BFD_VMA_FMT): Define.
1058 (printf_vma, sprintf_vma): Use the above.
1059 (_bfd_int64_low, _bfd_int64_high): Delete.
1060 * bfd-in2.h: Regenerate.
1061
1062 2008-07-27 Alan Modra <amodra@bigpond.net.au>
1063
1064 * elf.c (_bfd_elf_make_section_from_shdr): Ignore return from
1065 elf_parse_notes. Use bfd_malloc_and_get_section.
1066 (elf_parse_notes): Validate note namesz and descsz.
1067
1068 2008-07-26 Michael Eager <eager@eagercon.com>
1069
1070 * elf32-ppc.c (ppc_elf_merge_obj_attributes): Check compatibility
1071 between single-float, double-float, and soft-float.
1072
1073 2008-07-24 Daniel Jacobowitz <dan@codesourcery.com>
1074
1075 * elf32-mips.c (elf_backend_write_section): Define.
1076
1077 2008-07-24 Nick Clifton <nickc@redhat.com>
1078
1079 * elf.c (_bfd_elf_map_sections_to_segments): Catch off by one
1080 error assigning sections to segments.
1081
1082 2008-07-22 Nick Clifton <nickc@redhat.com>
1083
1084 * elf.c (_bfd_elf_map_sections_to_segments): Allow sections in
1085 adjoining pages to be included in the same segment.
1086
1087 2008-07-22 Simon Baldwin <simonb@google.com>
1088
1089 * elflink.c (elf_link_output_extsym): Set st_size to zero for
1090 symbols from dynamic libraries.
1091
1092 2008-07-21 H.J. Lu <hongjiu.lu@intel.com>
1093
1094 PR ld/4424
1095 * elflink.c (_bfd_elf_merge_symbol): Call bed->relocs_compatible
1096 to check if 2 inputs are compatible.
1097
1098 2008-07-21 Sterling Augustine <sterling@tensilica.com>
1099
1100 * elf.c (assign_file_positions_for_load_sections): Print vma in
1101 error message about overlapping section vmas.
1102
1103 2008-07-21 H.J. Lu <hongjiu.lu@intel.com>
1104
1105 PR ld/6747
1106 * elf32-frv.c (elf32_frv_relocate_section): Revert the change
1107 for PR ld/6446 checked in by accident on May 21, 2008.
1108
1109 2008-07-21 Nick Clifton <nickc@redhat.com>
1110
1111 * coff-sh.c (bfd_pe_print_pdata): Define to NULL for non
1112 COFF_WITH_PE based SH ports.
1113 * libpei.h (_bfd_XX_print_ce_compressed_pdata): Prototype.
1114 * arm-wince-pe.c (bfd_pe_print_pdata): Use
1115 _bfd_pe_print_ce_compressed_pdata.
1116 (slurp_symcache, cleanup_syms, pe_print_ce_compressed_pdata): Move
1117 to...
1118 * peXXigen.c: ... here and rename pe_print_ce_compressed_pdata to
1119 _bfd_XX_print_ce_compressed_pdata.
1120
1121 2008-07-21 Alan Modra <amodra@bigpond.net.au>
1122
1123 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Drop
1124 unwanted zero terminators.
1125
1126 2008-07-21 Alan Modra <amodra@bigpond.net.au>
1127
1128 * elf32-spu.c (spu_elf_relocate_section): Expand
1129 RELOC_FOR_GLOBAL_SYMBOL. Don't warn about undefined symbols for
1130 R_SPU_PPU32 and R_SPU_PPU64 relocations.
1131
1132 2008-07-21 Luis Machado <luisgpm@br.ibm.com>
1133
1134 * elf-bfd.h: Declare elfcore_write_ppc_vsx.
1135 * elf.c (elfcore_grok_ppc_vsx): New function.
1136 (elfcore_write_ppc_vsx): New function
1137 (elfcore_grok_note): Handle VSX notes.
1138 (elfcore_write_register_note): Handle VSX notes.
1139
1140 2008-07-18 Joseph Myers <joseph@codesourcery.com>
1141
1142 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add new parameter.
1143 * bfd-in2.h: Regenerate.
1144 * elf32-arm.c (struct elf_arm_obj_tdata): Add field
1145 no_wchar_size_warning.
1146 (bfd_elf32_arm_set_target_relocs): Add new parameter
1147 no_wchar_warn.
1148 (elf32_arm_merge_eabi_attributes): Give a warning, not an error,
1149 for conflicting wchar_t attributes. Do not warn if
1150 --no-wchar-size-warning. Make diagnostic text more specific.
1151
1152 2008-07-18 H.J. Lu <hongjiu.lu@intel.com>
1153
1154 PR ld/6748
1155 * elf32-arm.c (elf32_arm_link_hash_table_create): Initialize
1156 new fields added for ARM long call support.
1157
1158 2008-07-18 Danny Backx <dannybackx@users.sourceforge.net>
1159
1160 * pe-arm-wince.c (pe_print_compressed_pdata): Define new function to
1161 print compressed pdata structure as described on MSDN. This only
1162 applies to a limited set of architectures (ARM, SH4).
1163 (slurp_symtab, my_symbol_for_address): Define static helper
1164 functions for pe_print_compressed_pdata.
1165 * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_print_pdata field.
1166 (bfd_coff_have_print_pdata, bfd_coff_print_pdata): Define.
1167 * bfd/peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add check on
1168 bfd_coff_backend_data, call the function if non-null.
1169 * pei-mcore.c: Add target dependent initialisation for
1170 bfd_coff_backend_data.
1171 * coff-sh.c: Likewise.
1172 * coff64-rs6000.c: Likewise.
1173 * coff-rs6000.c: Likewise.
1174 * libcoff-in.h: Likewise.
1175 * cf-i386lynx.c: Likewise.
1176 * coff-alpha.c: Likewise.
1177 * coff-apollo.c: Likewise.
1178 * coff-arm.c: Likewise.
1179 * coff-aux.c: Likewise.
1180 * coff-h8300.c: Likewise.
1181 * coff-h8500.c: Likewise.
1182 * coff-i386.c: Likewise.
1183 * coff-i860.c: Likewise.
1184 * coff-i960.c: Likewise.
1185 * coff-ia64.c: Likewise.
1186 * coff-m68k.c: Likewise.
1187 * coff-m88k.c: Likewise.
1188 * coff-maxq.c: Likewise.
1189 * coff-mips.c: Likewise.
1190 * coff-or32.c: Likewise.
1191 * coff-sparc.c: Likewise.
1192 * coff-tic30.c: Likewise.
1193 * coff-tic4x.c: Likewise.
1194 * coff-tic54x.c: Likewise.
1195 * coff-tic80.c: Likewise.
1196 * coff-w65.c: Likewise.
1197 * coff-we32k.c: Likewise.
1198 * coff-x86_64.c: Likewise.
1199 * coff-z80.c: Likewise.
1200 * coff-z8k.c: Likewise.
1201 * pe-mcore.c: Likewise.
1202 * pe-mips.c: Likewise.
1203 * pe-ppc.c: Likewise.
1204 * peXXigen.c: Likewise.
1205 * pei-ppc.c: Likewise.
1206 * libcoff.h: Regenerate.
1207
1208 2008-07-16 Bernd Schmidt <bernd.schmidt@analog.com>
1209
1210 * elf32-bfin.c (bfin_check_relocs, bfin_relocate_section,
1211 bfin_final_link_relocate, bfin_gc_mark_hook, bfin_gc_sweep_hook,
1212 ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE,
1213 struct _bfinfdpic_dynamic_got_info): Moved around to keep FD-PIC code
1214 separate from non-FD-PIC.
1215
1216 2008-07-14 DJ Delorie <dj@redhat.com>
1217
1218 * elf-m10300.c (mn10300_elf_final_link_relocate): Correct overflow
1219 checks for PCREL8, PCREL16, GOTPC16, GOTOFF16, PLT16, and GOT16
1220 relocs.
1221 (mn10300_elf_relax_section): Correct jump offset check when target
1222 is in a different section.
1223
1224 2008-07-15 Jie Zhang <jie.zhang@analog.com>
1225
1226 * elf32-bfin.c (elf32_bfin_special_sections[]): New.
1227 (elf_backend_special_sections): Define.
1228
1229 2008-07-13 Craig Silverstein <csilvers@google.com>
1230
1231 PR binutils/6743
1232 * dwarf2.c (struct dwarf2_debug): New variable info_ptr_memory.
1233 (find_line): Use info_ptr_memory instead of sec_info_ptr.
1234 (_bfd_dwarf2_cleanup_debug_info): Likewise.
1235
1236 2008-07-12 Jie Zhang <jie.zhang@analog.com>
1237
1238 Revert
1239 2008-07-12 Jie Zhang <jie.zhang@analog.com>
1240 * elf.c (_bfd_elf_map_sections_to_segments): Don't put
1241 executable sections into the same segment with other
1242 read only sections if --sep-code.
1243 * elf32-bfin.c (elf32_bfin_code_in_l1): New variable.
1244 (elf32_bfin_data_in_l1): New variable.
1245 (elf32_bfin_final_write_processing): New.
1246 (elf32_bfin_special_sections[]): New.
1247 (elf_backend_final_write_processing): Define.
1248 (elf_backend_special_sections): Define.
1249
1250 2008-07-12 Jie Zhang <jie.zhang@analog.com>
1251
1252 * elf.c (_bfd_elf_map_sections_to_segments): Don't put
1253 executable sections into the same segment with other
1254 read only sections if --sep-code.
1255 * elf32-bfin.c (elf32_bfin_code_in_l1): New variable.
1256 (elf32_bfin_data_in_l1): New variable.
1257 (elf32_bfin_final_write_processing): New.
1258 (elf32_bfin_special_sections[]): New.
1259 (elf_backend_final_write_processing): Define.
1260 (elf_backend_special_sections): Define.
1261
1262 2008-07-11 Andreas Schwab <schwab@suse.de>
1263
1264 * dwarf2.c (read_section): Take pointer to bfd_size_type instead
1265 of unsigned long as last parameter.
1266 (struct dwarf2_debug): Define dwarf_abbrev_size, dwarf_line_size,
1267 dwarf_str_size and dwarf_ranges_size as bfd_size_type instead of
1268 unsigned long.
1269
1270 2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
1271
1272 * elfxx-mips.c (mips_elf_calculate_relocation): Calculate GP and GP0
1273 for all relocation types. Allow any type of relocation to refer to
1274 __gnu_local_gp.
1275
1276 2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
1277
1278 * elfxx-mips.c (mips_elf_check_mips16_stubs): Use ELF_ST_IS_MIPS16.
1279 (mips_elf_calculate_relocation): Likewise.
1280 (_bfd_mips_elf_add_symbol_hook): Likewise.
1281 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1282 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1283
1284 2008-07-10 Andreas Schwab <schwab@suse.de>
1285
1286 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Add missing
1287 paren.
1288
1289 2008-07-09 Craig Silverstein <csilvers@google.com>
1290
1291 * Makefile.am (BFD32_LIBS): Add compress.lo.
1292 (BFD32_LIBS_CFILES): Add compress.c.
1293 (BFD_H_FILES): Likewise.
1294 * Makefile.in: Regenerate.
1295 * bfd-in2.h: Regenerate.
1296 * config.in: Add HAVE_ZLIB_H
1297 * configure.in: Add test for libz and zlib.h
1298 * configure: Regenerate.
1299 * dwarf2.c (read_section): New function.
1300 (read_indirect_string): Call new function read_section.
1301 (read_abbrevs): Likewise.
1302 (decode_line_info): Likewise.
1303 (read_debug_ranges): Likewise.
1304 (find_line): Call new function read_section when just one
1305 .zdebug_info section is found, otherwise read and compress
1306 multiple sections.
1307 (_bfd_dwarf2_cleanup_debug_info): Free sec_info_ptr.
1308 * elf.c (_bfd_elf_make_section_from_shdr): Add zdebug prefix.
1309 (special_sections_z): New struct.
1310 (special_sections): Refer to special_sections_z.
1311 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Recognize
1312 sections named .zdebug_*.
1313 (_bfd_mips_elf_fake_sections): Likewise.
1314 * compress.c: New file.
1315 (bfd_uncompress_section_contents): New function.
1316
1317 2008-07-07 Christophe Lyon <christophe.lyon@st.com>
1318
1319 * elf32-arm.c (arm_type_of_stub): Don't crash on local symbols in
1320 the presence of a PLT.
1321
1322 2008-07-07 Alan Modra <amodra@bigpond.net.au>
1323
1324 * bfd.c (bfd_demangle): Always trim off bfd_get_symbol_leading_char.
1325
1326 2008-07-02 Alan Modra <amodra@bigpond.net.au>
1327
1328 * elf32-ppc.c (is_pic_glink_stub): New function.
1329 (ppc_elf_get_synthetic_symtab): Don't generate symbols when
1330 multiple shared/pie stubs per plt entry.
1331
1332 2008-06-30 Richard Sandiford <rdsandiford@googlemail.com>
1333
1334 * elf.c (_bfd_elf_get_synthetic_symtab): Increment p by
1335 bed->s->int_rels_per_ext_rel.
1336
1337 2008-06-30 Richard Sandiford <rdsandiford@googlemail.com>
1338
1339 * syms.c (BSF_SYNTHETIC): New flag.
1340 * elf.c (_bfd_elf_get_synthetic_symtab): Set it.
1341 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Likewise.
1342 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
1343 * bfd-in.h (bfd_asymbol_flavour): Return bfd_target_unknown_flavour
1344 for synthetic symbols.
1345 * bfd-in2.h: Regenerate.
1346
1347 2008-06-30 Daniel Jacobowitz <dan@codesourcery.com>
1348
1349 * elf32-arm.c (record_arm_to_thumb_glue, record_thumb_to_arm_glue):
1350 Expand comments.
1351 (arm_map_one_stub): Use | 1 when setting the low bit.
1352
1353 2008-06-29 Andreas Schwab <schwab@suse.de>
1354
1355 * elf32-m68k.c (elf_m68k_relocate_section): Don't ignore existing
1356 addend on _GLOBAL_OFFSET_TABLE_.
1357
1358 2008-06-24 Daniel Jacobowitz <dan@codesourcery.com>
1359
1360 * elf32-arm.c (STUB_ENTRY_NAME): Define.
1361 (arm_thumb_thumb_long_branch_stub): Use bx instead of b.n.
1362 (arm_pic_long_branch_stub): Mention R_ARM_REL32 instead of
1363 R_ARM_ABS32.
1364 (struct elf32_arm_stub_hash_entry): Add output_name.
1365 (arm_build_one_stub): Move offsets into the offset argument
1366 of _bfd_final_link_relocate. Correct offset for
1367 arm_thumb_arm_v4t_stub_long_branch.
1368 (elf32_arm_size_stubs): Set stub_entry->output_name.
1369 (elf32_arm_ouput_plt_map_sym): Rename to elf32_arm_output_map_sym.
1370 Update all callers.
1371 (elf32_arm_output_stub_sym): New.
1372 (arm_map_one_stub): Correct formatting. Use elf32_arm_output_stub_sym.
1373
1374 2008-06-20 Alan Modra <amodra@bigpond.net.au>
1375
1376 * elf32-spu.c (needs_ovl_stub): Correctly return nonovl_stub for
1377 non-branch insns.
1378
1379 2008-06-20 Alan Modra <amodra@bigpond.net.au>
1380
1381 * elf32-spu.c (build_stub): Allow wraparound on stub branches.
1382 (allocate_spuear_stubs, build_spuear_stubs): Return value from
1383 count_stub/build_stub.
1384 (spu_elf_build_stubs): Correct location of stub reloc error message.
1385
1386 2008-06-18 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
1387
1388 * elf32-cr16.c (ELF_MACHINE_ALT1): Define to EM_CR16_OLD.
1389
1390 2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1391
1392 * configure: Regenerate.
1393
1394 2008-06-17 Alan Modra <amodra@bigpond.net.au>
1395
1396 * elf32-spu.c (struct spu_link_hash_table): Add extra_stack_space.
1397 (spu_elf_check_vma): Add extra_stack_space param, copy to htab.
1398 (spu_elf_auto_overlay): Use it.
1399 (RECURSE_UNMARK): Define as 0.
1400 (unmark_overlay_section): Heed RECURSE_UNMARK.
1401 * elf32-spu.h (spu_elf_check_vma): Update prototype.
1402
1403 2008-06-12 DJ Delorie <dj@redhat.com>
1404
1405 * elf32-m32c.c (ELF_MACHINE_ALT1): Define as EM_M32C_OLD.
1406
1407 2008-06-09 Paul Brook <paul@codesourcery.com>
1408
1409 bfd/
1410 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Allow BE8 shared
1411 libraries.
1412
1413 2008-06-09 Christophe Lyon <christophe.lyon@st.com>
1414
1415 * elf32-arm.c (arm_stub_is_thumb): Define.
1416 (elf32_arm_final_link_relocate): Handle near mode switching stubs.
1417
1418 2008-06-07 Alan Modra <amodra@bigpond.net.au>
1419
1420 * elf32-spu.c (spu_elf_auto_overlay): Add valid area below sp
1421 to stack calculation.
1422
1423 2008-06-06 Paul Brook <paul@codesourcery.com>
1424
1425 bfd/
1426 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Reject BE8 input.
1427
1428 2008-06-06 Alan Modra <amodra@bigpond.net.au>
1429
1430 * elf32-spu.c (spu_elf_auto_overlay): Relax requirement that
1431 file names be unique. Specify archive:path in overlay script.
1432
1433 2008-06-05 Alan Modra <amodra@bigpond.net.au>
1434
1435 PR ld/6590
1436 * elf64-ppc.c (ppc_build_one_stub): Correct reloc offsets.
1437
1438 2008-06-04 Alan Modra <amodra@bigpond.net.au>
1439
1440 * elf.c (ignore_section_sym): Don't test section sym value here.
1441 (elf_map_symbols): Instead check zero value here as was done prior
1442 to 2006-05-26 change.
1443
1444 2008-06-04 Nick Clifton <nickc@redhat.com>
1445
1446 PR ld/6019
1447 * elf32-avr.c (elf32_avr_relax_section): Handle the case where
1448 there are no local symbols.
1449
1450 2008-06-04 Alan Modra <amodra@bigpond.net.au>
1451
1452 * elf32-spu.c (get_sym_h): Don't attempt to read global syms.
1453 (process_stubs): Likewise.
1454 (discover_functions): Don't used cached symbols.
1455 (maybe_insert_function): Correct condition under which function
1456 array is realloc'd.
1457 (mark_functions_via_relocs): Delete unused variable.
1458
1459 2008-05-30 Frediano Ziglio <frediano.ziglio@vodafone.com>
1460 Nick Clifton <nickc@redhat.com>
1461
1462 PR ld/6511
1463 * elf64-hppa.c (allocate_global_data_opd): Default to using the
1464 dynamic symbol table for local function names in shared libraries.
1465
1466 2008-05-29 Jan Kratochvil <jan.kratochvil@redhat.com>
1467
1468 * elf.c (assign_file_positions_for_load_sections): Adjust pre-section
1469 gaps based on VMA and P_VADDR instead of LMA and P_PADDR addresses.
1470
1471 2008-05-28 Alan Modra <amodra@bigpond.net.au>
1472
1473 * elf32-spu.c (spu_elf_object_p): New function.
1474 (elf_backend_object_p): Define.
1475 (build_stub): Correct second word of 8 byte overlay stubs.
1476 (spu_elf_relocate_section): Formatting.
1477
1478 2008-05-24 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
1479
1480 * elf.c (elfcore_write_register_note): New function.
1481 * elf-bfd.h (elfcore_write_register_note): New prototype.
1482
1483 2008-05-22 Christophe Lyon <christophe.lyon@st.com>
1484
1485 * elf32-arm.c (arm_type_of_stub): Ignore STT_SECTION symbols.
1486 (elf32_arm_stub_add_mapping_symbol): Remove.
1487 (elf32_arm_add_stub): Don't generate mapping symbols. Change
1488 prototype.
1489 (elf32_arm_size_stubs): Use new elf32_arm_add_stub
1490 prototype. Don't generate thumb to arm glue for calls.
1491 (arm_map_one_stub): Define.
1492 (elf32_arm_output_arch_local_syms): Generate mapping symbols for
1493 long calls stubs.
1494
1495 2008-05-21 Nick Clifton <nickc@redhat.com>
1496
1497 * elf32-arm.c (group_sections): Reformat comments.
1498
1499 PR ld/6446
1500 * elf32-frv.c (elf32_frv_relocate_section): Set EF_FRV_PIC by
1501 default (for FDPIC). Clear it if any inter-segment relocations
1502 are found.
1503
1504 * elf64-hppa.c (elf64_hppa_finalize_opd): Check NULL return
1505 from elf_link_hash_lookup.
1506
1507 2008-05-21 Maxim Kuvyrkov <maxim@codesourcery.com>
1508
1509 Add multi-GOT support for m68k.
1510 * elf32-m68k.c (struct elf_m68k_link_hash_entry: got_entry_key,
1511 glist): New fields.
1512 (struct elf_m68k_got_entry_key, struct elf_m68k_got_entry,
1513 struct elf_m68k_got, struct elf_m68k_bfd2got_entry,
1514 struct elf_m68k_multi_got): New data structures.
1515 (struct elf_m68k_link_hash_table: local_gp_p, use_neg_got_offsets_p,
1516 allow_multigot_p, multi_got_): New fields.
1517 (elf_m68k_multi_got): New macro.
1518 (elf_m68k_link_hash_newfunc): Initialize new fields of
1519 struct elf_m68k_link_hash_entry.
1520 (elf_m68k_link_hash_table_create): Initialize new fields of
1521 struct elf_m68k_link_hash_table.
1522 (elf_m68k_link_hash_table_free): New static function implementing hook.
1523 (elf_m68k_init_got, elf_m68k_clear_got, elf_m68k_create_empty_got): New
1524 static functions for struct elf_m68k_got.
1525 (elf_m68k_init_got_entry_key, elf_m68k_got_entry_hash,
1526 elf_m68k_got_entry_eq): New static functions for
1527 struct elf_m68k_got_entry.
1528 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT,
1529 ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): New macros.
1530 (enum elf_m68k_get_entry_howto): New enum.
1531 (elf_m68k_get_got_entry, elf_m68k_update_got_entry_type,
1532 elf_m68k_remove_got_entry_type): New static functions for
1533 struct elf_m68k_got_entry.
1534 (elf_m68k_add_entry_to_got): New static function.
1535 (elf_m68k_bfd2got_entry_hash, elf_m68k_bfd2got_entry_eq,
1536 elf_m68k_bfd2got_entry_del, elf_m68k_get_bfd2got_entry): New static
1537 functions for struct elf_m68k_bfd2got_entry.
1538 (struct elf_m68k_can_merge_gots_arg, elf_m68k_can_merge_gots_1,
1539 elf_m68k_can_merge_gots): New traversal.
1540 (struct elf_m68k_merge_gots_arg, elf_m68k_merge_gots_1,
1541 elf_m68k_merge_gots): Ditto.
1542 (struct elf_m68k_finalize_got_offsets_arg,
1543 elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Ditto.
1544 (struct elf_m68k_partition_multi_got_arg,
1545 elf_m68k_partition_multi_got_1, elf_m68k_init_symndx2h_1,
1546 elf_m68k_partition_multi_got): Ditto.
1547 (elf_m68k_find_got_entry_ptr, elf_m68k_remove_got_entry): New static
1548 functions.
1549 (elf_m68k_copy_indirect_symbol): New static function implementing
1550 a hook.
1551 (elf_m68k_check_relocs): Update to add entries to multi-GOT.
1552 (elf_m68k_gc_sweep_hook): Update to remove entries from multi-GOT.
1553 (elf_m68k_always_size_sections): Assign BFDs to GOTs.
1554 (elf_m68k_relocate_section): Update to properly handle GOT relocations.
1555 (elf_m68k_finish_dynamic_symbol): Update to traverse all GOT entries
1556 of a global symbol.
1557 (bfd_elf_m68k_set_target_options): New function.
1558 (bfd_elf32_bfd_link_hash_table_free): Define hook.
1559 (bfd_elf32_bfd_final_link): Change expansion to bfd_elf_final_link
1560 to skip generic calculation of GOT offsets.
1561 (elf_backend_copy_indirect_symbol): Define hook.
1562 * bfd-in.h (bfd_elf_m68k_set_target_options): Declare function.
1563 * bfd-in2.h: Regenerate.
1564
1565 2008-05-21 André Johansen <andrejoh@gmail.com>
1566
1567 PR 868
1568 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free memory allocated
1569 for filenames in function tables and variable tables.
1570
1571 2008-05-19 Alan Modra <amodra@bigpond.net.au>
1572
1573 PR 2995, PR 6473
1574 * elf.c (_bfd_elf_make_section_from_shdr): Leave lma equal to
1575 vma when all p_paddr fields are zero and there is more than
1576 one PT_LOAD header.
1577
1578 2008-05-15 Christophe Lyon <christophe.lyon@st.com>
1579
1580 Add long call support for ARM.
1581 * elf32-arm.c (THM2_MAX_FWD_BRANCH_OFFSET): Define.
1582 (THM2_MAX_BWD_BRANCH_OFFSET): Define.
1583 (ARM_MAX_FWD_BRANCH_OFFSET): Define.
1584 (ARM_MAX_BWD_BRANCH_OFFSET): Define.
1585 (THM_MAX_FWD_BRANCH_OFFSET): Define.
1586 (THM_MAX_BWD_BRANCH_OFFSET): Define.
1587 (arm_long_branch_stub): Define.
1588 (arm_pic_long_branch_stub): Define.
1589 (arm_thumb_v4t_long_branch_stub): Define.
1590 (arm_thumb_thumb_long_branch_stub): Define.
1591 (arm_thumb_arm_v4t_long_branch_stub): Define.
1592 (STUB_SUFFIX): Define.
1593 (elf32_arm_stub_type): Define.
1594 (elf32_arm_stub_hash_entry): Define.
1595 (elf32_arm_link_hash_entry): Add stub_cache field.
1596 (arm_stub_hash_lookup): Define.
1597 (elf32_arm_link_hash_table): Add stub_hash_table, stub_bfd,
1598 add_stub_section, layout_sections_again, stub_group, bfd_count,
1599 top_index, input_list fields.
1600 (elf32_arm_link_hash_newfunc): Init new field.
1601 (stub_hash_newfunc): New function.
1602 (elf32_arm_link_hash_table_create): Init stub_hash_table.
1603 (elf32_arm_hash_table_free): New function.
1604 (arm_type_of_stub): New function.
1605 (elf32_arm_stub_name): New function.
1606 (elf32_arm_get_stub_entry): New function.
1607 (elf32_arm_stub_add_mapping_symbol): New function.
1608 (elf32_arm_add_stub): New function.
1609 (arm_build_one_stub): New function.
1610 (arm_size_one_stub): New function.
1611 (elf32_arm_setup_section_lists): New function.
1612 (elf32_arm_next_input_section): New function.
1613 (group_sections): New function.
1614 (elf32_arm_size_stubs): New function.
1615 (elf32_arm_build_stubs): New function.
1616 (bfd_elf32_arm_add_glue_sections_to_bfd): Skip stub sections.
1617 (bfd_elf32_arm_process_before_allocation): No longer handle
1618 R_ARM_CALL and R_ARM_THM_CALL.
1619 (using_thumb_only): New function.
1620 (elf32_arm_final_link_relocate): Redirect calls to stub if range
1621 exceeds encoding capabilities.
1622 (bfd_elf32_bfd_link_hash_table_free): Define.
1623 * bfd-in.h (R_ARM_max): Fix value to 130.
1624 (elf32_arm_setup_section_lists): Protype.
1625 (elf32_arm_next_input_section): Protype.
1626 (elf32_arm_size_stubs): Protype.
1627 (elf32_arm_build_stubs): Protype.
1628 * bfd-in2.h: Regenerate.
1629
1630 2008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1631
1632 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Fix memset calls.
1633 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
1634
1635 2008-05-14 Alan Modra <amodra@bigpond.net.au>
1636
1637 * Makefile.am: Run "make dep-am".
1638 * Makefile.in: Regenerate.
1639
1640 2008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1641 Alan Modra <amodra@bigpond.net.au>
1642
1643 * elf32-ppc.c (section_covers_vma): New function.
1644 (ppc_elf_get_synthetic_symtab): New function.
1645 (bfd_elf32_get_synthetic_symtab): Define.
1646 * elf64-ppc.c (section_covers_vma): New function.
1647 (ppc64_elf_get_synthetic_symtab): Generate sym@plt on glink branch
1648 table entries, and __glink_PLTresolve on resolver stub.
1649 (ppc64_elf_build_stubs): Rename __glink sym to __glink_PLTresolve.
1650
1651 2008-05-12 Alan Modra <amodra@bigpond.net.au>
1652
1653 PR 6443
1654 * elf32-ppc.c (MUST_BE_DYN_RELOC): Delete.
1655 (must_be_dyn_reloc): New function.
1656 (ppc_elf_check_relocs): Don't set DF_STATIC_TLS for tprel relocs
1657 in pies.
1658 (ppc_elf_tls_optimize): Optimise pies.
1659 (ppc_elf_relocate_section): Use a section symbol rather than no
1660 symbol if possible for LD->IE TLS sequence, but don't error if
1661 we must use no symbol.
1662 * elf64-ppc.c (MUST_BE_DYN_RELOC): As for elf32-ppc.c.
1663 (must_be_dyn_reloc): Likewise.
1664 (ppc64_elf_check_relocs): Likewise.
1665 (ppc64_elf_tls_optimize): Likewise.
1666 (ppc64_elf_relocate_section): Likewise.
1667
1668 2008-05-12 Alan Modra <amodra@bigpond.net.au>
1669
1670 * elf32-spu.c (spu_elf_relocate_section): Rename is_ea to is_ea_sym.
1671
1672 2008-05-10 Paul Pluzhnikov <ppluzhnikov@google.com>
1673
1674 * elfcore.h (elf_core_file_p): Warn about core truncation.
1675
1676 2008-05-07 Bob Wilson <bob.wilson@acm.org>
1677
1678 * elf32-xtensa.c (xtensa_property_section_name): New.
1679 (xtensa_make_property_section): New.
1680 (xtensa_get_property_section): Make static. Do not create a new
1681 section if it does not exist.
1682
1683 2008-05-08 Alan Modra <amodra@bigpond.net.au>
1684
1685 * elf32-spu.c (spu_elf_special_sections): Add "._ea".
1686 (spu_elf_relocate_section): Handle relocations against symbols
1687 defined in ._ea specially.
1688
1689 2008-05-03 Daniel Jacobowitz <dan@codesourcery.com>
1690
1691 * elf32-arm.c (elf32_arm_symbian_link_hash_table_create): Use
1692 ARRAY_SIZE.
1693 (elf32_arm_symbian_plt_sym_val): New.
1694 (elf_backend_plt_sym_val): Define.
1695
1696 2008-05-03 Alan Modra <amodra@bigpond.net.au>
1697
1698 PR 2995, PR 6473
1699 * elf.c (rewrite_elf_program_header): Rather than clearing
1700 p_paddr_valid at end, don't set it in the first place. Delete
1701 comment no longer relevant. When not p_paddr_valid, don't set
1702 paddr from vaddr, and don't set p_vaddr_offset.
1703
1704 2008-05-01 Cary Coutant <ccoutant@google.com>
1705
1706 * elf.c (bfd_elf_get_str_section): Fix memory leak caused by
1707 corrupt string table.
1708
1709 2008-05-01 Joel Brobecker <brobecker@adacore.com>
1710
1711 * cache.c (cache_bread_1): Renames cache_bread.
1712 (cache_bread): New function.
1713
1714 2008-05-01 Alan Modra <amodra@bigpond.net.au>
1715
1716 PR 2995, PR 6473
1717 * elf.c (_bfd_elf_make_section_from_shdr): Always set lma from p_paddr.
1718 (assign_file_positions_for_load_sections): Combine nested "if".
1719 (copy_elf_program_header): Don't set p_paddr_valid or p_vaddr_offset
1720 when all header p_paddr fields are zero.
1721
1722 2008-04-30 Edmar Wienskoski <edmar@freescale.com>
1723
1724 * cpu-powerpc.c (bfd_powerpc_archs): Add e500mc entry.
1725
1726 2008-04-29 Daniel Jacobowitz <dan@codesourcery.com>
1727
1728 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound)
1729 (_bfd_elf_canonicalize_dynamic_reloc): Find dynamic relocations
1730 even if they are not loaded.
1731 * elflink.c (_bfd_elf_init_2_index_sections): Set data_index_section
1732 first.
1733
1734 2008-04-25 Jay Foad <jay.foad@gmail.com>
1735
1736 * reloc16.c (bfd_coff_reloc16_get_value): Add support for
1737 undefined weak symbols.
1738
1739 2008-04-25 Nick Clifton <nickc@redhat.com>
1740
1741 * po/vi.po: Updated Vietnamese translation.
1742
1743 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1744
1745 * aclocal.m4: Regenerate.
1746 * configure: Regenerate.
1747
1748 2008-04-21 Cary Coutant <ccoutant@google.com>
1749
1750 * archive.c (_bfd_write_archive_contents): Fix incorrect use of
1751 ARFMAG.
1752
1753 2008-04-21 Nathan Sidwell <nathan@codesourcery.com>
1754
1755 * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Don't
1756 set the value of undefined symbols in shared objects.
1757 (_bfd_mips_vxworks_finish_dynamic_symbol): Clear value for
1758 undefined symbols unless pointer equality is needed.
1759
1760 2008-04-18 Dennis Roberts <dennis.roberts@sunquestinfo.com>
1761
1762 * aix5ppc-core.c: Define macros for the default architecture and
1763 machine for matching core files.
1764 (xcoff64_core_p): Set the architecture and machine to the default
1765 values defined in the macros mentioned above.
1766 * rs6000-core.c: Define macros to determine whether or not the
1767 core file header uses the core_dumpxx header format.
1768 (rs6000coff_core_p): Don't match core files that use the
1769 core_dumpxx header format.
1770
1771 2008-04-16 Pedro Alves <pedro@codesourcery.com>
1772
1773 * config.bfd (i[3-7]86-*-dicos*, x86_64-*-dicos*): Add.
1774
1775 2008-04-16 David S. Miller <davem@davemloft.net>
1776
1777 * reloc.c (BFD_RELOC_SPARC_GOTDATA_HIX22,
1778 BFD_RELOC_SPARC_GOTDATA_LOX10, BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
1779 BFD_RELOC_SPARC_GOTDATA_OP_LOX10, BFD_RELOC_SPARC_GOTDATA_OP): New.
1780 * libbfd.h: Regnerate.
1781 * bfd-in2.h: Regenerate.
1782 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Add entries for
1783 GOTDATA relocations.
1784 (sparc_reloc_map): Likewise.
1785 (_bfd_sparc_elf_check_relocs): Handle R_SPARC_GOTDATA_* like
1786 R_SPARC_GOT*.
1787 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1788 (_bfd_sparc_elf_relocate_section): Transform R_SPARC_GOTDATA_HIX22,
1789 R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22, and
1790 R_SPARC_GOTDATA_OP_LOX10 into the equivalent R_SPARC_GOT* reloc.
1791 Simply ignore R_SPARC_GOTDATA_OP relocations.
1792
1793 2008-04-14 Aurelien Jarno <aurelien@aurel32.net>
1794
1795 * configure.in: Link with the PIC version of libiberty on
1796 Linux/MIPS hosts.
1797 * configure: Regenerate.
1798
1799 2008-04-14 Edmar Wienskoski <edmar@freescale.com>
1800
1801 * archures.c: Add bfd_mach_ppc_e500mc.
1802 * bfd-in2.h: Regenerate.
1803
1804 2008-04-08 Alan Modra <amodra@bigpond.net.au>
1805
1806 * elf32-spu.c (spu_elf_build_stubs): Correct error message.
1807 (mark_functions_via_relocs): Remove premature init of symtab_hdr.
1808 (collect_overlays): Commment typo fix.
1809
1810 2008-04-08 Kees Cook <kees@canonical.com>
1811
1812 * elflink.c (bfd_elf_size_dynamic_sections): Ignore GNU-stack note
1813 in EXEC_P bfds.
1814
1815 2008-04-08 Alan Modra <amodra@bigpond.net.au>
1816
1817 * elf32-spu.c: Include libiberty.h.
1818 (struct spu_link_hash_table): Add local_stire, overlay_fixed, reserved,
1819 non_ovly_stub, spu_elf_load_ovl_mgr, spu_elf_open_overlay_script,
1820 spu_elf_relink, auto_overlay fields.
1821 (AUTO_OVERLAY, AUTO_RELINK, OVERLAY_RODATA): Define.
1822 (needs_ovl_stub): Flip test so that call to non-function warning
1823 is emitted during relocate_section rather than earlier.
1824 (spu_elf_check_vma): Stash --auto-overlay parameters, and clear
1825 auto_overlay if no section exceeds local store.
1826 (struct call_info): Add count, max_depth, is_pasted fields.
1827 (struct function_info): Add rodata, last_caller, call_count,
1828 depth, new visit flags.
1829 (insert_callee): Increment call count.
1830 (copy_callee): New function.
1831 (mark_functions_via_relocs): Investigate all reloc types to count
1832 possible function pointer stubs for --auto-overlay. Track
1833 last_caller and increment function call_count.
1834 (pasted_function): Insert a "call" into call info for pasted section.
1835 (remove_cycles): Track max depth of calls. Don't emit call graph
1836 pruning warning for --auto-overlay.
1837 (build_call_tree): Don't transfer_calls for --auto-overlay.
1838 Adjust remove_cycles call.
1839 (sort_calls, sort_lib, sort_bfds): New functions.
1840 (struct _mos_param, struct _uos_param, struct _cl_param): New.
1841 (mark_overlay_section, unmark_overlay_section): New functions.
1842 (collect_lib_sectios, auto_ovl_lib_functions): New functions.
1843 (collect_overlays, find_pasted_call): New functions.
1844 (sum_stack): Deal with is_pasted "calls". Exit before printing
1845 when --auto-overlay.
1846 (spu_elf_auto_overlay): New function.
1847 (spu_elf_final_link): Call spu_elf_auto_overlay.
1848 * elf32-spu.h (spu_elf_check_vma): Update prototype.
1849
1850 2008-04-07 Alan Modra <amodra@bigpond.net.au>
1851
1852 * elf32-spu.c (allocate_spuear_stubs): Ensure _SPUEAR_ symbol
1853 is defined in overlay section before creating a stub.
1854 (build_spuear_stubs): Likewise.
1855 (spu_elf_size_stubs, spu_elf_build_stubs): Adjust calls.
1856
1857 2008-04-02 Alan Modra <amodra@bigpond.net.au>
1858
1859 * elf32-spu.c (insert_callee): Reorder call list so most recent
1860 call is always first.
1861 (interesting_section): Move.
1862 (mark_functions_via_relocs): Fold interesting_section and
1863 reloc_count tests in callers to here. Simplify output section
1864 owner test.
1865 (discover_functions): Set "gaps" when no symbols and some
1866 "interesting_section". Run pasted_function loop for no symbol
1867 bfds.
1868 (for_each_node, transfer_calls): New functions.
1869 (mark_non_root): Adjust to suit for_each_node.
1870 (call_graph_traverse): Likewise. Fix memory leak. Rename to..
1871 (remove_cycles): ..this.
1872 (build_call_tree): Use for_each_node and transfer_calls.
1873 (struct _sum_stack_param): New.
1874 (sum_stack): Adjust to suit for_each_node. Return error on
1875 malloc failure. Move code to print root node cumulative stack from..
1876 (spu_elf_stack_analysis): ..here. Use for_each_node.
1877
1878 2008-03-31 Cary Coutant <ccoutant@google.com>
1879
1880 PR 6006
1881 * archive.c (_bfd_slurp_extended_name_table): Change
1882 ARFMAG[0] to ARFMAG[1].
1883 (_bfd_construct_extended_name_table): Likewise.
1884
1885 2008-03-31 Daniel Jacobowitz <dan@codesourcery.com>
1886
1887 * elfxx-mips.c (mips_elf_record_got_page_entry): Update comment.
1888 (_bfd_mips_elf_check_relocs): Update comments. Always call
1889 mips_elf_record_got_page_entry for R_MIPS_GOT_PAGE.
1890
1891 2008-03-27 Cary Coutant <ccoutant@google.com>
1892
1893 Add support for thin archives.
1894 * archive.c (_bfd_find_nested_archive): New function.
1895 (get_extended_arelt_filename): Add origin parameter.
1896 (_bfd_generic_read_ar_hdr_mag): Deal with extended name
1897 combined with a file offset.
1898 (append_relative_path): New function.
1899 (_bfd_get_elt_at_filepos): Deal with external members and
1900 nested archives.
1901 (bfd_generic_openr_next_archived_file): Thin archives.
1902 (bfd_generic_archive_p): Recognize new magic string.
1903 (adjust_relative_path): New function.
1904 (_bfd_construct_extended_name_table): Construct extended
1905 names for thin archive members.
1906 (_bfd_write_archive_contents): Emit new magic string, skip
1907 copying files for thin archives.
1908 * bfd-in.h (bfd_is_thin_archive): New macro.
1909 * bfd.c (struct bfd): New fields for thin archives.
1910 * libbfd-in.h (struct areltdata): New field for thin archives.
1911 * opncls.c (bfd_close): Delete BFDs for nested archives.
1912
1913 2008-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
1914
1915 * elf32-bfin.c (bfin_final_link_relocate): New function, wrapper around
1916 _bfd_final_link_relocate that also handles R_pcrel24 relocs.
1917 (bfinfdpic_relocate_section, bfin_relocate_section): Use it.
1918
1919 2008-03-25 Nathan Sidwell <nathan@codesourcery.com>
1920
1921 * elf32-arm.c (elf32_arm_final_link_relocate): Skip dynamic relocs
1922 in vxworks tls_vars sections.
1923 (allocate_dynrelocs, elf32_arm_size_dynamic_sections): Likewise.
1924 * elf32-i386.c (allocate_dynrelocs,
1925 elf_i386_size_dynamic_sections, elf_i386_relocate_section): Likewise.
1926 * elf32-ppc.c (allocate_dynrelocs, ppc_elf_size_dynamic_sections,
1927 ppc_elf_relocate_section): Likewise.
1928 * elf32-sh.c (allocate_dynrelocs, sh_elf_size_dynamic_sections,
1929 sh_elf_relocate_section): Likewise.
1930 * elfxx-sparc.c (allocate_dynrelocs,
1931 _bfd_sparc_elf_size_dynamic_sections,
1932 _bfd_sparc_elf_relocate_section): Likewise.
1933
1934 2008-03-21 Adam Nemet <anemet@caviumnetworks.com>
1935
1936 * elf.c (_bfd_elf_print_private_bfd_data): Use bfd_fprintf_vma to
1937 print the values from the dynamic section.
1938
1939 2008-03-20 Richard Sandiford <rsandifo@nildram.co.uk>
1940
1941 * elfxx-mips.c (MIPS_ELF_GNU_GOT1_MASK): New macro.
1942 (_bfd_mips_elf_finish_dynamic_sections): Use it instead of 0x80000000.
1943
1944 2008-03-20 Alan Modra <amodra@bigpond.net.au>
1945
1946 * elf32-spu.c (spu_elf_create_sections): Remove output_bfd parameter.
1947 (spu_elf_find_overlays, spu_elf_size_stubs): Likewise
1948 (process_stubs, discover_functions, build_call_tree): Likewise.
1949 (spu_elf_stack_analysis): Likewise.
1950 (spu_elf_check_vma): Likewise. Move.
1951 (struct call_info): Make "is_tail" a bitfield.
1952 (insert_callee): Clear fun->start and set fun->is_func if we find
1953 a non-tail call.
1954 * elf32-spu.h (spu_elf_create_sections): Update prototype.
1955 (spu_elf_find_overlays, spu_elf_size_stubs, spu_elf_check_vma): Ditto.
1956
1957 2008-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1958
1959 * aclocal.m4: Regenerate.
1960 * configure: Likewise.
1961 * Makefile.in: Likewise.
1962
1963 2008-03-16 H.J. Lu <hongjiu.lu@intel.com>
1964
1965 PR ld/5789
1966 PR ld/5943
1967 * elf32-i386.c (elf_i386_relocate_section): Issue an error
1968 for R_386_GOTOFF relocaton against undefined hidden/internal
1969 symbols when building a shared object.
1970
1971 * elf64-x86-64.c (elf64_x86_64_relocate_section): Issue an
1972 error for R_X86_64_PC8/R_X86_64_PC16/R_X86_64_PC32
1973 relocaton against undefined hidden/internal symbols when
1974 building a shared object.
1975 (elf64_x86_64_finish_dynamic_symbol): Return FALSE when symbol
1976 is referenced locally, but isn't defined in a regular file.
1977
1978 2008-03-15 H.J. Lu <hongjiu.lu@intel.com>
1979
1980 * bfd-in.h (BFD_NO_FLAGS, HAS_RELOC, EXEC_P, HAS_LINENO,
1981 HAS_DEBUG, HAS_SYMS, HAS_LOCALS, DYNAMIC, WP_TEXT, D_PAGED,
1982 BFD_IS_RELAXABLE, BFD_TRADITIONAL_FORMAT, BFD_IN_MEMORY,
1983 HAS_LOAD_PAGE, BFD_LINKER_CREATED): Moved to ...
1984 * bfd.c: Here.
1985
1986 * bfd.c (bfd): Change cacheable, target_defaulted, opened_once,
1987 mtime_set, no_export, output_has_begun and has_armap to bit
1988 field.
1989
1990 * bfd-in2.h: Regenerated.
1991
1992 2008-03-14 Daniel Jacobowitz <dan@codesourcery.com>
1993
1994 * cache.c (close_one): Remove mtime hack.
1995
1996 2008-03-14 H.J. Lu <hongjiu.lu@intel.com>
1997
1998 PR ld/5913
1999 * elfxx-ia64.c (elfNN_ia64_tprel_base): Remove BFD_ASSERT.
2000 (elfNN_ia64_dtprel_base): Likewise.
2001 (elfNN_ia64_relocate_section): Go to missing_tls_sec if
2002 tls_sec is NULL before calling elfNN_ia64_tprel_base or
2003 elfNN_ia64_dtprel_base. Report unsupported TLS relocations.
2004
2005 2008-03-14 Alan Modra <amodra@bigpond.net.au>
2006
2007 * elf32-spu.c (process_stubs, spu_elf_relocate_section): Move
2008 common code to..
2009 (maybe_needs_stub): ..here, a new function that also omits stubs
2010 for .eh_frame, and..
2011 (needs_ovl_stub): ..here. Create stubs for labels in code section
2012 referenced by switch jump table.
2013 (spu_elf_find_overlays): Set htab->ovly_load and htab->ovly_return.
2014 (enum _insn_type): Delete.
2015 (enum _stub_type): New.
2016 (count_stub, build_stub): Adjust.
2017 (allocate_spuear_stubs, build_spuear_stubs): Adjust.
2018
2019 2008-03-13 Alan Modra <amodra@bigpond.net.au>
2020
2021 * elf.c (_bfd_elf_make_section_from_shdr): Remove unnecessary cast.
2022 (_bfd_elf_assign_file_position_for_section): Simplify align.
2023 (_bfd_elf_init_reloc_shdr): Ensure shift expression wide enough
2024 for sh_addralign.
2025 (elf_fake_sections, swap_out_syms): Likewise.
2026 * elflink.c (bfd_elf_final_link): Likewise.
2027
2028 2008-03-13 Alan Modra <amodra@bigpond.net.au>
2029
2030 * Makefile.am: Run "make dep-am".
2031 * Makefile.in: Regenerate.
2032 * po/SRC-POTFILES.in: Regenerate.
2033
2034 2008-03-12 Bernd Schmidt <bernd.schmidt@analog.com>
2035
2036 From Jie Zhang <jie.zhang@analog.com>
2037 * elf32-bfin.c (struct bfinfdpic_relocs_info): Make got17m4,
2038 gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4, fdgoffhilo,
2039 gotoff, call and sym not bitfields.
2040 (bfinfdpic_gc_sweep_hook): New function; update the relocation
2041 information for the relocations of the section being removed.
2042 (bfinfdpic_check_relocs): Accumulate the number of relocations
2043 which set got17m4, gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4,
2044 fdgoffhilo, gotoff, call and sym fields.
2045 (elf_backend_gc_sweep_hook): Redefine for FD-PIC.
2046
2047 2008-03-12 Alan Modra <amodra@bigpond.net.au>
2048
2049 PR 5900
2050 * elf-bfd.h: Include elf/internal.h after elf/external.h.
2051 * elfcode.h (elf_swap_symbol_in): Map reserved shndx range.
2052 (elf_swap_symbol_out): Adjust SHN_XINDEX test.
2053 (elf_swap_ehdr_out): Mask SHN_LORESERVE and SHN_XINDEX to values
2054 seen in external structs.
2055 (valid_section_index_p): Delete.
2056 (elf_object_p): Don't increment section numbers over reserved range.
2057 Simplify test for valid sh_link, sh_info and e_shstrndx fields.
2058 (elf_write_shdrs_and_ehdr): Mask SHN_LORESERVE and SHN_XINDEX to values
2059 seen in external structs. Don't increment section numbers over
2060 reserved range.
2061 * elf.c (bfd_elf_sym_name): Remove redundant tests on st_shndx.
2062 (bfd_section_from_shdr): Likewise.
2063 (group_signature): Range check before accessing elf_elfsections.
2064 (_bfd_elf_setup_sections): Likewise.
2065 (bfd_section_from_shdr): Likewise.
2066 (bfd_section_from_shdr): Don't increment section number over
2067 reserved sections.
2068 (assign_file_positions_for_non_load_sections): Likewise.
2069 (assign_file_positions_except_relocs): Likewise.
2070 (_bfd_elf_write_object_contents): Likewise.
2071 (assign_section_numbers): Likewise. Adjust for changed SHN_*.
2072 (prep_headers): Delete unused variable.
2073 * elflink.c (bfd_elf_link_record_local_dynamic_symbol): Adjust
2074 for changed SHN_* values.
2075 (check_dynsym, elf_link_input_bfd): Likewise.
2076 (bfd_elf_final_link): Likewise. Don't skip over reserved section
2077 range.
2078 (elf_fixup_link_order): Check that sh_link field is valid.
2079 * elf-hppa.h (elf_hppa_add_symbol_hook): Make "index" unsigned.
2080 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Range check before
2081 accesssing elf_elfsections.
2082 * elf32-avr.c (elf32_avr_size_stubs): Likewise.
2083 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
2084 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Likewise.
2085 * elf64-hppa.c (elf64_hppa_check_relocs): Adjust for changed
2086 SHN_* defines. Test for SHN_BAD return from
2087 _bfd_elf_section_from_bfd_section
2088
2089 2008-03-12 Alan Modra <amodra@bigpond.net.au>
2090
2091 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Update prototype.
2092 * elf.c (_bfd_elf_section_from_bfd_section): Return unsigned int,
2093 SHN_BAD on error.
2094 (_bfd_elf_print_private_bfd_data): Test for SHN_BAD result from
2095 _bfd_elf_section_from_bfd_section, not -1.
2096 (swap_out_syms): Likewise.
2097 * elflink.c (elf_link_add_object_symbols): Likewise.
2098 (bfd_elf_get_bfd_needed_list): Likewise.
2099 (bfd_elf_match_symbols_in_sections): Likewise.
2100 (elf_link_add_object_symbols): Don't bother testing for symbols
2101 using normal sections before calling bfd_section_from_elf_index.
2102 (elf_link_input_bfd, bfd_elf_final_link): Likewise.
2103 (bfd_elf_reloc_symbol_deleted_p): Likewise.
2104 * elfcode.h (elf_slurp_symbol_table): Likewise.
2105 * elf32-spu.c (get_sym_h): Likewise.
2106 * elf32-xtensa.c (get_elf_r_symndx_section): Likewise.
2107 * elf64-ppc.c (opd_entry_value, get_sym_h, ppc64_elf_edit_toc): Ditto.
2108 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
2109
2110 2008-03-11 Alan Modra <amodra@bigpond.net.au>
2111
2112 * elf32-spu.c (spu_elf_relocate_section): Test identical conditions
2113 to those in process_stubs for overlay symbols.
2114
2115 2008-03-09 Paul Brook <paul@codesourcery.com>
2116
2117 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
2118 Tag_VFP_arch values.
2119
2120 2008-03-08 Paul Brook <paul@codesourcery.com>
2121
2122 * elf32-arm.c (insert_thumb_branch): Rewrite.
2123 (elf32_thumb_to_arm_stub): Use new insert_thumb_branch.
2124
2125 2008-03-07 Paul Brook <paul@codesourcery.com>
2126
2127 * elf32-arm.c (elf32_arm_howto_table_1): Fix bitmasks for MOVW and
2128 MOVT relocations.
2129 (elf32_arm_final_link_relocate): Fix off by one MOVW/MOVT sign
2130 extension.
2131 (elf32_arm_relocate_section): Handle MOVW and MOVT
2132 relocations. Improve safety check for other weird relocations.
2133 (elf32_arm_check_relocs): Only set h->needs_plt for branch/call
2134 relocations.
2135
2136 2008-03-03 Bob Wilson <bob.wilson@acm.org>
2137
2138 * xtensa-isa.c (xtensa_isa_num_pipe_stages): Make max_stage static and
2139 only compute its value once.
2140
2141 2008-03-03 Alan Modra <amodra@bigpond.net.au>
2142
2143 * elf32-spu.c (struct got_entry): Add "addend" field.
2144 (count_stub, build_stub): Use a new stub if relocation addend
2145 differs from existing stubs for this symbol.
2146 (process_stubs): Deal with addends.
2147 (spu_elf_relocate_section, spu_elf_output_symbol_hook): Likewise.
2148
2149 2008-03-02 H.J. Lu <hongjiu.lu@intel.com>
2150
2151 PR ld/5789
2152 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true
2153 for hidden and local symbols.
2154
2155 2008-03-03 Alan Modra <amodra@bigpond.net.au>
2156
2157 * elf32-ppc.c (allocate_dynrelocs): Discard relocs on
2158 undefined symbols with internal or hidden visibility.
2159 (ppc_elf_relocate_section): Likewise. Use SYMBOL_CALLS_LOCAL
2160 rather than SYMBOL_REFERENCES_LOCAL on branches. Don't
2161 return immediately on dynamic reloc error.
2162
2163 2008-03-01 Alan Modra <amodra@bigpond.net.au>
2164
2165 * elf64-ppc.c (build_plt_stub): Add relocs on plt call stubs
2166 if emitrelocations.
2167 (get_relocs): New function, split out from..
2168 (ppc_build_one_stub): ..here. Add relocs on plt_branch stubs if
2169 emitrelocations. Remove indx temp.
2170 (ppc_size_one_stub): Count new stub relocs.
2171 (ppc64_elf_size_stubs): Count new glink reloc.
2172 (ppc64_elf_build_stubs): Emit glink reloc if emitrelocations.
2173 (ppc64_elf_finish_dynamic_sections): Output glink relocs.
2174 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Describe non-pic
2175 glink code.
2176
2177 2008-02-28 Alan Modra <amodra@bigpond.net.au>
2178
2179 * elf32-spu.c (mark_functions_via_relocs): Don't assume that
2180 the "->start" pointer reaches to function origin, so that we
2181 can handle functions split over more than two sections.
2182 (build_call_tree): Likewise.
2183 (pasted_function): Don't attempt to set fun->start back to the
2184 function origin, just go back one section.
2185
2186 2008-02-27 Catherine Moore <clm@codesourcery.com>
2187
2188 * elf.c ( _bfd_elf_print_private_bfd_data): Call
2189 elf_backend_get_target_dtag if defined.
2190 * elf32-mips.c (elf_backend_get_target_dtag): Define.
2191 * elf64-mips.c: Likewise.
2192 * elfn32-mips.c: Likewise.
2193 * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New.
2194 * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare.
2195 * elf-bfd.h (elf_backend_get_target_dtag): Add prototype.
2196 * elfxx-target.h (elf_backend_get_target_dtag): Add default.
2197 (elf_backend_data): Add elf_backend_get_target_dtag.
2198
2199 2008-02-26 Alan Modra <amodra@bigpond.net.au>
2200
2201 * elf32-ppc.c (ppc_elf_check_relocs): Set pointer_equality_needed
2202 for R_PPC_REL32 syms. Don't set non_got_ref on branch reloc syms,
2203 and assume branch relocs are not dynamic when non-shared.
2204 (readonly_dynrelocs): New function, split out from..
2205 (maybe_set_textrel): ..here, renamed from old readonly_dynrelocs.
2206 (ppc_elf_adjust_dynamic_symbol): For symbols generating plt entries,
2207 clear non_got_ref..
2208 (allocate_dynrelocs): ..and don't set u.def for undefined weak.
2209 Do allow dynamic relocs on undefined symbols.
2210 (ppc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
2211 (ppc_elf_relocate_section): Mirror dynamic reloc changes in
2212 check_relocs.
2213 (ppc_elf_finish_dynamic_symbol): Don't give a warning on weak
2214 plt symbols needing pointer_equality_needed.
2215
2216 2008-02-23 Alan Modra <amodra@bigpond.net.au>
2217
2218 * elf32-ppc.c (ppc_elf_check_relocs): Revert non_got_ref change.
2219
2220 2008-02-23 Alan Modra <amodra@bigpond.net.au>
2221
2222 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Copy
2223 pointer_equality_needed.
2224 (ppc_elf_check_relocs): Split out non-branch relocs from others
2225 that might emit dynamic relocs. Set pointer_equality_needed
2226 for their symbols. Don't set non_got_ref on branch reloc symbols.
2227 (ppc_elf_hash_symbol): New function.
2228 (elf_backend_hash_symbol): Define.
2229 (ppc_elf_finish_dynamic_symbol): Handle pointer_equality_needed.
2230 Error if pointer_equality_needed on weak plt symbol.
2231
2232 2008-02-22 H.J. Lu <hongjiu.lu@intel.com>
2233
2234 PR ld/5788
2235 * elflink.c (elf_create_symbuf): Correct buffer size and
2236 position.
2237
2238 2008-02-22 Nick Clifton <nickc@redhat.com>
2239
2240 PR 868
2241 * dwarf2.c: Revert previous patch. All of the allocate memory is
2242 on an obstack which will be freed at some other time.
2243
2244 2008-02-20 Nick Clifton <nickc@redhat.com>
2245
2246 PR 868
2247 * libbfd.c (bfd_realloc_or_free): New function. Performs like
2248 bfd_realloc, but if the (re)allocation fails, the pointer is
2249 freed.
2250 * libbfd-in.h: Prototype.
2251 * libbfd.h: Regenerate.
2252 * bfdio.c (bfd_bwrite): Use the new function.
2253 (bfd_seek): Likewise.
2254 * bfdwin.c:(bfd_get_file_window): Likewise.
2255 * elf-strtab.c (_bfd_elf_strtab_add): Likewise.
2256 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
2257 * elf32-xtensa.c (vsprintf_msg): Likewise.
2258 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
2259 * stabs.c (_bfd_link_seciton_stabs): Likewise.
2260 * vms-misc.c (_bfd_vms_get_record): Likewise.
2261 * vms-tir.c (check_section): Likewise.
2262 * vms.c (vms_new_section_hook): Likewise.
2263 * elf32-arm.c (elf32_arm_section_map_add): Check that the
2264 allocation of sec_data->map succeeded before using it.
2265 * elflink.c (elf_link_output_sym): Do not overwrite finfo->
2266 symshndxbuf until it is known that the reallocation succeeded.
2267
2268 2008-02-20 Diogo de Carvalho Kraemer <diogo@kraemer.eng.br>
2269 Nick Clifton <nickc@redhat.com>
2270
2271 PR 868
2272 * dwarf2.c (read_abbrevs): Free the abbreviation table if we run
2273 out of memory.
2274 (decode_line_info): Free the line_info_table before returning a
2275 failure result.
2276 (_bfd_dwarf2_cleanup_debug_info): Free the abbreviation table.
2277 Free the line table. Free the function table. Free the variable
2278 table.
2279
2280 2008-02-17 Mark Kettenis <kettenis@gnu.org>
2281
2282 * elf.c (swap_out_syms): Avoid preprocessing directive within
2283 macro arg.
2284
2285 2008-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
2286
2287 * elf.c (assign_file_positions_for_load_sections): Set the type of
2288 PT_NOTE sections to SHT_NOTE.
2289
2290 2008-02-17 Ulrich Weigand <uweigand@de.ibm.com>
2291
2292 * simple.c (bfd_simple_get_relocated_section_contents): Set
2293 link_info.output_bfd.
2294
2295 2008-02-16 Nathan Sidwell <nathan@codesourcery.com>
2296
2297 * dwarf2.c (find_line): Don't trust debug information after an
2298 unparseable compilation unit.
2299
2300 2008-02-15 Alan Modra <amodra@bigpond.net.au>
2301
2302 PR 5765
2303 * section.c (SEC_LINK_DUPLICATES): Correct. Renumber following flags.
2304 * bfd-in2.h: Regenerate.
2305
2306 2008-02-15 Alan Modra <amodra@bigpond.net.au>
2307
2308 * elf-bfd.h (enum elf_object_id): Add HPPA_ELF_TDATA.
2309 * elf.c (bfd_elf_allocate_object): Don't check for already allocated
2310 tdata.
2311 * elf32-hppa.c (elf32_hppa_mkobject): New function.
2312 (bfd_elf32_mkobject): Define.
2313 * elf32-ppc.c (is_ppc_elf_target): Delete. Replace all uses with..
2314 (is_ppc_elf): ..this new macro.
2315 * elf64-ppc.c (is_ppc64_elf_target): Delete. Replace all uses with..
2316 (is_ppc64_elf): ..this new macro.
2317
2318 2008-02-15 Alan Modra <amodra@bigpond.net.au>
2319
2320 * elflink.c: Replace all accesses to hash->creator field with
2321 output_bfd->xvec.
2322 * cofflink.c: Likewise.
2323 * coff-h8300.c: Likewise.
2324 * ecoff.c: Likewise.
2325 * elf32-m68hc1x.c: Likewise.
2326 * elf32-ppc.c: Likewise.
2327 * elf64-alpha.c: Likewise.
2328 * elf64-ppc.c: Likewise.
2329 * elf64-sparc.c: Likewise.
2330 * elfxx-mips.c: Likewise.
2331 * i386linux.c: Likewise.
2332 * m68klinux.c: Likewise.
2333 * sparclinux.c: Likewise.
2334 * sunos.c: Likewise.
2335 * xcofflink.c: Likewise.
2336 * linker.c: Likewise.
2337 (_bfd_link_hash_table_init): Don't store creator.
2338
2339 2008-02-14 Peter Jones <pjones@redhat.com>
2340
2341 * efi-rtdrv-ia32.c: New file.
2342 * efi-bsdrv-ia32.c: New file.
2343 * efi-rtdrv-ia64.c: New file.
2344 * efi-bsdrv-ia64.c: New file.
2345 * efi-rtdrv-x86_64.c: New file.
2346 * efi-bsdrv-x86_64.c: New file.
2347 * peicode.h (pe_bfd_object_p): Add support for boot service and
2348 runtime service drivers.
2349 * libpei.h: Add macros for EFI formats, and rename the efi application
2350 format macros to disambiguate.
2351 * targets.c: Add bfd_target _vec externs.
2352 (_bfd_tar): Add EFI _vec entries.
2353 * config.bfd: Add EFI vectors into the selection routines.
2354 * configure.in: add EFI _vec entries.
2355 * configure: Regenerate.
2356 * Makefile.am: Add EFI files.
2357 * Makefile.in: Regenerate.
2358
2359 2008-02-14 Nathan Sidwell <nathan@codesourcery.com>
2360
2361 * dwarf1.c (struct dwarf1_debug): Add syms member.
2362 (alloc_dwarf1_unit, alloc_dwarf1_func): Check for out of memory.
2363 (parse_line_table, _bfd_dwarf1_find_nearest_line): Relocate
2364 section contents, check for out of memory.
2365
2366 * dwarf1.c (struct dwarf1_debug): Change data pointers to bfd_byte.
2367 (parse_die): Change data pointers to bfd_byte.
2368 (parse_line_table, parse_functions_in_unit): Likewise.
2369
2370 2008-02-14 Alan Modra <amodra@bigpond.net.au>
2371
2372 * elflink.c (compute_bucket_count): Warning fixes.
2373
2374 2008-02-12 DJ Delorie <dj@redhat.com>
2375
2376 * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
2377 relocation pointing to local symbol in merged section.
2378
2379 * elf32-iq2000.c (iq2000_elf_relocate_offset16): New.
2380 (iq2000_elf_relocate_section): Call it.
2381
2382 2008-02-12 Nick Clifton <nickc@redhat.com>
2383
2384 PR ld/5692
2385 * elf-bfd.h (enum elf_object_id): New enum, used to identify
2386 target specific extensions to the elf_obj_tdata structure.
2387 (struct elf_obj_tdata): New field 'object_id'.
2388 (elf_object_id, elf_program_header_size, elf_symtab_hdr): New
2389 macros for accessing fields in the elf_obj_tdata structure.
2390 (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object.
2391 (bfd_elf_allocate_object): New function.
2392 * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object
2393 and implement by calling bfd_elf_allocate_object.
2394 (bfd_elf_allocate_object): New function: Allocates an
2395 elf_obj_tdata structure, possibly with a target specific
2396 extension.
2397 * elfxx-target.h (bfd_elfNN_mkobject): Use
2398 bfd_elf_make_generic_object as the default value.
2399 * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata
2400 for consistency with other, similar structures.
2401 (is_arm_elf): New macro. Checks a BFD to make sure that is an ARM
2402 ELF bfd.
2403 (elf32_arm_mkobject): Call bfd_elf_allocate_object.
2404 (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check
2405 the bfd being processed.
2406 (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
2407 (bfd_elf32_arm_set_target_relocs): Likewise.
2408 (bfd_elf32_arm_final_link_relocate): Likewise.
2409 (bfd_elf32_arm_copy_private_bfd_data): Likewise.
2410 (bfd_elf32_arm_merge_eabi_attributes): Likewise.
2411 (bfd_elf32_arm_merge_private_bfd_data): Likewise.
2412 (bfd_elf32_arm_check_relocs): Likewise.
2413 (bfd_elf32_arm_gc_mark_extra_sections): Likewise.
2414 (bfd_elf32_arm_size_dynamic_sections): Likewise.
2415 (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr.
2416 (bfd_elf32_arm_init_maps): Likewise.
2417 (bfd_elf32_arm_final_link_relocate): Likewise.
2418 (bfd_elf32_arm_relocate_section): Likewise.
2419 (bfd_elf32_arm_gc_sweep_hook): Likewise.
2420 (bfd_elf32_arm_check_relocs): Likewise.
2421 (bfd_elf32_arm_size_dynamic_sections): Likewise.
2422 * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object.
2423 (is_i386_elf): New macro. Checks a BFD to make sure that is an x86
2424 ELF bfd.
2425 (elf_i386_check_relocs): Use is_i386_elf macro to check the bfd
2426 being processed.
2427 (elf_i386_size_dynamic_sections): Likewise.
2428 (elf_i386_relocate_section): Likewise.
2429 (elf_i386_check_relocs): Use elf_symtab_hdr.
2430 (elf_i386_gc_sweep_hook): Likewise.
2431 (elf_i386_size_dynamic_sections): Likewise.
2432 (elf_i386_relocate_section): Likewise.
2433 * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object.
2434 (elf_create_pointer_linker_section): Use is_ppc_elf_target to
2435 verify that the bfd before accessing target specific fields.
2436 (ppc_elf_check_relocs): Likewise.
2437 (elf_finish_pointer_linker_section): Likewise.
2438 (elf_create_pointer_linker_section): Use elf_symtab_hdr.
2439 (ppc_elf_check_relocs): Likewise.
2440 (ppc_elf_gc_sweep_hook): Likewise.
2441 (ppc_elf_tls_optimize): Likewise.
2442 (ppc_elf_size_dynamic_sections): Likewise.
2443 (ppc_elf_relax_section): Likewise.
2444 (ppc_elf_relocate_section): Likewise.
2445 * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment
2446 reminding programmers to keep this structure in sync with the one
2447 defined in elf64-s390.c.
2448 (elf_s390_mkobject): Call bfd_elf_allocate_object.
2449 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
2450 ELF bfd.
2451 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
2452 being processed.
2453 (elf_s390_size_dynamic_sections): Likewise.
2454 (elf_s390_relocate_section): Likewise.
2455 (elf_s390_check_relocs): Use elf_symtab_hdr.
2456 (elf_s390_gc_sweep_hook): Likewise.
2457 (elf_s390_size_dynamic_sections): Likewise.
2458 (elf_s390_relocate_section): Likewise.
2459 * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object.
2460 (is_sh_elf): New macro. Checks a BFD to make sure that is an SH
2461 ELF bfd.
2462 (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the
2463 bfd being processed.
2464 (sh_elf_relocate_section): Likewise.
2465 (sh_elf_check_relocs): Likewise.
2466 (sh_elf_copy_private_data): Likewise.
2467 (sh_elf_relax_section): Use elf_symtab_hdr.
2468 (sh_elf_size_dynamic_sections): Likewise.
2469 (sh_elf_relocate_section): Likewise.
2470 (sh_elf_get_relocated_section_contents): Likewise.
2471 (sh_elf_gc_sweep_hook): Likewise.
2472 (sh_elf_check_relocs): Likewise.
2473 * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object.
2474 (is_alpha_elf): New macro. Checks a BFD to make sure that is an
2475 Alpha ELF bfd.
2476 (elf64_alpha_create_got_section): Use is_alpha_elf macro to check
2477 the bfd being processed.
2478 (elf64_alpha_create_dynamic_section): Likewise.
2479 (elf64_alpha_check_relocs): Likewise.
2480 (elf64_alpha_size_got_sections): Likewise.
2481 (elf64_alpha_relax_section): Likewise.
2482 (elf64_alpha_relocate_section): Likewise.
2483 (elf64_alpha_final_link): Likewise.
2484 (elf64_alpha_check_relocs): Use elf_symtab_hdr.
2485 (elf64_alpha_relax_section): Likewise.
2486 (elf64_alpha_relocate_section_r): Likewise.
2487 (elf64_alpha_relocate_section): Likewise.
2488 * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object.
2489 (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd
2490 being processed.
2491 (opd_entry_value): Likewise.
2492 (allocate_dynrelocs): Likewise.
2493 (ppc64_elf_relocate_section): Likewise.
2494 (ppc64_elf_check_relocs): Use elf_symtab_hdr.
2495 (opd_entry_value): Likewise.
2496 (ppc64_elf_gc_sweep_hook): Likewise.
2497 (get_sym_h): Likewise.
2498 (ppc64_elf_edit_opd): Likewise.
2499 (ppc64_elf_tls_optimize): Likewise.
2500 (ppc64_elf_edit_toc): Likewise.
2501 (ppc64_elf_size_dynamic_sections): Likewise.
2502 (toc_adjusting_stub_needed): Likewise.
2503 (ppc64_elf_size_stubs): Likewise.
2504 (ppc64_elf_relocate_section): Likewise.
2505 * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment
2506 reminding programmers to keep this structure in sync with the one
2507 defined in elf32-s390.c.
2508 (elf_s390_mkobject): Call bfd_elf_allocate_object.
2509 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
2510 ELF bfd.
2511 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
2512 being processed.
2513 (elf_s390_size_dynamic_sections): Likewise.
2514 (elf_s390_relocate_section): Likewise.
2515 (elf_s390_check_relocs): Use elf_symtab_hdr.
2516 (elf_s390_gc_sweep_hook): Likewise.
2517 (elf_s390_size_dynamic_sections): Likewise.
2518 (elf_s390_relocate_section): Likewise.
2519 * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object.
2520 (is_x86_64_elf): New macro. Checks a BFD to make sure that is an
2521 x86_64 ELF bfd.
2522 (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd
2523 being processed.
2524 (elf64_x86_64_size_dynamic_sections): Likewise.
2525 (elf64_x86_64_relocate_section): Likewise.
2526 (elf64_x86_64_check_relocs): Use elf_symtab_hdr.
2527 (elf64_x86_64_gc_sweep_hook): Likewise.
2528 (elf64_x86_64_size_dynamic_sections): Likewise.
2529 (elf64_x86_64_relocate_section): Likewise.
2530 * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object.
2531 (is_sparc_elf): New macro. Checks a BFD to make sure that is a Sparc
2532 ELF bfd.
2533 (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the
2534 bfd being processed.
2535 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
2536 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
2537 (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr.
2538 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
2539 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
2540 (_bfd_sparc_elf_relocate_section): Likewise.
2541
2542 2008-02-12 Alan Modra <amodra@bigpond.net.au>
2543
2544 PR 5303, 5755
2545 * arange-set.c: Delete.
2546 * arange-set.h: Delete.
2547 * dwarf2.c: Revert 2007-09-21 changes.
2548 * Makefile.am: Likewise.
2549 * Makefile.in: Regenerate.
2550 * po/SRC-POTFILES.in: Regenerate.
2551
2552 2008-02-11 Bernd Schmidt <bernd.schmidt@analog.com>
2553
2554 * elf32-bfin.c (bfin_relocate_section): Set up dynobj before using it
2555 if necessary.
2556 (elf32_bfin_merge_private_bfd_data): Simplify, and ensure object type
2557 mismatches are detected.
2558
2559 * elf32-bfin.c (bfinfdpic_relocate_section): Take more care not to
2560 emit invalid relocs or rofixup entries for deleted .eh_frame entries.
2561
2562 2008-02-11 Daniel Jacobowitz <dan@codesourcery.com>
2563
2564 * cache.c (cache_bread): Set bfd_error_file_truncated if EOF
2565 was reached.
2566 * srec.c (srec_scan): Calculate the checksum. Complain on mismatch.
2567
2568 2008-02-07 Alan Modra <amodra@bigpond.net.au>
2569
2570 * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling
2571 of _ovly_buf_table size.
2572 (spu_elf_build_stubs): Use low bit of .size as "present" bit.
2573 Adjust initialisations relating to _ovly_buf_table.
2574
2575 2008-02-04 Bob Wilson <bob.wilson@acm.org>
2576
2577 * elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid
2578 relocation, do not continue processing it. Ignore R_XTENSA_ASM_EXPAND
2579 relocations against dynamic symbols.
2580 (elf_xtensa_finish_dynamic_sections): Do not fail if there is no
2581 .xt.lit section.
2582
2583 2008-02-04 Kai Tietz <kai.tietz@onevision.com>
2584 H.J. Lu <hongjiu.lu@intel.com>
2585
2586 PR 5715
2587 * warning.m4: Enable -Wno-format by default when using gcc on
2588 mingw.
2589 * configure: Regenerated.
2590
2591 2008-02-04 Adam Nemet <anemet@caviumnetworks.com>
2592
2593 * archures.c: Update copyright.
2594 (bfd_mach_mips_octeon): New macro.
2595 * bfd-in2.h: Regenerate.
2596 * elfxx-mips.c (_bfd_elf_mips_mach): Handle Octeon.
2597 (mips_set_isa_flags): Likewise.
2598 (mips_mach_extensions): Add Octeon.
2599 * cpu-mips.c: Update copyright.
2600 (I_mipsocteon): New enum constant.
2601 (arch_info_struct): Add Octeon.
2602
2603 2008-02-04 Alan Modra <amodra@bigpond.net.au>
2604
2605 * elf32-spu.c (spu_elf_relocate_section): Correct return type.
2606 Return error status on unexpected relocation errors.
2607
2608 2008-02-04 Alan Modra <amodra@bigpond.net.au>
2609
2610 PR ld/5692
2611 * elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31. Instead abort
2612 on non-ELF input.
2613 * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue
2614 processing on non-ELF input.
2615
2616 2008-01-31 Marc Gauthier <marc@tensilica.com>
2617
2618 * config.bfd (xtensa*-*-*): Recognize processor variants.
2619
2620 2008-01-31 Nick Clifton <nickc@redhat.com>
2621
2622 PR ld/5692
2623 * elf.c (bfd_elf_get_elf_syms): Check the return value of
2624 get_elf_backend_data.
2625
2626 2008-01-28 Fabian Groffen <grobian@gentoo.org>
2627
2628 * config.bfd (x86_64-*-solaris2): Add support for this target.
2629
2630 2008-01-28 Alan Modra <amodra@bigpond.net.au>
2631
2632 Rewrite SPU overlay handling code. Put overlay calls stubs in the
2633 overlays where possible. Use a faster call stub, or optionally at
2634 compile time, a more compact stub. Double size of _ovly_buf_table
2635 so that low bit of _ovly_table.buf can be used as a "present" bit.
2636 Reserve an extra _ovly_table entry for index zero.
2637 * elf32-spu.c: (struct spu_link_hash_table): Delete a number of fields,
2638 add new ones.
2639 (struct got_entry): New.
2640 (struct spu_stub_hash_entry): Delete.
2641 (stub_hash_newfunc, spu_elf_link_hash_table_free): Delete.
2642 (spu_elf_link_hash_table_create): Adjust for struct changes.
2643 (spu_stub_name): Delete.
2644 (spu_elf_find_overlays): Don't track sections from overlay regions.
2645 Instead set ovl_buf number in spu elf section data. Error if
2646 overlays in one region don't start at the same address. Adjust
2647 for struct _spu_elf_section_data changes.
2648 (SIZEOF_STUB1, SIZEOF_STUB2, ILA_79, ILA_78): Delete.
2649 (OVL_STUB_SIZE, BRSL, LNOP, ILA): Define.
2650 (needs_ovl_stub): Adjust for struct _spu_elf_section_data changes.
2651 (enum _insn_type): New.
2652 (count_stub, build_stub): New functions.
2653 (allocate_spuear_stubs): Use count_stub.
2654 (build_spuear_stubs): Use build_stub.
2655 (populate_stubs, sort_stubs): Delete.
2656 (process_stubs): New function.
2657 (write_one_stub): Delete.
2658 (spu_elf_size_stubs, spu_elf_build_stubs): Rewrite.
2659 (alloc_stack_info): Adjust for struct _spu_elf_section_data changes.
2660 (maybe_insert_function, check_function_ranges): Likewise.
2661 (find_function, pasted_function, build_call_tree): Likewise.
2662 (spu_elf_stack_analysis, spu_elf_modify_segment_map): Likewise.
2663 (spu_elf_modify_program_headers): Likewise.
2664 (interesting_section): Detect stub sections differently. Delete
2665 htab param, adjust all callers.
2666 (spu_elf_relocate_section): Rewrite stub handling.
2667 (spu_elf_output_symbol_hook): Likewise.
2668 (bfd_elf32_bfd_link_hash_table_free): Delete.
2669 * elf32-spu.h (struct _spu_elf_section_data): Move input-only and
2670 output-only fields into a union. Add ovl_buf.
2671 (spu_elf_size_stubs, spu_elf_build_stubs): Update prototypes.
2672
2673 2008-01-25 DJ Delorie <dj@redhat.com>
2674
2675 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
2676
2677 2008-01-25 Kai Tietz <kai.tietz@onevision.com>
2678
2679 * bfd-in.h: Add mingw I64 support.
2680 * bfd-in2.h: Regenerated.
2681 * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64.
2682
2683 2008-01-21 Alan Modra <amodra@bigpond.net.au>
2684
2685 PR 4453
2686 * format.c (bfd_check_format_matches): Don't accept archives as
2687 fully matching unless they have a map.
2688
2689 2008-01-21 Alan Modra <amodra@bigpond.net.au>
2690
2691 * elflink.c (_bfd_elf_link_output_relocs): Correct error return.
2692
2693 2008-01-21 Alan Modra <amodra@bigpond.net.au>
2694
2695 * ecoff.c (_bfd_ecoff_archive_p): Delete.
2696 * libecoff.h (_bfd_ecoff_archive_p): Delete.
2697 * coff-alpha.c (ecoffalpha_little_vec): Use bfd_generic_archive_p.
2698 * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
2699 (ecoff_biglittle_vec): Likewise.
2700
2701 2008-01-19 Alan Modra <amodra@bigpond.net.au>
2702
2703 PR 5646
2704 * elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
2705 non-NULL before dereferencing.
2706
2707 2008-01-15 Alan Modra <amodra@bigpond.net.au>
2708
2709 PR 5604
2710 * elf-bfd.h (struct elf_backend_data): Add gc_keep. Remove param
2711 names from others.
2712 (_bfd_elf_gc_keep): Declare.
2713 * elfxx-target.h (elf_backend_gc_keep): Define.
2714 (elfNN_bed): Init new field.
2715 * elflink.c (_bfd_elf_gc_keep): New function.
2716 (bfd_elf_gc_sections): Call gc_keep.
2717 * elf64-ppc.c (elf_backend_gc_keep): Define.
2718 (struct _ppc64_elf_section_data): Move .opd related fields to
2719 a struct so they don't occupy the same storage. Adjust accesses
2720 throughout file.
2721 (ppc64_elf_gc_keep): New function, split out from..
2722 (ppc64_elf_gc_mark_hook): ..here. Don't call _bfd_elf_gc_mark
2723 to mark .opd section, just set gc_mark.
2724 (ppc64_elf_edit_opd): Remove no_opd_opt parm. Don't set opd->adjust
2725 unless we are changing .opd. Test non-NULL opd->adjust at all
2726 accesses throughout file.
2727 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
2728
2729 2008-01-15 Alan Modra <amodra@bigpond.net.au>
2730
2731 * bfd-in.h (BFD_HOST_LONG_LONG): Delete.
2732 * bfd-in2.h: Regenerate.
2733
2734 2008-01-11 Tristan Gingold <gingold@adacore.com>
2735 Eric Botcazou <ebotcazou@adacore.com>
2736
2737 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a
2738 relocatable.
2739 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
2740 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
2741 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
2742 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
2743 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
2744 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
2745 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2746 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2747 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
2748 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
2749 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2750 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2751 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise.
2752 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
2753 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
2754 * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output
2755 or executable output with relocations.
2756
2757 2008-01-09 Nick Clifton <nickc@redhat.com>
2758
2759 PR gas/5552
2760 * elf32-fr30.c (fr30_elf_howto_table): Set partial_inplace field
2761 to FALSE for all relocs.
2762
2763 2008-01-09 Richard Sandiford <rsandifo@nildram.co.uk>
2764
2765 PR ld/5526
2766 * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged
2767 fields. Rename u.cie.u.merged to u.cie.u.merged_with.
2768 (eh_frame_sec_info): Add a cies field.
2769 (eh_frame_hdr_info): Add a merge_cies field.
2770 * elf-eh-frame.c (cie): Add a reloc_index member to the personality
2771 union.
2772 (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead
2773 of hdr_info->cies.
2774 (_bfd_elf_parse_eh_frame): Remove tmp_cie. Ccreate an array of
2775 cie structures in all cases and use it instead of extended_cies.
2776 If merging, store the cie array in sec_info->cies and point each
2777 CIE's eh_fde_cie at the associated element. Do not try to
2778 calculate the value of the personality routine here; record the
2779 offset of the relocation instead. Do not merge CIEs here.
2780 (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here...
2781 (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead.
2782 (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE.
2783 (find_merged_cie): New function.
2784 (_bfd_elf_gc_mark_fdes): Use it. Free sec_info->cies.
2785
2786 2008-01-07 Nick Clifton <nickc@redhat.com>
2787
2788 PR binutils/5535
2789 * vms.c (vms_close_and_cleanup): Check for the presence of a
2790 vms_private_data_struct before examining any of its fields.
2791
2792 2008-01-07 H.J. Lu <hongjiu.lu@intel.com>
2793
2794 PR ld/5522
2795 * elflink.c (elf_link_input_bfd): Don't write out a section if
2796 its output section is marked with SEC_NEVER_LOAD.
2797
2798 For older changes see ChangeLog-2007
2799 \f
2800 Local Variables:
2801 mode: change-log
2802 left-margin: 8
2803 fill-column: 74
2804 version-control: never
2805 End:
This page took 0.114457 seconds and 5 git commands to generate.