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