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