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