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