bfd/
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
2
3 * elfxx-mips.c (mips_elf_record_relocs): Defer allocation of a
4 global GOT entry when deferring allocation of dynamic relocations.
5 (allocate_dynrelocs): When allocating deferred dynamic relocations,
6 also do the deferred allocation of a GOT entry.
7
8 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
9
10 * elfxx-mips.c (mips_got_info): Add a "reloc_only_gotno" field.
11 (mips_elf_got_section): Delete.
12 (mips_elf_sort_hash_table): Use g->reloc_only_gotno to decide
13 how many reloc-only entries there are.
14 (mips_elf_count_got_symbols): Adjust g->reloc_only_gotno as
15 well as g->global_gotno.
16 (mips_elf_make_got_per_bfd): Initialize reloc_only_gotno.
17 (mips_elf_multi_got): Likewise. Use gg->reloc_only_gotno
18 rather than gg->assigned_gotno to store the number of
19 reloc-only GOT entries.
20 (mips_elf_create_got_section): Remove the MAYBE_EXCLUDE parameter.
21 Initialize reloc_only_gotno.
22 (mips_elf_calculate_relocation): Check htab->got_info instead of
23 dynobj when deciding whether to call mips_elf_adjust_gp,
24 (_bfd_mips_elf_create_dynamic_sections): Adjust the call
25 to mips_elf_create_got_section.
26 (mips_elf_record_relocs): Likewise. Remove redundant
27 "dynobj == NULL" code. Do not use mips_elf_create_got_section
28 or mips_elf_record_global_got_symbol for R_MIPS_32, R_MIPS_REL32
29 and R_MIPS_64; limit global_got_area to GGA_RELOC_ONLY instead.
30 (_bfd_mips_elf_finish_dynamic_symbol): Use htab->sgot instead
31 of mips_elf_got_section.
32 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
33 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
34 Move the initial assignment of G to the block that uses it;
35 it is used for an unrelated purpose later.
36
37 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
38
39 * elfxx-mips.c (count_section_dynsyms): Move before the new first use.
40 (mips_elf_sort_hash_table): Take the output bfd as a parameter.
41 Remove the MAX_LOCAL parameter. Exit early if there are no
42 dynamic symbols, if there is no dynobj, or if there is no
43 GOT section. Use count_section_dynsyms instead of MAX_LOCAL.
44 Assert == rather than <= when checking hsd.max_unref_got_dynindx.
45 Also assert that g->global_gotno is right.
46 (mips_elf_count_forced_local_got_symbols): Rename to...
47 (mips_elf_count_got_symbols): ...and count global GOT entries too.
48 Set the global_got_area of a forced-local GGA_RELOC_ONLY symbol
49 to GGA_NONE.
50 (mips_elf_multi_got): Don't sort the symbol table.
51 (mips_elf_lay_out_got): Likewise. Use mips_elf_count_got_symbols
52 to count the number of global GOT entries.
53 (_bfd_mips_elf_final_link): Unconditionally call
54 mips_elf_sort_hash_table.
55
56 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
57
58 * elfxx-mips.c (GGA_NORMAL, GGA_RELOC_ONLY, GGA_NONE): New macros.
59 (mips_elf_link_hash_entry): Add a "global_got_area" field.
60 (mips_elf_link_hash_newfunc): Initialize it.
61 (mips_elf_sort_hash_table_f): Use h->global_got_area instead of
62 h->root.got.offset. Do not handle forced_local symbols specially.
63 (mips_elf_record_global_got_symbol): Set h->global_got_area
64 instead of h->root.got.offset.
65 (mips_elf_recreate_got): Assert that h->global_got_area == GGA_NONE
66 for indirect and warning symbols.
67 (mips_elf_count_forced_local_got_symbols): Change the argument
68 from a "elf_link_hash_entry" to "mips_elf_link_hash_entry".
69 Use and set h->global_got_area instead of h->root.got.offset.
70 Set it to GGA_NONE for all forced-local symbols.
71 (mips_elf_set_global_got_offset): Set h->global_got_area
72 instead of h->root.got.offset. Use g->global_got_area instead
73 of a combination of dynindx, forced_local and tls_type.
74 (mips_elf_multi_got): Remove disabled code. Pass GGA_* values to
75 mips_elf_set_global_got_offset.
76 (mips_elf_lay_out_got): Use mips_elf_link_hash_traverse instead
77 of elf_link_hash_traverse.
78 (_bfd_mips_elf_copy_indirect_symbol): Copy the indirect symbol's
79 global_got_area to the direct symbol if the latter's value is higher.
80 Set the indirect symbol's area to GGA_NONE.
81
82 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
83
84 * elf32-mips.c (elf_backend_hide_symbol): Delete.
85 * elfn32-mips.c (elf_backend_hide_symbol): Likewise.
86 * elf64-mips.c (elf_backend_hide_symbol): Likewise.
87 * elfxx-mips.h (elf_backend_hide_symbol): Likewise.
88 * elfxx-mips.c (mips_elf_link_hash_entry): Remove "forced_local"
89 and add "needs_lazy_stub".
90 (mips_elf_link_hash_newfunc): Update accordingly.
91 (mips_elf_link_hash_table): Remove "computed_got_sizes" and
92 add "lazy_stub_count".
93 (_bfd_mips_elf_link_hash_table_create): Update accordingly.
94 (mips_elf_output_extsym): Use hd->needs_lazy_stub to detect
95 cases where a lazy stub is being used.
96 (mips_elf_sort_hash_table_f): Use h->root.forced_local instead
97 of h->forced_local.
98 (mips_elf_record_global_got_symbol): Use _bfd_elf_link_hash_hide_symbol
99 instead of _bfd_mips_elf_hide_symbol. Do not increment local_gotno
100 here.
101 (mips_elf_allocate_dynamic_relocations): Move before new first use.
102 (mips_elf_check_recreate_got, mips_elf_recreate_got): New functions.
103 (mips_elf_resolve_final_got_entries): Move earlier in file. Make at
104 most two passes over the hash table. Use mips_elf_check_recreate_got
105 to see if there are any indirect or warning entries and
106 mips_elf_recreate_got to create a new GOT without them.
107 Return a boolean success value.
108 (mips_elf_count_forced_local_got_entries): New function.
109 (mips_elf_make_got_per_bfd): Check h->root.forced_local instead of
110 h->forced_local.
111 (mips_elf_set_global_got_offset): Likewise.
112 (mips_elf_set_no_stub): Replace with...
113 (mips_elf_forbid_lazy_stubs): ...this new function.
114 (mips_elf_resolve_final_got_entry): Delete.
115 (mips_elf_multi_got): Fix formatting. Use mips_elf_forbid_lazy_stubs
116 instead of mips_elf_set_no_stub. Move the code that sets
117 global offsets and allocates dynamic relocations from the main
118 _bfd_mips_elf_size_dynamic_sections loop to here.
119 (_bfd_mips_elf_adjust_dynamic_symbol): Do not allocate room in
120 .MIPS.stubs here; just set hmips->needs_lazy_stub and increment
121 htab->lazy_stub_count.
122 (_bfd_mips_elf_always_size_sections): Move the stub-estimation
123 code to mips_elf_estimate_stub_size and the GOT-sizing code to
124 mips_elf_lay_out_got. Do not call these functions here.
125 (mips_elf_estimate_stub_size): New function, split
126 out from _bfd_mips_elf_always_size_sections. Call
127 mips_elf_resolve_final_got_entries earlier. Count the number
128 of forced-local entries. Do not add stub sizes to loadable_size;
129 after this patch, the stub sizes are already included in the main
130 estimate. Allocate dynamic relocations here rather than in the
131 main _bfd_mips_elf_size_dynamic_sections loop.
132 (mips_elf_estimate_stub_size): New function, split out from
133 _bfd_mips_elf_always_size_sections.
134 (mips_elf_allocate_lazy_stub): New function.
135 (mips_elf_lay_out_lazy_stubs): Likewise.
136 (_bfd_mips_elf_size_dynamic_sections): Call mips_elf_estimate_stub_size,
137 mips_elf_lay_out_got and mips_elf_lay_out_lazy_stubs. Do not handle
138 the allocation of sreldyn specially.
139 (_bfd_mips_elf_hide_symbol): Delete.
140
141 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
142
143 * elfxx-mips.c (allocate_dynrelocs): Ignore indirect and warning
144 symbols.
145
146 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
147
148 * elfxx-mips.c (mips_elf_link_hash_entry): Move bfd_boolean
149 fields to the end of the structure and make them single-bit
150 bitfields.
151 (mips_elf_link_hash_newfunc): Make the initialization statements
152 follow the new field order.
153
154 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
155
156 * elfxx-mips.c (_mips_elf_section_data): Remove the "u.got_info" field.
157 (mips_elf_link_hash_table): Add "sgot" and "got_info" fields.
158 (_bfd_mips_elf_link_hash_table_create): Initialize them.
159 (mips_elf_got_section): Always apply the !maybe_excluded behavior.
160 (mips_elf_got_info): Delete.
161 (mips_elf_initialize_tls_slots): Remove the DYNOBJ local variable.
162 Adjust the call to mips_elf_got_section.
163 (mips_elf_local_got_index): Don't call mips_elf_got_info.
164 Update the call to mips_elf_create_local_got_entry.
165 Use htab->got_info.
166 (mips_elf_global_got_index): Don't call mips_elf_got_info;
167 use htab->got_info and htab->sgot instead.
168 (mips_elf_got_page): Don't call mips_elf_got_info. Update the
169 call to mips_elf_create_local_got_entry.
170 (mips_elf_got16_entry): Likewise.
171 (mips_elf_got_offset_from_index): Replace with DYNOBJ parameter
172 with an INFO parameter. Don't call mips_elf_got_info; use htab->sgot
173 and htab->got_info instead.
174 (mips_elf_create_local_got_entry): Remove the GG and SGOT parameters.
175 Use htab->sgot and htab->got_info.
176 (mips_elf_sort_hash_table): Remove the DYNOBJ local variable.
177 Don't call mips_elf_got_info; use htab->got_info instead.
178 (mips_elf_record_global_got_symbol): Turn G from a paramter to
179 a local variable and read it from htab->got_info.
180 (mips_elf_record_local_got_symbol): Replace the G parameter with
181 an INFO parameter. Make G a local variable and read it from
182 htab->got_info instead.
183 (mips_elf_record_got_page_entry): Likewise.
184 (mips_elf_multi_got): Remove the G parameter and make it a local
185 variable instead. Read it from htab->got_info.
186 (mips_elf_create_got_section): Cache the GOT section in htab->sgot.
187 Store the GOT information in htab->got_info.
188 (mips_elf_calculate_relocation): Don't call mips_elf_got_section
189 and mips_elf_got_info; use htab->sgot and htab->got_info instead.
190 Adjust the calls to mips_elf_got_offset_from_index and
191 mips_elf_adjust_gp.
192 (_bfd_mips_elf_check_relocs): Remove the G and SGOT local variables.
193 Adjust the calls to mips_elf_record_local_got_symbol,
194 mips_elf_record_global_got_symbol and mips_elf_record_got_page_entry.
195 Use htab->sgot.
196 (_bfd_mips_elf_always_size_sections): Remove the DYNOBJ local variable.
197 Don't call mips_elf_got_info; use htab->sgot and htab->got_info instead.
198 Update the call to mips_elf_multi_got.
199 (_bfd_mips_elf_size_dynamic_sections): Don't call mips_elf_got_info;
200 use htab->got_info instead.
201 (_bfd_mips_elf_finish_dynamic_symbol): Update the call to
202 mips_elf_got_section. Get the got_info from the hash table
203 rather than the GOT section.
204 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
205 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
206 (_bfd_mips_elf_hide_symbol): Don't call mips_elf_got_section;
207 get the got_info from the hash table instead. Remove the GOT
208 local variable.
209 (_bfd_mips_elf_final_link): Likewise. Also remove the DYNOBJ
210 local variable.
211
212 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
213
214 * elfxx-mips.c (mips_elf_link_hash_table): Add an "sstubs" field.
215 (_bfd_mips_elf_create_dynamic_sections): Use it to cache the stubs
216 section. Don't check whether the section already exists.
217 (_bfd_mips_elf_adjust_dynamic_symbol): Use htab->sstubs.
218 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
219 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
220 (_bfd_mips_elf_size_dynamic_sections): Likewise. Don't add the
221 dummy stub to an empty section.
222 (_bfd_mips_elf_link_hash_table_create): Initialize the "sstubs" field.
223
224 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
225
226 * reloc.c (BFD_RELOC_MIPS16_GOT16, BFD_RELOC_MIPS16_CALL16): Declare.
227 * libbfd.h, bfd-in2.h: Regenerate.
228 * elf32-mips.c (elf_mips16_howto_table_rel): Fill in reserved
229 R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
230 (mips16_reloc_map): Add mappings.
231 * elf64-mips.c (mips16_elf64_howto_table_rel): Fill in reserved
232 R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
233 (mips16_elf64_howto_table_rela): Likewise.
234 (mips16_reloc_map): Add mappings.
235 * elfn32-mips.c (elf_mips16_howto_table_rel): Fill in reserved
236 R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
237 (elf_mips16_howto_table_rela): Likewise.
238 (mips16_reloc_map): Add mappings.
239 * elfxx-mips.c (mips_elf_create_shadow_symbol): New function.
240 (section_allows_mips16_refs_p): Likewise.
241 (mips16_stub_symndx): Likewise.
242 (mips_elf_check_mips16_stubs): Treat the data argument as a
243 bfd_link_info. Mark every dynamic symbol as needing MIPS16 stubs
244 and create a "shadow" symbol for the original MIPS16 definition.
245 (mips16_reloc_p, got16_reloc_p, call16_reloc_p, hi16_reloc_p)
246 (lo16_reloc_p, mips16_call_reloc_p): New functions.
247 (_bfd_mips16_elf_reloc_unshuffle): Use mips16_reloc_p to generalize
248 relocation checks.
249 (_bfd_mips16_elf_reloc_shuffle): Likewise.
250 (_bfd_mips_elf_lo16_reloc): Handle R_MIPS16_GOT16.
251 (mips_elf_got16_entry): Add comment.
252 (mips_elf_calculate_relocation): Use hi16_reloc_p,
253 lo16_reloc_p, mips16_call_reloc_p, call16_reloc_p and got16_reloc_p
254 to generalize relocation checks. Use section_allows_mips16_refs_p
255 instead of mips16_stub_section_p. Handle R_MIPS16_CALL16 and
256 R_MIPS16_GOT16, allowing the former to refer directly to a
257 MIPS16 function if its stub is not needed.
258 (mips16_stub_section_p): Delete.
259 (_bfd_mips_elf_symbol_processing): Convert odd-valued function
260 symbols into even MIPS16 symbols.
261 (mips_elf_add_lo16_rel_addend): Use mips16_reloc_p to generalize
262 a relocation check.
263 (_bfd_mips_elf_check_relocs): Calculate "bed" and "rel_end"
264 earlier in the function. Use mips16_stub_symndx to identify
265 the target function. Avoid out-of-bounds accesses when the
266 stub has no relocations; report an error instead. Use
267 section_allows_mips16_refs_p instead of mips16_stub_section_p.
268 Use mips16_call_reloc_p and got16_reloc_p to generalize relocation
269 checks. Handle R_MIPS16_CALL16 and R_MIPS16_GOT16. Don't create
270 dynamic relocations for absolute references to __gnu_local_gp.
271 (_bfd_mips_elf_always_size_sections): Pass a bfd_link_info as
272 the argument to mips_elf_check_mips16_stubs. Generalize comment.
273 (_bfd_mips_elf_relocate_section): Use hi16_reloc_p and got16_reloc_p
274 to generalize relocation checks.
275 (_bfd_mips_elf_finish_dynamic_symbol): If a dynamic MIPS16 function
276 symbol has a non-MIPS16 stub, redirect the symbol to the stub.
277 Fix an overly long line. Don't give dynamic symbols type STO_MIPS16.
278 (_bfd_mips_elf_gc_sweep_hook): Handle R_MIPS16_CALL16 and
279 R_MIPS16_GOT16.
280
281 2008-08-06 Alan Modra <amodra@bigpond.net.au>
282
283 * elf32-ppc.c (ppc_elf_relax_section): Clear R_PPC_PLTREL24 addend.
284 (ppc_elf_relocate_section <R_PPC_RELAX32_PLT>): Don't bother here.
285
286 2008-08-05 Alan Modra <amodra@bigpond.net.au>
287 Jaka Močnik <jaka@xlab.si>
288
289 * coffcode.h (coff_slurp_line_table): bfd_alloc lineno_cache first
290 so that we don't inadvertently free it. Use bfd_alloc for sort
291 arrays, and memcpy sorted line table.
292
293 2008-08-04 Alan Modra <amodra@bigpond.net.au>
294
295 * elf32-spu.c (spu_elf_auto_overlay): Use the maximum possible
296 if --fixed-space request is too large.
297
298 2008-08-04 Alan Modra <amodra@bigpond.net.au>
299
300 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Set LC_ALL=C.
301 * Makefile.in: Regenerate.
302 * po/SRC-POTFILES.in: Regenerate.
303
304 2008-08-02 Alan Modra <amodra@bigpond.net.au>
305
306 * elf32-spu.c (mark_overlay_section): Move code calculating
307 max_overlay_size to correct block.
308 (spu_elf_auto_overlay): Don't use %x in einfo error message.
309
310 2008-08-01 Alan Modra <amodra@bigpond.net.au>
311 Jan Kratochvil <jan.kratochvil@redhat.com>
312
313 * elfcore.h (elf_core_file_p): Ensure we have a backend match
314 with the correct arch size before rejecting the generic fallback.
315 * elfcode.h (elf_object_p): Likewise. Ensure arch size matches
316 before accepting a target.
317
318 2008-08-01 Alan Modra <amodra@bigpond.net.au>
319
320 PR 6774
321 * elf.c (rewrite_elf_program_header): Don't wrap p_paddr to
322 include file or program headers.
323
324 2008-07-30 Alan Modra <amodra@bigpond.net.au>
325
326 * coff-ppc.c, coffgen.c, ecoff.c, ecofflink.c, elf.c, elf32-frv.c,
327 elf32-iq2000.c, elf32-m32c.c, elf32-mep.c, elf32-mt.c,
328 elf32-sh-symbian.c, elf64-hppa.c, mach-o.c, peXXigen.c, pef.c,
329 ppcboot.c, vms-misc.c, xsym.c: Silence gcc warnings.
330
331 2008-07-28 Daniel Jacobowitz <dan@codesourcery.com>
332
333 * elfxx-mips.c (mips_elf_calculate_relocation): Avoid generating
334 relocations for undefined weak symbols with non-default visibility.
335 (_bfd_mips_elf_check_relocs): Use possibly_dynamic_relocs for
336 global symbols in shared libraries.
337 (allocate_dynrelocs): New function.
338 (_bfd_mips_elf_adjust_dynamic_symbol): Do not handle
339 possibly_dynamic_relocs here.
340 (_bfd_mips_elf_size_dynamic_sections): Call allocate_dynrelocs.
341
342 2008-07-28 Alexandre Oliva <aoliva@redhat.com>
343
344 * elf32-i386.c (struct elf_i386_link_hash_table): Added field
345 tls_module_base.
346 (elf_i386_link_hash_table_create): Initialize it.
347 (elf_i386_always_size_sections): Set it.
348 (set_tls_module_base): New.
349 (elf_i386_relocate_sections): Call it.
350 * elf64-x86-64.c (struct elf64_x86_64_link_hash_table): Added
351 field tls_module_base.
352 (elf64_x86_64_link_hash_table_create): Initialize it.
353 (elf64_x86_64_always_size_sections): Set it.
354 (set_tls_module_base): New.
355 (elf64_x86_64_relocate_sections): Call it.
356 Reported by Cary Coutant <ccoutant@google.com>
357
358 2008-07-28 Ineiev <ineiev@yahoo.co.uk>
359
360 * elf32-arm.c (arm_map_one_stub): Declare variables at beginning
361 of block.
362 * elf32-avr.c (get_local_syms): Likewise.
363
364 2008-07-28 Alan Modra <amodra@bigpond.net.au>
365
366 PR 6769
367 * bfd-in.h (BFD_VMA_FMT): Define.
368 (printf_vma, sprintf_vma): Use the above.
369 (_bfd_int64_low, _bfd_int64_high): Delete.
370 * bfd-in2.h: Regenerate.
371
372 2008-07-27 Alan Modra <amodra@bigpond.net.au>
373
374 * elf.c (_bfd_elf_make_section_from_shdr): Ignore return from
375 elf_parse_notes. Use bfd_malloc_and_get_section.
376 (elf_parse_notes): Validate note namesz and descsz.
377
378 2008-07-26 Michael Eager <eager@eagercon.com>
379
380 * elf32-ppc.c (ppc_elf_merge_obj_attributes): Check compatibility
381 between single-float, double-float, and soft-float.
382
383 2008-07-24 Daniel Jacobowitz <dan@codesourcery.com>
384
385 * elf32-mips.c (elf_backend_write_section): Define.
386
387 2008-07-24 Nick Clifton <nickc@redhat.com>
388
389 * elf.c (_bfd_elf_map_sections_to_segments): Catch off by one
390 error assigning sections to segments.
391
392 2008-07-22 Nick Clifton <nickc@redhat.com>
393
394 * elf.c (_bfd_elf_map_sections_to_segments): Allow sections in
395 adjoining pages to be included in the same segment.
396
397 2008-07-22 Simon Baldwin <simonb@google.com>
398
399 * elflink.c (elf_link_output_extsym): Set st_size to zero for
400 symbols from dynamic libraries.
401
402 2008-07-21 H.J. Lu <hongjiu.lu@intel.com>
403
404 PR ld/4424
405 * elflink.c (_bfd_elf_merge_symbol): Call bed->relocs_compatible
406 to check if 2 inputs are compatible.
407
408 2008-07-21 Sterling Augustine <sterling@tensilica.com>
409
410 * elf.c (assign_file_positions_for_load_sections): Print vma in
411 error message about overlapping section vmas.
412
413 2008-07-21 H.J. Lu <hongjiu.lu@intel.com>
414
415 PR ld/6747
416 * elf32-frv.c (elf32_frv_relocate_section): Revert the change
417 for PR ld/6446 checked in by accident on May 21, 2008.
418
419 2008-07-21 Nick Clifton <nickc@redhat.com>
420
421 * coff-sh.c (bfd_pe_print_pdata): Define to NULL for non
422 COFF_WITH_PE based SH ports.
423 * libpei.h (_bfd_XX_print_ce_compressed_pdata): Prototype.
424 * arm-wince-pe.c (bfd_pe_print_pdata): Use
425 _bfd_pe_print_ce_compressed_pdata.
426 (slurp_symcache, cleanup_syms, pe_print_ce_compressed_pdata): Move
427 to...
428 * peXXigen.c: ... here and rename pe_print_ce_compressed_pdata to
429 _bfd_XX_print_ce_compressed_pdata.
430
431 2008-07-21 Alan Modra <amodra@bigpond.net.au>
432
433 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Drop
434 unwanted zero terminators.
435
436 2008-07-21 Alan Modra <amodra@bigpond.net.au>
437
438 * elf32-spu.c (spu_elf_relocate_section): Expand
439 RELOC_FOR_GLOBAL_SYMBOL. Don't warn about undefined symbols for
440 R_SPU_PPU32 and R_SPU_PPU64 relocations.
441
442 2008-07-21 Luis Machado <luisgpm@br.ibm.com>
443
444 * elf-bfd.h: Declare elfcore_write_ppc_vsx.
445 * elf.c (elfcore_grok_ppc_vsx): New function.
446 (elfcore_write_ppc_vsx): New function
447 (elfcore_grok_note): Handle VSX notes.
448 (elfcore_write_register_note): Handle VSX notes.
449
450 2008-07-18 Joseph Myers <joseph@codesourcery.com>
451
452 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add new parameter.
453 * bfd-in2.h: Regenerate.
454 * elf32-arm.c (struct elf_arm_obj_tdata): Add field
455 no_wchar_size_warning.
456 (bfd_elf32_arm_set_target_relocs): Add new parameter
457 no_wchar_warn.
458 (elf32_arm_merge_eabi_attributes): Give a warning, not an error,
459 for conflicting wchar_t attributes. Do not warn if
460 --no-wchar-size-warning. Make diagnostic text more specific.
461
462 2008-07-18 H.J. Lu <hongjiu.lu@intel.com>
463
464 PR ld/6748
465 * elf32-arm.c (elf32_arm_link_hash_table_create): Initialize
466 new fields added for ARM long call support.
467
468 2008-07-18 Danny Backx <dannybackx@users.sourceforge.net>
469
470 * pe-arm-wince.c (pe_print_compressed_pdata): Define new function to
471 print compressed pdata structure as described on MSDN. This only
472 applies to a limited set of architectures (ARM, SH4).
473 (slurp_symtab, my_symbol_for_address): Define static helper
474 functions for pe_print_compressed_pdata.
475 * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_print_pdata field.
476 (bfd_coff_have_print_pdata, bfd_coff_print_pdata): Define.
477 * bfd/peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add check on
478 bfd_coff_backend_data, call the function if non-null.
479 * pei-mcore.c: Add target dependent initialisation for
480 bfd_coff_backend_data.
481 * coff-sh.c: Likewise.
482 * coff64-rs6000.c: Likewise.
483 * coff-rs6000.c: Likewise.
484 * libcoff-in.h: Likewise.
485 * cf-i386lynx.c: Likewise.
486 * coff-alpha.c: Likewise.
487 * coff-apollo.c: Likewise.
488 * coff-arm.c: Likewise.
489 * coff-aux.c: Likewise.
490 * coff-h8300.c: Likewise.
491 * coff-h8500.c: Likewise.
492 * coff-i386.c: Likewise.
493 * coff-i860.c: Likewise.
494 * coff-i960.c: Likewise.
495 * coff-ia64.c: Likewise.
496 * coff-m68k.c: Likewise.
497 * coff-m88k.c: Likewise.
498 * coff-maxq.c: Likewise.
499 * coff-mips.c: Likewise.
500 * coff-or32.c: Likewise.
501 * coff-sparc.c: Likewise.
502 * coff-tic30.c: Likewise.
503 * coff-tic4x.c: Likewise.
504 * coff-tic54x.c: Likewise.
505 * coff-tic80.c: Likewise.
506 * coff-w65.c: Likewise.
507 * coff-we32k.c: Likewise.
508 * coff-x86_64.c: Likewise.
509 * coff-z80.c: Likewise.
510 * coff-z8k.c: Likewise.
511 * pe-mcore.c: Likewise.
512 * pe-mips.c: Likewise.
513 * pe-ppc.c: Likewise.
514 * peXXigen.c: Likewise.
515 * pei-ppc.c: Likewise.
516 * libcoff.h: Regenerate.
517
518 2008-07-16 Bernd Schmidt <bernd.schmidt@analog.com>
519
520 * elf32-bfin.c (bfin_check_relocs, bfin_relocate_section,
521 bfin_final_link_relocate, bfin_gc_mark_hook, bfin_gc_sweep_hook,
522 ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE,
523 struct _bfinfdpic_dynamic_got_info): Moved around to keep FD-PIC code
524 separate from non-FD-PIC.
525
526 2008-07-14 DJ Delorie <dj@redhat.com>
527
528 * elf-m10300.c (mn10300_elf_final_link_relocate): Correct overflow
529 checks for PCREL8, PCREL16, GOTPC16, GOTOFF16, PLT16, and GOT16
530 relocs.
531 (mn10300_elf_relax_section): Correct jump offset check when target
532 is in a different section.
533
534 2008-07-15 Jie Zhang <jie.zhang@analog.com>
535
536 * elf32-bfin.c (elf32_bfin_special_sections[]): New.
537 (elf_backend_special_sections): Define.
538
539 2008-07-13 Craig Silverstein <csilvers@google.com>
540
541 PR binutils/6743
542 * dwarf2.c (struct dwarf2_debug): New variable info_ptr_memory.
543 (find_line): Use info_ptr_memory instead of sec_info_ptr.
544 (_bfd_dwarf2_cleanup_debug_info): Likewise.
545
546 2008-07-12 Jie Zhang <jie.zhang@analog.com>
547
548 Revert
549 2008-07-12 Jie Zhang <jie.zhang@analog.com>
550 * elf.c (_bfd_elf_map_sections_to_segments): Don't put
551 executable sections into the same segment with other
552 read only sections if --sep-code.
553 * elf32-bfin.c (elf32_bfin_code_in_l1): New variable.
554 (elf32_bfin_data_in_l1): New variable.
555 (elf32_bfin_final_write_processing): New.
556 (elf32_bfin_special_sections[]): New.
557 (elf_backend_final_write_processing): Define.
558 (elf_backend_special_sections): Define.
559
560 2008-07-12 Jie Zhang <jie.zhang@analog.com>
561
562 * elf.c (_bfd_elf_map_sections_to_segments): Don't put
563 executable sections into the same segment with other
564 read only sections if --sep-code.
565 * elf32-bfin.c (elf32_bfin_code_in_l1): New variable.
566 (elf32_bfin_data_in_l1): New variable.
567 (elf32_bfin_final_write_processing): New.
568 (elf32_bfin_special_sections[]): New.
569 (elf_backend_final_write_processing): Define.
570 (elf_backend_special_sections): Define.
571
572 2008-07-11 Andreas Schwab <schwab@suse.de>
573
574 * dwarf2.c (read_section): Take pointer to bfd_size_type instead
575 of unsigned long as last parameter.
576 (struct dwarf2_debug): Define dwarf_abbrev_size, dwarf_line_size,
577 dwarf_str_size and dwarf_ranges_size as bfd_size_type instead of
578 unsigned long.
579
580 2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
581
582 * elfxx-mips.c (mips_elf_calculate_relocation): Calculate GP and GP0
583 for all relocation types. Allow any type of relocation to refer to
584 __gnu_local_gp.
585
586 2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
587
588 * elfxx-mips.c (mips_elf_check_mips16_stubs): Use ELF_ST_IS_MIPS16.
589 (mips_elf_calculate_relocation): Likewise.
590 (_bfd_mips_elf_add_symbol_hook): Likewise.
591 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
592 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
593
594 2008-07-10 Andreas Schwab <schwab@suse.de>
595
596 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Add missing
597 paren.
598
599 2008-07-09 Craig Silverstein <csilvers@google.com>
600
601 * Makefile.am (BFD32_LIBS): Add compress.lo.
602 (BFD32_LIBS_CFILES): Add compress.c.
603 (BFD_H_FILES): Likewise.
604 * Makefile.in: Regenerate.
605 * bfd-in2.h: Regenerate.
606 * config.in: Add HAVE_ZLIB_H
607 * configure.in: Add test for libz and zlib.h
608 * configure: Regenerate.
609 * dwarf2.c (read_section): New function.
610 (read_indirect_string): Call new function read_section.
611 (read_abbrevs): Likewise.
612 (decode_line_info): Likewise.
613 (read_debug_ranges): Likewise.
614 (find_line): Call new function read_section when just one
615 .zdebug_info section is found, otherwise read and compress
616 multiple sections.
617 (_bfd_dwarf2_cleanup_debug_info): Free sec_info_ptr.
618 * elf.c (_bfd_elf_make_section_from_shdr): Add zdebug prefix.
619 (special_sections_z): New struct.
620 (special_sections): Refer to special_sections_z.
621 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Recognize
622 sections named .zdebug_*.
623 (_bfd_mips_elf_fake_sections): Likewise.
624 * compress.c: New file.
625 (bfd_uncompress_section_contents): New function.
626
627 2008-07-07 Christophe Lyon <christophe.lyon@st.com>
628
629 * elf32-arm.c (arm_type_of_stub): Don't crash on local symbols in
630 the presence of a PLT.
631
632 2008-07-07 Alan Modra <amodra@bigpond.net.au>
633
634 * bfd.c (bfd_demangle): Always trim off bfd_get_symbol_leading_char.
635
636 2008-07-02 Alan Modra <amodra@bigpond.net.au>
637
638 * elf32-ppc.c (is_pic_glink_stub): New function.
639 (ppc_elf_get_synthetic_symtab): Don't generate symbols when
640 multiple shared/pie stubs per plt entry.
641
642 2008-06-30 Richard Sandiford <rdsandiford@googlemail.com>
643
644 * elf.c (_bfd_elf_get_synthetic_symtab): Increment p by
645 bed->s->int_rels_per_ext_rel.
646
647 2008-06-30 Richard Sandiford <rdsandiford@googlemail.com>
648
649 * syms.c (BSF_SYNTHETIC): New flag.
650 * elf.c (_bfd_elf_get_synthetic_symtab): Set it.
651 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Likewise.
652 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
653 * bfd-in.h (bfd_asymbol_flavour): Return bfd_target_unknown_flavour
654 for synthetic symbols.
655 * bfd-in2.h: Regenerate.
656
657 2008-06-30 Daniel Jacobowitz <dan@codesourcery.com>
658
659 * elf32-arm.c (record_arm_to_thumb_glue, record_thumb_to_arm_glue):
660 Expand comments.
661 (arm_map_one_stub): Use | 1 when setting the low bit.
662
663 2008-06-29 Andreas Schwab <schwab@suse.de>
664
665 * elf32-m68k.c (elf_m68k_relocate_section): Don't ignore existing
666 addend on _GLOBAL_OFFSET_TABLE_.
667
668 2008-06-24 Daniel Jacobowitz <dan@codesourcery.com>
669
670 * elf32-arm.c (STUB_ENTRY_NAME): Define.
671 (arm_thumb_thumb_long_branch_stub): Use bx instead of b.n.
672 (arm_pic_long_branch_stub): Mention R_ARM_REL32 instead of
673 R_ARM_ABS32.
674 (struct elf32_arm_stub_hash_entry): Add output_name.
675 (arm_build_one_stub): Move offsets into the offset argument
676 of _bfd_final_link_relocate. Correct offset for
677 arm_thumb_arm_v4t_stub_long_branch.
678 (elf32_arm_size_stubs): Set stub_entry->output_name.
679 (elf32_arm_ouput_plt_map_sym): Rename to elf32_arm_output_map_sym.
680 Update all callers.
681 (elf32_arm_output_stub_sym): New.
682 (arm_map_one_stub): Correct formatting. Use elf32_arm_output_stub_sym.
683
684 2008-06-20 Alan Modra <amodra@bigpond.net.au>
685
686 * elf32-spu.c (needs_ovl_stub): Correctly return nonovl_stub for
687 non-branch insns.
688
689 2008-06-20 Alan Modra <amodra@bigpond.net.au>
690
691 * elf32-spu.c (build_stub): Allow wraparound on stub branches.
692 (allocate_spuear_stubs, build_spuear_stubs): Return value from
693 count_stub/build_stub.
694 (spu_elf_build_stubs): Correct location of stub reloc error message.
695
696 2008-06-18 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
697
698 * elf32-cr16.c (ELF_MACHINE_ALT1): Define to EM_CR16_OLD.
699
700 2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
701
702 * configure: Regenerate.
703
704 2008-06-17 Alan Modra <amodra@bigpond.net.au>
705
706 * elf32-spu.c (struct spu_link_hash_table): Add extra_stack_space.
707 (spu_elf_check_vma): Add extra_stack_space param, copy to htab.
708 (spu_elf_auto_overlay): Use it.
709 (RECURSE_UNMARK): Define as 0.
710 (unmark_overlay_section): Heed RECURSE_UNMARK.
711 * elf32-spu.h (spu_elf_check_vma): Update prototype.
712
713 2008-06-12 DJ Delorie <dj@redhat.com>
714
715 * elf32-m32c.c (ELF_MACHINE_ALT1): Define as EM_M32C_OLD.
716
717 2008-06-09 Paul Brook <paul@codesourcery.com>
718
719 bfd/
720 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Allow BE8 shared
721 libraries.
722
723 2008-06-09 Christophe Lyon <christophe.lyon@st.com>
724
725 * elf32-arm.c (arm_stub_is_thumb): Define.
726 (elf32_arm_final_link_relocate): Handle near mode switching stubs.
727
728 2008-06-07 Alan Modra <amodra@bigpond.net.au>
729
730 * elf32-spu.c (spu_elf_auto_overlay): Add valid area below sp
731 to stack calculation.
732
733 2008-06-06 Paul Brook <paul@codesourcery.com>
734
735 bfd/
736 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Reject BE8 input.
737
738 2008-06-06 Alan Modra <amodra@bigpond.net.au>
739
740 * elf32-spu.c (spu_elf_auto_overlay): Relax requirement that
741 file names be unique. Specify archive:path in overlay script.
742
743 2008-06-05 Alan Modra <amodra@bigpond.net.au>
744
745 PR ld/6590
746 * elf64-ppc.c (ppc_build_one_stub): Correct reloc offsets.
747
748 2008-06-04 Alan Modra <amodra@bigpond.net.au>
749
750 * elf.c (ignore_section_sym): Don't test section sym value here.
751 (elf_map_symbols): Instead check zero value here as was done prior
752 to 2006-05-26 change.
753
754 2008-06-04 Nick Clifton <nickc@redhat.com>
755
756 PR ld/6019
757 * elf32-avr.c (elf32_avr_relax_section): Handle the case where
758 there are no local symbols.
759
760 2008-06-04 Alan Modra <amodra@bigpond.net.au>
761
762 * elf32-spu.c (get_sym_h): Don't attempt to read global syms.
763 (process_stubs): Likewise.
764 (discover_functions): Don't used cached symbols.
765 (maybe_insert_function): Correct condition under which function
766 array is realloc'd.
767 (mark_functions_via_relocs): Delete unused variable.
768
769 2008-05-30 Frediano Ziglio <frediano.ziglio@vodafone.com>
770 Nick Clifton <nickc@redhat.com>
771
772 PR ld/6511
773 * elf64-hppa.c (allocate_global_data_opd): Default to using the
774 dynamic symbol table for local function names in shared libraries.
775
776 2008-05-29 Jan Kratochvil <jan.kratochvil@redhat.com>
777
778 * elf.c (assign_file_positions_for_load_sections): Adjust pre-section
779 gaps based on VMA and P_VADDR instead of LMA and P_PADDR addresses.
780
781 2008-05-28 Alan Modra <amodra@bigpond.net.au>
782
783 * elf32-spu.c (spu_elf_object_p): New function.
784 (elf_backend_object_p): Define.
785 (build_stub): Correct second word of 8 byte overlay stubs.
786 (spu_elf_relocate_section): Formatting.
787
788 2008-05-24 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
789
790 * elf.c (elfcore_write_register_note): New function.
791 * elf-bfd.h (elfcore_write_register_note): New prototype.
792
793 2008-05-22 Christophe Lyon <christophe.lyon@st.com>
794
795 * elf32-arm.c (arm_type_of_stub): Ignore STT_SECTION symbols.
796 (elf32_arm_stub_add_mapping_symbol): Remove.
797 (elf32_arm_add_stub): Don't generate mapping symbols. Change
798 prototype.
799 (elf32_arm_size_stubs): Use new elf32_arm_add_stub
800 prototype. Don't generate thumb to arm glue for calls.
801 (arm_map_one_stub): Define.
802 (elf32_arm_output_arch_local_syms): Generate mapping symbols for
803 long calls stubs.
804
805 2008-05-21 Nick Clifton <nickc@redhat.com>
806
807 * elf32-arm.c (group_sections): Reformat comments.
808
809 PR ld/6446
810 * elf32-frv.c (elf32_frv_relocate_section): Set EF_FRV_PIC by
811 default (for FDPIC). Clear it if any inter-segment relocations
812 are found.
813
814 * elf64-hppa.c (elf64_hppa_finalize_opd): Check NULL return
815 from elf_link_hash_lookup.
816
817 2008-05-21 Maxim Kuvyrkov <maxim@codesourcery.com>
818
819 Add multi-GOT support for m68k.
820 * elf32-m68k.c (struct elf_m68k_link_hash_entry: got_entry_key,
821 glist): New fields.
822 (struct elf_m68k_got_entry_key, struct elf_m68k_got_entry,
823 struct elf_m68k_got, struct elf_m68k_bfd2got_entry,
824 struct elf_m68k_multi_got): New data structures.
825 (struct elf_m68k_link_hash_table: local_gp_p, use_neg_got_offsets_p,
826 allow_multigot_p, multi_got_): New fields.
827 (elf_m68k_multi_got): New macro.
828 (elf_m68k_link_hash_newfunc): Initialize new fields of
829 struct elf_m68k_link_hash_entry.
830 (elf_m68k_link_hash_table_create): Initialize new fields of
831 struct elf_m68k_link_hash_table.
832 (elf_m68k_link_hash_table_free): New static function implementing hook.
833 (elf_m68k_init_got, elf_m68k_clear_got, elf_m68k_create_empty_got): New
834 static functions for struct elf_m68k_got.
835 (elf_m68k_init_got_entry_key, elf_m68k_got_entry_hash,
836 elf_m68k_got_entry_eq): New static functions for
837 struct elf_m68k_got_entry.
838 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT,
839 ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): New macros.
840 (enum elf_m68k_get_entry_howto): New enum.
841 (elf_m68k_get_got_entry, elf_m68k_update_got_entry_type,
842 elf_m68k_remove_got_entry_type): New static functions for
843 struct elf_m68k_got_entry.
844 (elf_m68k_add_entry_to_got): New static function.
845 (elf_m68k_bfd2got_entry_hash, elf_m68k_bfd2got_entry_eq,
846 elf_m68k_bfd2got_entry_del, elf_m68k_get_bfd2got_entry): New static
847 functions for struct elf_m68k_bfd2got_entry.
848 (struct elf_m68k_can_merge_gots_arg, elf_m68k_can_merge_gots_1,
849 elf_m68k_can_merge_gots): New traversal.
850 (struct elf_m68k_merge_gots_arg, elf_m68k_merge_gots_1,
851 elf_m68k_merge_gots): Ditto.
852 (struct elf_m68k_finalize_got_offsets_arg,
853 elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Ditto.
854 (struct elf_m68k_partition_multi_got_arg,
855 elf_m68k_partition_multi_got_1, elf_m68k_init_symndx2h_1,
856 elf_m68k_partition_multi_got): Ditto.
857 (elf_m68k_find_got_entry_ptr, elf_m68k_remove_got_entry): New static
858 functions.
859 (elf_m68k_copy_indirect_symbol): New static function implementing
860 a hook.
861 (elf_m68k_check_relocs): Update to add entries to multi-GOT.
862 (elf_m68k_gc_sweep_hook): Update to remove entries from multi-GOT.
863 (elf_m68k_always_size_sections): Assign BFDs to GOTs.
864 (elf_m68k_relocate_section): Update to properly handle GOT relocations.
865 (elf_m68k_finish_dynamic_symbol): Update to traverse all GOT entries
866 of a global symbol.
867 (bfd_elf_m68k_set_target_options): New function.
868 (bfd_elf32_bfd_link_hash_table_free): Define hook.
869 (bfd_elf32_bfd_final_link): Change expansion to bfd_elf_final_link
870 to skip generic calculation of GOT offsets.
871 (elf_backend_copy_indirect_symbol): Define hook.
872 * bfd-in.h (bfd_elf_m68k_set_target_options): Declare function.
873 * bfd-in2.h: Regenerate.
874
875 2008-05-21 André Johansen <andrejoh@gmail.com>
876
877 PR 868
878 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free memory allocated
879 for filenames in function tables and variable tables.
880
881 2008-05-19 Alan Modra <amodra@bigpond.net.au>
882
883 PR 2995, PR 6473
884 * elf.c (_bfd_elf_make_section_from_shdr): Leave lma equal to
885 vma when all p_paddr fields are zero and there is more than
886 one PT_LOAD header.
887
888 2008-05-15 Christophe Lyon <christophe.lyon@st.com>
889
890 Add long call support for ARM.
891 * elf32-arm.c (THM2_MAX_FWD_BRANCH_OFFSET): Define.
892 (THM2_MAX_BWD_BRANCH_OFFSET): Define.
893 (ARM_MAX_FWD_BRANCH_OFFSET): Define.
894 (ARM_MAX_BWD_BRANCH_OFFSET): Define.
895 (THM_MAX_FWD_BRANCH_OFFSET): Define.
896 (THM_MAX_BWD_BRANCH_OFFSET): Define.
897 (arm_long_branch_stub): Define.
898 (arm_pic_long_branch_stub): Define.
899 (arm_thumb_v4t_long_branch_stub): Define.
900 (arm_thumb_thumb_long_branch_stub): Define.
901 (arm_thumb_arm_v4t_long_branch_stub): Define.
902 (STUB_SUFFIX): Define.
903 (elf32_arm_stub_type): Define.
904 (elf32_arm_stub_hash_entry): Define.
905 (elf32_arm_link_hash_entry): Add stub_cache field.
906 (arm_stub_hash_lookup): Define.
907 (elf32_arm_link_hash_table): Add stub_hash_table, stub_bfd,
908 add_stub_section, layout_sections_again, stub_group, bfd_count,
909 top_index, input_list fields.
910 (elf32_arm_link_hash_newfunc): Init new field.
911 (stub_hash_newfunc): New function.
912 (elf32_arm_link_hash_table_create): Init stub_hash_table.
913 (elf32_arm_hash_table_free): New function.
914 (arm_type_of_stub): New function.
915 (elf32_arm_stub_name): New function.
916 (elf32_arm_get_stub_entry): New function.
917 (elf32_arm_stub_add_mapping_symbol): New function.
918 (elf32_arm_add_stub): New function.
919 (arm_build_one_stub): New function.
920 (arm_size_one_stub): New function.
921 (elf32_arm_setup_section_lists): New function.
922 (elf32_arm_next_input_section): New function.
923 (group_sections): New function.
924 (elf32_arm_size_stubs): New function.
925 (elf32_arm_build_stubs): New function.
926 (bfd_elf32_arm_add_glue_sections_to_bfd): Skip stub sections.
927 (bfd_elf32_arm_process_before_allocation): No longer handle
928 R_ARM_CALL and R_ARM_THM_CALL.
929 (using_thumb_only): New function.
930 (elf32_arm_final_link_relocate): Redirect calls to stub if range
931 exceeds encoding capabilities.
932 (bfd_elf32_bfd_link_hash_table_free): Define.
933 * bfd-in.h (R_ARM_max): Fix value to 130.
934 (elf32_arm_setup_section_lists): Protype.
935 (elf32_arm_next_input_section): Protype.
936 (elf32_arm_size_stubs): Protype.
937 (elf32_arm_build_stubs): Protype.
938 * bfd-in2.h: Regenerate.
939
940 2008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
941
942 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Fix memset calls.
943 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
944
945 2008-05-14 Alan Modra <amodra@bigpond.net.au>
946
947 * Makefile.am: Run "make dep-am".
948 * Makefile.in: Regenerate.
949
950 2008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
951 Alan Modra <amodra@bigpond.net.au>
952
953 * elf32-ppc.c (section_covers_vma): New function.
954 (ppc_elf_get_synthetic_symtab): New function.
955 (bfd_elf32_get_synthetic_symtab): Define.
956 * elf64-ppc.c (section_covers_vma): New function.
957 (ppc64_elf_get_synthetic_symtab): Generate sym@plt on glink branch
958 table entries, and __glink_PLTresolve on resolver stub.
959 (ppc64_elf_build_stubs): Rename __glink sym to __glink_PLTresolve.
960
961 2008-05-12 Alan Modra <amodra@bigpond.net.au>
962
963 PR 6443
964 * elf32-ppc.c (MUST_BE_DYN_RELOC): Delete.
965 (must_be_dyn_reloc): New function.
966 (ppc_elf_check_relocs): Don't set DF_STATIC_TLS for tprel relocs
967 in pies.
968 (ppc_elf_tls_optimize): Optimise pies.
969 (ppc_elf_relocate_section): Use a section symbol rather than no
970 symbol if possible for LD->IE TLS sequence, but don't error if
971 we must use no symbol.
972 * elf64-ppc.c (MUST_BE_DYN_RELOC): As for elf32-ppc.c.
973 (must_be_dyn_reloc): Likewise.
974 (ppc64_elf_check_relocs): Likewise.
975 (ppc64_elf_tls_optimize): Likewise.
976 (ppc64_elf_relocate_section): Likewise.
977
978 2008-05-12 Alan Modra <amodra@bigpond.net.au>
979
980 * elf32-spu.c (spu_elf_relocate_section): Rename is_ea to is_ea_sym.
981
982 2008-05-10 Paul Pluzhnikov <ppluzhnikov@google.com>
983
984 * elfcore.h (elf_core_file_p): Warn about core truncation.
985
986 2008-05-07 Bob Wilson <bob.wilson@acm.org>
987
988 * elf32-xtensa.c (xtensa_property_section_name): New.
989 (xtensa_make_property_section): New.
990 (xtensa_get_property_section): Make static. Do not create a new
991 section if it does not exist.
992
993 2008-05-08 Alan Modra <amodra@bigpond.net.au>
994
995 * elf32-spu.c (spu_elf_special_sections): Add "._ea".
996 (spu_elf_relocate_section): Handle relocations against symbols
997 defined in ._ea specially.
998
999 2008-05-03 Daniel Jacobowitz <dan@codesourcery.com>
1000
1001 * elf32-arm.c (elf32_arm_symbian_link_hash_table_create): Use
1002 ARRAY_SIZE.
1003 (elf32_arm_symbian_plt_sym_val): New.
1004 (elf_backend_plt_sym_val): Define.
1005
1006 2008-05-03 Alan Modra <amodra@bigpond.net.au>
1007
1008 PR 2995, PR 6473
1009 * elf.c (rewrite_elf_program_header): Rather than clearing
1010 p_paddr_valid at end, don't set it in the first place. Delete
1011 comment no longer relevant. When not p_paddr_valid, don't set
1012 paddr from vaddr, and don't set p_vaddr_offset.
1013
1014 2008-05-01 Cary Coutant <ccoutant@google.com>
1015
1016 * elf.c (bfd_elf_get_str_section): Fix memory leak caused by
1017 corrupt string table.
1018
1019 2008-05-01 Joel Brobecker <brobecker@adacore.com>
1020
1021 * cache.c (cache_bread_1): Renames cache_bread.
1022 (cache_bread): New function.
1023
1024 2008-05-01 Alan Modra <amodra@bigpond.net.au>
1025
1026 PR 2995, PR 6473
1027 * elf.c (_bfd_elf_make_section_from_shdr): Always set lma from p_paddr.
1028 (assign_file_positions_for_load_sections): Combine nested "if".
1029 (copy_elf_program_header): Don't set p_paddr_valid or p_vaddr_offset
1030 when all header p_paddr fields are zero.
1031
1032 2008-04-30 Edmar Wienskoski <edmar@freescale.com>
1033
1034 * cpu-powerpc.c (bfd_powerpc_archs): Add e500mc entry.
1035
1036 2008-04-29 Daniel Jacobowitz <dan@codesourcery.com>
1037
1038 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound)
1039 (_bfd_elf_canonicalize_dynamic_reloc): Find dynamic relocations
1040 even if they are not loaded.
1041 * elflink.c (_bfd_elf_init_2_index_sections): Set data_index_section
1042 first.
1043
1044 2008-04-25 Jay Foad <jay.foad@gmail.com>
1045
1046 * reloc16.c (bfd_coff_reloc16_get_value): Add support for
1047 undefined weak symbols.
1048
1049 2008-04-25 Nick Clifton <nickc@redhat.com>
1050
1051 * po/vi.po: Updated Vietnamese translation.
1052
1053 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1054
1055 * aclocal.m4: Regenerate.
1056 * configure: Regenerate.
1057
1058 2008-04-21 Cary Coutant <ccoutant@google.com>
1059
1060 * archive.c (_bfd_write_archive_contents): Fix incorrect use of
1061 ARFMAG.
1062
1063 2008-04-21 Nathan Sidwell <nathan@codesourcery.com>
1064
1065 * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Don't
1066 set the value of undefined symbols in shared objects.
1067 (_bfd_mips_vxworks_finish_dynamic_symbol): Clear value for
1068 undefined symbols unless pointer equality is needed.
1069
1070 2008-04-18 Dennis Roberts <dennis.roberts@sunquestinfo.com>
1071
1072 * aix5ppc-core.c: Define macros for the default architecture and
1073 machine for matching core files.
1074 (xcoff64_core_p): Set the architecture and machine to the default
1075 values defined in the macros mentioned above.
1076 * rs6000-core.c: Define macros to determine whether or not the
1077 core file header uses the core_dumpxx header format.
1078 (rs6000coff_core_p): Don't match core files that use the
1079 core_dumpxx header format.
1080
1081 2008-04-16 Pedro Alves <pedro@codesourcery.com>
1082
1083 * config.bfd (i[3-7]86-*-dicos*, x86_64-*-dicos*): Add.
1084
1085 2008-04-16 David S. Miller <davem@davemloft.net>
1086
1087 * reloc.c (BFD_RELOC_SPARC_GOTDATA_HIX22,
1088 BFD_RELOC_SPARC_GOTDATA_LOX10, BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
1089 BFD_RELOC_SPARC_GOTDATA_OP_LOX10, BFD_RELOC_SPARC_GOTDATA_OP): New.
1090 * libbfd.h: Regnerate.
1091 * bfd-in2.h: Regenerate.
1092 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Add entries for
1093 GOTDATA relocations.
1094 (sparc_reloc_map): Likewise.
1095 (_bfd_sparc_elf_check_relocs): Handle R_SPARC_GOTDATA_* like
1096 R_SPARC_GOT*.
1097 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1098 (_bfd_sparc_elf_relocate_section): Transform R_SPARC_GOTDATA_HIX22,
1099 R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22, and
1100 R_SPARC_GOTDATA_OP_LOX10 into the equivalent R_SPARC_GOT* reloc.
1101 Simply ignore R_SPARC_GOTDATA_OP relocations.
1102
1103 2008-04-14 Aurelien Jarno <aurelien@aurel32.net>
1104
1105 * configure.in: Link with the PIC version of libiberty on
1106 Linux/MIPS hosts.
1107 * configure: Regenerate.
1108
1109 2008-04-14 Edmar Wienskoski <edmar@freescale.com>
1110
1111 * archures.c: Add bfd_mach_ppc_e500mc.
1112 * bfd-in2.h: Regenerate.
1113
1114 2008-04-08 Alan Modra <amodra@bigpond.net.au>
1115
1116 * elf32-spu.c (spu_elf_build_stubs): Correct error message.
1117 (mark_functions_via_relocs): Remove premature init of symtab_hdr.
1118 (collect_overlays): Commment typo fix.
1119
1120 2008-04-08 Kees Cook <kees@canonical.com>
1121
1122 * elflink.c (bfd_elf_size_dynamic_sections): Ignore GNU-stack note
1123 in EXEC_P bfds.
1124
1125 2008-04-08 Alan Modra <amodra@bigpond.net.au>
1126
1127 * elf32-spu.c: Include libiberty.h.
1128 (struct spu_link_hash_table): Add local_stire, overlay_fixed, reserved,
1129 non_ovly_stub, spu_elf_load_ovl_mgr, spu_elf_open_overlay_script,
1130 spu_elf_relink, auto_overlay fields.
1131 (AUTO_OVERLAY, AUTO_RELINK, OVERLAY_RODATA): Define.
1132 (needs_ovl_stub): Flip test so that call to non-function warning
1133 is emitted during relocate_section rather than earlier.
1134 (spu_elf_check_vma): Stash --auto-overlay parameters, and clear
1135 auto_overlay if no section exceeds local store.
1136 (struct call_info): Add count, max_depth, is_pasted fields.
1137 (struct function_info): Add rodata, last_caller, call_count,
1138 depth, new visit flags.
1139 (insert_callee): Increment call count.
1140 (copy_callee): New function.
1141 (mark_functions_via_relocs): Investigate all reloc types to count
1142 possible function pointer stubs for --auto-overlay. Track
1143 last_caller and increment function call_count.
1144 (pasted_function): Insert a "call" into call info for pasted section.
1145 (remove_cycles): Track max depth of calls. Don't emit call graph
1146 pruning warning for --auto-overlay.
1147 (build_call_tree): Don't transfer_calls for --auto-overlay.
1148 Adjust remove_cycles call.
1149 (sort_calls, sort_lib, sort_bfds): New functions.
1150 (struct _mos_param, struct _uos_param, struct _cl_param): New.
1151 (mark_overlay_section, unmark_overlay_section): New functions.
1152 (collect_lib_sectios, auto_ovl_lib_functions): New functions.
1153 (collect_overlays, find_pasted_call): New functions.
1154 (sum_stack): Deal with is_pasted "calls". Exit before printing
1155 when --auto-overlay.
1156 (spu_elf_auto_overlay): New function.
1157 (spu_elf_final_link): Call spu_elf_auto_overlay.
1158 * elf32-spu.h (spu_elf_check_vma): Update prototype.
1159
1160 2008-04-07 Alan Modra <amodra@bigpond.net.au>
1161
1162 * elf32-spu.c (allocate_spuear_stubs): Ensure _SPUEAR_ symbol
1163 is defined in overlay section before creating a stub.
1164 (build_spuear_stubs): Likewise.
1165 (spu_elf_size_stubs, spu_elf_build_stubs): Adjust calls.
1166
1167 2008-04-02 Alan Modra <amodra@bigpond.net.au>
1168
1169 * elf32-spu.c (insert_callee): Reorder call list so most recent
1170 call is always first.
1171 (interesting_section): Move.
1172 (mark_functions_via_relocs): Fold interesting_section and
1173 reloc_count tests in callers to here. Simplify output section
1174 owner test.
1175 (discover_functions): Set "gaps" when no symbols and some
1176 "interesting_section". Run pasted_function loop for no symbol
1177 bfds.
1178 (for_each_node, transfer_calls): New functions.
1179 (mark_non_root): Adjust to suit for_each_node.
1180 (call_graph_traverse): Likewise. Fix memory leak. Rename to..
1181 (remove_cycles): ..this.
1182 (build_call_tree): Use for_each_node and transfer_calls.
1183 (struct _sum_stack_param): New.
1184 (sum_stack): Adjust to suit for_each_node. Return error on
1185 malloc failure. Move code to print root node cumulative stack from..
1186 (spu_elf_stack_analysis): ..here. Use for_each_node.
1187
1188 2008-03-31 Cary Coutant <ccoutant@google.com>
1189
1190 PR 6006
1191 * archive.c (_bfd_slurp_extended_name_table): Change
1192 ARFMAG[0] to ARFMAG[1].
1193 (_bfd_construct_extended_name_table): Likewise.
1194
1195 2008-03-31 Daniel Jacobowitz <dan@codesourcery.com>
1196
1197 * elfxx-mips.c (mips_elf_record_got_page_entry): Update comment.
1198 (_bfd_mips_elf_check_relocs): Update comments. Always call
1199 mips_elf_record_got_page_entry for R_MIPS_GOT_PAGE.
1200
1201 2008-03-27 Cary Coutant <ccoutant@google.com>
1202
1203 Add support for thin archives.
1204 * archive.c (_bfd_find_nested_archive): New function.
1205 (get_extended_arelt_filename): Add origin parameter.
1206 (_bfd_generic_read_ar_hdr_mag): Deal with extended name
1207 combined with a file offset.
1208 (append_relative_path): New function.
1209 (_bfd_get_elt_at_filepos): Deal with external members and
1210 nested archives.
1211 (bfd_generic_openr_next_archived_file): Thin archives.
1212 (bfd_generic_archive_p): Recognize new magic string.
1213 (adjust_relative_path): New function.
1214 (_bfd_construct_extended_name_table): Construct extended
1215 names for thin archive members.
1216 (_bfd_write_archive_contents): Emit new magic string, skip
1217 copying files for thin archives.
1218 * bfd-in.h (bfd_is_thin_archive): New macro.
1219 * bfd.c (struct bfd): New fields for thin archives.
1220 * libbfd-in.h (struct areltdata): New field for thin archives.
1221 * opncls.c (bfd_close): Delete BFDs for nested archives.
1222
1223 2008-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
1224
1225 * elf32-bfin.c (bfin_final_link_relocate): New function, wrapper around
1226 _bfd_final_link_relocate that also handles R_pcrel24 relocs.
1227 (bfinfdpic_relocate_section, bfin_relocate_section): Use it.
1228
1229 2008-03-25 Nathan Sidwell <nathan@codesourcery.com>
1230
1231 * elf32-arm.c (elf32_arm_final_link_relocate): Skip dynamic relocs
1232 in vxworks tls_vars sections.
1233 (allocate_dynrelocs, elf32_arm_size_dynamic_sections): Likewise.
1234 * elf32-i386.c (allocate_dynrelocs,
1235 elf_i386_size_dynamic_sections, elf_i386_relocate_section): Likewise.
1236 * elf32-ppc.c (allocate_dynrelocs, ppc_elf_size_dynamic_sections,
1237 ppc_elf_relocate_section): Likewise.
1238 * elf32-sh.c (allocate_dynrelocs, sh_elf_size_dynamic_sections,
1239 sh_elf_relocate_section): Likewise.
1240 * elfxx-sparc.c (allocate_dynrelocs,
1241 _bfd_sparc_elf_size_dynamic_sections,
1242 _bfd_sparc_elf_relocate_section): Likewise.
1243
1244 2008-03-21 Adam Nemet <anemet@caviumnetworks.com>
1245
1246 * elf.c (_bfd_elf_print_private_bfd_data): Use bfd_fprintf_vma to
1247 print the values from the dynamic section.
1248
1249 2008-03-20 Richard Sandiford <rsandifo@nildram.co.uk>
1250
1251 * elfxx-mips.c (MIPS_ELF_GNU_GOT1_MASK): New macro.
1252 (_bfd_mips_elf_finish_dynamic_sections): Use it instead of 0x80000000.
1253
1254 2008-03-20 Alan Modra <amodra@bigpond.net.au>
1255
1256 * elf32-spu.c (spu_elf_create_sections): Remove output_bfd parameter.
1257 (spu_elf_find_overlays, spu_elf_size_stubs): Likewise
1258 (process_stubs, discover_functions, build_call_tree): Likewise.
1259 (spu_elf_stack_analysis): Likewise.
1260 (spu_elf_check_vma): Likewise. Move.
1261 (struct call_info): Make "is_tail" a bitfield.
1262 (insert_callee): Clear fun->start and set fun->is_func if we find
1263 a non-tail call.
1264 * elf32-spu.h (spu_elf_create_sections): Update prototype.
1265 (spu_elf_find_overlays, spu_elf_size_stubs, spu_elf_check_vma): Ditto.
1266
1267 2008-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1268
1269 * aclocal.m4: Regenerate.
1270 * configure: Likewise.
1271 * Makefile.in: Likewise.
1272
1273 2008-03-16 H.J. Lu <hongjiu.lu@intel.com>
1274
1275 PR ld/5789
1276 PR ld/5943
1277 * elf32-i386.c (elf_i386_relocate_section): Issue an error
1278 for R_386_GOTOFF relocaton against undefined hidden/internal
1279 symbols when building a shared object.
1280
1281 * elf64-x86-64.c (elf64_x86_64_relocate_section): Issue an
1282 error for R_X86_64_PC8/R_X86_64_PC16/R_X86_64_PC32
1283 relocaton against undefined hidden/internal symbols when
1284 building a shared object.
1285 (elf64_x86_64_finish_dynamic_symbol): Return FALSE when symbol
1286 is referenced locally, but isn't defined in a regular file.
1287
1288 2008-03-15 H.J. Lu <hongjiu.lu@intel.com>
1289
1290 * bfd-in.h (BFD_NO_FLAGS, HAS_RELOC, EXEC_P, HAS_LINENO,
1291 HAS_DEBUG, HAS_SYMS, HAS_LOCALS, DYNAMIC, WP_TEXT, D_PAGED,
1292 BFD_IS_RELAXABLE, BFD_TRADITIONAL_FORMAT, BFD_IN_MEMORY,
1293 HAS_LOAD_PAGE, BFD_LINKER_CREATED): Moved to ...
1294 * bfd.c: Here.
1295
1296 * bfd.c (bfd): Change cacheable, target_defaulted, opened_once,
1297 mtime_set, no_export, output_has_begun and has_armap to bit
1298 field.
1299
1300 * bfd-in2.h: Regenerated.
1301
1302 2008-03-14 Daniel Jacobowitz <dan@codesourcery.com>
1303
1304 * cache.c (close_one): Remove mtime hack.
1305
1306 2008-03-14 H.J. Lu <hongjiu.lu@intel.com>
1307
1308 PR ld/5913
1309 * elfxx-ia64.c (elfNN_ia64_tprel_base): Remove BFD_ASSERT.
1310 (elfNN_ia64_dtprel_base): Likewise.
1311 (elfNN_ia64_relocate_section): Go to missing_tls_sec if
1312 tls_sec is NULL before calling elfNN_ia64_tprel_base or
1313 elfNN_ia64_dtprel_base. Report unsupported TLS relocations.
1314
1315 2008-03-14 Alan Modra <amodra@bigpond.net.au>
1316
1317 * elf32-spu.c (process_stubs, spu_elf_relocate_section): Move
1318 common code to..
1319 (maybe_needs_stub): ..here, a new function that also omits stubs
1320 for .eh_frame, and..
1321 (needs_ovl_stub): ..here. Create stubs for labels in code section
1322 referenced by switch jump table.
1323 (spu_elf_find_overlays): Set htab->ovly_load and htab->ovly_return.
1324 (enum _insn_type): Delete.
1325 (enum _stub_type): New.
1326 (count_stub, build_stub): Adjust.
1327 (allocate_spuear_stubs, build_spuear_stubs): Adjust.
1328
1329 2008-03-13 Alan Modra <amodra@bigpond.net.au>
1330
1331 * elf.c (_bfd_elf_make_section_from_shdr): Remove unnecessary cast.
1332 (_bfd_elf_assign_file_position_for_section): Simplify align.
1333 (_bfd_elf_init_reloc_shdr): Ensure shift expression wide enough
1334 for sh_addralign.
1335 (elf_fake_sections, swap_out_syms): Likewise.
1336 * elflink.c (bfd_elf_final_link): Likewise.
1337
1338 2008-03-13 Alan Modra <amodra@bigpond.net.au>
1339
1340 * Makefile.am: Run "make dep-am".
1341 * Makefile.in: Regenerate.
1342 * po/SRC-POTFILES.in: Regenerate.
1343
1344 2008-03-12 Bernd Schmidt <bernd.schmidt@analog.com>
1345
1346 From Jie Zhang <jie.zhang@analog.com>
1347 * elf32-bfin.c (struct bfinfdpic_relocs_info): Make got17m4,
1348 gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4, fdgoffhilo,
1349 gotoff, call and sym not bitfields.
1350 (bfinfdpic_gc_sweep_hook): New function; update the relocation
1351 information for the relocations of the section being removed.
1352 (bfinfdpic_check_relocs): Accumulate the number of relocations
1353 which set got17m4, gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4,
1354 fdgoffhilo, gotoff, call and sym fields.
1355 (elf_backend_gc_sweep_hook): Redefine for FD-PIC.
1356
1357 2008-03-12 Alan Modra <amodra@bigpond.net.au>
1358
1359 PR 5900
1360 * elf-bfd.h: Include elf/internal.h after elf/external.h.
1361 * elfcode.h (elf_swap_symbol_in): Map reserved shndx range.
1362 (elf_swap_symbol_out): Adjust SHN_XINDEX test.
1363 (elf_swap_ehdr_out): Mask SHN_LORESERVE and SHN_XINDEX to values
1364 seen in external structs.
1365 (valid_section_index_p): Delete.
1366 (elf_object_p): Don't increment section numbers over reserved range.
1367 Simplify test for valid sh_link, sh_info and e_shstrndx fields.
1368 (elf_write_shdrs_and_ehdr): Mask SHN_LORESERVE and SHN_XINDEX to values
1369 seen in external structs. Don't increment section numbers over
1370 reserved range.
1371 * elf.c (bfd_elf_sym_name): Remove redundant tests on st_shndx.
1372 (bfd_section_from_shdr): Likewise.
1373 (group_signature): Range check before accessing elf_elfsections.
1374 (_bfd_elf_setup_sections): Likewise.
1375 (bfd_section_from_shdr): Likewise.
1376 (bfd_section_from_shdr): Don't increment section number over
1377 reserved sections.
1378 (assign_file_positions_for_non_load_sections): Likewise.
1379 (assign_file_positions_except_relocs): Likewise.
1380 (_bfd_elf_write_object_contents): Likewise.
1381 (assign_section_numbers): Likewise. Adjust for changed SHN_*.
1382 (prep_headers): Delete unused variable.
1383 * elflink.c (bfd_elf_link_record_local_dynamic_symbol): Adjust
1384 for changed SHN_* values.
1385 (check_dynsym, elf_link_input_bfd): Likewise.
1386 (bfd_elf_final_link): Likewise. Don't skip over reserved section
1387 range.
1388 (elf_fixup_link_order): Check that sh_link field is valid.
1389 * elf-hppa.h (elf_hppa_add_symbol_hook): Make "index" unsigned.
1390 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Range check before
1391 accesssing elf_elfsections.
1392 * elf32-avr.c (elf32_avr_size_stubs): Likewise.
1393 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
1394 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Likewise.
1395 * elf64-hppa.c (elf64_hppa_check_relocs): Adjust for changed
1396 SHN_* defines. Test for SHN_BAD return from
1397 _bfd_elf_section_from_bfd_section
1398
1399 2008-03-12 Alan Modra <amodra@bigpond.net.au>
1400
1401 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Update prototype.
1402 * elf.c (_bfd_elf_section_from_bfd_section): Return unsigned int,
1403 SHN_BAD on error.
1404 (_bfd_elf_print_private_bfd_data): Test for SHN_BAD result from
1405 _bfd_elf_section_from_bfd_section, not -1.
1406 (swap_out_syms): Likewise.
1407 * elflink.c (elf_link_add_object_symbols): Likewise.
1408 (bfd_elf_get_bfd_needed_list): Likewise.
1409 (bfd_elf_match_symbols_in_sections): Likewise.
1410 (elf_link_add_object_symbols): Don't bother testing for symbols
1411 using normal sections before calling bfd_section_from_elf_index.
1412 (elf_link_input_bfd, bfd_elf_final_link): Likewise.
1413 (bfd_elf_reloc_symbol_deleted_p): Likewise.
1414 * elfcode.h (elf_slurp_symbol_table): Likewise.
1415 * elf32-spu.c (get_sym_h): Likewise.
1416 * elf32-xtensa.c (get_elf_r_symndx_section): Likewise.
1417 * elf64-ppc.c (opd_entry_value, get_sym_h, ppc64_elf_edit_toc): Ditto.
1418 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
1419
1420 2008-03-11 Alan Modra <amodra@bigpond.net.au>
1421
1422 * elf32-spu.c (spu_elf_relocate_section): Test identical conditions
1423 to those in process_stubs for overlay symbols.
1424
1425 2008-03-09 Paul Brook <paul@codesourcery.com>
1426
1427 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
1428 Tag_VFP_arch values.
1429
1430 2008-03-08 Paul Brook <paul@codesourcery.com>
1431
1432 * elf32-arm.c (insert_thumb_branch): Rewrite.
1433 (elf32_thumb_to_arm_stub): Use new insert_thumb_branch.
1434
1435 2008-03-07 Paul Brook <paul@codesourcery.com>
1436
1437 * elf32-arm.c (elf32_arm_howto_table_1): Fix bitmasks for MOVW and
1438 MOVT relocations.
1439 (elf32_arm_final_link_relocate): Fix off by one MOVW/MOVT sign
1440 extension.
1441 (elf32_arm_relocate_section): Handle MOVW and MOVT
1442 relocations. Improve safety check for other weird relocations.
1443 (elf32_arm_check_relocs): Only set h->needs_plt for branch/call
1444 relocations.
1445
1446 2008-03-03 Bob Wilson <bob.wilson@acm.org>
1447
1448 * xtensa-isa.c (xtensa_isa_num_pipe_stages): Make max_stage static and
1449 only compute its value once.
1450
1451 2008-03-03 Alan Modra <amodra@bigpond.net.au>
1452
1453 * elf32-spu.c (struct got_entry): Add "addend" field.
1454 (count_stub, build_stub): Use a new stub if relocation addend
1455 differs from existing stubs for this symbol.
1456 (process_stubs): Deal with addends.
1457 (spu_elf_relocate_section, spu_elf_output_symbol_hook): Likewise.
1458
1459 2008-03-02 H.J. Lu <hongjiu.lu@intel.com>
1460
1461 PR ld/5789
1462 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true
1463 for hidden and local symbols.
1464
1465 2008-03-03 Alan Modra <amodra@bigpond.net.au>
1466
1467 * elf32-ppc.c (allocate_dynrelocs): Discard relocs on
1468 undefined symbols with internal or hidden visibility.
1469 (ppc_elf_relocate_section): Likewise. Use SYMBOL_CALLS_LOCAL
1470 rather than SYMBOL_REFERENCES_LOCAL on branches. Don't
1471 return immediately on dynamic reloc error.
1472
1473 2008-03-01 Alan Modra <amodra@bigpond.net.au>
1474
1475 * elf64-ppc.c (build_plt_stub): Add relocs on plt call stubs
1476 if emitrelocations.
1477 (get_relocs): New function, split out from..
1478 (ppc_build_one_stub): ..here. Add relocs on plt_branch stubs if
1479 emitrelocations. Remove indx temp.
1480 (ppc_size_one_stub): Count new stub relocs.
1481 (ppc64_elf_size_stubs): Count new glink reloc.
1482 (ppc64_elf_build_stubs): Emit glink reloc if emitrelocations.
1483 (ppc64_elf_finish_dynamic_sections): Output glink relocs.
1484 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Describe non-pic
1485 glink code.
1486
1487 2008-02-28 Alan Modra <amodra@bigpond.net.au>
1488
1489 * elf32-spu.c (mark_functions_via_relocs): Don't assume that
1490 the "->start" pointer reaches to function origin, so that we
1491 can handle functions split over more than two sections.
1492 (build_call_tree): Likewise.
1493 (pasted_function): Don't attempt to set fun->start back to the
1494 function origin, just go back one section.
1495
1496 2008-02-27 Catherine Moore <clm@codesourcery.com>
1497
1498 * elf.c ( _bfd_elf_print_private_bfd_data): Call
1499 elf_backend_get_target_dtag if defined.
1500 * elf32-mips.c (elf_backend_get_target_dtag): Define.
1501 * elf64-mips.c: Likewise.
1502 * elfn32-mips.c: Likewise.
1503 * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New.
1504 * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare.
1505 * elf-bfd.h (elf_backend_get_target_dtag): Add prototype.
1506 * elfxx-target.h (elf_backend_get_target_dtag): Add default.
1507 (elf_backend_data): Add elf_backend_get_target_dtag.
1508
1509 2008-02-26 Alan Modra <amodra@bigpond.net.au>
1510
1511 * elf32-ppc.c (ppc_elf_check_relocs): Set pointer_equality_needed
1512 for R_PPC_REL32 syms. Don't set non_got_ref on branch reloc syms,
1513 and assume branch relocs are not dynamic when non-shared.
1514 (readonly_dynrelocs): New function, split out from..
1515 (maybe_set_textrel): ..here, renamed from old readonly_dynrelocs.
1516 (ppc_elf_adjust_dynamic_symbol): For symbols generating plt entries,
1517 clear non_got_ref..
1518 (allocate_dynrelocs): ..and don't set u.def for undefined weak.
1519 Do allow dynamic relocs on undefined symbols.
1520 (ppc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
1521 (ppc_elf_relocate_section): Mirror dynamic reloc changes in
1522 check_relocs.
1523 (ppc_elf_finish_dynamic_symbol): Don't give a warning on weak
1524 plt symbols needing pointer_equality_needed.
1525
1526 2008-02-23 Alan Modra <amodra@bigpond.net.au>
1527
1528 * elf32-ppc.c (ppc_elf_check_relocs): Revert non_got_ref change.
1529
1530 2008-02-23 Alan Modra <amodra@bigpond.net.au>
1531
1532 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Copy
1533 pointer_equality_needed.
1534 (ppc_elf_check_relocs): Split out non-branch relocs from others
1535 that might emit dynamic relocs. Set pointer_equality_needed
1536 for their symbols. Don't set non_got_ref on branch reloc symbols.
1537 (ppc_elf_hash_symbol): New function.
1538 (elf_backend_hash_symbol): Define.
1539 (ppc_elf_finish_dynamic_symbol): Handle pointer_equality_needed.
1540 Error if pointer_equality_needed on weak plt symbol.
1541
1542 2008-02-22 H.J. Lu <hongjiu.lu@intel.com>
1543
1544 PR ld/5788
1545 * elflink.c (elf_create_symbuf): Correct buffer size and
1546 position.
1547
1548 2008-02-22 Nick Clifton <nickc@redhat.com>
1549
1550 PR 868
1551 * dwarf2.c: Revert previous patch. All of the allocate memory is
1552 on an obstack which will be freed at some other time.
1553
1554 2008-02-20 Nick Clifton <nickc@redhat.com>
1555
1556 PR 868
1557 * libbfd.c (bfd_realloc_or_free): New function. Performs like
1558 bfd_realloc, but if the (re)allocation fails, the pointer is
1559 freed.
1560 * libbfd-in.h: Prototype.
1561 * libbfd.h: Regenerate.
1562 * bfdio.c (bfd_bwrite): Use the new function.
1563 (bfd_seek): Likewise.
1564 * bfdwin.c:(bfd_get_file_window): Likewise.
1565 * elf-strtab.c (_bfd_elf_strtab_add): Likewise.
1566 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
1567 * elf32-xtensa.c (vsprintf_msg): Likewise.
1568 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
1569 * stabs.c (_bfd_link_seciton_stabs): Likewise.
1570 * vms-misc.c (_bfd_vms_get_record): Likewise.
1571 * vms-tir.c (check_section): Likewise.
1572 * vms.c (vms_new_section_hook): Likewise.
1573 * elf32-arm.c (elf32_arm_section_map_add): Check that the
1574 allocation of sec_data->map succeeded before using it.
1575 * elflink.c (elf_link_output_sym): Do not overwrite finfo->
1576 symshndxbuf until it is known that the reallocation succeeded.
1577
1578 2008-02-20 Diogo de Carvalho Kraemer <diogo@kraemer.eng.br>
1579 Nick Clifton <nickc@redhat.com>
1580
1581 PR 868
1582 * dwarf2.c (read_abbrevs): Free the abbreviation table if we run
1583 out of memory.
1584 (decode_line_info): Free the line_info_table before returning a
1585 failure result.
1586 (_bfd_dwarf2_cleanup_debug_info): Free the abbreviation table.
1587 Free the line table. Free the function table. Free the variable
1588 table.
1589
1590 2008-02-17 Mark Kettenis <kettenis@gnu.org>
1591
1592 * elf.c (swap_out_syms): Avoid preprocessing directive within
1593 macro arg.
1594
1595 2008-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
1596
1597 * elf.c (assign_file_positions_for_load_sections): Set the type of
1598 PT_NOTE sections to SHT_NOTE.
1599
1600 2008-02-17 Ulrich Weigand <uweigand@de.ibm.com>
1601
1602 * simple.c (bfd_simple_get_relocated_section_contents): Set
1603 link_info.output_bfd.
1604
1605 2008-02-16 Nathan Sidwell <nathan@codesourcery.com>
1606
1607 * dwarf2.c (find_line): Don't trust debug information after an
1608 unparseable compilation unit.
1609
1610 2008-02-15 Alan Modra <amodra@bigpond.net.au>
1611
1612 PR 5765
1613 * section.c (SEC_LINK_DUPLICATES): Correct. Renumber following flags.
1614 * bfd-in2.h: Regenerate.
1615
1616 2008-02-15 Alan Modra <amodra@bigpond.net.au>
1617
1618 * elf-bfd.h (enum elf_object_id): Add HPPA_ELF_TDATA.
1619 * elf.c (bfd_elf_allocate_object): Don't check for already allocated
1620 tdata.
1621 * elf32-hppa.c (elf32_hppa_mkobject): New function.
1622 (bfd_elf32_mkobject): Define.
1623 * elf32-ppc.c (is_ppc_elf_target): Delete. Replace all uses with..
1624 (is_ppc_elf): ..this new macro.
1625 * elf64-ppc.c (is_ppc64_elf_target): Delete. Replace all uses with..
1626 (is_ppc64_elf): ..this new macro.
1627
1628 2008-02-15 Alan Modra <amodra@bigpond.net.au>
1629
1630 * elflink.c: Replace all accesses to hash->creator field with
1631 output_bfd->xvec.
1632 * cofflink.c: Likewise.
1633 * coff-h8300.c: Likewise.
1634 * ecoff.c: Likewise.
1635 * elf32-m68hc1x.c: Likewise.
1636 * elf32-ppc.c: Likewise.
1637 * elf64-alpha.c: Likewise.
1638 * elf64-ppc.c: Likewise.
1639 * elf64-sparc.c: Likewise.
1640 * elfxx-mips.c: Likewise.
1641 * i386linux.c: Likewise.
1642 * m68klinux.c: Likewise.
1643 * sparclinux.c: Likewise.
1644 * sunos.c: Likewise.
1645 * xcofflink.c: Likewise.
1646 * linker.c: Likewise.
1647 (_bfd_link_hash_table_init): Don't store creator.
1648
1649 2008-02-14 Peter Jones <pjones@redhat.com>
1650
1651 * efi-rtdrv-ia32.c: New file.
1652 * efi-bsdrv-ia32.c: New file.
1653 * efi-rtdrv-ia64.c: New file.
1654 * efi-bsdrv-ia64.c: New file.
1655 * efi-rtdrv-x86_64.c: New file.
1656 * efi-bsdrv-x86_64.c: New file.
1657 * peicode.h (pe_bfd_object_p): Add support for boot service and
1658 runtime service drivers.
1659 * libpei.h: Add macros for EFI formats, and rename the efi application
1660 format macros to disambiguate.
1661 * targets.c: Add bfd_target _vec externs.
1662 (_bfd_tar): Add EFI _vec entries.
1663 * config.bfd: Add EFI vectors into the selection routines.
1664 * configure.in: add EFI _vec entries.
1665 * configure: Regenerate.
1666 * Makefile.am: Add EFI files.
1667 * Makefile.in: Regenerate.
1668
1669 2008-02-14 Nathan Sidwell <nathan@codesourcery.com>
1670
1671 * dwarf1.c (struct dwarf1_debug): Add syms member.
1672 (alloc_dwarf1_unit, alloc_dwarf1_func): Check for out of memory.
1673 (parse_line_table, _bfd_dwarf1_find_nearest_line): Relocate
1674 section contents, check for out of memory.
1675
1676 * dwarf1.c (struct dwarf1_debug): Change data pointers to bfd_byte.
1677 (parse_die): Change data pointers to bfd_byte.
1678 (parse_line_table, parse_functions_in_unit): Likewise.
1679
1680 2008-02-14 Alan Modra <amodra@bigpond.net.au>
1681
1682 * elflink.c (compute_bucket_count): Warning fixes.
1683
1684 2008-02-12 DJ Delorie <dj@redhat.com>
1685
1686 * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
1687 relocation pointing to local symbol in merged section.
1688
1689 * elf32-iq2000.c (iq2000_elf_relocate_offset16): New.
1690 (iq2000_elf_relocate_section): Call it.
1691
1692 2008-02-12 Nick Clifton <nickc@redhat.com>
1693
1694 PR ld/5692
1695 * elf-bfd.h (enum elf_object_id): New enum, used to identify
1696 target specific extensions to the elf_obj_tdata structure.
1697 (struct elf_obj_tdata): New field 'object_id'.
1698 (elf_object_id, elf_program_header_size, elf_symtab_hdr): New
1699 macros for accessing fields in the elf_obj_tdata structure.
1700 (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object.
1701 (bfd_elf_allocate_object): New function.
1702 * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object
1703 and implement by calling bfd_elf_allocate_object.
1704 (bfd_elf_allocate_object): New function: Allocates an
1705 elf_obj_tdata structure, possibly with a target specific
1706 extension.
1707 * elfxx-target.h (bfd_elfNN_mkobject): Use
1708 bfd_elf_make_generic_object as the default value.
1709 * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata
1710 for consistency with other, similar structures.
1711 (is_arm_elf): New macro. Checks a BFD to make sure that is an ARM
1712 ELF bfd.
1713 (elf32_arm_mkobject): Call bfd_elf_allocate_object.
1714 (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check
1715 the bfd being processed.
1716 (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
1717 (bfd_elf32_arm_set_target_relocs): Likewise.
1718 (bfd_elf32_arm_final_link_relocate): Likewise.
1719 (bfd_elf32_arm_copy_private_bfd_data): Likewise.
1720 (bfd_elf32_arm_merge_eabi_attributes): Likewise.
1721 (bfd_elf32_arm_merge_private_bfd_data): Likewise.
1722 (bfd_elf32_arm_check_relocs): Likewise.
1723 (bfd_elf32_arm_gc_mark_extra_sections): Likewise.
1724 (bfd_elf32_arm_size_dynamic_sections): Likewise.
1725 (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr.
1726 (bfd_elf32_arm_init_maps): Likewise.
1727 (bfd_elf32_arm_final_link_relocate): Likewise.
1728 (bfd_elf32_arm_relocate_section): Likewise.
1729 (bfd_elf32_arm_gc_sweep_hook): Likewise.
1730 (bfd_elf32_arm_check_relocs): Likewise.
1731 (bfd_elf32_arm_size_dynamic_sections): Likewise.
1732 * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object.
1733 (is_i386_elf): New macro. Checks a BFD to make sure that is an x86
1734 ELF bfd.
1735 (elf_i386_check_relocs): Use is_i386_elf macro to check the bfd
1736 being processed.
1737 (elf_i386_size_dynamic_sections): Likewise.
1738 (elf_i386_relocate_section): Likewise.
1739 (elf_i386_check_relocs): Use elf_symtab_hdr.
1740 (elf_i386_gc_sweep_hook): Likewise.
1741 (elf_i386_size_dynamic_sections): Likewise.
1742 (elf_i386_relocate_section): Likewise.
1743 * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object.
1744 (elf_create_pointer_linker_section): Use is_ppc_elf_target to
1745 verify that the bfd before accessing target specific fields.
1746 (ppc_elf_check_relocs): Likewise.
1747 (elf_finish_pointer_linker_section): Likewise.
1748 (elf_create_pointer_linker_section): Use elf_symtab_hdr.
1749 (ppc_elf_check_relocs): Likewise.
1750 (ppc_elf_gc_sweep_hook): Likewise.
1751 (ppc_elf_tls_optimize): Likewise.
1752 (ppc_elf_size_dynamic_sections): Likewise.
1753 (ppc_elf_relax_section): Likewise.
1754 (ppc_elf_relocate_section): Likewise.
1755 * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment
1756 reminding programmers to keep this structure in sync with the one
1757 defined in elf64-s390.c.
1758 (elf_s390_mkobject): Call bfd_elf_allocate_object.
1759 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
1760 ELF bfd.
1761 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
1762 being processed.
1763 (elf_s390_size_dynamic_sections): Likewise.
1764 (elf_s390_relocate_section): Likewise.
1765 (elf_s390_check_relocs): Use elf_symtab_hdr.
1766 (elf_s390_gc_sweep_hook): Likewise.
1767 (elf_s390_size_dynamic_sections): Likewise.
1768 (elf_s390_relocate_section): Likewise.
1769 * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object.
1770 (is_sh_elf): New macro. Checks a BFD to make sure that is an SH
1771 ELF bfd.
1772 (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the
1773 bfd being processed.
1774 (sh_elf_relocate_section): Likewise.
1775 (sh_elf_check_relocs): Likewise.
1776 (sh_elf_copy_private_data): Likewise.
1777 (sh_elf_relax_section): Use elf_symtab_hdr.
1778 (sh_elf_size_dynamic_sections): Likewise.
1779 (sh_elf_relocate_section): Likewise.
1780 (sh_elf_get_relocated_section_contents): Likewise.
1781 (sh_elf_gc_sweep_hook): Likewise.
1782 (sh_elf_check_relocs): Likewise.
1783 * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object.
1784 (is_alpha_elf): New macro. Checks a BFD to make sure that is an
1785 Alpha ELF bfd.
1786 (elf64_alpha_create_got_section): Use is_alpha_elf macro to check
1787 the bfd being processed.
1788 (elf64_alpha_create_dynamic_section): Likewise.
1789 (elf64_alpha_check_relocs): Likewise.
1790 (elf64_alpha_size_got_sections): Likewise.
1791 (elf64_alpha_relax_section): Likewise.
1792 (elf64_alpha_relocate_section): Likewise.
1793 (elf64_alpha_final_link): Likewise.
1794 (elf64_alpha_check_relocs): Use elf_symtab_hdr.
1795 (elf64_alpha_relax_section): Likewise.
1796 (elf64_alpha_relocate_section_r): Likewise.
1797 (elf64_alpha_relocate_section): Likewise.
1798 * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object.
1799 (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd
1800 being processed.
1801 (opd_entry_value): Likewise.
1802 (allocate_dynrelocs): Likewise.
1803 (ppc64_elf_relocate_section): Likewise.
1804 (ppc64_elf_check_relocs): Use elf_symtab_hdr.
1805 (opd_entry_value): Likewise.
1806 (ppc64_elf_gc_sweep_hook): Likewise.
1807 (get_sym_h): Likewise.
1808 (ppc64_elf_edit_opd): Likewise.
1809 (ppc64_elf_tls_optimize): Likewise.
1810 (ppc64_elf_edit_toc): Likewise.
1811 (ppc64_elf_size_dynamic_sections): Likewise.
1812 (toc_adjusting_stub_needed): Likewise.
1813 (ppc64_elf_size_stubs): Likewise.
1814 (ppc64_elf_relocate_section): Likewise.
1815 * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment
1816 reminding programmers to keep this structure in sync with the one
1817 defined in elf32-s390.c.
1818 (elf_s390_mkobject): Call bfd_elf_allocate_object.
1819 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
1820 ELF bfd.
1821 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
1822 being processed.
1823 (elf_s390_size_dynamic_sections): Likewise.
1824 (elf_s390_relocate_section): Likewise.
1825 (elf_s390_check_relocs): Use elf_symtab_hdr.
1826 (elf_s390_gc_sweep_hook): Likewise.
1827 (elf_s390_size_dynamic_sections): Likewise.
1828 (elf_s390_relocate_section): Likewise.
1829 * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object.
1830 (is_x86_64_elf): New macro. Checks a BFD to make sure that is an
1831 x86_64 ELF bfd.
1832 (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd
1833 being processed.
1834 (elf64_x86_64_size_dynamic_sections): Likewise.
1835 (elf64_x86_64_relocate_section): Likewise.
1836 (elf64_x86_64_check_relocs): Use elf_symtab_hdr.
1837 (elf64_x86_64_gc_sweep_hook): Likewise.
1838 (elf64_x86_64_size_dynamic_sections): Likewise.
1839 (elf64_x86_64_relocate_section): Likewise.
1840 * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object.
1841 (is_sparc_elf): New macro. Checks a BFD to make sure that is a Sparc
1842 ELF bfd.
1843 (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the
1844 bfd being processed.
1845 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1846 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1847 (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr.
1848 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1849 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1850 (_bfd_sparc_elf_relocate_section): Likewise.
1851
1852 2008-02-12 Alan Modra <amodra@bigpond.net.au>
1853
1854 PR 5303, 5755
1855 * arange-set.c: Delete.
1856 * arange-set.h: Delete.
1857 * dwarf2.c: Revert 2007-09-21 changes.
1858 * Makefile.am: Likewise.
1859 * Makefile.in: Regenerate.
1860 * po/SRC-POTFILES.in: Regenerate.
1861
1862 2008-02-11 Bernd Schmidt <bernd.schmidt@analog.com>
1863
1864 * elf32-bfin.c (bfin_relocate_section): Set up dynobj before using it
1865 if necessary.
1866 (elf32_bfin_merge_private_bfd_data): Simplify, and ensure object type
1867 mismatches are detected.
1868
1869 * elf32-bfin.c (bfinfdpic_relocate_section): Take more care not to
1870 emit invalid relocs or rofixup entries for deleted .eh_frame entries.
1871
1872 2008-02-11 Daniel Jacobowitz <dan@codesourcery.com>
1873
1874 * cache.c (cache_bread): Set bfd_error_file_truncated if EOF
1875 was reached.
1876 * srec.c (srec_scan): Calculate the checksum. Complain on mismatch.
1877
1878 2008-02-07 Alan Modra <amodra@bigpond.net.au>
1879
1880 * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling
1881 of _ovly_buf_table size.
1882 (spu_elf_build_stubs): Use low bit of .size as "present" bit.
1883 Adjust initialisations relating to _ovly_buf_table.
1884
1885 2008-02-04 Bob Wilson <bob.wilson@acm.org>
1886
1887 * elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid
1888 relocation, do not continue processing it. Ignore R_XTENSA_ASM_EXPAND
1889 relocations against dynamic symbols.
1890 (elf_xtensa_finish_dynamic_sections): Do not fail if there is no
1891 .xt.lit section.
1892
1893 2008-02-04 Kai Tietz <kai.tietz@onevision.com>
1894 H.J. Lu <hongjiu.lu@intel.com>
1895
1896 PR 5715
1897 * warning.m4: Enable -Wno-format by default when using gcc on
1898 mingw.
1899 * configure: Regenerated.
1900
1901 2008-02-04 Adam Nemet <anemet@caviumnetworks.com>
1902
1903 * archures.c: Update copyright.
1904 (bfd_mach_mips_octeon): New macro.
1905 * bfd-in2.h: Regenerate.
1906 * elfxx-mips.c (_bfd_elf_mips_mach): Handle Octeon.
1907 (mips_set_isa_flags): Likewise.
1908 (mips_mach_extensions): Add Octeon.
1909 * cpu-mips.c: Update copyright.
1910 (I_mipsocteon): New enum constant.
1911 (arch_info_struct): Add Octeon.
1912
1913 2008-02-04 Alan Modra <amodra@bigpond.net.au>
1914
1915 * elf32-spu.c (spu_elf_relocate_section): Correct return type.
1916 Return error status on unexpected relocation errors.
1917
1918 2008-02-04 Alan Modra <amodra@bigpond.net.au>
1919
1920 PR ld/5692
1921 * elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31. Instead abort
1922 on non-ELF input.
1923 * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue
1924 processing on non-ELF input.
1925
1926 2008-01-31 Marc Gauthier <marc@tensilica.com>
1927
1928 * config.bfd (xtensa*-*-*): Recognize processor variants.
1929
1930 2008-01-31 Nick Clifton <nickc@redhat.com>
1931
1932 PR ld/5692
1933 * elf.c (bfd_elf_get_elf_syms): Check the return value of
1934 get_elf_backend_data.
1935
1936 2008-01-28 Fabian Groffen <grobian@gentoo.org>
1937
1938 * config.bfd (x86_64-*-solaris2): Add support for this target.
1939
1940 2008-01-28 Alan Modra <amodra@bigpond.net.au>
1941
1942 Rewrite SPU overlay handling code. Put overlay calls stubs in the
1943 overlays where possible. Use a faster call stub, or optionally at
1944 compile time, a more compact stub. Double size of _ovly_buf_table
1945 so that low bit of _ovly_table.buf can be used as a "present" bit.
1946 Reserve an extra _ovly_table entry for index zero.
1947 * elf32-spu.c: (struct spu_link_hash_table): Delete a number of fields,
1948 add new ones.
1949 (struct got_entry): New.
1950 (struct spu_stub_hash_entry): Delete.
1951 (stub_hash_newfunc, spu_elf_link_hash_table_free): Delete.
1952 (spu_elf_link_hash_table_create): Adjust for struct changes.
1953 (spu_stub_name): Delete.
1954 (spu_elf_find_overlays): Don't track sections from overlay regions.
1955 Instead set ovl_buf number in spu elf section data. Error if
1956 overlays in one region don't start at the same address. Adjust
1957 for struct _spu_elf_section_data changes.
1958 (SIZEOF_STUB1, SIZEOF_STUB2, ILA_79, ILA_78): Delete.
1959 (OVL_STUB_SIZE, BRSL, LNOP, ILA): Define.
1960 (needs_ovl_stub): Adjust for struct _spu_elf_section_data changes.
1961 (enum _insn_type): New.
1962 (count_stub, build_stub): New functions.
1963 (allocate_spuear_stubs): Use count_stub.
1964 (build_spuear_stubs): Use build_stub.
1965 (populate_stubs, sort_stubs): Delete.
1966 (process_stubs): New function.
1967 (write_one_stub): Delete.
1968 (spu_elf_size_stubs, spu_elf_build_stubs): Rewrite.
1969 (alloc_stack_info): Adjust for struct _spu_elf_section_data changes.
1970 (maybe_insert_function, check_function_ranges): Likewise.
1971 (find_function, pasted_function, build_call_tree): Likewise.
1972 (spu_elf_stack_analysis, spu_elf_modify_segment_map): Likewise.
1973 (spu_elf_modify_program_headers): Likewise.
1974 (interesting_section): Detect stub sections differently. Delete
1975 htab param, adjust all callers.
1976 (spu_elf_relocate_section): Rewrite stub handling.
1977 (spu_elf_output_symbol_hook): Likewise.
1978 (bfd_elf32_bfd_link_hash_table_free): Delete.
1979 * elf32-spu.h (struct _spu_elf_section_data): Move input-only and
1980 output-only fields into a union. Add ovl_buf.
1981 (spu_elf_size_stubs, spu_elf_build_stubs): Update prototypes.
1982
1983 2008-01-25 DJ Delorie <dj@redhat.com>
1984
1985 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
1986
1987 2008-01-25 Kai Tietz <kai.tietz@onevision.com>
1988
1989 * bfd-in.h: Add mingw I64 support.
1990 * bfd-in2.h: Regenerated.
1991 * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64.
1992
1993 2008-01-21 Alan Modra <amodra@bigpond.net.au>
1994
1995 PR 4453
1996 * format.c (bfd_check_format_matches): Don't accept archives as
1997 fully matching unless they have a map.
1998
1999 2008-01-21 Alan Modra <amodra@bigpond.net.au>
2000
2001 * elflink.c (_bfd_elf_link_output_relocs): Correct error return.
2002
2003 2008-01-21 Alan Modra <amodra@bigpond.net.au>
2004
2005 * ecoff.c (_bfd_ecoff_archive_p): Delete.
2006 * libecoff.h (_bfd_ecoff_archive_p): Delete.
2007 * coff-alpha.c (ecoffalpha_little_vec): Use bfd_generic_archive_p.
2008 * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
2009 (ecoff_biglittle_vec): Likewise.
2010
2011 2008-01-19 Alan Modra <amodra@bigpond.net.au>
2012
2013 PR 5646
2014 * elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
2015 non-NULL before dereferencing.
2016
2017 2008-01-15 Alan Modra <amodra@bigpond.net.au>
2018
2019 PR 5604
2020 * elf-bfd.h (struct elf_backend_data): Add gc_keep. Remove param
2021 names from others.
2022 (_bfd_elf_gc_keep): Declare.
2023 * elfxx-target.h (elf_backend_gc_keep): Define.
2024 (elfNN_bed): Init new field.
2025 * elflink.c (_bfd_elf_gc_keep): New function.
2026 (bfd_elf_gc_sections): Call gc_keep.
2027 * elf64-ppc.c (elf_backend_gc_keep): Define.
2028 (struct _ppc64_elf_section_data): Move .opd related fields to
2029 a struct so they don't occupy the same storage. Adjust accesses
2030 throughout file.
2031 (ppc64_elf_gc_keep): New function, split out from..
2032 (ppc64_elf_gc_mark_hook): ..here. Don't call _bfd_elf_gc_mark
2033 to mark .opd section, just set gc_mark.
2034 (ppc64_elf_edit_opd): Remove no_opd_opt parm. Don't set opd->adjust
2035 unless we are changing .opd. Test non-NULL opd->adjust at all
2036 accesses throughout file.
2037 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
2038
2039 2008-01-15 Alan Modra <amodra@bigpond.net.au>
2040
2041 * bfd-in.h (BFD_HOST_LONG_LONG): Delete.
2042 * bfd-in2.h: Regenerate.
2043
2044 2008-01-11 Tristan Gingold <gingold@adacore.com>
2045 Eric Botcazou <ebotcazou@adacore.com>
2046
2047 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a
2048 relocatable.
2049 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
2050 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
2051 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
2052 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
2053 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
2054 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
2055 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2056 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2057 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
2058 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
2059 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2060 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2061 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise.
2062 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
2063 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
2064 * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output
2065 or executable output with relocations.
2066
2067 2008-01-09 Nick Clifton <nickc@redhat.com>
2068
2069 PR gas/5552
2070 * elf32-fr30.c (fr30_elf_howto_table): Set partial_inplace field
2071 to FALSE for all relocs.
2072
2073 2008-01-09 Richard Sandiford <rsandifo@nildram.co.uk>
2074
2075 PR ld/5526
2076 * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged
2077 fields. Rename u.cie.u.merged to u.cie.u.merged_with.
2078 (eh_frame_sec_info): Add a cies field.
2079 (eh_frame_hdr_info): Add a merge_cies field.
2080 * elf-eh-frame.c (cie): Add a reloc_index member to the personality
2081 union.
2082 (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead
2083 of hdr_info->cies.
2084 (_bfd_elf_parse_eh_frame): Remove tmp_cie. Ccreate an array of
2085 cie structures in all cases and use it instead of extended_cies.
2086 If merging, store the cie array in sec_info->cies and point each
2087 CIE's eh_fde_cie at the associated element. Do not try to
2088 calculate the value of the personality routine here; record the
2089 offset of the relocation instead. Do not merge CIEs here.
2090 (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here...
2091 (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead.
2092 (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE.
2093 (find_merged_cie): New function.
2094 (_bfd_elf_gc_mark_fdes): Use it. Free sec_info->cies.
2095
2096 2008-01-07 Nick Clifton <nickc@redhat.com>
2097
2098 PR binutils/5535
2099 * vms.c (vms_close_and_cleanup): Check for the presence of a
2100 vms_private_data_struct before examining any of its fields.
2101
2102 2008-01-07 H.J. Lu <hongjiu.lu@intel.com>
2103
2104 PR ld/5522
2105 * elflink.c (elf_link_input_bfd): Don't write out a section if
2106 its output section is marked with SEC_NEVER_LOAD.
2107
2108 For older changes see ChangeLog-2007
2109 \f
2110 Local Variables:
2111 mode: change-log
2112 left-margin: 8
2113 fill-column: 74
2114 version-control: never
2115 End:
This page took 0.107171 seconds and 4 git commands to generate.