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