]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
*** empty log message ***
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
71a75f6f
MF
12006-10-18 Roy Marples <uberlord@gentoo.org>
2
3 * elf64-sparc.c: Add FreeBSD support.
4 (elf64_sparc_fbsd_post_process_headers): New function.
5 * targets.c (_bfd_target_vector): Add bfd_elf64_sparc_freebsd_vec.
6 * config.bfd (sparc64-*-freebsd*): Set targ_defvec to bfd_elf64_sparc_freebsd_vec.
7 * configure.in: Add entry for bfd_elf64_sparc_freebsd_vec.
8 * configure: Regenerate.
9
92f5d02b
MS
102006-10-17 Mark Shinwell <shinwell@codesourcery.com>
11
12 * elf32-arm.c (elf32_arm_final_link_relocate): Add support for
13 R_ARM_MOVW_BREL_NC, R_ARM_MOVW_BREL, R_ARM_MOVT_BREL,
14 R_ARM_THM_MOVW_BREL_NC, R_ARM_THM_MOVW_BREL and
15 R_ARM_THM_MOVT_BREL relocations.
16
e95de063
MS
172006-10-17 Mark Shinwell <shinwell@codesourcery.com>
18
19 * elf32-arm.c (elf32_arm_howto_table_1): Change offset for
20 R_THM_CALL to 25 and remove FIXME comment.
21 (using_thumb2): New function.
22 (elf32_arm_final_link_relocate): Cope with Thumb-2 BL encoding.
23
bb224fc3
MS
242006-10-17 Mark Shinwell <shinwell@codesourcery.com>
25
26 * elf32-arm.c (elf32_arm_final_link_relocate): Add cases
27 for R_ARM_ABS32_NOI and R_ARM_REL32_NOI.
28 (elf32_arm_gc_sweep_hook): Likewise.
29 (elf32_arm_check_relocs): Likewise.
30 (allocate_dynrelocs): Likewise.
31
74541ad4
AM
322006-10-17 Alan Modra <amodra@bigpond.net.au>
33
34 * elf-bfd.h (struct elf_link_hash_table): Reorder. Add
35 text_index_section and data_index_section.
36 (struct elf_backend_data): Add elf_backend_init_index_section.
37 (_bfd_elf_init_1_index_section): Declare.
38 (_bfd_elf_init_2_index_sections): Declare.
39 * elfxx-target.h (elf_backend_init_index_section): Define.
40 (elfNN_bed): Init new field.
41 * elflink.c (_bfd_elf_link_omit_section_dynsym): Keep first tls
42 section and text_index_section plus data_index_section.
43 (_bfd_elf_link_renumber_dynsyms): Clear dynindx on omitted sections.
44 (_bfd_elf_init_1_index_section): New function.
45 (_bfd_elf_init_2_index_sections): New function.
46 (bfd_elf_size_dynsym_hash_dynstr): Call elf_backend_init_index_section.
47 (elf_link_input_bfd): When emitting relocs, use text_index_section
48 and data_index_section for removed sections.
49 * elf-m10300.c (elf_backend_omit_section_dynsym): Define.
50 * elf32-i386.c: Likewise.
51 * elf32-m32r.c: Likewise.
52 * elf32-sh.c: Likewise.
53 * elf32-xstormy16.c: Likewise.
54 * elf32-xtensa.c: Likewise.
55 * elf64-alpha.c: Likewise.
56 * elf64-hppa.c: Likewise.
57 * elf64-mmix.c: Likewise.
58 * elf64-sh64.c: Likewise.
59 * elfxx-ia64.c: Likewise.
60 * elf32-arm.c (elf32_arm_final_link_relocate): Use text_index_section
61 and data_index_section sym for relocs against sections with no dynamic
62 section sym.
63 (elf_backend_init_index_section): Define.
64 * elf32-cris.c: Similarly.
65 * elf32-hppa.c: Similarly.
66 * elf32-i370.c: Similarly.
67 * elf32-m68k.c: Similarly.
68 * elf32-mips.c: Similarly.
69 * elf32-ppc.c: Similarly.
70 * elf32-s390.c: Similarly.
71 * elf32-sparc.c: Similarly.
72 * elf32-vax.c: Similarly.
73 * elf64-mips.c: Similarly.
74 * elf64-ppc.c: Similarly.
75 * elf64-s390.c: Similarly.
76 * elf64-sparc.c: Similarly.
77 * elf64-x86-64.c: Similarly.
78 * elfn32-mips.c: Similarly.
79 * elfxx-mips.c: Similarly.
80 * elfxx-sparc.c: Similarly.
81 * linker.c (fix_syms): Base symbols in removed sections on
82 previous section in preference to using absolute section.
83
c26620e3
AS
842006-10-16 Andreas Schwab <schwab@suse.de>
85
86 * elfxx-ia64.c (addend_compare): Properly compute return value.
87
3ba71138
L
882006-10-15 H.J. Lu <hongjiu.lu@intel.com>
89
90 PR ld/3314
91 * elf.c (assign_file_positions_for_non_load_sections): Don't
92 page align empty SHF_ALLOC sections.
93
7eeb1be6
JJ
942006-10-13 Jakub Jelinek <jakub@redhat.com>
95
96 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections): Set
97 .plt sh_entsize to 0 if plt header size isn't multiple of
98 plt entry size or for 32-bit which adds a nop insn at the
99 end of the .plt section.
100
a77dc2cc
BW
1012006-10-12 Bob Wilson <bob.wilson@acm.org>
102
103 * elf32-xtensa.c (elf_xtensa_action_discarded): New.
104 (elf_backend_action_discarded): Define.
105
bf1747de
BW
1062006-10-11 Bob Wilson <bob.wilson@acm.org>
107
108 * elf32-xtensa.c (elf_xtensa_relocate_section): Return after
109 unresolvable relocation error.
110 (elf_xtensa_finish_dynamic_symbol): Set value of undefined, weak
111 symbols to zero.
112
ba05963f
BW
1132006-10-10 Bob Wilson <bob.wilson@acm.org>
114
115 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Add DT_DEBUG
116 for PIE executables.
117
ac685e6a
JJ
1182006-10-03 Jakub Jelinek <jakub@redhat.com>
119
120 * elf-bfd.h (struct eh_cie_fde): Add set_loc pointer.
121 * elf-eh-frame.c (skip_cfa_op): Fix handling of DW_CFA_advance_loc.
122 Handle DW_CFA_{remember,restore}_state, DW_CFA_GNU_window_save,
123 DW_CFA_val_{offset{,_sf},expression}.
124 (skip_non_nops): Record number of DW_CFA_set_loc ops.
125 (_bfd_elf_discard_section_eh_frame): Require skip_non_nops recognizes
126 all ops. If there are any DW_CFA_set_loc ops and they are pcrel
127 or going to be pcrel, compute set_loc array.
128 (_bfd_elf_eh_frame_section_offset): If make_relative, kill relocations
129 against DW_CFA_set_loc operands.
130 (_bfd_elf_write_section_eh_frame): Handle DW_CFA_set_loc adjusting.
131
cd7be95b
KH
1322006-10-02 Daniel Jacobowitz <dan@codesourcery.com>
133
134 * elflink.c (_bfd_elf_merge_symbol): Discard references to TLS
135 symbols from the --just-syms file.
136
23eb7e01
AM
1372006-10-01 Alan Modra <amodra@bigpond.net.au>
138
139 * elf64-ppc.c (ppc64_elf_build_stubs): Test glink size for
140 existence of PLT.
141
4dba4b24
L
1422006-09-29 H.J. Lu <hongjiu.lu@intel.com>
143
144 PR ld/3283
145 * elf64-x86-64.c (elf64_x86_64_relocate_section): Don't ignore
146 relocation overflow on branches to undefweaks.
147
3bb0c887
AM
1482006-09-29 Alan Modra <amodra@bigpond.net.au>
149
150 * po/BLD-POTFILES.in: Regenerate.
151 * po/SRC-POTFILES.in: Regenerate.
152
14952a5b
DS
1532006-09-29 Danny Smith <dannysmith@users.sourceforge.net>
154
155 PR 3276
156 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
157 alignment for .data$, .rdata$ and .text$ sections so that sse
158 and sse2 code will work for linkonce sections too.
159 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
160
07adf181
AM
1612006-09-28 Alan Modra <amodra@bigpond.net.au>
162
163 * elflink.c (_bfd_elf_gc_mark_hook): New function.
164 * elf-bfd.h (_bfd_elf_gc_mark_hook): Declare.
165 * elfxx-target.h (elf_backend_gc_mark_hook): Default to above.
166 * elf-m10300.c (mn10300_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
167 * elf32-arm.c (elf32_arm_gc_mark_hook): Likewise.
168 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
169 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
170 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
171 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
172 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
173 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
174 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
175 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
176 * elf32-score.c (_bfd_score_elf_gc_mark_hook): Likewise.
177 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
178 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
179 * elf32-xtensa.c (elf_xtensa_gc_mark_hook): Likewise.
180 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
181 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
182 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
183 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
184 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Likewise.
185 * elf32-bfin.c (bfin_gc_mark_hook): Likewise.
186 (bfinfdpic_gc_sweep_hook): Delete.
187 (elf_backend_gc_sweep_hook): Don't define for elf32-bfinfdpic.
188 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
189 (elf32_d10v_gc_sweep_hook): Delete.
190 (elf_backend_gc_sweep_hook): Don't define.
191 * elf32-fr30.c (fr30_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
192 (fr30_elf_gc_sweep_hook): Delete.
193 (elf_backend_gc_sweep_hook): Don't define.
194 * elf32-frv.c (elf32_frv_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
195 (elf32_frv_gc_sweep_hook): Delete.
196 (elf_backend_gc_sweep_hook): Don't define.
197 * elf32-iq2000.c (iq2000_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
198 (iq2000_elf_gc_sweep_hook): Delete.
199 (elf_backend_gc_sweep_hook): Don't define.
200 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Use
201 _bfd_elf_gc_mark_hook.
202 (openrisc_elf_gc_sweep_hook): Delete.
203 (elf_backend_gc_sweep_hook): Don't define.
204 * elf32-v850.c (v850_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
205 (v850_elf_gc_sweep_hook): Delete.
206 (elf_backend_gc_sweep_hook): Don't define.
207 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Use
208 _bfd_elf_gc_mark_hook.
209 (xstormy16_elf_gc_sweep_hook): Delete.
210 (elf_backend_gc_sweep_hook): Don't define.
211 * elf64-sh64.c (sh_elf64_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
212 (sh_elf64_gc_sweep_hook): Delete.
213 (elf_backend_gc_sweep_hook): Don't define.
214 * elf32-avr.c (elf32_avr_gc_mark_hook): Delete.
215 (elf32_avr_gc_sweep_hook): Delete.
216 (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
217 * elf32-cr16c.c (elf32_cr16c_gc_mark_hook): Delete.
218 (elf32_cr16c_gc_sweep_hook): Delete.
219 (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
220 * elf32-crx.c (elf32_crx_gc_mark_hook): Delete.
221 (elf32_crx_gc_sweep_hook): Delete.
222 (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
223 * elf32-h8300.c (elf32_h8_gc_mark_hook): Delete.
224 (elf32_h8_gc_sweep_hook): Delete.
225 (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
226 * elf32-ip2k.c (ip2k_elf_gc_mark_hook): Delete.
227 (ip2k_elf_gc_sweep_hook): Delete.
228 (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
229 * elf32-m32c.c (m32c_elf_gc_mark_hook, m32c_elf_gc_sweep_hook): Delete.
230 (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
231 * elf32-m68hc11.c (elf_backend_gc_mark_hook): Don't define.
232 (elf_backend_gc_sweep_hook): Don't define.
233 * elf32-m68hc12.c (elf_backend_gc_mark_hook): Don't define.
234 (elf_backend_gc_sweep_hook): Don't define.
235 * elf32-m68hc1x.c (elf32_m68hc11_gc_mark_hook): Delete.
236 (elf32_m68hc11_gc_sweep_hook): Delete.
237 * elf32-m68hc1x.h (elf32_m68hc11_gc_mark_hook): Delete.
238 (elf32_m68hc11_gc_sweep_hook): Delete.
239 * elf32-msp430.c (elf32_msp430_gc_mark_hook): Delete.
240 (elf32_msp430_gc_sweep_hook): Delete.
241 (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
242 * elf32-mt.c (mt_elf_gc_mark_hook, mt_elf_gc_sweep_hook): Delete.
243 (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
244
ea9986ff
NC
2452006-09-25 Pedro Alves <pedro_alves@portugalmail.pt>
246
247 * bfd-in.h (CONST_STRNCPY) : Delete.
248 (LITSTRCPY) : New.
249 (LITMEMCPY) : New.
250 * bfd-in2.h : Regenerate.
251 * elflink.c (bfd_elf_gc_sections) : Use LITMEMCPY. Don't manually
252 calculate string lengths.
253 * nlmcode.h (nlm_swap_auxiliary_headers_in) : Use LITMEMCPY.
254
49c13adb
L
2552006-09-26 H.J. Lu <hongjiu.lu@intel.com>
256
257 PR ld/3223
258 PR ld/3267
259 * elf.c (assign_file_positions_for_non_load_sections): Don't
260 warn zero size allocated sections.
261
f36b9bcd
AM
2622006-09-27 Alan Modra <amodra@bigpond.net.au>
263
264 * elf32-score.c (_bfd_score_elf_relocate_section): Move assignment
265 to "name" so that compiler realizes it is never uninitialized.
266 Use bfd_elf_sym_name.
267
41f8ce69
L
2682006-09-26 H.J. Lu <hongjiu.lu@intel.com>
269
270 PR binutils/3262
271 * elf.c (rewrite_elf_program_header): Use bfd_zalloc instead of
272 bfd_alloc to allocate segment map.
273 (copy_elf_program_header): Likewise.
274
2d447fca
JM
2752006-09-26 Mark Shinwell <shinwell@codesourcery.com>
276 Joseph Myers <joseph@codesourcery.com>
277 Ian Lance Taylor <ian@wasabisystems.com>
278 Ben Elliston <bje@wasabisystems.com>
279
280 * archures.c: Add definition for bfd_mach_arm_iWMMXt2.
281 * cpu-arm.c (processors): Add bfd_mach_arm_iWMMXt2.
282 (arch_info_struct, bfd_arm_update_notes): Likewise.
283 (architectures): Likewise.
284 (bfd_arm_merge_machines): Check for iWMMXt2.
285 * bfd-in2.h: Rebuild.
286
65fe5dd6
L
2872006-09-24 H.J. Lu <hongjiu.lu@intel.com>
288
289 * configure: Regenerated.
290
8384fb8f
AM
2912006-09-22 Alan Modra <amodra@bigpond.net.au>
292
293 * elfcode.h (elf_swap_symbol_in): Return bfd_boolean. Don't abort
294 on error.
295 * elf-bfd.h (elf_size_info <swap_symbol_in>): Adjust decl.
296 (bfd_elf32_swap_symbol_in, bfd_elf64_swap_symbol_in): Likewise.
297 * elf.c (bfd_elf_get_elf_syms): Test return of swap_symbol_in,
298 and report error.
299 * elf32-arm.c (elf32_arm_swap_symbol_in): Return bfd_boolean.
300
36c10a8f
MS
3012006-09-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
302
303 * elf32-s390.c (elf_s390_relocate_section): Remove check for code
304 section in LD to LE linker relaxation for R_390_TLS_LDO32.
305 * elf64-s390.c (elf_s390_relocate_section): Likewise for
306 R_390_TLS_LDO64.
307
99ad8390
NC
3082006-09-20 Kai Tietz <Kai.Tietz@onevision.com>
309
310 * configure.in: Added new target-vectors x86_64coff_vec,
311 x86_64pe_vec, and x86_64pei_vec.
312 * configure: Regenerate.
313 * config.bfd: Adjusted x86_64 target architecture detection.
314 * bfd.c: Add for new target "coff-x86-64"
315 (bfd_get_sign_extend): Add target vector idents for pe-x86-64. and pei-x86-64.
316 * coff-x86_64.c: Add new file for x86_64 (AMD64) coff support.
317 * libpei.h: Adjustments for COFF_WITH_pex64.
318 * coffcode.h: Add for new target machine, architecture, signature, and internal
319 signature handler.
320 * Makefile.am: Add new files to target-all and define make-rule for pex64igen.c
321 * Makefile.in: Regenerate.
322 * pe-x86_64.c: Add for new target "pe-x86-64".
323 * pei-x86_64.c: Add for new target "pei-x86-64".
324 * peicode.h: Adjusts for new targets.
325 (coff_swap_filehdr_out): Set for this target to
326 _bfd_pex64_only_swap_filehdr_out.
327 (SIZEOF_IDATA4): Define it as 8 byte size for this target.
328 (SIZEOF_IDATA5): Define it as 8 byte size for this target.
329 (jump_table jtab): Add for AMD64MAGIC.
330 (pe_ILF_build_a_bfd): Adjusts for new size of SIZEOF_IDATA4 and SIZE_IDATA5.
331 (pe_ILF_object_p): Add coff image-file signature to internal
332 signature translation.
333 * peXXigen.c: Adjust proper include of target coff-header and
334 introduced target specific code
335 (COFF_WITH_pex64): New macro for this target.
336 (pe_print_idata): New dumping method for import section of PE+ files.
337 * targets.c: Add new target vectors declarations for x86_64 coff targets.
338 * coffcode.h: Support code to support the x86_64 PE magic number.
339 * coff-x86_64.c: New file.
340
60ff4dc4
HPN
3412006-09-17 Hans-Peter Nilsson <hp@axis.com>
342
343 * elf.c (special_sections_s): Revert last STRING_COMMA_LEN change
344 for .stabstr entry, explain why.
345
7421a730
AM
3462006-09-17 Anton Blanchard <anton@samba.org>
347 Alan Modra <amodra@bigpond.net.au>
348
349 * dwarf2.c (concat_filename): Apply DW_AT_comp_dir if dir table
350 entry isn't absolute.
351
1c0d3aa6
NC
3522006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
353
354 * cpu-score.c: New file.
355 * elf32-score.c: New file.
356 * config.bfd: Add Score target.
357 * Makefile.am: Add Score files.
358 * Makefile.in: Regenerate.
359 * archures.c: Add Score architecture.
360 * reloc.c: Add Score relocs.
361 * targets.c: Add Score target vectors.
362 * bfd-in2.h: Regenerate.
363 * libbfd.h: Regenerate.
364 * configure.in: Add Score target.
365 * configure: Regenerate.
366
0112cd26
NC
3672006-09-16 Nick Clifton <nickc@redhat.com>
368 Pedro Alves <pedro_alves@portugalmail.pt>
369
370 * bfd-in.h (STRING_AND_COMMA): New macro. Takes one constant
371 string as its argument and emits the string followed by a comma
372 and then the length of the string.
373 (CONST_STRNEQ): New macro. Checks to see if a variable string
374 has a constant string as its initial characters.
375 (CONST_STRNCPY): New macro. Copies a constant string to the start
376 of a variable string.
377 * bfd-in2.h: Regenerate.
378 * archive.c: Make use of the new macros.
379 * archive64.c: Likewise.
380 * bfd.c: Likewise.
381 * coff-ppc.c: Likewise.
382 * coff-stgo32.c: Likewise.
383 * coffcode.h: Likewise.
384 * cofflink.c: Likewise.
385 * cpu-i960.c: Likewise.
386 * dwarf2.c: Likewise.
387 * ecoff.c: Likewise.
388 * elf-m10300.c: Likewise.
389 * elf.c: Likewise.
390 * elf32-arm.c: Likewise.
391 * elf32-bfin.c: Likewise.
392 * elf32-cris.c: Likewise.
393 * elf32-hppa.c: Likewise.
394 * elf32-i370.c: Likewise.
395 * elf32-i386.c: Likewise.
396 * elf32-iq2000.c: Likewise.
397 * elf32-m32r.c: Likewise.
398 * elf32-m68hc11.c: Likewise.
399 * elf32-m68hc12.c: Likewise.
400 * elf32-m68k.c: Likewise.
401 * elf32-mcore.c: Likewise.
402 * elf32-ppc.c: Likewise.
403 * elf32-s390.c: Likewise.
404 * elf32-sh-symbian.c: Likewise.
405 * elf32-sh.c: Likewise.
406 * elf32-sh64.c: Likewise.
407 * elf32-v850.c: Likewise.
408 * elf32-vax.c: Likewise.
409 * elf32-xtensa.c: Likewise.
410 * elf64-alpha.c: Likewise.
411 * elf64-hppa.c: Likewise.
412 * elf64-mmix.c: Likewise.
413 * elf64-ppc.c: Likewise.
414 * elf64-s390.c: Likewise.
415 * elf64-sh64.c: Likewise.
416 * elf64-x86-64.c: Likewise.
417 * elflink.c: Likewise.
418 * elfxx-ia64.c: Likewise.
419 * elfxx-mips.c: Likewise.
420 * elfxx-sparc.c: Likewise.
421 * hpux-core.c: Likewise.
422 * i386linux.c: Likewise.
423 * ieee.c: Likewise.
424 * libpei.h: Likewise.
425 * linker.c: Likewise.
426 * m68klinux.c: Likewise.
427 * mmo.c: Likewise.
428 * nlmcode.h: Likewise.
429 * osf-core.c: Likewise.
430 * pef.c: Likewise.
431 * som.c: Likewise.
432 * sparclinux.c: Likewise.
433 * vms-hdr.c: Likewise.
434
30288845
AM
4352006-09-14 Alan Modra <amodra@bigpond.net.au>
436
4b181510 437 PR 3181
30288845
AM
438 * elf.c (_bfd_elf_copy_private_header_data): Fix group members
439 that have had their SHT_GROUP section removed.
440
41198d0c
L
4412006-09-12 H.J. Lu <hongjiu.lu@intel.com>
442
443 PR ld/3197
444 * elflink.c (elf_link_output_extsym): Compute bucket only if
445 needed.
446
168dd667
L
4472006-09-10 H.J. Lu <hongjiu.lu@intel.com>
448
449 PR binutils/3186
450 * elf.c (_bfd_elf_make_section_from_shdr): Correct length of
451 "gnu.linkonce.wi.".
452
b0fead2b
RE
4532006-09-08 Vladimir Prus <vladimir@codesourcery.com>
454
455 * elf32-arm.c (elf32_arm_swap_symbol_out): Remove
456 unconditional setting of low bit for Thumb symbol
457 mistakenly left behind after check for external
458 symbols was added. Fix comment typo.
459
55255dae
L
4602006-09-07 H.J. Lu <hongjiu.lu@intel.com>
461
462 * elf-bfd.h (elf_link_hash_entry): Add a dynamic field.
463 (bfd_elf_link_mark_dynamic_symbol): New.
464 (SYMBOLIC_BIND): New.
465
466 * elf32-i386.c (elf_i386_check_relocs): Replace info->symbolic
467 with SYMBOLIC_BIND (info, h).
468 (elf_i386_relocate_section): Likewise.
469 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
470 (elf64_x86_64_relocate_section): Likewise.
471 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
472
473 * elflink.c (bfd_elf_link_mark_dynamic_symbol): New.
474 (bfd_elf_record_link_assignment): Call
475 bfd_elf_link_mark_dynamic_symbol on new entry.
476 (_bfd_elf_merge_symbol): Likewise.
477 (_bfd_elf_export_symbol): Return if the symbol isn't exported.
478 (_bfd_elf_fix_symbol_flags): Replace info->symbolic with
479 SYMBOLIC_BIND (info, h).
480 (_bfd_elf_dynamic_symbol_p): Likewise.
481 (_bfd_elf_symbol_refs_local_p): Likewise.
482 (bfd_elf_size_dynamic_sections): Updated.
483
7a2ec0a6
L
4842006-09-05 Bibo Mao <bibo.mao@intel.com>
485
486 PR binutils/3171
487 * coffcode.h (coff_write_object_contents): Set the optional
488 header magic number to PE32PMAGIC instead of ZMAGIC for ia64.
489
2cab6cc3
MS
4902006-09-04 Mark Shinwell <shinwell@codesourcery.com>
491
492 * elf32-arm.c (elf32_arm_howto_table_1): Adjust entries for
493 R_ARM_THM_ALU_PREL_11_0 and R_ARM_THM_PC12 relocations.
494 (elf32_arm_final_link_relocate): Handle R_ARM_THM_ALU_PREL_11_0
495 and R_ARM_THM_PC12 relocations.
496
74869ac7
BW
4972006-08-24 Bob Wilson <bob.wilson@acm.org>
498
499 * elf32-xtensa.c (xtensa_get_property_section_name): Delete.
500 (xtensa_get_property_section): New.
501 (xtensa_read_table_entries): Use xtensa_get_property_section.
502 (relax_property_section, xtensa_get_property_predef_flags): Handle
503 group name suffixes in property section names.
504 (match_section_group): New.
505
174660ce
NC
5062006-08-23 Frediano Ziglio <Frediano.Ziglio@vodafone.com>
507
508 * archive.c (hpux_uid_gid_encode): Fix thinko decrementing "cnt"
509 variable.
510
b34b2d70
DJ
5112006-08-22 Daniel Jacobowitz <dan@codesourcery.com>
512
513 * elf32-arm.c (elf32_arm_copy_indirect_symbol): Only copy
514 plt_thumb_refcount from indirect symbols.
515
5c5f6e17
AM
5162006-08-22 Alan Modra <amodra@bigpond.net.au>
517
518 * elf32-ppc.c (ppc_elf_relocate_section): Correct GOT and PLT HA
519 reloc handling.
520 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
521
87bc043a
MS
5222006-08-21 Mark Shinwell <shinwell@codesourcery.com>
523
524 * elf32-arm.c (elf32_arm_link_hash_table): Correct typo in
525 comment for target1_is_rel.
526
7148cc28
NC
5272006-08-21 Pedro Alves <pedro_alves@portugalmail.pt>
528
529 * Makefile.am: Add rules to build pe-arm-wince.lo
530 and pei-arm-wince.lo objects.
531 * Makefile.in: Regenerate.
532 * pe-arm-wince.c: New file.
533 * pei-arm-wince.c: New file.
534 * pei-arm.c: Remove ARM_WINCE block.
535 * pe-arm.c: Remove ARM_WINCE block. Rename
536 bfd_arm_pe_allocate_interworking_sections,
537 bfd_arm_pe_get_bfd_for_interworking, and
538 bfd_arm_pe_process_before_allocation to
539 bfd_armpe_allocate_interworking_sections,
540 bfd_armpe_get_bfd_for_interworking, and
541 bfd_armpe_process_before_allocation. Move them before
542 including bfd.h.
543 * bfd.c: ARM wince bfd format names were renamed. Adjust.
544 * coff-arm.c [ARM_WINCE]: Adjust so Windows CE doesn't end up
545 with unexpected/conflicting relocs.
546 * targets.c: The arm-wince-pe target got its own new vector.
547 Adjust.
548 * config.bfd: Likewise.
549 * configure.in: Likewise.
550 * configure: Regenerate.
551
a4fd1a8e
PB
5522006-08-18 Paul Brook <paul@codesourcery.com>
553
554 * elf32-arm.c (elf32_arm_link_hash_entry): Add export_glue.
555 (elf32_arm_link_hash_newfunc): Initialize export_glue.
556 (record_arm_to_thumb_glue): Return stub symbol.
557 (elf32_arm_create_thumb_stub): New function.
558 (elf32_arm_to_thumb_stub): Use it.
559 (elf32_arm_to_thumb_export_stub): New function.
560 (elf32_arm_begin_write_processing): New function.
561 (allocate_dynrelocs): Allocate Arm stubs.
562 (elf_backend_begin_write_processing): Define.
563 (elf32_arm_symbian_begin_write_processing): Remove ATTRIBUTE_UNUSED.
564 Call elf32_arm_begin_write_processing.
565
ee4bf8d2
AM
5662006-08-17 Alan Modra <amodra@bigpond.net.au>
567
568 * elf64-ppc.c (create_linkage_sections): Align .glink to 8 bytes.
569 (ppc64_elf_build_stubs): Use new lazy linking stub.
570
12c0f757
AM
5712006-08-17 Alan Modra <amodra@bigpond.net.au>
572
573 * elf64-ppc.c (ppc64_elf_size_stubs): Ignore non-code sections.
574
c9df6640
L
5752006-08-16 H.J. Lu <hongjiu.lu@intel.com>
576
577 PR ld/3015
578 * elf.c (get_program_header_size): Add a PT_GNU_RELRO segment
579 only if there is a PT_DYNAMIC segment.
580 (_bfd_elf_map_sections_to_segments): Likewise.
581 (assign_file_positions_for_load_sections): Set PT_GNU_RELRO
582 segment alignment to 1.
583
8992f0d7
TS
5842006-08-15 Thiemo Seufer <ths@mips.com>
585 Nigel Stephens <nigel@mips.com>
586
587 * elf32-mips.c, elf64-mips.c, elfn32-mips.c
588 (elf_backend_merge_symbol_attribute): Define.
589 * elflink.c (elf_link_add_object_symbols): Merge only the ELF
590 visibility flags.
591 * elfxx-mips.c (_bfd_mips_elf_merge_symbol_attribute): New function.
592
4be041b2
TS
5932006-08-15 Thiemo Seufer <ths@mips.com>
594 Nigel Stephens <nigel@mips.com>
595 David Ung <davidu@mips.com>
596
597 * config.bfd: Add configurations for mips*el-sde-elf* and
598 mips*-sde-elf*.
599
eb13e63f
DD
6002006-08-14 DJ Delorie <dj@redhat.com>
601
602 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add value.
603 (elf32_mn10300_count_hash_table_entries): New.
604 (elf32_mn10300_list_hash_table_entries): New.
605 (sort_by_value): New.
606 (mn10300_elf_relax_section): Don't skip data sections; restrict
607 code-specific tests to code-specific areas so that potential
608 indirect calls can be detected. Check for multiple local symbols
609 at the same address and merge their flags.
610 (elf32_mn10300_link_hash_newfunc): Initialize value.
611
b59eed79
TS
6122006-08-14 Thiemo Seufer <ths@mips.com>
613
614 * elfxx-mips.c (_bfd_mips_elf_symbol_processing,
615 _bfd_mips_elf_add_symbol_hook): Don't try to place small common TLS
616 symbols in .scommon.
617
54938e2a
TS
6182006-08-11 Thiemo Seufer <ths@mips.com>
619
620 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Set
621 sh_entsize only when sgot was already initialized.
622
f725025b
DD
6232006-08-08 DJ Delorie <dj@redhat.com>
624
625 * elf32-sh.c (sh_elf_relax_section): Allow for branches across
626 non-moving .align directives. Preserve any DIR32 offset when
627 converting bsr's to jsr's.
628
aa8a7074
AM
6292006-08-08 Alan Modra <amodra@bigpond.net.au>
630
631 * elf64-ppc.c (ppc64_elf_build_stubs): Clear relbrlt reloc_count
632 after stubs have been built.
633
527a23b8
NC
6342006-08-07 Nick Clifton <nickc@redhat.com>
635
636 * elf32-sh.c (vxworks_object_p): Only check for vxworks target
637 vectors if they are going to be created.
638
7b12cedc
NC
6392006-08-07 Nick Clifton <nickc@redhat.com>
640
641 * configure.in (bfd_elf32_shnbsd_vec): Fix typo.
642 * configure: Regenerate.
643
0be038d6
NC
6442006-08-07 Nick Clifton <nickc@redhat.com>
645
646 * coff-arm.c (coff_arm_rtype_to_howto): Only check for ARM_SECREL
647 relocation types if the target is ARM_WINCE.
648
f0927246
NC
6492006-08-05 Pedro Alves <pedro_alves@portugalmail.pt>
650
651 * bfd.c (bfd_get_sign_extend_vma): Add cases for pe-arm-little
652 and pei-arm-little.
653 * coff-arm.c (coff_arm_rtype_to_howto) [COFF_WITH_PE]: Handle
654 ARM_SECREL.
655 (coff_arm_reloc_type_lookup): Map BFD_RELOC_32_SECREL to
656 ARM_SECREL.
657 * pe-arm.c [COFF_SECTION_ALIGNMENT_ENTRIES]: Define.
658 * pei-arm.c [TARGET_UNDERSCORE]: Define for ARM_WINCE like in
659 pe-arm.c.
660 [COFF_SECTION_ALIGNMENT_ENTRIES]: Define.
661
c17d87de
NC
6622006-08-04 Marcelo Tosatti <marcelo@kvack.org>
663
664 * elflink.c (elf_gc_sweep): If info.print_gc_sections is true,
665 list removed sections to stderr.
666
55e6e397
RS
6672006-08-04 Richard Sandiford <richard@codesourcery.com>
668 Kazu Hirata <kazu@codesourcery.com>
669 Phil Edwards <phil@codesourcery.com>
670 Nathan Sidwell <nathan@codesourcery.com>
671
672 * config.bfd (sh-*-vxworks): Use bfd_elf32_shvxworks_vec and
673 bfd_elf32_shlvxworks_vec.
674 * configure.in (bfd_elf32_sh64_vec): Add elf-vxworks.lo.
675 (bfd_elf32_sh64l_vec, bfd_elf32_sh64lin_vec): Likewise.
676 (bfd_elf32_sh64blin_vec, bfd_elf32_sh64lnbsd_vec): Likewise.
677 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh_vec): Likewise.
678 (bfd_elf32_shblin_vec, bfd_elf32_shl_vec): Likewise.
679 (bfd_elf32_shl_symbian_vec, bfd_elf32_shlin_vec): Likewise.
680 (bfd_elf32_shlnbsd_vec, bfd_elf32_shnbsd_vec): Likewise.
681 (bfd_elf32_shlvxworks_vec, bfd_elf32_shvxworks_vec): New stanzas.
682 * configure: Regenerate.
683 * Makefile.am: Regenerate dependencies.
684 * Makefile.in: Regenerate.
685 * elf-vxworks.c (elf_vxworks_gott_symbol_p): New function.
686 (elf_vxworks_add_symbol_hook): Use it.
687 (elf_vxworks_link_output_symbol_hook): Likewise. Use the hash
688 table entry to check for weak undefined symbols and to obtain
689 the original bfd.
690 (elf_vxworks_emit_relocs): Use target_index instead of this_idx.
691 * elf32-sh-relocs.h: New file, split from elf32-sh.c.
692 (R_SH_DIR32): Use SH_PARTIAL32 for the partial_inplace field,
693 SH_SRC_MASK32 for the src_mask field, and SH_ELF_RELOC for the
694 special_function field.
695 (R_SH_REL32): Use SH_PARTIAL32 and SH_SRC_MASK32 here too.
696 (R_SH_REL32, R_SH_TLS_GD_32, R_SH_TLS_LD_32): Likewise.
697 (R_SH_TLS_LDO_32, R_SH_TLS_IE_32, R_SH_TLS_LE_32): Likewise.
698 (R_SH_TLS_DTPMOD32, R_SH_TLS_DTPOFF32, R_SH_TLS_TPOFF32): Likewise.
699 (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT): Likewise.
700 (R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): Likewise.
701 (SH_PARTIAL32, SH_SRC_MASK32, SH_ELF_RELOC): Undefine at end of file.
702 * elf32-sh.c: Include elf32-vxworks.h.
703 (MINUS_ONE): Define.
704 (sh_elf_howto_table): Include elf32-sh-relocs.h with SH_PARTIAL32
705 set to TRUE, SH_SRC_MASK32 set to 0xffffffff, and SH_ELF_RELOC set
706 to sh_elf_reloc.
707 (sh_vxworks_howto_table): New variable. Include elf32-sh-relocs.h
708 with SH_PARTIAL32 set to FALSE, SH_SRC_MASK32 set to 0, and
709 SH_ELF_RELOC set to bfd_elf_generic_reloc.
710 (vxworks_object_p, get_howto_table): New functions.
711 (sh_elf_reloc_type_lookup): Fix typo. Use get_howto_table.
712 (sh_elf_info_to_howto): Use get_howto_table.
713 (sh_elf_relax_section): Honor the partial_inplace field of the
714 R_SH_DIR32 howto.
715 (sh_elf_relax_delete_bytes): Likewise.
716 (elf_sh_plt_info): New structure.
717 (PLT_ENTRY_SIZE): Replace both definitions with...
718 (ELF_PLT_ENTRY_SIZE): ...this new macro, with separate definitions for
719 INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
720 (elf_sh_plt0_entry_be): Update sizes of both definitions accordingly.
721 (elf_sh_plt0_entry_le): Likewise.
722 (elf_sh_plt_entry_be, elf_sh_plt_entry_le): Likewise.
723 (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le): Likewise.
724 (elf_sh_plts): New structure, with separate definitions for
725 INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
726 (elf_sh_plt0_entry): Delete both definitions.
727 (elf_sh_plt_entry, elf_sh_pic_plt_entry): Likewise.
728 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset): Likewise.
729 (elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset): Likewise.
730 (elf_sh_plt_reloc_offset): Likewise.
731 (movi_shori_putval): Delete in favor of...
732 (install_plt_field): ...this new function, with separate definitions
733 for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
734 (get_plt_info): New function, with separate definitions
735 for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
736 (elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset): Delete.
737 (VXWORKS_PLT_HEADER_SIZE, VXWORKS_PLT_ENTRY_SIZE): New macros.
738 (vxworks_sh_plt0_entry_be, vxworks_sh_plt0_entry_le): New constants.
739 (vxworks_sh_plt_entry_be, vxworks_sh_plt_entry_le): Likewise.
740 (vxworks_sh_pic_plt_entry_be, vxworks_sh_pic_plt_entry_le): Likewise.
741 (get_plt_index, get_plt_offset): New functions.
742 (elf_sh_link_hash_table): Add srelplt2, plt_info and vxworks_p fields.
743 (sh_elf_link_hash_table_create): Initialize them.
744 (sh_elf_create_dynamic_sections): Call
745 elf_vxworks_create_dynamic_sections for VxWorks.
746 (allocate_dynrelocs): Use htab->plt_info to get the size of PLT
747 entries. Allocate relocation entries in .rela.plt.unloaded if
748 generating a VxWorks executable.
749 (sh_elf_always_size_sections): New function.
750 (sh_elf_size_dynamic_sections): Extend .rela.plt handling to
751 .rela.plt.unloaded.
752 (sh_elf_relocate_section): Use get_howto_table. Honor
753 partial_inplace when calculating the addend for dynamic
754 relocations. Use get_plt_index.
755 (sh_elf_finish_dynamic_symbol): Use get_plt_index, install_plt_field
756 and htab->plt_info. Fill in the bra .plt offset for VxWorks
757 executables. Populate .rela.plt.unloaded. Do not make
758 _GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
759 (sh_elf_finish_dynamic_sections): Use install_plt_field and
760 htab->plt_info. Handle cases where there is no special PLT header.
761 Populate the first relocation in .rela.plt.unloaded and fix up
762 the remaining entries.
763 (sh_elf_plt_sym_val): Use get_plt_info.
764 (elf_backend_always_size_sections): Define.
765 (TARGET_BIG_SYM, TARGET_BIG_NAME): Override for VxWorks.
766 (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
767 (elf32_bed, elf_backend_want_plt_sym): Likewise.
768 (elf_symbol_leading_char, elf_backend_want_got_underscore): Likewise.
769 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Likewise.
770 (elf_backend_add_symbol_hook): Likewise.
771 (elf_backend_link_output_symbol_hook): Likewise.
772 (elf_backend_emit_relocs): Likewise.
773 (elf_backend_final_write_processing): Likewise.
774 (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Likewise.
775 * targets.c (bfd_elf32_shlvxworks_vec): Declare.
776 (bfd_elf32_shvxworks_vec): Likewise.
777 (_bfd_target_vector): Include bfd_elf32_shlvxworks_vec and
778 bfd_elf32_shvxworks_vec.
779
e33533a4
MK
7802006-08-02 Mark Kettenis <kettenis@gnu.org>
781
782 * configure.in (arm-*-openbsd*): Set COREFILE to netbsd-core.lo.
783 * configure: Regenerate.
784
9d7cbccd
NC
7852006-08-02 Petr Salinger <Petr.Salinger@seznam.cz>
786
787 PR binutils/2983
788 * elf64-x86-64.c: Add FreeBSD support.
789 (elf64_x86_64_fbsd_post_process_headers): New function.
790 * targets.c (_bfd_target_vector): Add bfd_elf64_x86_64_freebsd_vec.
791 * config.bfd (x64_64-*-freebsd*): Add bfd_elf64_x86_64_freebsd_vec
792 to the targ_selvecs.
793 * configure.in: Add entry for bfd_elf64_x86_64_freebsd_vec.
794 * configure: Regenerate.
795
f72c3e6b
AS
7962006-07-26 Andreas Schwab <schwab@suse.de>
797
798 * elfxx-ia64.c (elfNN_ia64_choose_gp): Use rawsize if set.
799
252e386e
AM
8002006-07-26 Alan Modra <amodra@bigpond.net.au>
801
802 * elf.c (elf_modify_segment_map): Delete empty PT_LOAD segments.
803 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Delete.
804 (define elf_backend_modify_segment_map): Don't define.
805
2907b861
TS
8062006-07-25 Thiemo Seufer <ths@networkno.de>
807
808 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Allow
809 linking of objects for compatible machine types.
810
c000e262
TS
8112006-07-25 Thiemo Seufer <ths@networkno.de>
812
813 * elfxx-mips.c (mips_elf_next_relocation): Tighten check to test
814 also for same symbol.
815
37caec6b
TS
8162006-07-25 Thiemo Seufer <ths@mips.com>
817
818 * elfxx-mips.c (mips_elf_calculate_relocation): Remove magic constant.
819
ff15b240
NC
8202006-07-24 Michael Wetherell <mike.wetherell@ntlworld.com>
821
822 * elf.c (bfd_section_from_shdr): Reject unrecognised OS-specific
823 sections only if the SHF_OS_NONCONFORMING flag is present.
824
4e22f78d
NC
8252006-07-24 Nick Clifton <nickc@redhat.com>
826
827 PR ld/2729
828 * peXXigen.c (_bfd_XXi_final_link_postscript): Check for the
829 existance of output sections before putting their entries into the
830 DataDictionary.
831
35d3d567
TS
8322006-07-20 Thiemo Seufer <ths@mips.com>
833
834 * elf32-mips.c (mips16_jump_reloc): Remove function.
835 (elf_mips16_howto_table_rel): Use _bfd_mips_elf_generic_reloc
836 instead of mips16_jump_reloc.
837 * elf64_mips.c, wlfn32-mips.c (mips16_jump_reloc): Remove function.
838 (elf_mips16_howto_table_rel, elf_mips16_howto_table_rela): Use
839 _bfd_mips_elf_generic_reloc instead of mips16_jump_reloc.
840
5061a885
AM
8412006-07-19 Alan Modra <amodra@bigpond.net.au>
842
843 * bfd-in.h (enum notice_asneeded_action): Define.
844 * bfd-in2.h: Regenerate.
845 * elflink.c (elf_link_add_object_symbols): Call linker "notice"
846 function with NULL name for as-needed handling.
847
16805f35
PB
8482006-07-18 Paul Brook <paul@codesourcery.com>
849
850 * bfd-in2.h: Regenerate.
851 * libbfd.h: Regenerate.
852 * reloc.c: Add BFD_RELOC_ARM_T32_ADD_IMM.
853
e0764319
NC
8542006-07-18 Nick Clifton <nickc@redhat.com>
855
856 * elfxx-mips.c (_bfd_mips_elf_common_definition): New function.
857 Consider SHN_MIPS_ACOMMON and SHN_MIPS_SCOMMON as being common
858 sections.
859 * elfxx-mips.h (_bfd_mips_elf_common_definition): Prototype.
860
2ccdbfcc
JJ
8612006-07-14 Jakub Jelinek <jakub@redhat.com>
862
863 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Fix cinfo.shift2 value.
864
0b33793d
MK
8652006-07-14 Mark Kettenis <kettenis@gnu.org>
866
867 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Move declarations
868 to the start of a block.
869
230d6d81
NC
8702006-07-13 Nick Clifton <nickc@redhat.com>
871
872 * coff-sh.c (_bfd_sh_align_load_span): Catch sh_insn_info()
873 returning a NULL value.
874
d2dee3b2
L
8752006-07-12 H.J. Lu <hongjiu.lu@intel.com>
876
877 PR ld/2884
878 * elflink.c (_bfd_elf_merge_symbol): Copy the symbol info from
879 the old versioned dynamic definition to the new one with
880 non-default visibility. Hide the symbol if it is hidden or
881 internal.
882
fb405f8a
RS
8832006-07-12 Matthew R. Dempsky <mrd@alkemio.org>
884
885 * cpu-m68k.c (bfd_m68k_compatible): Handle CPU32.
886
fdc90cb4
JJ
8872006-07-10 Jakub Jelinek <jakub@redhat.com>
888
889 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_GNU_HASH.
890 (bfd_section_from_shdr, elf_fake_sections, assign_section_numbers):
891 Handle SHT_GNU_HASH.
892 (special_sections_g): Include .gnu.hash section.
893 (bfd_elf_gnu_hash): New function.
894 * elf-bfd.h (bfd_elf_gnu_hash, _bfd_elf_hash_symbol): New prototypes.
895 (struct elf_backend_data): Add elf_hash_symbol method.
896 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create .hash
897 only if info->emit_hash, create .gnu.hash section if
898 info->emit_gnu_hash.
899 (struct collect_gnu_hash_codes): New type.
900 (elf_collect_gnu_hash_codes, elf_renumber_gnu_hash_syms,
901 _bfd_elf_hash_symbol): New functions.
902 (compute_bucket_count): Don't compute HASHCODES array, instead add
903 that and NSYMS as arguments. Use bed->s->sizeof_hash_entry
904 instead of bed->s->arch_size / 8. Fix .hash size estimation.
905 When not optimizing, use the number of hashed symbols rather than
906 dynsymcount.
907 (bfd_elf_size_dynamic_sections): Only add DT_HASH if info->emit_hash,
908 and ADD DT_GNU_HASH if info->emit_gnu_hash.
909 (bfd_elf_size_dynsym_hash_dynstr): Size .hash only if info->emit_hash,
910 adjust compute_bucket_count caller. Create and populate .gnu.hash
911 section if info->emit_gnu_hash.
912 (elf_link_output_extsym): Only populate .hash section if
913 finfo->hash_sec != NULL.
914 (bfd_elf_final_link): Adjust assertion. Handle DT_GNU_HASH.
915 * elfxx-target.h (elf_backend_hash_symbol): Define if not yet defined.
916 (elfNN_bed): Add elf_backend_hash_symbol.
917 * elf64-x86-64.c (elf64_x86_64_hash_symbol): New function.
918 (elf_backend_hash_symbol): Define.
919 * elf32-i386.c (elf_i386_hash_symbol): New function.
920 (elf_backend_hash_symbol): Define.
921
cfc9dfb1
NC
9222006-07-05 Nick Clifton <nickc@redhat.com>
923
924 PR ld/2659
925 * cofflink.c (_bfd_coff_link_input_bfd): Fix selection of aux
926 entry when multiple definitions of a symbol are encountered.
927
10efb593
L
9282006-06-30 H.J. Lu <hongjiu.lu@intel.com>
929
930 * elf32-i386.c (elf_i386_relocate_section): Use xchg %ax,%ax
931 instead of 2 nops.
932 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
933 (elf64_x86_64_plt0_entry): Use nopl 0(%rax) instead of 4 nops.
934
ebcfb3c0
JJ
9352006-06-29 Jakub Jelinek <jakub@redhat.com>
936
937 PR ld/2513
938 * elf32-i386.c (GOT_TLS_MASK, GOT_TLS_IE_IE, GOT_TLS_IE_GD,
939 GOT_TLS_IE_MASK, elf_i386_check_relocs, allocate_dynrelocs): Revert
940 2006-04-08 changes.
941 (elf_i386_relocate_section): Likewise. For GD->IE transition
942 change subl into addl whenever tls_type is GOT_TLS_IE_POS.
943
62d7a5f6
AM
9442006-06-23 Alan Modra <amodra@bigpond.net.au>
945
946 PR ld/2754
947 * elf.c (bfd_elf_mkobject): Don't alloc if already done. Set
948 program_header_size to -1.
949 (_bfd_elf_map_sections_to_segments): Adjust program_header_size check.
950 (assign_file_positions_for_load_sections ): Likewise.
951 (_bfd_elf_sizeof_headers): Use saved program_header_size if
952 available.
953 * elf32-arm.c (elf32_arm_mkobject): Call bfd_elf_mkobject, don't
954 alloc if already done.
955 * elf32-i386.c (elf_i386_mkobject): Likewise.
956 * elf32-ppc.c (ppc_elf_mkobject): Likewise.
957 * elf32-s390.c (elf_s390_mkobject): Likewise.
958 * elf32-sh.c (sh_elf_mkobject): Likewise.
959 * elf64-alpha.c (elf64_alpha_mkobject): Likewise.
960 * elf64-ppc.c (ppc64_elf_mkobject): Likewise.
961 * elf64-s390.c (elf_s390_mkobject): Likewise.
962 * elf64-x86-64.c (elf64_x86_64_mkobject): Likewise.
963 * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Likewise.
964
6a4a0940
JJ
9652006-06-20 Jakub Jelinek <jakub@redhat.com>
966
967 * elflink.c (elf_link_add_object_symbols): Don't create .tcommon
968 section for relocatable link.
969
e36284ab
AM
9702006-06-21 Alan Modra <amodra@bigpond.net.au>
971
972 * elf-bfd.h (struct elf_backend_data): Add
973 elf_backend_modify_program_headers.
974 * elfxx-target.h (elf_backend_modify_program_headers): Define.
975 (elfNN_bed): Init new field.
976 * elf.c (elf_modify_segment_map): Remove comment.
977 (assign_file_positions_for_load_sections): Only call
978 elf_modify_segment_map for objcopy/strip.
979 (assign_file_positions_except_relocs): Call
980 elf_backend_modify_program_headers.
981 * elf32-frv.c (elf32_frvfdpic_always_size_sections): Don't make
982 .stack section.
983 (elf32_frvfdpic_modify_segment_map): Delete.
984 (elf32_frvfdpic_modify_program_headers): New.
985 (elf_backend_modify_segment_map): Don't define.
986 (elf_backend_modify_program_headers): Define.
987 * elf32-bfin.c (elf32_bfinfdpic_always_size_sections): Don't make
988 .stack section.
989 (elf32_bfinfdpic_modify_segment_map): Delete.
990 (elf32_bfinfdpic_modify_program_headers): New.
991 (elf_backend_modify_segment_map): Don't define.
992 (elf_backend_modify_program_headers): Define.
993 * elfxx-ia64.c (elfNN_ia64_modify_program_headers): New function.
994 Split out from..
995 (elfNN_ia64_modify_segment_map): ..here.
996 (elf_backend_modify_program_headers): Define.
997
ed66ec07
JJ
9982006-06-20 Jakub Jelinek <jakub@redhat.com>
999
1000 * bfd.c (bfd_record_phdr): Clear p_align and p_align_valid fields.
1001 * elf.c (_bfd_elf_link_hash_table_init): Clear hplt field.
1002
8ded5a0f
AM
10032006-06-20 Alan Modra <amodra@bigpond.net.au>
1004
1005 * elf-bfd.h: Formatting.
1006 (_bfd_elf_map_sections_to_segments): Declare.
1007 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame_hdr): Don't
1008 clear program_header_size.
1009 * elf.c (get_program_header_size): Move. Don't use or set saved
1010 program_header_size here.
1011 (elf_modify_segment_map): New function. Split out from..
1012 (assign_file_positions_for_load_sections): ..here. Assert
1013 header size is correct. Remove dead code.
1014 (_bfd_elf_map_sections_to_segments): Rename from
1015 map_sections_to_segments. Make global. Use get_program_header_size
1016 when we need estimate of header size. Call elf_modify_segment_map.
1017 Set program_header_size.
1018 (print_segment_map): Delete.
1019 (_bfd_elf_sizeof_headers): If segment_map available, get the
1020 actual size.
1021 * elf32-arm.c (elf32_arm_symbian_modify_segment_map): Make safe
1022 for calling more than once.
1023 * elf32-bfin.c (elf32_bfinfdpic_modify_segment_map): Likewise.
1024 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Likewise.
1025 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
1026 * elf32-i370.c (elf_backend_add_symbol_hook): Delete.
1027 (elf_backend_additional_program_headers): Delete.
1028 (elf_backend_modify_segment_map): Delete.
1029 * elf64-hppa.c (elf64_hppa_modify_segment_map): Convert to ISO C.
1030 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
1031 * doc/bfdint.texi: Delete SIZEOF_HEADERS difficulties.
1032
0fa3dcad
PB
10332006-06-19 Vladimir Prus <vladimir@codesourcery.com>
1034
1035 * elf32-arm.c (elf32_arm_swap_symbol_out): Don't set low
1036 bit for undefined symbols.
1037
a6b96beb
AM
10382006-06-19 Alan Modra <amodra@bigpond.net.au>
1039
1040 * elf-bfd.h (struct elf_backend_data): Add bfd_link_info pointer
1041 parameter.
1042 (_bfd_elf_sizeof_headers): Replace bfd_boolean param with
1043 bfd_link_info pointer.
1044 * targets.c (struct bfd_target <_bfd_sizeof_headers>): Likewise.
1045 * bfd.c (bfd_sizeof_headers): Tweak param name.
1046 * aout-adobe.c (aout_adobe_sizeof_headers): Adjust.
1047 * aoutx.h (NAME (aout, sizeof_headers)): Adjust.
1048 * binary.c (binary_sizeof_headers): Adjust.
1049 * bout.c (b_out_sizeof_headers): Adjust.
1050 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust.
1051 * coff64-rs6000.c (xcoff64_sizeof_headers): Adjust.
1052 * coffgen.c (coff_sizeof_headers): Adjust.
1053 * ecoff.c (_bfd_ecoff_sizeof_headers): Adjust.
1054 (ecoff_compute_section_file_positions): Adjust.
1055 (_bfd_ecoff_write_object_contents): Adjust.
1056 * elf.c (get_program_header_size, _bfd_elf_sizeof_headers): Adjust.
1057 * elf32-arm.c (elf32_arm_additional_program_headers): Adjust.
1058 * elf32-i370.c (elf_backend_additional_program_headers): Adjust.
1059 * elf32-ppc.c (ppc_elf_additional_program_headers): Adjust.
1060 * elf64-hppa.c (elf64_hppa_additional_program_headers): Adjust.
1061 * elf64-x86-64.c (elf64_x86_64_additional_program_headers): Adjust.
1062 * elfxx-ia64.c (elfNN_ia64_additional_program_headers): Adjust.
1063 * elfxx-mips.c (_bfd_mips_elf_additional_program_headers): Adjust.
1064 * elfxx-mips.h (_bfd_mips_elf_additional_program_headers): Adjust.
1065 * i386msdos.c: Convert to ISO C.
1066 (msdos_sizeof_headers): Adjust.
1067 * i386os9k.c: Convert to ISO C.
1068 (os9k_sizeof_headers): Adjust.
1069 * ieee.c (ieee_sizeof_headers): Adjust.
1070 * ihex.c (ihex_sizeof_headers): Adjust.
1071 * libaout.h (NAME (aout, sizeof_headers)): Adjust.
1072 * libbfd-in.h (_bfd_nolink_sizeof_headers): Adjust.
1073 * libcoff-in.h (coff_sizeof_headers): Adjust.
1074 * libecoff.h (_bfd_ecoff_sizeof_headers): Adjust.
1075 * mach-o.c (bfd_mach_o_sizeof_headers): Adjust.
1076 * mmo.c (mmo_sizeof_headers): Adjust.
1077 * oasys.c (oasys_sizeof_headers): Adjust.
1078 * pdp11.c (NAME (aout, sizeof_headers)): Adjust.
1079 * pef.c (bfd_pef_sizeof_headers): Adjust.
1080 * ppcboot.c (ppcboot_sizeof_headers): Adjust.
1081 * som.c (som_sizeof_headers): Adjust.
1082 * srec.c (srec_sizeof_headers): Adjust.
1083 * tekhex.c (tekhex_sizeof_headers): Adjust.
1084 * versados.c (versados_sizeof_headers): Adjust.
1085 * vms.c (vms_sizeof_headers): Adjust.
1086 * xcoff-target.h (_bfd_xcoff_sizeof_headers): Adjust.
1087 * xsym.c (bfd_sym_sizeof_headers): Adjust.
1088 * xsym.h (bfd_sym_sizeof_headers): Adjust.
1089 * bfd-in2.h: Regenerate.
1090 * libbfd.h: Regenerate.
1091 * libcoff.h: Regenerate.
1092
4962c51a
MS
10932006-06-15 Mark Shinwell <shinwell@codesourcery.com>
1094
1095 * bfd-in2.h: Regenerate.
1096 * elf32-arm.c (R_ARM_ALU_PC_G0_NC, R_ARM_ALU_PC_G0,
1097 R_ARM_ALU_PC_G1_NC, R_ARM_ALU_PC_G1, R_ARM_ALU_PC_G2,
1098 R_ARM_LDR_PC_G1, R_ARM_LDR_PC_G2, R_ARM_LDRS_PC_G0,
1099 R_ARM_LDRS_PC_G1, R_ARM_LDRS_PC_G2, R_ARM_LDC_PC_G0,
1100 R_ARM_LDC_PC_G1, R_ARM_LDC_PC_G2, R_ARM_ALU_SB_G0_NC,
1101 R_ARM_ALU_SB_G0, R_ARM_ALU_SB_G1_NC, R_ARM_ALU_SB_G1,
1102 R_ARM_ALU_SB_G2, R_ARM_LDR_SB_G0, R_ARM_LDR_SB_G1,
1103 R_ARM_LDR_SB_G2, R_ARM_LDRS_SB_G0, R_ARM_LDRS_SB_G1,
1104 R_ARM_LDRS_SB_G2, R_ARM_LDC_SB_G0, R_ARM_LDC_SB_G1,
1105 R_ARM_LDC_SB_G2): New relocation types.
1106 (R_ARM_PC13): Rename to AAELF name R_ARM_LDR_PC_G0 and
1107 adjust HOWTO entry to be consistent with R_ARM_LDR_PC_G1
1108 and friends.
1109 (elf32_arm_howto_table_3): Delete; contents merged into
1110 elf32_arm_howto_table_2.
1111 (elf32_arm_howto_from_type): Adjust correspondingly.
1112 (elf32_arm_reloc_map): Extend with the above relocations.
1113 (calculate_group_reloc_mask): New function.
1114 (identify_add_or_sub): New function.
1115 (elf32_arm_final_link_relocate): Support for the above
1116 relocations.
1117 * reloc.c: Add enumeration entries for BFD_RELOC_ARM_...
1118 codes to correspond to the above relocations.
1119
cc3e26be
RS
11202006-06-14 Richard Sandiford <richard@codesourcery.com>
1121
1122 * elf32-m68k.c (elf_m68k_plt_info): New structure.
1123 (elf_m68k_plt0_entry): Add R_68K_PC32-style in-place addends.
1124 (elf_m68k_plt_entry): Likewise.
1125 (elf_m68k_plt_info): New table.
1126 (CFV4E_PLT_ENTRY_SIZE): Rename to...
1127 (ISAB_PLT_ENTRY_SIZE): ...this.
1128 (CFV4E_FLAG): Delete.
1129 (elf_cfv4e_plt0_entry): Rename to...
1130 (elf_isab_plt0_entry): ...this. Adjust comments. Use (-6,%pc,%d0)
1131 for the second instruction too.
1132 (elf_cfv4e_plt_entry): Rename to...
1133 (elf_isab_plt_entry): ...this. Adjust comments and use (-6,%pc,%d0).
1134 (elf_isab_plt_info): New table.
1135 (CPU32_FLAG): Delete.
1136 (PLT_CPU32_ENTRY_SIZE): Rename to...
1137 (CPU32_PLT_ENTRY_SIZE): ...this.
1138 (elf_cpu32_plt0_entry): Update bounds accordingly. Add R_68K_PC32-
1139 style in-place addends.
1140 (elf_cpu32_plt_entry): Likewise.
1141 (elf_cpu32_plt_info): New table.
1142 (elf_m68k_link_hash_table): Add a plt_info field.
1143 (elf_m68k_link_hash_table_create): Initialize it.
1144 (elf_m68k_get_plt_info): New function.
1145 (elf_m68k_always_size_sections): Likewise.
1146 (elf_m68k_adjust_dynamic_symbol): Use the plt_info hash table field.
1147 (elf_m68k_install_pc32): New function.
1148 (elf_m68k_finish_dynamic_symbol): Factor code using plt_info and
1149 elf_m68k_install_pc32.
1150 (elf_m68k_finish_dynamic_sections): Likewise.
1151 (elf_m68k_plt_sym_val): Use elf_m68k_get_plt_info.
1152 (elf_backend_always_size_sections): Define.
1153
4f87808c
AM
11542006-06-14 Alan Modra <amodra@bigpond.net.au>
1155
1156 * elflink.c (elf_link_add_object_symbols): Save and restore
1157 struct bfd_hash_table table, size and count fields for
1158 as-needed libs.
1159
7fd91fe0
TS
11602006-06-12 Thiemo Seufer <ths@mips.com>
1161
1162 * elf32-mips.c: Expand comment about ABI-mandated pagesize values.
1163 (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): define in a more obvious way.
1164 * elf64-mips.c, elfn32-mips.c (ELF_MAXPAGESIZE): Fix value for IRIX6.
1165 Delete old comments.
1166 (ELF_COMMONPAGESIZE): Define in a more obvious way.
1167
d07676f8
NC
11682006-06-12 Nick Clifton <nickc@redhat.com>
1169
1170 PR binutils/2735
1171 * elflink.c (elf_link_add_object_symbols): Fix the warning message
1172 about mismatched alignments to allow for the case where the common
1173 alignment has been deduced from the section alignment.
1174 * bfd.c (_bfd_default_error_handler): Update comment to explain
1175 why bfd and asection varargs are out of order. Explicitly catch
1176 and abort on NULL bfd and asection arguments.
1177
5108fc1b
RS
11782006-06-11 Richard Sandiford <richard@codesourcery.com>
1179 Thiemo Seufer <ths@mips.com>
1180
1181 * elfxx-mips.c (mips_elf_link_hash_table): Add function_stub_size.
1182 (STUB_ORI): New macro.
1183 (STUB_LI16U): Fix formatting.
1184 (MIPS_FUNCTION_STUB_SIZE): Delete.
1185 (MIPS_FUNCTION_STUB_MAX_SIZE): Likewise.
1186 (MIPS_FUNCTION_STUB_NORMAL_SIZE): New macro.
1187 (MIPS_FUNCTION_STUB_BIG_SIZE): Likewise.
1188 (_bfd_mips_elf_adjust_dynamic_symbol): Use htab->function_stub_size
1189 instead of MIPS_FUNCTION_STUB_SIZE.
1190 (count_section_dynsyms): New function, split out from
1191 _bfd_mips_elf_final_link.
1192 (_bfd_mips_elf_always_size_sections): Get a worst-case estimate
1193 of the number of dynamic symbols needed and use it to set up
1194 function_stub_size. Use function_stub_size rather than
1195 MIPS_FUNCTION_STUB_SIZE to determine the size of the stub section.
1196 Use 16-byte stubs for 0x10000 dynamic symbols.
1197 (_bfd_mips_elf_size_dynamic_sections): Use htab->function_stub_size
1198 instead of MIPS_FUNCTION_STUB_SIZE. Fix formatting.
1199 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Change the
1200 size of the stub buffer from MIPS_FUNCTION_STUB_MAX_SIZE to
1201 MIPS_FUNCTION_STUB_BIG_SIZE. Tweak the check for unhandled dynindxes.
1202 Use MIPS_FUNCTION_STUB_BIG_SIZE rather than a hard-coded 20.
1203 Use STUB_ORI rather than STUB_LI16U for big stubs.
1204 (_bfd_mips_elf_link_hash_table_create): Initialize function_stub_size.
1205 (_bfd_mips_elf_final_link): Use count_section_dynsyms.
1206
f38c2df5
TS
12072006-06-09 David Ung <davidu@mips.com>
1208
1209 * bfd/elfxx-mips.c (mips_elf_calculate_relocation): Fix mode for stub
1210 calling relocations.
1211
3d6746ca
DD
12122006-06-08 David Daney <ddaney@avtrex.com>
1213
1214 * elfxx-mips.c (STUB_LI16): Removed.
1215 (STUB_LUI): New macro.
1216 (STUB_LI16U): Ditto.
1217 (STUB_LI16S): Ditto.
1218 (MIPS_FUNCTION_STUB_SIZE): Rewrote to take info parameter.
1219 (_bfd_mips_elf_adjust_dynamic_symbol): Pass info parameter to
1220 MIPS_FUNCTION_STUB_SIZE.
1221 (_bfd_mips_elf_always_size_sections): Ditto.
1222 (_bfd_mips_elf_size_dynamic_sections): Ditto.
1223 (_bfd_mips_elf_finish_dynamic_sections): Ditto.
1224 (_bfd_mips_elf_finish_dynamic_symbol): Rewrote stub generation
1225 to allow larger symbol table indexes.
1226
6648b7cf
JM
12272006-06-07 Joseph S. Myers <joseph@codesourcery.com>
1228
1229 * po/Make-in (pdf, ps): New dummy targets.
1230
d3fd4074
AM
12312006-06-06 Alan Modra <amodra@bigpond.net.au>
1232
0bef4ce5
AM
1233 * hash.c (bfd_hash_lookup): Correct stray line.
1234
d3fd4074
AM
1235 * elf.c (_bfd_elf_init_private_section_data): Comment typo.
1236 (elfcore_grok_nto_status): Use long instead of pid_t.
1237 (elfcore_grok_nto_regs, elfcore_grok_nto_note): Likewise.
1238
4cfe2c59
DJ
12392006-06-05 Daniel Jacobowitz <dan@codesourcery.com>
1240
1241 * po/Make-in (top_builddir): Define.
1242
7ff1a5b5
AM
12432006-06-05 Alan Modra <amodra@bigpond.net.au>
1244
1245 * Makefile.am: Run "make dep-am".
1246 * Makefile.in: Regenerate.
1247 * config.in: Regenerate.
1248
f0b5bb34
AM
12492006-06-02 Alan Modra <amodra@bigpond.net.au>
1250 H.J. Lu <hongjiu.lu@intel.com>
1251
1252 PR ld/2723
1253 * elflink.c (bfd_elf_final_link): Don't output section symbols
1254 for special ELF sections.
1255
117ed4f8
AM
12562006-06-01 Alan Modra <amodra@bigpond.net.au>
1257
1258 * stabs.c (_bfd_link_section_stabs): Use bfd_make_section*_with_flags
1259 instead of bfd_make_section*.
1260 * aix386-core.c: Likewise.
1261 * aix5ppc-core.c: Likewise.
1262 * aout-adobe.c: Likewise.
1263 * aoutf1.h: Likewise.
1264 * binary.c: Likewise.
1265 * cisco-core.c: Likewise.
1266 * coff-arm.c: Likewise.
1267 * coff-h8300.c: Likewise.
1268 * elf.c: Likewise.
1269 * elf32-bfin.c: Likewise.
1270 * elf32-m32c.c: Likewise.
1271 * hppabsd-core.c: Likewise.
1272 * hpux-core.c: Likewise.
1273 * i386linux.c: Likewise.
1274 * ieee.c: Likewise.
1275 * ihex.c: Likewise.
1276 * irix-core.c: Likewise.
1277 * lynx-core.c: Likewise.
1278 * m68klinux.c: Likewise.
1279 * mach-o.c: Likewise.
1280 * netbsd-core.c: Likewise.
1281 * nlmcode.h: Likewise.
1282 * opncls.c: Likewise.
1283 * osf-core.c: Likewise.
1284 * peXXigen.c: Likewise.
1285 * ppcboot.c: Likewise.
1286 * ptrace-core.c: Likewise.
1287 * rs6000-core.c: Likewise.
1288 * sco5-core.c: Likewise.
1289 * sparclinux.c: Likewise.
1290 * srec.c: Likewise.
1291 * sunos.c: Likewise.
1292 * trad-core.c: Likewise.
1293 * xcofflink.c: Likewise.
1294 * xsym.c: Likewise.
1295
20e95c23
DJ
12962006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
1297
1298 * Makefile.am (INCLUDES): Use @INCINTL@.
1299 * acinclude.m4: Include new gettext macros.
1300 * configure.in: Use ZW_GNU_GETTEXT_SISTER_DIR and AM_PO_SUBDIRS.
1301 Manually substitute POFILES and GMOFILES.
1302 * Makefile.in, aclocal.m4, configure, doc/Makefile.in: Regenerated.
1303
24718e3b
L
13042006-05-30 H.J. Lu <hongjiu.lu@intel.com>
1305
1306 * bfd.c (bfd_emul_get_maxpagesize): New.
1307 (bfd_elf_set_pagesize): Likewise.
1308 (bfd_emul_set_maxpagesize): Likewise.
1309 (bfd_emul_get_commonpagesize): Likewise.
1310 (bfd_emul_set_commonpagesize): Likewise.
1311 * bfd-in2.h: Regenerated.
1312
1313 * elf-bfd.h (elf_backend_data): Add commonpagesize.
1314 (xvec_get_elf_backend_data): New.
1315 (get_elf_backend_data): Use xvec_get_elf_backend_data.
1316
1317 * elf32-arm.c (elf32_arm_vxworks_bed): Remove const.
1318 * elfxx-target.h (elfNN_bed): Likewise.
1319
1320 * elf32-arm.c (ELF_COMMONPAGESIZE): Defined.
1321 * elf32-mips.c (ELF_COMMONPAGESIZE): Likewise.
1322 * elf32-ppc.c (ELF_COMMONPAGESIZE): Likewise.
1323 * elf32-sh.c (ELF_COMMONPAGESIZE): Likewise.
1324 * elf32-sh64.c (ELF_COMMONPAGESIZE): Likewise.
1325 * elf32-sparc.c (ELF_COMMONPAGESIZE): Likewise.
1326 * elf64-alpha.c (ELF_COMMONPAGESIZE): Likewise.
1327 * elf64-ppc.c (ELF_COMMONPAGESIZE): Likewise.
1328 * elf64-sparc.c (ELF_COMMONPAGESIZE): Likewise.
1329 * elf64-x86-64.c (ELF_COMMONPAGESIZE): Likewise.
1330 * elfn32-mips.c (ELF_COMMONPAGESIZE): Likewise.
1331 * elfxx-ia64.c (ELF_COMMONPAGESIZE): Likewise.
1332
1333 * elfxx-target.h (ELF_COMMONPAGESIZE): Define if not defined.
1334 (elfNN_bed): Initialize commonpagesize with ELF_COMMONPAGESIZE.
1335
1336 * targets.c (bfd_find_target): Support NULL abfd.
1337
eebf07fb
NC
13382006-05-30 Nick Clifton <nickc@redhat.com>
1339
1340 * po/es.po: Updated Spanish translation.
1341
3f570048
AM
13422006-05-27 Alan Modra <amodra@bigpond.net.au>
1343 H.J. Lu <hongjiu.lu@intel.com>
1344
1345 * elf.c (assign_file_positions_for_load_sections): Retrieve
1346 maxpagesize from m->p_align if it is valid. Set p_vaddr,
1347 p_paddr and p_align earlier. Revert 2006-05-19 change to p_align.
1348 (copy_elf_program_header): Copy p_align. Set p_align_valid.
1349
2043964e
L
13502006-05-26 H.J. Lu <hongjiu.lu@intel.com>
1351
1352 * elf64-x86-64.c (ELF_MINPAGESIZE): Changed to 0x1000.
1353
13542006-05-25 H.J. Lu <hongjiu.lu@intel.com>
1355
1356 * elf64-x86-64.c (ELF_MINPAGESIZE): Set to 0x100000.
1357
f7661549
L
13582006-05-25 H.J. Lu <hongjiu.lu@intel.com>
1359
1360 * elf64-x86-64.c (ELF_MAXPAGESIZE): Updated to 0x200000.
1361
5372391b
AM
13622006-05-26 Alan Modra <amodra@bigpond.net.au>
1363
1364 * elf.c (sym_is_global): Return a bfd_boolean.
1365 (ignore_section_sym): New function.
1366 (elf_map_symbols): Use ignore_section_sym to discard some syms.
1367 (_bfd_elf_symbol_from_bfd_symbol): Ensure section belongs to
1368 bfd before using elf_section_syms.
1369
6566b43c
L
13702006-05-25 H.J. Lu <hongjiu.lu@intel.com>
1371
1372 * config.bfd: (sh-*-linux*): Treat as 64bit target.
1373 (sh*l*-*-netbsdelf*): Likewise.
1374 (sh-*-netbsdelf*): Likewise.
1375 (shl*-*-elf*): Likewise.
1376 (sh[1234]l*-*-elf*): Likewise.
1377 (sh3el*-*-elf*): Likewise.
1378 (shl*-*-kaos*): Likewise.
1379 (sh-*-elf*): Likewise.
1380 (sh[1234]*-elf*): Likewise.
1381 (sh-*-rtems*): Likewise.
1382 (sh-*-kaos*): Likewise.
1383
314e9a4e
L
13842006-05-24 H.J. Lu <hongjiu.lu@intel.com>
1385
1386 PR ld/1485
1387 * config.bfd: Set want64 to true if 64bit bfd is used.
1388 (sh-*-linux*): Use targ64_selvecs for 64bit targets.
1389 (sh*l*-*-netbsdelf*): Likewise.
1390 (sh-*-netbsdelf*): Likewise.
1391 (shl*-*-elf*): Likewise.
1392 (sh[1234]l*-*-elf*): Likewise.
1393 (sh3el*-*-elf*): Likewise.
1394 (shl*-*-kaos*): Likewise.
1395 (sh-*-elf*): Likewise.
1396 (sh[1234]*-elf*): Likewise.
1397 (sh-*-rtems*): Likewise.
1398 (sh-*-kaos*): Likewise.
1399
4e617b1e
PB
14002006-05-24 Paul Brook <paul@codesourcery.com>
1401
1402 * elf-bfd.h (elf_backend_data): Add elf_backend_output_arch_local_syms
1403 * elf32-arm.c (output_arch_syminfo): Define.
1404 (elf32_arm_ouput_plt_map_sym, elf32_arm_output_plt_map,
1405 elf32_arm_output_arch_local_syms): New functions.
1406 (elf_backend_output_arch_local_syms): Define.
1407 * elflink.c (bfd_elf_final_link): Call
1408 elf_backend_output_arch_local_syms.
1409 * elfxx-target.h (elf_backend_output_arch_local_syms): Provide default
1410 definition.
1411 (elfNN_bed): Add elf_backend_output_arch_local_syms.
1412
52ab56c2
PB
14132006-05-24 Paul Brook <paul@codesourcery.com>
1414
1415 * elf32-arm.c (put_arm_insn, put_thumb_insn): New functions.
1416 (elf32_thumb_to_arm_stub, elf32_arm_to_thumb_stub,
1417 elf32_arm_finish_dynamic_symbol): Use them.
1418
9b52905e
NC
14192006-05-24 Carlos O'Donell <carlos@systemhalted.org>
1420 Randolph Chung <tausq@debian.org>
1421
1422 * elf-hppa.h (reloc_hppa_howto_table): Check bitfield for
1423 TPREL21L/TPREL14R relocations. Handle LTOFF_TP14R relocations.
1424 Add handling for TLS relocations.
1425 (elf_hpp_reloc_final_type): Handle TLS relocs.
1426 * elf32-hppa.c: Add authors for cleanup and TLS support.
1427 (hppa_elf_local_got_tls_type, hh_name, eh_name): Define.
1428 (elf32_hppa_link_hash_entry): Add tls_type.
1429 (elf32_hppa_link_hash_table): Add tld_ldm_got.
1430 (hppa_link_has_newfunc): Set tls_type.
1431 (elf32_hppa_link_hash_table_create): Set tls_ldm_got refcount.
1432 (hppa_stub_name): Use hh_name macro.
1433 (elf32_hppa_copy_indirect_symbol): Copy TLS information.
1434 (elf32_hppa_check_relocs): Call elf32_hppa_optimized_tls_reloc.
1435 Handle TLS relocs.
1436 (elf32_hppa_gc_sweep_hook): Likewise.
1437 (allocate_dynrelocs): Handle TLS relocs.
1438 (elf32_hppa_size_dynamic_sections): Count space required by TLS
1439 relocs. Use hh_name macro.
1440 (dtpoff_base): New function.
1441 (tpoff): Likewise.
1442 (elf32_hppa_optimized_tls_reloc): Likewise.
1443 (final_link_relocate): Handle TLS relocs.
1444 (elf32_hppa_relocate_section): Handle TLS relocs. Use eh_name
1445 and hh_name macros.
1446 (elf32_hppa_finish_dynamic_symbol): Setup TLS got entries. Use
1447 hh_name and eh_name macros.
1448 (elf32_hppa_reloc_type_clas): Handle TLS relocs.
1449
28c9d252
NC
14502006-05-24 Bjoern Haase <bjoern.m.haase@web.de>
1451
1452 * archures.c: Add bfd_mach_avr6.
1453 * cpu-avr.c: Likewise.
1454 * reloc.c (BFD_RELOC_AVR_LO8_LDI_GS, BFD_RELOC_AVR_HI8_LDI_GS):
1455 New relocations.
1456 * libbfd.h: Regenerate.
1457 * bfd-in2.h:Regenerate.
1458 * elf32-avr.h: New file. Protoypes for functions accessed from ld.
1459 * elf32-avr.c: Add elf32-avr.h to include list.
1460 (elf32_avr_stub_hash_entry): New function.
1461 (elf32_avr_link_hash_table): New struct.
1462 (avr_link_hash_table): Likewise.
1463 (avr_stub_hash_entry): Likewise.
1464 (avr_stub_hash_lookup): New function.
1465 (stub_hash_newfunc): New function.
1466 (elf32_avr_link_hash_table_create): New function.
1467 (elf32_avr_link_hash_table_free): New function.
1468 (avr_get_stub_addr): New function.
1469 (debug_relax, debug_stubs): Add new global variables controlling
1470 debugging printout to stdout.
1471 (avr_pc_wrap_around): Change the type to bfd_vma.
1472 (avr_replace_call_ret_sequences): Add a new variable controling
1473 linkrelax optimizations.
1474 (avr_stub_is_required_for_16_bit_reloc): New function.
1475 (avr_final_link_relocate):
1476 Add linker hash table to parameter list. Use stub addr. if necessary.
1477 (elf32_avr_relocate_section):
1478 Add linker hashtable to parameter list of avr_final_link_relocate.
1479 (bfd_elf_avr_final_write_processing): Add support for bfd_mach_avr6.
1480 (elf32_avr_object_p): Add support for E_AVR_MACH_AVR6.
1481 (elf32_avr_relax_delete_bytes):
1482 Iterate over all sections of a bfd when adjusting relocs addends.
1483 (elf32_avr_relax_section):
1484 Evaluate avr_replace_call_ret_sequences and recalculate the size of
1485 stub section.
1486 (avr_stub_name): New function.
1487 (avr_get_stub_entry): New function.
1488 (avr_add_stub): New function.
1489 (avr_build_one_stub): New function.
1490 (avr_size_one_stub): New function.
1491 (elf32_avr_setup_params): New function.
1492 (elf32_avr_setup_section_lists): New function.
1493 (get_local_syms): New function.
1494 (elf32_avr_size_stubs): New function.
1495 (bfd_elf32_bfd_link_hash_table_create): New function.
1496 (bfd_elf32_bfd_link_hash_table_free): New function.
1497
a34a056a
L
14982006-05-23 H.J. Lu <hongjiu.lu@intel.com>
1499
1500 PR ld/2655
1501 PR ld/2657
1502 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Properly
1503 update CIE/FDE length. Don't pad to the section alignment.
1504
8aafe8b4
JZ
15052006-05-23 Jie Zhang <jie.zhang@analog.com>
1506
1507 * elf32-bfin.c (bfinfdpic_relocate_section): Clear reloc for
1508 deteted entries in .eh_frame section.
1509
5592d7ec
JZ
15102006-05-23 Jie Zhang <jie.zhang@analog.com>
1511
1512 * elf32-bfin.c (bfin_check_relocs): Use __GLOBAL_OFFSET_TABLE_
1513 instead of _GLOBAL_OFFSET_TABLE_.
1514 (bfin_relocate_section): Ditto.
1515 (_bfin_create_got_section): Ditto.
1516 (elf32_bfinfdpic_create_dynamic_sections): Use
1517 __PROCEDURE_LINKAGE_TABLE_ instead of _PROCEDURE_LINKAGE_TABLE_.
1518 (bfin_finish_dynamic_symbol): Use __DYNAMIC instead of _DYNAMIC.
1519
4d35a0aa
AM
15202006-05-23 Alan Modra <amodra@bigpond.net.au>
1521
1522 * elf64-ppc.c (compare_symbols): Prefer strong dynamic global
1523 function syms over other syms.
1524
943284cc
DJ
15252006-05-22 Daniel Jacobowitz <dan@codesourcery.com>
1526
1527 * elflink.c (_bfd_elf_add_dynamic_entry): Remove DT_TEXTREL
1528 check.
1529 (bfd_elf_final_link): Add a late DT_TEXTREL check.
1530 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): Define.
1531 (mips_elf_create_dynamic_relocation): Set DF_TEXTREL.
1532 (_bfd_mips_elf_check_relocs): Delete MIPS_READONLY_SECTION.
1533 Use MIPS_ELF_READONLY_SECTION.
1534 (_bfd_mips_elf_size_dynamic_sections): Clear DF_TEXTREL after
1535 creating DT_TEXTREL.
1536 (_bfd_mips_elf_finish_dynamic_sections): Clear textrel markers
1537 if no text relocations were generated.
1538
4d345610
L
15392006-05-19 H.J. Lu <hongjiu.lu@intel.com>
1540
1541 * elfxx-ia64.c (ELF_MAXPAGESIZE): Fix a typo in comment.
1542
1ea63fd2
AM
15432006-05-19 Alan Modra <amodra@bigpond.net.au>
1544
1545 * elf.c (elf_fake_sections): Formatting.
1546 (assign_file_positions_for_load_sections): Only add SEC_ALLOC
1547 sections to p_memsz. Remove hack for PT_NOTE sections. Allow
1548 section alignment to increase p_align for PT_LOAD.
1549 (assign_file_positions_for_non_load_sections): Remove ARM BPABI
1550 hack for PT_DYNAMIC. Instead, set p_filesz for all segments
1551 other than PT_LOAD, and PT_NOTE in core.
1552
f3520d2f
AM
15532006-05-17 Alan Modra <amodra@bigpond.net.au>
1554
1555 * elf.c (assign_file_positions_for_segments): Split into..
1556 (assign_file_positions_for_load_sections): ..this, and..
1557 (assign_file_positions_for_non_load_sections): ..this new function,..
1558 (assign_file_positions_except_relocs): ..writing program headers here.
1559
dea5f36a
AM
15602006-05-17 Alan Modra <amodra@bigpond.net.au>
1561
1562 * elflink.c (elf_gc_sweep): Don't specially keep non-alloc,
1563 non-load sections if they have relocs.
1564
b0796911
PB
15652006-05-15 Paul Brook <paul@codesourcery.com>
1566
1567 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename ...
1568 (bfd_is_arm_special_symbol_name): ... to this. Add type argument.
1569 Check symbol name is of specified type.
1570 * elf32-arm.c (elf32_arm_is_target_special_symbol,
1571 arm_elf_find_function, elf32_arm_output_symbol_hook): Use
1572 bfd_is_arm_special_symbol_name.
1573 * bfd-in.h (BFD_ARM_SPECIAL_SYM_TYPE_MAP,
1574 BFD_ARM_SPECIAL_SYM_TYPE_TAG, BFD_ARM_SPECIAL_SYM_TYPE_OTHER,
1575 BFD_ARM_SPECIAL_SYM_TYPE_ANY): Define.
1576 (bfd_is_arm_mapping_symbol_name): Remove prototype.
1577 (bfd_is_arm_special_symbol_name): Add prototype.
1578 * bfd-in2.h: Regenerate.
1579
64b607e6
BW
15802006-05-15 David Heine <dlheine@tensilica.com>
1581 Bob Wilson <bob.wilson@acm.org>
1582
1583 * elf32-xtensa.c (check_loop_aligned): Fix reversed check for
1584 undefined opcode. Clean up assertions.
1585 (narrow_instruction, widen_instruction): Remove "do_it" parameters.
1586 Factor most of the code into separate functions....
1587 (can_narrow_instruction, can_widen_instruction): New.
1588 (prev_instr_is_a_loop): New.
1589 (compute_ebb_proposed_actions): Combine error handling code for
1590 decode errors. Replace call to insn_decode_len with inline code.
1591 Use can_narrow_instruction and can_widen_instruction. Handle errors
1592 from call to xtensa_opcode_is_loop.
1593 (relax_section): Adjust calls to narrow_instruction and
1594 widen_instruction.
1595
7de713b9
AM
15962006-05-15 Alan Modra <amodra@bigpond.net.au>
1597
1598 PR 2658
1599 * elf32-ppc.c (ppc_elf_relax_section): Don't segfault on non-pic
1600 -shared link.
1601
83180ade
L
16022006-05-11 Michael Matz <matz@suse.de>
1603
1604 * elflink.c (match_group_member): Correctly iterate group
1605 members.
1606
b6895b4f
PB
16072006-05-11 Paul Brook <paul@codesourcery.com>
1608
1609 * elf32-arm.c (elf32_arm_reloc_map): Add MOVW and MOVT relocs.
1610 (elf32_arm_final_link_relocate): Handle MOVW and MOVT relocs.
1611 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
1612 * reloc.c: Ditto.
1613 * bfd-in2.h: Regenerate.
1614 * libbfd.h: Regenerate.
1615 * libcoff.h: Regenerate.
1616
8b95791f
AM
16172006-05-11 Mike Bland <mbland@google.com>
1618
1619 * elf.c (_bfd_elf_init_private_section_data): Don't change
1620 section type if already set.
1621
5e1b4a6d
NC
16222006-05-10 Nick Clifton <nickc@redhat.com>
1623
1624 PR ld/2607
1625 * elfcode.h (valid_section_index_p): New function: Checks for a
1626 valid section index. Allows indicies in the range SHN_LOPROC to
1627 SHN_HIOS.
1628 (elf_object_p): Use valid_section_index_p.
1629
53baae48
NC
16302006-05-11 Pedro Alves <pedro_alves@portugalmail.pt>
1631
1632 * coff-arm.c (ARM_26D, ARM_32, ARM_RVA_32, ARM_SECTION,
1633 ARM_SECREL): Mark WinCE versions of these relocs as partial
1634 inplace.
1635 (coff_arm_relocate_section): Adjust addend for WinCE.
1636
69d54b1b
AM
16372006-05-10 Alan Modra <amodra@bigpond.net.au>
1638
1639 PR 2342
1640 * elflink.c (_bfd_elf_default_action_discarded): Revert 2006-02-16.
1641
337ff0a5
NC
16422006-05-09 Nick Clifton <nickc@redhat.com>
1643
1644 * coffcode.h (coff_write_relocs): Produce an error message if a an
1645 out-of-range symbol index is detected in a reloc.
1646
e4d4d200
BE
16472006-05-09 Ben Elliston <bje@au.ibm.com>
1648
1649 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Remove unused
1650 local variable `dynobj'.
1651
73160847
NC
16522006-05-05 Bjoern Haase <bjoern.m.haase@web.de>
1653
336e5de1 1654 * elf32-avr.c (elf32_avr_relax_delete_bytes): Iterate over all
73160847
NC
1655 of the bfd's sections for the reloc-addend adjustments.
1656
77df2968
MS
16572006-05-05 Martin Schwidefsky <schwidefsky@de.ibm.com>
1658
1659 * elf32-s390.c (invalid_tls_insn): Call bfd_set_error.
1660 (elf_s390_relocate_section): Add code to do the GD->LE and
1661 LD->LE TLS linker optimizations if a brasl instruction is used
1662 for the __tls_get_offset function call.
1663 * elf64-s390.c (invalid_tls_insn): Call bfd_set_error.
1664
30038c59
AM
16652006-05-05 Alan Modra <amodra@bigpond.net.au>
1666
1667 * elf64-ppc.c (ppc64_elf_tls_optimize): Only optimize
1668 R_PPC64_TPREL64 and R_PPC64_DTPMOD64 relocs when they are in
1669 the .toc and referenced by a TLS code sequence.
1670 (ppc64_elf_edit_toc): Cater for the unlikely situation that
1671 .toc is the first section in a file.
1672
ff8b75c7
AS
16732006-05-04 Andreas Schwab <schwab@suse.de>
1674
1675 * aoutf1.h (struct external_sparc_core): Declare c_regs as struct
1676 regs instead of an array of int.
1677 (struct external_solaris_bcp_core): Likewise.
1678 (swapcore_sun3): Use offsetof instead of computing the offset
1679 manually.
1680 (swapcore_sparc): Likewise. Simplify reference to c_regs.
1681 (swapcore_solaris_bcp): Likewise.
1682
003b8e1d
DJ
16832006-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1684
1685 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Adjust handling
1686 for missing GOTs.
1687
efacb0fb
DJ
16882006-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1689
27106ff0 1690 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Accept more
efacb0fb
DJ
1691 mapping symbols.
1692
9578239d
BE
16932006-05-04 Ben Elliston <bje@au.ibm.com>
1694
1695 * coff-or32.c (bfd_section_from_shdr): Remove unused local
1696 variable `ptr'.
1697 * cofflink.c (process_embedded_commands): Remove unused local
1698 variables `had_read' and `had_shared'.
1699 * ecofflink.c (bfd_ecoff_debug_accumulate): Remove unused local
1700 variable `fdr_adr'.
1701 * ihex.c (ihex_read_section): Remove unused local variable `addr'.
1702
f592407e
AM
17032006-05-03 Alan Modra <amodra@bigpond.net.au>
1704
1705 * libbfd-in.h (_bfd_generic_new_section_hook): Declare.
1706 * section.c (bfd_abs_symbol, bfd_com_symbol): Delete.
1707 (bfd_und_symbol, bfd_ind_symbol): Delete.
1708 (BFD_FAKE_SECTION): Remove SYM_PTR param, set symbol_ptr_ptr to
1709 &SEC.symbol.
1710 (STD_SECTION): Adjust.
1711 (_bfd_generic_new_section_hook): New function, extracted from..
1712 (bfd_section_init): ..here.
1713 (bfd_make_section_old_way): Call new_section_hook for abs, com,
1714 und and ind sections.
1715 * elf.c (_bfd_elf_large_com_section): Adjust.
1716 * aoutx.h (new_section_hook): Call _bfd_generic_new_section_hook.
1717 * pdp11.c (new_section_hook): Likewise.
1718 * coffcode.h (coff_new_section_hook): Likewise.
1719 * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
1720 * elf.c (_bfd_elf_new_section_hook): Likewise.
1721 * vms.c (vms_new_section_hook): Likwise.
1722 * elf32-arm.c (elf32_arm_new_section_hook): Check used_by_bfd isn't
1723 already set.
1724 * elf32-sh64.c (sh64_elf_new_section_hook): Likewise.
1725 * elf32-xtensa.c (elf_xtensa_new_section_hook): Likewise.
1726 * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
1727 * elf64-ppc.c (ppc64_elf_new_section_hook): Likewise.
1728 * elfxx-mips.c (_bfd_mips_elf_new_section_hook): Likewise.
1729 * elfxx-sparc.c (_bfd_sparc_elf_new_section_hook): Likewise.
1730 * ieee.c (ieee_new_section_hook): Likewise. Call
1731 _bfd_generic_new_section_hook too.
1732 * mmo.c (mmo_new_section_hook): Likewise.
1733 * oasys.c (oasys_new_section_hook): Likewise.
1734 * som.c (som_new_section_hook): Likewise.
1735 * coff-w65.c (reloc_processing): Don't use bfd_abs_symbol.
1736 * bfd-in2.h: Regenerate.
1737 * libbfd.h: Regenerate.
1738
bd75c995
AM
17392006-05-03 Alan Modra <amodra@bigpond.net.au>
1740
1741 * hash.c (DEFAULT_SIZE): Revert last change.
1742 (higher_prime_number): Correct test for no larger prime. Don't
1743 abort on error, instead return 0. Depopulate primes[].
1744 (bfd_hash_lookup): If we overflow size, refuse to grow table.
1745
a8bc6c78
PB
17462006-05-02 Paul Brook <paul@codesourcery.com>
1747
1748 * elf32-arm.c (elf32_arm_final_link_relocate): Set thumb funciton bit
1749 for R_ARM_REL32.
1750
b48c61bc
BE
17512006-05-02 Ben Elliston <bje@au.ibm.com>
1752
1753 * archive.c (bfd_generic_archive_p): Remove unused local variable
1754 `fail'.
1755 * dwarf2.c (decode_line_info): Remove unused local variable
1756 `basic_block'.
e4d4d200
BE
1757 * elfcode.h (elf_slurp_reloc_table_from_section): Remove unused
1758 local variable `s'.
b48c61bc
BE
1759 * tekhex.c (tekhex_write_object_contents): Remove unused local
1760 variable `bytes_written'.
1761 * aout-ns32k.c (MY_swap_std_reloc_out): Remove unused local
1762 variable `r_addend'.
1763 * elf32-dlx.c (dlx_rtype_to_howto): Remove breaks after returns.
1764 * elfxx-mips.c (_bfd_elf_mips_mach): Remove breaks after returns.
1765 (_bfd_ns32k_relocate_contents): Remove break after return.
1766 * elf.c (bfd_section_from_shdr): Remove breaks after returns.
1767
63f2fc30
NC
17682006-05-02 Nick Clifton <nickc@redhat.com>
1769
1770 * elf32-sh-symbian.c: Rename local define DEBUG to SYMBIAN_DEBUG
1771 in order to avoid conflicts with the global DEBUG define.
1772
e460dd0d
AM
17732006-05-02 Alan Modra <amodra@bigpond.net.au>
1774
1775 * dwarf2.c: Formatting.
1776 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Simplify
1777 output section check.
1778 * elf32-i370.c: Warning fixes inside #ifdef DEBUG.
1779 * elf32-m32c.c: Similarly.
1780 * elf32-ppc.c: Similarly.
1781 * elf32-v850.c: Similarly.
1782 * nlm32-sparc.c: Similarly.
1783 * elfcode.h: Similarly.
1784 (elf_symbol_flags): Delete.
1785 * elflink.c (elf_link_input_bfd): Comment typo.
1786
aa149cf7
DD
17872006-05-01 DJ Delorie <dj@redhat.com>
1788
1789 * bfd-in.h (bfd_hash_table): Add count field.
1790 * bfd-in2.h: Regenerate.
1791 * hash.c (higher_prime_number): New.
1792 (bfd_hash_table_inint_n): Init count field.
1793 (bfd_hash_lookup): Grow table as needed.
1794
75b8939e
KK
17952006-04-27 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1796
1797 PR binutils/2584
1798 * tekhex.c (getvalue): Change return type to bfd_boolean and
1799 add the new parameter. Return false if the unexpected character
1800 is found.
1801 (getsym): Likewise.
1802 (first_phase): Change return type to bfd_boolean and return
1803 false if the unexpected character is found. Replace abort
1804 with returning false.
1805 (pass_over): Change return type to bfd_boolean and the type of
1806 the second argument to bfd_boolean (*) (bfd *, int, char *).
1807 Return false if FUNC returns false.
1808 (tekhex_object_p): Return NULL if pass_over fails.
1809
f05742e6
AM
18102006-04-27 Alan Modra <amodra@bigpond.net.au>
1811
1812 * coff-rs6000.c (xcoff_write_archive_contents_old): Warning fix.
1813
e843e0f8
L
18142006-04-26 H.J. Lu <hongjiu.lu@intel.com>
1815
1816 PR binutils/2593
1817 * elf.c (_bfd_elf_new_section_hook): Don't set section ELF type
1818 and flags if its BFD flags have been set.
1819 (_bfd_elf_init_private_section_data): Don't copy the output ELF
1820 section type from input if it has been set to something
1821 different.
1822
b25e3d87
L
18232006-04-25 H.J. Lu <hongjiu.lu@intel.com>
1824
1825 PR binutils/2467
1826 * elf.c (_bfd_elf_close_and_cleanup): Check elf_tdata (abfd)
1827 is NULL first.
1828
1829 * elf32-arm.c (elf32_arm_close_and_cleanup): Check if
1830 abfd->sections is NULL.
1831 (elf32_arm_bfd_free_cached_info): New.
1832 (bfd_elf32_bfd_free_cached_info): Defined.
1833
1834 * elfxx-target.h (bfd_elfNN_bfd_free_cached_info): Default it
1835 to _bfd_free_cached_info.
1836
1837 * libbfd-in.h (_bfd_free_cached_info): New.
1838 * libbfd: Regenerated.
1839
1840 * opncls.c (_bfd_delete_bfd): Check if abfd->memory is NULL.
1841 (_bfd_free_cached_info): New.
1842
5c182d5f
AM
18432006-04-21 Alan Modra <amodra@bigpond.net.au>
1844
1845 * elf.c (assign_file_positions_except_relocs): Move code setting
1846 file position of non-loaded sections..
1847 (assign_file_positions_for_segments): ..to here.
1848
3eb70a79
L
18492006-04-20 H.J. Lu <hongjiu.lu@intel.com>
1850
1851 PR ld/2537
1852 * elf.c (bfd_section_from_shdr): Allow sections reserved for
1853 applications. Issue an error on sections we don't know how
1854 to handle.
1855
ec3fcc56
AM
18562006-04-19 Alan Modra <amodra@bigpond.net.au>
1857
1858 * Makefile.am: Run "make dep-am".
1859 * Makefile.in: Regenerate.
1860
241a6c40
AM
18612006-04-19 Alan Modra <amodra@bigpond.net.au>
1862
1863 * warning.m4 (--enable-werror): Format help message.
1864 (--enable-build-warnings): Likewise.
1865 * configure: Regenerate.
1866
0b49d371
NC
18672006-04-18 Nick Clifton <nickc@redhat.com>
1868
1869 PR 2257
1870 * elfcode.h (elf_object_p): Allow files with corrupt e_shstrndx
1871 fields to still be handled as ELF files.
1872
e7403566
DJ
18732006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
1874
1875 * po/SRC-POTFILES.in: Regenerated.
1876
ffdc4eed
DJ
18772006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
1878
1879 * configure.in: Update version to 2.17.50.
1880 * configure: Regenerated.
1881
cb337148
BW
18822006-04-14 David Heine <dlheine@tensilica.com>
1883
1884 * elf32-xtensa.c (build_reloc_opcodes): New.
1885 (compute_text_actions): Use it to decode opcodes outside inner loop.
1886 (check_section_ebb_pcrels_fit): Add "reloc_opcodes" argument, and if
1887 it is set, use it to get the opcodes for relocations.
1888 (move_shared_literal): Adjust call to check_section_ebb_pcrels_fit.
1889
cb878726
L
18902006-04-08 H.J. Lu <hongjiu.lu@intel.com>
1891
1892 PR ld/2513
1893 * elf32-i386.c (GOT_TLS_MASK): New macro for tls_type.
1894 (GOT_TLS_IE_IE): Likewise.
1895 (GOT_TLS_IE_GD): Likewise.
1896 (GOT_TLS_IE_MASK): Likewise.
1897 (elf_i386_check_relocs): For global symbols, set GOT_TLS_IE_GD
1898 and GOT_TLS_IE_IE for R_386_TLS_GD and R_386_TLS_IE
1899 respectively.
1900 (allocate_dynrelocs): If both GOT_TLS_IE_IE and GOT_TLS_IE_GD
1901 are set, treat tls_type as GOT_TLS_IE_BOTH.
1902 (elf_i386_relocate_section): Likewise.
1903
235ecfbc
NC
19042006-04-07 Randolph Chung <tausq@debian.org>
1905
1906 * elf64-hppa.c (elf64_hppa_grok_prstatus): New function.
1907 (elf64_hppa_grok_psinfo): Likewise.
1908 (elf_backend_grok_pstatus, elf_backend_grok_psinfo): Define.
1909
35520cb7
DD
19102006-04-06 DJ Delorie <dj@redhat.com>
1911
1912 * elf32-m32c.c (m32c_elf_relocate_section): Generate a symbol for
1913 each plt entry we create.
1914
108a6f8e
CD
19152006-04-06 Carlos O'Donell <carlos@codesourcery.com>
1916
1917 * po/Make-in: Add install-html target.
1918 * Makefile.am: Rename docdir to bfddocdir. Add datarootdir, docdir
1919 htmldir. Add install-html and install-html-recursive targets.
1920 * Makefile.in: Regenerate.
1921 * configure.in: AC_SUBST for datarootdir, docdir and htmldir.
1922 * configure: Regenerate.
1923
fbbc3759
L
19242006-04-06 H.J. Lu <hongjiu.lu@intel.com>
1925
1926 * elfxx-ia64.c (elfNN_ia64_relax_section): Skip unneeded passes
1927 with the skip_relax_pass_0 and skip_relax_pass_1 bits in the
1928 section structure.
1929
17e226a8
BS
19302006-04-05 Bernd Schmidt <bernd.schmidt@analog.com>
1931
1932 * elf32-bfin.c (bfinfdpic_relocs_info_hash): Sprinkle casts to
1933 eliminate warnings.
1934
396a682d
L
19352006-04-05 H.J. Lu <hongjiu.lu@intel.com>
1936 James E Wilson <wilson@specifixinc.com>
1937
1938 PR ld/2442
1939 * elfxx-ia64.c (elfNN_ia64_dyn_sym_info): Remove next.
1940 (elfNN_ia64_local_hash_entry): Add count, sorted_count and
1941 size.
1942 (elfNN_ia64_link_hash_entry): Likewise.
1943 (elfNN_ia64_new_elf_hash_entry): Initialize count, sorted_count
1944 and size.
1945 (elfNN_ia64_hash_copy_indirect): Updated elfNN_ia64_dyn_sym_info
1946 processing.
1947 (elfNN_ia64_hash_hide_symbol): Likewise.
1948 (elfNN_ia64_global_dyn_sym_thunk): Likewise.
1949 (elfNN_ia64_local_dyn_sym_thunk): Likewise.
1950 (elfNN_ia64_global_dyn_info_free): New function.
1951 (elfNN_ia64_local_dyn_info_free): Likewise.
1952 (elfNN_ia64_hash_table_free): Free local and global
1953 elfNN_ia64_dyn_sym_info.
1954 (addend_compare): New function.
1955 (sort_dyn_sym_info): Likewise.
1956 (get_dyn_sym_info): Updated to use binary search for addend.
1957 (elfNN_ia64_check_relocs): Scan relocations to create dynamic
1958 relocation arrays first.
1959
0781db9f
BS
19602006-04-05 Bernd Schmidt <bernd.schmidt@analog.com>
1961
1962 * elf32-bfin.c (_bfin_create_got_section): Don't generate a _gp
1963 symbol.
1964
c0d5a53d
L
19652006-04-05 H.J. Lu <hongjiu.lu@intel.com>
1966
1967 PR ld/2411
1968 * elflink.c (check_dynsym): New.
1969 (elf_link_output_extsym): Use it.
1970 (bfd_elf_final_link): Likewise.
1971
580a2b6e
L
19722006-04-05 H.J. Lu <hongjiu.lu@intel.com>
1973
1974 PR ld/2404
1975 * elflink.c (_bfd_elf_merge_symbol): Skip the default indirect
1976 symbol from the dynamic definition with the default version if
1977 its type and the type of existing regular definition mismatch.
1978
910600e9
RS
19792006-04-05 Richard Sandiford <richard@codesourcery.com>
1980 Daniel Jacobowitz <dan@codesourcery.com>
1981
1982 * config.bfd (sparc-*-vxworks*): New stanza.
1983 * configure.in (bfd_elf32_sparc_vxworks_vec): New stanza.
1984 (bfd_elf32_sparc_vec, bfd_elf64_sparc_vec): Add elf-vxworks.lo.
1985 * configure: Regenerate.
1986 * elf32-sparc.c: Include elf-vxworks.h.
1987 (elf32_sparc_vxworks_link_hash_table_create: New.
1988 (elf32_sparc_vxworks_final_write_processing): New.
1989 (TARGET_BIG_SYM): Override for VxWorks.
1990 (TARGET_BIG_NAME, ELF_MINPAGESIZE): Likewise.
1991 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1992 (elf_backend_want_got_plt, elf_backend_plt_readonly): Likewise.
1993 (elf_backend_got_header_size, elf_backend_add_symbol_hook): Likewise.
1994 (elf_backend_link_output_symbol_hook): Likewise.
1995 (elf_backend_emit_relocs): Likewise.
1996 (elf_backend_final_write_processing, elf32_bed): Likewise.
1997 * elfxx-sparc.c: Include libiberty.h and elf-vxworks.h.
1998 (sparc_vxworks_exec_plt0_entry, sparc_vxworks_exec_plt_entry): New.
1999 (sparc_vxworks_shared_plt0_entry, sparc_vxworks_shared_plt_entry): New.
2000 (_bfd_sparc_elf_link_hash_table_create): Don't initialize
2001 build_plt_entry here.
2002 (create_got_section): Initialize sgotplt for VxWorks.
2003 (_bfd_sparc_elf_create_dynamic_sections): Initialize build_plt_entry,
2004 plt_header_size and plt_entry_size, with new VxWorks-specific settings.
2005 Call elf_vxworks_create_dynamic_sections for VxWorks.
2006 (allocate_dynrelocs): Use plt_header_size and plt_entry_size.
2007 Allocate room for .got.plt and .rela.plt.unloaded entries on VxWorks.
2008 (_bfd_sparc_elf_size_dynamic_sections): Don't allocate a nop in .plt
2009 for VxWorks. Check for the .got.plt section.
2010 (sparc_vxworks_build_plt_entry): New function.
2011 (_bfd_sparc_elf_finish_dynamic_symbol): Add handling of VxWorks PLTs.
2012 Don't make _GLOBAL_OFFSET_TABLE_ and _PROCEDURE_LINKAGE_TABLE_
2013 absolute on VxWorks.
2014 (sparc32_finish_dyn): Add special handling for DT_RELASZ
2015 and DT_PLTGOT on VxWorks.
2016 (sparc_vxworks_finish_exec_plt): New.
2017 (sparc_vxworks_finish_shared_plt): New.
2018 (_bfd_sparc_elf_finish_dynamic_sections): Call them.
2019 Use plt_header_size and plt_entry_size.
2020 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add is_vxworks,
2021 srelplt2, sgotplt, plt_header_size and plt_entry_size fields.
2022 * Makefile.am (elfxx-sparc.lo): Depend on elf-vxworks.h.
2023 (elf32-sparc.lo): Likewise.
2024 * Makefile.in: Regenerate.
2025 * targets.c (bfd_elf32_sparc_vxworks_vec): Declare.
2026 (_bfd_target_vector): Add a pointer to it.
2027
b761a207
BE
20282006-03-30 Ben Elliston <bje@au.ibm.com>
2029
2030 PR ld/2267
2031 * elflink.c (elf_fixup_link_order): Ensure `elfsec' is not a
2032 special section number that exceeds the number of ELF sections
2033 (eg. SHN_MIPS_SCOMMON).
2034
ead49a57
RS
20352006-03-27 Richard Sandiford <richard@codesourcery.com>
2036
2037 * elfxx-mips.c (mips_got_entry): Add more commentary.
2038 (mips_elf_local_got_index): Use the hash table entry to record
2039 the GOT index of forced-local symbols.
2040 (mips_elf_initialize_tls_index): Rearrange code. Store the index
2041 in either the hash table entry or the mips_got_entry, not both.
2042 Add more commentary.
2043 (mips_elf_multi_got): Make sure the g->next is nonnull when calling
2044 mips_elf_initialize_tls_index.
2045
3b55e94a
BS
20462006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
2047
2048 * elf32-bfin.c (bfd_const_reloc, bfd_oper_reloc, bfin_push_reloc,
2049 RELOC_STACK_SIZE, reloc_stack, reloc_stack_tos, is_reloc_stack_empty,
2050 reloc_stack_push, reloc_stack_pop, reloc_stack_operate,
2051 bfin_areloc_howto_table): Delete. All
2052 uses deleted as well.
2053 (bfin_reloc_map): Delete all stack relocs.
2054 (bfin_info_to_howto, bfin_bfd_reloc_type_lookup,
2055 bfin_reloc_type_lookup): Don't support them.
2056 (bfin_relocate_section): Don't try to handle them.
2057
48d502e1
BS
2058 * config.bfd (bfin-*-*): Add bfd_elf32_bfinfdpic_vec.
2059 * configure.in: Likewise.
2060 * configure: Regenerate.
2061 * elf32-bfin.c: Include "elf/dwarf2.h" and "hashtab.h".
2062 (BFIN_RELOC_MAX): Now 0x21.
2063 (bfin_howto_table, bfin_reloc_map): Add FD-PIC relocs.
2064 (bfd_elf32_bfinfdpic_vec): Declare.
2065 (IS_FDPIC): New macro.
2066 (struct bfinfdpic_elf_link_hash_table): New struct.
2067 (bfinfdpic_hash_table, bfinfdpic_got_section,
2068 bfinfdpic_gotrel_section, bfinfdpic_gotfixup_section,
2069 bfinfdpic_plt_setion, bfinfdpic_pltrel_section,
2070 bfinfdpic_relocs_info, bfinfdpic_got_initial_offset,
2071 bfinfdpic_plt_initial_offset): Accessor macros for it.
2072 (BFINFDPIC_SYM_LOCAL, BFINFDPIC_FUNCDESC_LOCAL): New macros.
2073 (struct bfinfdpic_relocs_info): New struct.
2074 (LZPLT_RESOLVER_EXTRA, LZPLT_NORMAL_SIZE, LZPLT_ENTRIES,
2075 BFINFDPIC_LZPLT_BLOCK_SIZE, BFINFDPIC_LZPLT_RESOLV_LOC,
2076 DEFAULT_STACK_SIZE): New macros.
2077 (bfinfdpic_elf_link_hash_table_create, bfinfdpic_relocs_info_hash,
2078 bfinfdpic_relocs_info_eq, bfinfdpics_relocs_info_find,
2079 bfinfdpic_relocs_info_for_global, bfinfdpic_relocs_info_for_local,
2080 bfinfdpic_pic_merge_early_relocs_info, _bfinfdpic_add_dyn_reloc,
2081 _bfinfdpic_add_rofixup, _bfinfdpic_osec_to_segment,
2082 _bfinfdpic_osec_readonly_p, bfinfdpic_relocate_section,
2083 bfinfdpic_check_relocs, bfinfdpic_gc_sweep_hook,
2084 _bfinfdpic_link_omit_section_dynsym, _bfin_create_got_section,
2085 elf32_bfinfdpic_create_dynamic_sections, _bfinfdpic_get_fd_entry,
2086 _bfinfdpic_compute_got_alloc_data, _bfinfdpic_get_got_entry,
2087 _bfinfdpic_assign_got_entries, _bfinfdpic_assign_plt_entries,
2088 _bfinfdpic_resolve_final_relocs_info,
2089 elf32_bfinfdpic_size_dynamic_sections,
2090 elf32_bfinfdpic_always_size_sections,
2091 elf32_bfinfdpic_modify_segment_map,
2092 _bfinfdpic_count_got_plt_entries,
2093 elf32_bfinfdpic_finish_dynamic_sections,
2094 elf32_bfinfdpic_adjust_dynamic_symbol,
2095 elf32_bfinfdpic_finish_dynamic_symbol,
2096 elf32_bfinfdpic_elf_use_relative_eh_frame,
2097 elf32_bfinfdpic_elf_encode_eh_address,
2098 elf32_bfin_object_p, bfin_elf_copy_private_bfd_data,
2099 elf32_bfinfdpic_copy_private_bfd_data,
2100 (struct _bfinfdpic_dynamic_got_info,
2101 struct _bfinfdpic_dynamic_got_plt_info): New structs.
2102 (elf32_bfin_print_private_bfd_data): Print PIC flags.
2103 (elf32_bfin_merge_private_bfd_data): Extend to support FD-PIC.
2104 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, elf32_bed,
2105 elf_backend_got_header_size, bfd_elf32_bfd_link_hash_table_create,
2106 elf_backend_always_size_sectinos, elf_backend_modify_segment_map,
2107 bfd_elf32_bfd_copy_private_bfd_data,
2108 elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
2109 elf_backend_size_dynamic_sections, elf_backend_finish_dynamic_symbol,
2110 elf_backend_finish_dynamic_sections, elf_backend_relocate_section,
2111 elf_backend_can_make_relative_eh_frame, elf_backend_check_relocs,
2112 elf_backend_can_make_ldsa_relative_eh_frame, elf_backend_may_use_rel_p,
2113 elf_backend_may_use_rela_p, elf_backend_default_use_rela_p,
2114 elf_backend_omit_section_dynsym): Redefine these macros and include
2115 "elf32-target.h" again to create the elf32-bfinfdpic target.
2116 * reloc.c (BFD_RELOC_BFIN_GOT17M4, BFD_RELOC_BFIN_GOTHI,
2117 BFD_RELOC_BFIN_GOTLO, BFD_RELOC_BFIN_FUNCDESC,
2118 BFD_RELOC_BFIN_FUNCDESC_GOT17M4, BFD_RELOC_BFIN_FUNCDESC_GOTHI,
2119 BFD_RELOC_BFIN_FUNCDESC_GOTLO, BFD_RELOC_BFIN_FUNCDESC_VALUE,
2120 BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4, BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
2121 BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, BFD_RELOC_BFIN_GOTOFFHI,
2122 BFD_RELOC_BFIN_GOTOFFLO): New.
2123 * targets.c (bfd_elf32_bfinfdpic_vec): New bfd_target.
2124 (_bfd_target_vector): Add it.
2125 * bfd-in2.h: Regenerate.
2126 * libbfd.h: Regenerate.
2127
a9d34880
RS
21282006-03-25 Richard Sandiford <richard@codesourcery.com>
2129
2130 * cpu-m68k.c (bfd_m68k_compatible): Treat ISA A+ and ISA B code as
2131 incompatible. Likewise MAC and EMAC code.
2132 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Use
2133 bfd_get_compatible to set the new bfd architecture. Rely on it
2134 to detect incompatibilities.
2135
9ca26584
AJ
21362006-03-23 Michael Matz <matz@suse.de>
2137
2138 * reloc.c: Add BFD_RELOC_X86_64_GOT64, BFD_RELOC_X86_64_GOTPCREL64,
2139 BFD_RELOC_X86_64_GOTPC64, BFD_RELOC_X86_64_GOTPLT64,
2140 BFD_RELOC_X86_64_PLTOFF64.
2141 * bfd-in2.h: Regenerated.
2142 * libbfd.h: Regenerated.
2143 * elf64-x86-64.c (x86_64_elf_howto_table): Correct comment.
2144 Add howtos for above relocs.
2145 (x86_64_reloc_map): Add mappings for new relocs.
2146 (elf64_x86_64_check_relocs): R_X86_64_GOT64, R_X86_64_GOTPCREL64,
2147 R_X86_64_GOTPLT64 need a got entry. R_X86_64_GOTPLT64 also a PLT
2148 entry. R_X86_64_GOTPC64 needs a .got section. R_X86_64_PLTOFF64
2149 needs a PLT entry.
2150 (elf64_x86_64_gc_sweep_hook): Reflect changes from
2151 elf64_x86_64_check_relocs for the new relocs.
2152 (elf64_x86_64_relocate_section): Handle new relocs.
2153
2a23c2c5
BW
21542006-03-22 Bob Wilson <bob.wilson@acm.org>
2155
2156 * elf32-xtensa.c (xtensa_read_table_entries): Remove assertion that
2157 rel->r_addend is zero.
2158
6d79d2ed
RS
21592006-03-22 Richard Sandiford <richard@codesourcery.com>
2160
2161 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Fix type
2162 of "loc".
2163
0a44bf69
RS
21642006-03-22 Richard Sandiford <richard@codesourcery.com>
2165 Daniel Jacobowitz <dan@codesourcery.com>
2166 Phil Edwards <phil@codesourcery.com>
2167 Zack Weinberg <zack@codesourcery.com>
2168 Mark Mitchell <mark@codesourcery.com>
2169 Nathan Sidwell <nathan@codesourcery.com>
2170
2171 * bfd-in2.h: Regenerate.
2172 * config.bfd (mips*-*-vxworks*, mips*el-*-vxworks*): New stanzas.
2173 * configure.in (bfd_elf32_bigmips_vxworks_vec): New stanza.
2174 (bfd_elf32_littlemips_vxworks_vec): Likewise.
2175 (bfd_elf32_bigmips_vec): Add elf-vxworks.lo.
2176 (bfd_elf32_littlemips_vec): Likewise.
2177 (bfd_elf32_nbigmips_vec): Likewise.
2178 (bfd_elf32_nlittlemips_vec): Likewise.
2179 (bfd_elf32_ntradbigmips_vec): Likewise.
2180 (bfd_elf32_ntradlittlemips_vec): Likewise.
2181 (bfd_elf32_tradbigmips_vec): Likewise.
2182 (bfd_elf32_tradlittlemips_vec): Likewise.
2183 (bfd_elf64_bigmips_vec): Likewise.
2184 (bfd_elf64_littlemips_vec): Likewise.
2185 (bfd_elf64_tradbigmips_vec): Likewise.
2186 (bfd_elf64_tradlittlemips_vec): Likewise.
2187 * elf32-mips.c: Include elf-vxworks.h.
2188 (mips_info_to_howto_rel): Use elf_backend_mips_rtype_to_howto
2189 instead of calling mips_elf32_rtype_to_howto directly.
2190 (mips_vxworks_copy_howto_rela): New reloc howto.
2191 (mips_vxworks_jump_slot_howto_rela): Likewise.
2192 (mips_vxworks_bfd_reloc_type_lookup): New function.
2193 (mips_vxworks_rtype_to_howto): Likewise.
2194 (mips_vxworks_final_write_processing): Likewise.
2195 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Override for VxWorks.
2196 (TARGET_BIG_SYM, TARGET_BIG_NAME, elf_bed, ELF_MAXPAGESIZE): Likewise.
2197 (elf_backend_want_got_plt): Likewise.
2198 (elf_backend_want_plt_sym): Likewise.
2199 (elf_backend_got_symbol_offset): Likewise.
2200 (elf_backend_want_dynbss): Likewise.
2201 (elf_backend_may_use_rel_p): Likewise.
2202 (elf_backend_may_use_rela_p): Likewise.
2203 (elf_backend_default_use_rela_p): Likewise.
2204 (elf_backend_got_header_size: Likewise.
2205 (elf_backend_plt_readonly): Likewise.
2206 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
2207 (elf_backend_mips_rtype_to_howto): Likewise.
2208 (elf_backend_adjust_dynamic_symbol): Likewise.
2209 (elf_backend_finish_dynamic_symbol): Likewise.
2210 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2211 (elf_backend_add_symbol_hook): Likewise.
2212 (elf_backend_link_output_symbol_hook): Likewise.
2213 (elf_backend_emit_relocs): Likewise.
2214 (elf_backend_final_write_processing: Likewise.
2215 (elf_backend_additional_program_headers): Likewise.
2216 (elf_backend_modify_segment_map): Likewise.
2217 (elf_backend_symbol_processing): Likewise.
2218 * elfxx-mips.c: Include elf-vxworks.h.
2219 (mips_elf_link_hash_entry): Add is_relocation_target and
2220 is_branch_target fields.
2221 (mips_elf_link_hash_table): Add is_vxworks, srelbss, sdynbss, srelplt,
2222 srelplt2, sgotplt, splt, plt_header_size and plt_entry_size fields.
2223 (MIPS_ELF_RELA_SIZE, MIPS_ELF_REL_DYN_NAME): New macros.
2224 (MIPS_RESERVED_GOTNO): Take a mips_elf_link_hash_table argument.
2225 Return 3 for VxWorks.
2226 (ELF_MIPS_GP_OFFSET): Change the argument from a bfd to a
2227 mips_elf_link_hash_table. Return 0 for VxWorks.
2228 (MIPS_ELF_GOT_MAX_SIZE): Change the argument from a bfd to a
2229 mips_elf_link_hash_table. Update the call to ELF_MIPS_GP_OFFSET.
2230 (mips_vxworks_exec_plt0_entry): New variable.
2231 (mips_vxworks_exec_plt_entry): Likewise.
2232 (mips_vxworks_shared_plt0_entry): Likewise.
2233 (mips_vxworks_shared_plt_entry): Likewise.
2234 (mips_elf_link_hash_newfunc): Initialize the new hash_entry fields.
2235 (mips_elf_rel_dyn_section): Change the bfd argument to a
2236 mips_elf_link_hash_table. Use MIPS_ELF_REL_DYN_NAME to get
2237 the name of the section.
2238 (mips_elf_initialize_tls_slots): Update the call to
2239 mips_elf_rel_dyn_section.
2240 (mips_elf_gotplt_index): New function.
2241 (mips_elf_local_got_index): Add an input_section argument.
2242 Update the call to mips_elf_create_local_got_entry.
2243 (mips_elf_got_page): Likewise.
2244 (mips_elf_got16_entry): Likewise.
2245 (mips_elf_create_local_got_entry): Add bfd_link_info and input_section
2246 arguments. Create dynamic relocations for each entry on VxWorks.
2247 (mips_elf_merge_gots): Update the use of MIPS_ELF_GOT_MAX_SIZE.
2248 (mips_elf_multi_got): Update the uses of MIPS_ELF_GOT_MAX_SIZE
2249 and MIPS_RESERVED_GOTNO.
2250 (mips_elf_create_got_section): Update the uses of
2251 MIPS_ELF_GOT_MAX_SIZE. Create .got.plt on VxWorks.
2252 (is_gott_symbol): New function.
2253 (mips_elf_calculate_relocation): Use a dynobj local variable.
2254 Update the calls to mips_elf_local_got_index, mips_elf_got16_entry and
2255 mips_elf_got_page_entry. Set G to the .got.plt entry when calculating
2256 VxWorks R_MIPS_CALL* relocations. Calculate and use G for all GOT
2257 relocations on VxWorks. Add dynamic relocations for references
2258 to the VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Don't
2259 create dynamic relocations for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64
2260 in VxWorks executables.
2261 (mips_elf_allocate_dynamic_relocations): Add a bfd_link_info argument.
2262 Use MIPS_ELF_RELA_SIZE to calculate the size of a VxWorks entry.
2263 Don't allocate a null entry on VxWorks.
2264 (mips_elf_create_dynamic_relocation): Update the call to
2265 mips_elf_rel_dyn_section. Use absolute rather than relative
2266 relocations for VxWorks, and make them RELA rather than REL.
2267 (_bfd_mips_elf_create_dynamic_sections): Don't make .dynamic
2268 read-only on VxWorks. Update the call to mips_elf_rel_dyn_section.
2269 Create the .plt, .rela.plt, .dynbss and .rela.bss sections on
2270 VxWorks. Likewise create the _PROCEDURE_LINKAGE_TABLE symbol.
2271 Call elf_vxworks_create_dynamic_sections for VxWorks and
2272 initialize the plt_header_size and plt_entry_size fields.
2273 (_bfd_mips_elf_check_relocs): Don't allow GOT relocations to be
2274 used in VxWorks executables. Don't allocate dynamic relocations
2275 for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 in VxWorks executables.
2276 Set is_relocation_target for each symbol referenced by a relocation.
2277 Allocate .rela.dyn entries for relocations against the special
2278 VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Create GOT
2279 entries for all VxWorks R_MIPS_GOT16 relocations. Don't allocate
2280 a global GOT entry for symbols mentioned in VxWorks R_MIPS_CALL*,
2281 R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 relocations. Update the calls
2282 to mips_elf_rel_dyn_section and mips_elf_allocate_dynamic_relocations.
2283 Set is_branch_target for symbols mentioned in R_MIPS_PC16 or R_MIPS_26
2284 relocations. Don't set no_fn_stub on VxWorks.
2285 (_bfd_mips_elf_adjust_dynamic_symbol): Update the call to
2286 mips_elf_allocate_dynamic_relocations.
2287 (_bfd_mips_vxworks_adjust_dynamic_symbol): New function.
2288 (_bfd_mips_elf_always_size_sections): Do not allocate GOT page
2289 entries for VxWorks, and do not create multiple GOTs.
2290 (_bfd_mips_elf_size_dynamic_sections): Use MIPS_ELF_REL_DYN_NAME.
2291 Handle .got specially for VxWorks. Update the uses of
2292 MIPS_RESERVED_GOTNO and mips_elf_allocate_dynamic_relocations.
2293 Check for sgotplt and splt. Allocate the .rel(a).dyn contents last,
2294 once its final size is known. Set DF_TEXTREL for VxWorks. Add
2295 DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL, DT_PLTRELSZ and DT_JMPREL
2296 tags on VxWorks. Do not add the MIPS-specific tags for VxWorks.
2297 (_bfd_mips_vxworks_finish_dynamic_symbol): New function.
2298 (mips_vxworks_finish_exec_plt): Likewise.
2299 (mips_vxworks_finish_shared_plt): Likewise.
2300 (_bfd_mips_elf_finish_dynamic_sections): Remove an unncessary call
2301 to mips_elf_rel_dyn_section. Use a VxWorks-specific value of
2302 DT_PLTGOT. Handle DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL,
2303 DT_PLTRELSZ and DT_JMPREL. Update the uses of MIPS_RESERVED_GOTNO
2304 and mips_elf_rel_dyn_section. Use a different GOT header for
2305 VxWorks. Don't sort .rela.dyn on VxWorks. Finish the PLT on VxWorks.
2306 (_bfd_mips_elf_link_hash_table_create): Initialize the new
2307 mips_elf_link_hash_table fields.
2308 (_bfd_mips_vxworks_link_hash_table_create): New function.
2309 (_bfd_mips_elf_final_link): Set the GP value to _GLOBAL_OFFSET_TABLE_
2310 on VxWorks. Update the call to ELF_MIPS_GP_OFFSET.
2311 * elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Declare.
2312 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2313 (_bfd_mips_vxworks_link_hash_table_create): Likewise.
2314 * libbfd.h: Regenerate.
2315 * Makefile.am (elfxx-mips.lo): Depend on elf-vxworks.h.
2316 (elf32-mips.lo): Likewise.
2317 * Makefile.in: Regenerate.
2318 * reloc.c (BFD_RELOC_MIPS_COPY, BFD_RELOC_MIPS_JUMP_SLOT): Declare.
2319 * targets.c (bfd_elf32_bigmips_vxworks_vec): Declare.
2320 (bfd_elf32_littlemips_vxworks_vec): Likewise.
2321 (_bfd_target_vector): Add entries for them.
2322
a2199086
DA
23232006-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2324
2325 * elf64-hppa.c (elf64_hppa_special_sections): Change flags for .tbss
2326 section from SHF_PARISC_WEAKORDER to SHF_HP_TLS.
2327 (elf_backend_special_sections): Remove #undef.
2328
af7cfa33
DA
23292006-03-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2330
2331 * elf64-hppa.c (allocate_global_data_opd): Don't create an OPD entry
2332 for undefined weak symbols.
2333
a4676736
L
23342006-03-17 Daniel Jacobowitz <dan@codesourcery.com>
2335
2336 PR ld/2462
2337 * elflink.c (bfd_elf_final_link): Remove
2338 bed->elf_backend_emit_relocs from emit_relocs.
2339
e1710606
AO
23402006-03-17 Alexandre Oliva <aoliva@redhat.com>
2341
2342 * elf32-ppc.c (ppc_elf_relocate_section): Copy addend from
2343 first relocation to the second when relaxing TLS GD to LE;
2344 zero it out when relaxing to IE.
2345
2de92251
AM
23462006-03-17 Alan Modra <amodra@bigpond.net.au>
2347
2348 PR 2434
2349 * elflink.c (elf_link_add_object_symbols): Save and restore
2350 warning sym's linked sym.
2351
66eb6687
AM
23522006-03-16 Alan Modra <amodra@bigpond.net.au>
2353
2354 PR 2434
2355 * elflink.c (struct elf_smash_syms_data, elf_smash_syms): Delete.
2356 (elf_link_add_object_symbols): Delete unnecessary locals. Rename
2357 hash_table -> htab. Formatting. Save entire symbol table
2358 before loading as-needed syms, and restore afterwards if lib not
2359 needed. Use bfd_hash_allocate rather than bfd_alloc for sym
2360 name. Free some buffers earlier.
2361 * bfd-in.h (struct bfd_hash_table): Add entsize.
2362 (bfd_hash_table_init, bfd_hash_table_init_n): Adjust prototype.
2363 * elf-bfd.h (_bfd_elf_link_hash_table_init): Likewise
2364 * hash.c (bfd_hash_table_init_n): Add entsize param, save to
2365 hash table.
2366 (bfd_hash_table_init): Add param, adjust calls.
2367 * aoutx.h: Adjust all hash_table_init functions and calls.
2368 * bfd.c: Likewise.
2369 * coff-arm.c: Likewise.
2370 * coff-h8300.c: Likewise.
2371 * coff-ppc.c: Likewise.
2372 * cofflink.c: Likewise.
2373 * ecoff.c: Likewise.
2374 * ecofflink.c: Likewise.
2375 * elf-m10300.c: Likewise.
2376 * elf-strtab.c: Likewise.
2377 * elf.c: Likewise.
2378 * elf32-arm.c: Likewise.
2379 * elf32-bfin.c: Likewise.
2380 * elf32-cris.c: Likewise.
2381 * elf32-frv.c: Likewise.
2382 * elf32-hppa.c: Likewise.
2383 * elf32-i386.c: Likewise.
2384 * elf32-m32r.c: Likewise.
2385 * elf32-m68hc1x.c: Likewise.
2386 * elf32-m68k.c: Likewise.
2387 * elf32-ppc.c: Likewise.
2388 * elf32-s390.c: Likewise.
2389 * elf32-sh.c: Likewise.
2390 * elf32-vax.c: Likewise.
2391 * elf64-alpha.c: Likewise.
2392 * elf64-hppa.c: Likewise.
2393 * elf64-ppc.c: Likewise.
2394 * elf64-s390.c: Likewise.
2395 * elf64-sh64.c: Likewise.
2396 * elf64-x86-64.c: Likewise.
2397 * elfxx-ia64.c: Likewise.
2398 * elfxx-mips.c: Likewise.
2399 * elfxx-sparc.c: Likewise.
2400 * i386linux.c: Likewise.
2401 * libaout.h: Likewise.
2402 * libbfd-in.h: Likewise.
2403 * libcoff-in.h: Likewise.
2404 * linker.c: Likewise.
2405 * m68klinux.c: Likewise.
2406 * merge.c: Likewise.
2407 * opncls.c: Likewise.
2408 * pdp11.c: Likewise.
2409 * sparclinux.c: Likewise.
2410 * stabs.c: Likewise.
2411 * sunos.c: Likewise.
2412 * vms.c: Likewise.
2413 * xcofflink.c: Likewise.
2414 * section.c (struct section_hash_entry): Move to..
2415 * libbfd-in.h: ..here.
2416 * Makefile.am: Run "make dep-am"
2417 * Makefile.in: Regenerate.
2418 * bfd-in2.h: Regenerate.
2419 * libbfd.h: Regenerate.
2420 * libcoff.h: Regenerate.
2421
7123df0e
AM
24222006-03-16 Alan Modra <amodra@bigpond.net.au>
2423
2424 * elf32-ppc.c (ppc_elf_check_relocs): REL24 and REL14 relocs
2425 against __GLOBAL_OFFSET_TABLE__ need never be dynamic. Tweak
2426 last change to REL32 relocs so that they are counted as
2427 possibly dynamic as per REL24 and REL14.
2428
fd38b44c
AM
24292006-03-16 Alan Modra <amodra@bigpond.net.au>
2430
2431 * elf32-ppc.c (ppc_elf_check_relocs): Don't fall into REL24
2432 checks from REL32.
2433
eb111b1f
BE
24342006-03-15 Ben Elliston <bje@au.ibm.com>
2435
2436 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Iterate over all
2437 in_list elements, not just the first.
2438
81d43bff
RS
24392006-03-14 Richard Sandiford <richard@codesourcery.com>
2440
2441 * elf32-mips.c (mips_elf_adjust_addend): New function, mostly split
2442 out from...
2443 (_bfd_mips_elf_relocate_section): ...here. Use it to adjust r_addend
2444 for final links too.
2445
d329bcd1
RS
24462006-03-13 Richard Sandiford <richard@codesourcery.com>
2447
2448 * elfxx-mips.c (mips_elf_create_got_section): Initialize hgot.
2449
75a657ba
L
24502006-03-11 H.J. Lu <hongjiu.lu@intel.com>
2451
2452 PR ld/2443
241a6c40 2453 * dwarf2.c (concat_filename): Don't issue an error if file is 0.
75a657ba 2454
3a4a14e9
PB
24552006-03-10 Paul Brook <paul@codesourcery.com>
2456
2457 * elf32-arm.c (INTERWORK_FLAG): Handle EABIv5.
2458 (elf32_arm_print_private_bfd_data): Ditto.
2459
38406048
PB
24602006-03-09 Paul Brook <paul@codesourcery.com>
2461
2462 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Recognise additional
2463 mapping symbols.
2464
eed62c48
NC
24652006-03-09 Khem Raj <khem@mvista.com>
2466
2467 * elf32-arm.c(elf32_arm_finish_dynamic_sections): Use unsigned
2468 char type.
2469
6d2cf7d8
L
24702006-03-08 H.J. Lu <hongjiu.lu@intel.com>
2471
2472 * elfxx-ia64.c (elfNN_ia64_choose_gp): Properly choose gp.
2473
00a97672
RS
24742006-03-07 Richard Sandiford <richard@codesourcery.com>
2475 Daniel Jacobowitz <dan@codesourcery.com>
2476 Zack Weinberg <zack@codesourcery.com>
2477 Nathan Sidwell <nathan@codesourcery.com>
2478 Paul Brook <paul@codesourcery.com>
2479 Ricardo Anguiano <anguiano@codesourcery.com>
2480 Phil Edwards <phil@codesourcery.com>
2481
2482 * configure.in (bfd_elf32_bigarm_vec): Include elf-vxworks.lo.
2483 (bfd_elf32_bigarm_symbian_vec): Likewise.
2484 (bfd_elf32_bigarm_vxworks_vec): Likewise.
2485 (bfd_elf32_littlearm_vec): Likewise.
2486 (bfd_elf32_littlearm_symbian_vec): Likewise.
2487 (bfd_elf32_littlearm_vxworks_vec): Likewise.
2488 * configure: Regenerate.
2489 * elf32-arm.c: Include libiberty.h and elf-vxworks.h.
2490 (RELOC_SECTION, RELOC_SIZE, SWAP_RELOC_IN, SWAP_RELOC_OUT): New macros.
2491 (elf32_arm_vxworks_bed): Add forward declaration.
2492 (elf32_arm_howto_table_1): Fix the masks for R_ASM_ABS12.
2493 (elf32_arm_vxworks_exec_plt0_entry): New table.
2494 (elf32_arm_vxworks_exec_plt_entry): Likewise.
2495 (elf32_arm_vxworks_shared_plt_entry): Likewise.
2496 (elf32_arm_link_hash_table): Add vxworks_p and srelplt2 fields.
2497 (reloc_section_p): New function.
2498 (create_got_section): Use RELOC_SECTION.
2499 (elf32_arm_create_dynamic_sections): Likewise. Call
2500 elf_vxworks_create_dynamic_sections for VxWorks targets.
2501 Choose between the two possible values of plt_header_size
2502 and plt_entry_size.
2503 (elf32_arm_link_hash_table_create): Initialize vxworks_p and srelplt2.
2504 (elf32_arm_abs12_reloc): New function.
2505 (elf32_arm_final_link_relocate): Call it. Allow the creation of
2506 dynamic R_ARM_ABS12 relocs on VxWorks. Use reloc_section_p,
2507 RELOC_SIZE, SWAP_RELOC_OUT and RELOC_SECTION. Initialize the
2508 r_addend fields of relocs. On rela targets, skip any code that
2509 adjusts in-place addends. When using _bfd_link_final_relocate
2510 to perform a final relocation, pass rel->r_addend as the addend
2511 argument.
2512 (elf32_arm_merge_private_bfd_data): If one of the bfds is a VxWorks
2513 object, ignore flags that are not standard on VxWorks.
2514 (elf32_arm_check_relocs): Allow the creation of dynamic R_ARM_ABS12
2515 relocs on VxWorks. Use reloc_section_p.
2516 (elf32_arm_adjust_dynamic_symbol): Use RELOC_SECTION and RELOC_SIZE.
2517 (allocate_dynrelocs): Use RELOC_SIZE. Account for the size of
2518 .rela.plt.unloaded relocs on VxWorks targets.
2519 (elf32_arm_size_dynamic_sections): Use RELOC_SIZE. Check for
2520 .rela.plt.unloaded as well as .rel(a).plt. Add DT_RELA* tags
2521 instead of DT_REL* tags on RELA targets.
2522 (elf32_arm_finish_dynamic_symbol): Use RELOC_SECTION, RELOC_SIZE
2523 and SWAP_RELOC_OUT. Initialize r_addend fields. Handle VxWorks
2524 PLT entries. Do not make _GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
2525 (elf32_arm_finish_dynamic_sections): Use RELOC_SECTION, RELOC_SIZE
2526 and SWAP_RELOC_OUT. Initialize r_addend fields. Handle DT_RELASZ
2527 like DT_RELSZ. Handle the VxWorks form of initial PLT entry.
2528 Correct the .rela.plt.unreloaded symbol indexes.
2529 (elf32_arm_output_symbol_hook): Call the VxWorks version of this
2530 hook on VxWorks targets.
2531 (elf32_arm_vxworks_link_hash_table_create): Set vxworks_p to true.
2532 Minor formatting tweak.
2533 (elf32_arm_vxworks_final_write_processing): New function.
2534 (elf_backend_add_symbol_hook): Override for VxWorks and reset
2535 for Symbian.
2536 (elf_backend_final_write_processing): Likewise.
2537 (elf_backend_emit_relocs): Likewise.
2538 (elf_backend_want_plt_sym): Likewise.
2539 (ELF_MAXPAGESIZE): Likewise.
2540 (elf_backend_may_use_rel_p): Minor formatting tweak.
2541 (elf_backend_may_use_rela_p): Likewise.
2542 (elf_backend_default_use_rela_p): Likewise.
2543 (elf_backend_rela_normal): Likewise.
2544 * Makefile.in (elf32-arm.lo): Depend on elf-vxworks.h.
2545
0b2e31dc
NS
25462006-03-06 Nathan Sidwell <nathan@codesourcery.com>
2547
2548 * archures.c (bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_b_nousp):
2549 New. Adjust other variants.
2550 (bfd_default_scan): Update.
2551 * bfd-in2.h: Rebuilt.
2552 * cpu-m68k.c: Adjust.
2553 (bfd_m68k_compatible): New. Use it for architectures.
2554 * elf32-m68k.c (elf32_m68k_object_p): Adjust.
2555 (elf32_m68k_merge_private_bfd_data): Adjust. Correct isa-a/b
2556 mismatch.
2557 (elf32_m68k_print_private_bfd_data): Adjust.
2558 * ieee.c (ieee_write_processor): Adjust.
2559
d8d1c398
AM
25602006-03-06 Alan Modra <amodra@bigpond.net.au>
2561
2562 * dwarf2.c: Formatting.
2563 (add_line_info): Remove outer loop.
2564
d4c32a81
L
25652006-03-05 H.J. Lu <hongjiu.lu@intel.com>
2566 Alan Modra <amodra@bigpond.net.au>
2567
2568 PR binutils/2338
2569 * dwarf2.c (loadable_section): New struct.
2570 (dwarf2_debug): Add loadable_section_count and
2571 loadable_sections.
2572 (new_line_sorts_after): New.
2573 (add_line_info): Use new_line_sorts_after to compare line
2574 addresses.
2575 (check_function_name): Removed.
2576 (unset_sections): New.
2577 (place_sections): New.
2578 (_bfd_dwarf2_find_nearest_line): Updated. Call place_sections
2579 and unset_sections on relocatable files.
2580 (_bfd_dwarf2_find_line): Likewise.
2581
4cdc7696
NC
25822006-03-03 Nick Clifton <nickc@redhat.com>
2583
2584 * cpu-avr.c: Update to ISO-C90 formatting.
2585 * elf32-avr.c: Likewise.
2586
df406460
NC
25872006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
2588
2589 * elf32-avr.c (avr_reloc_map): Insert BFD_RELOC_AVR_MS8_LDI
2590 and R_AVR_MS8_LDI
2591 (bfd_elf_avr_final_write_processing): Set
2592 EF_AVR_LINKRELAX_PREPARED in e_flags field.
2593 (elf32_avr_relax_section): New function.
2594 (elf32_avr_relax_delete_bytes): New function.
2595 (elf32_avr_get_relocated_section_contents): New function.
2596 (avr_pc_wrap_around): New function.
2597 (avr_relative_distance_considering_wrap_around): New function.
2598 (avr_final_link_relocate): Handle negative int8t_t immediate for R_AVR_LDI.
2599 * reloc.c: Add BFD_RELOC_AVR_MS8_LDI and BFD_RELOC_AVR_LDI_NEG
2600 * libbfd.h: Regenerate.
2601 * bfd-in2.h: Regenerate.
2602
a1013894
DD
26032006-03-02 DJ Delorie <dj@redhat.com>
2604
2605 * elf32-m32c.c (m32c_offset_for_reloc): Fix local symbol
2606 calculations.
2607
7c492719
RS
26082006-03-02 Richard Sandiford <richard@codesourcery.com>
2609
2610 * elf32-ppc.c (is_ppc_elf_target): Return true if the target is
2611 bfd_elf32_powerpc_vxworks_vec.
2612
e970df31
NC
26132006-03-02 Nick Clifton <nickc@redhat.com>
2614
2615 * elf32-m32c.c (m32c_elf_relax_section): Initialise 'gap'.
2616
711de32c
RS
26172006-03-02 Richard Sandiford <richard@codesourcery.com>
2618
2619 * elf32-i386.c (elf_i386_create_dynamic_sections): Use
2620 elf_vxworks_create_dynamic_sections.
2621 (elf_i386_size_dynamic_sections): Remove VxWorks GOT and PLT
2622 symbol handling.
2623 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Use
2624 elf_vxworks_create_dynamic_sections.
2625 (ppc_elf_size_dynamic_sections): Remove VxWorks GOT and PLT
2626 symbol handling.
2627 * elf-vxworks.c (elf_vxworks_create_dynamic_sections): New function.
2628 * elf-vxworks.h (elf_vxworks_create_dynamic_sections): Declare.
2629
9c72ff84
RS
26302006-03-02 Richard Sandiford <richard@codesourcery.com>
2631
2632 * elf32-i386.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
2633 (elf_backend_link_output_symbol_hook): Use
2634 elf_vxworks_link_output_symbol_hook instead.
2635 * elf32-ppc.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
2636 (elf_backend_link_output_symbol_hook): Use
2637 elf_vxworks_link_output_symbol_hook instead.
2638 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Provide the
2639 same interface as elf_backend_link_output_symbol_hook.
2640 * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Update
2641 prototype accordingly.
2642
4a3dc543
RS
26432006-03-02 Richard Sandiford <richard@codesourcery.com>
2644
2645 * elf32-ppc.c (ppc_elf_plt_type): New enumeration.
2646 (ppc_elf_link_hash_table): Replace old_got and new_got with
2647 plt_type and can_use_new_plt.
2648 (ppc_elf_create_dynamic_sections): Add SEC_HAS_CONTENTS,
2649 SEC_LOAD and SEC_READONLY to the VxWorks .plt flags.
2650 (ppc_elf_check_relocs): Set can_use_new_plt instead of new_plt.
2651 Move from plt_type == PLT_UNSET to PLT_OLD instead of setting old_plt.
2652 (ppc_elf_select_plt_layout): Move from plt_type == PLT_UNSET to
2653 either plt_type == PLT_OLD or plt_type == PLT_NEW. Assert that
2654 this function should not be called for VxWorks targets.
2655 (ppc_elf_tls_setup): Use plt_type instead of old_got.
2656 (allocate_got): Likewise. Rearrange so that max_before_header
2657 is only used for PLT_OLD and PLT_NEW.
2658 (allocate_dynrelocs): Use plt_type instead of old_got and is_vxworks.
2659 (ppc_elf_size_dynamic_sections): Likewise.
2660 (ppc_elf_relax_section): Likewise.
2661 (ppc_elf_relocate_section): Likewise.
2662 (ppc_elf_finish_dynamic_symbol): Likewise.
2663 (ppc_elf_vxworks_link_hash_table_create): Initialize plt_type.
2664
5ae0bfb6
RS
26652006-02-28 Richard Sandiford <richard@codesourcery.com>
2666
2667 * elf32-i386.c (elf_i386_link_hash_table): Add next_tls_desc_index.
2668 (elf_i386_link_hash_table_create): Initialize it.
2669 (elf_i386_compute_jump_table_size): Use it instead of
2670 srelplt->reloc_count.
2671 (allocate_dynrelocs): Likewise.
2672 (elf_i386_size_dynamic_sections): Likewise.
2673 (elf_i386_relocate_section): Likewise.
2674
63752a75
JJ
26752006-02-27 Jakub Jelinek <jakub@redhat.com>
2676
2677 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle S flag.
2678 (_bfd_elf_write_section_eh_frame): Likewise.
2679
f7d9e5c3
CD
26802006-02-27 Carlos O'Donell <carlos@codesourcery.com>
2681
2682 * po/Make-in: Add html target.
2683
22edb2f1
RS
26842006-02-27 Richard Sandiford <richard@codesourcery.com>
2685
2686 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Use the
2687 cached hgot entry to check for _GLOBAL_OFFSET_TABLE_.
2688 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
2689 * elf32-bfin.c (bfin_finish_dynamic_symbol): Likewise.
2690 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
2691 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
2692 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
2693 * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
2694 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Likewise.
2695 * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
2696 * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
2697 * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
2698 * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
2699 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likewise.
2700 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
2701 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise. Also use
2702 the cached hplt entry to check for _PROCEDURE_LINKAGE_TABLE_.
2703 * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
2704 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2705 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
2706 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2707
7325306f
RS
27082006-02-25 Richard Sandiford <richard@codesourcery.com>
2709
2710 * elf-bfd.h (elf_link_hash_table): Add hplt field.
2711 * elflink.c (_bfd_elf_create_dynamic_sections): Initialize it.
2712 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
2713 * elf32-frv.c (_frv_create_got_section): Likewise.
2714 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
2715 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2716 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
2717 * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
2718 * elf32-i386.c (elf_i386_link_hash_table): Remove hgot and hplt.
2719 (elf_i386_link_hash_table_create): Don't initialize them.
2720 (elf_i386_size_dynamic_sections): Use the generic ELF hplt and
2721 hgot fields.
2722 (elf_i386_finish_dynamic_symbol): Likewise.
2723 * elf32-ppc.c (ppc_elf_link_hash_table): Remove hplt.
2724 (ppc_elf_size_dynamic_sections): Use the generic ELF hplt fields.
2725 (ppc_elf_finish_dynamic_symbol): Likewise.
2726
6772dd07
DD
27272006-02-24 DJ Delorie <dj@redhat.com>
2728
2729 * elf32-m32c.c (m32c_elf_howto_table): Add relaxation relocs.
2730 (m32c_elf_relocate_section): Don't relocate them.
2731 (compare_reloc): New.
2732 (relax_reloc): Remove.
2733 (m32c_offset_for_reloc): New.
2734 (m16c_addr_encodings): New.
2735 (m16c_jmpaddr_encodings): New.
2736 (m32c_addr_encodings): New.
2737 (m32c_elf_relax_section): Relax jumps and address displacements.
2738 (m32c_elf_relax_delete_bytes): Adjust for internal syms. Fix up
2739 short jumps.
2740
2741 * reloc.c: Add m32c relax relocs.
2742 * libbfd.h: Regenerate.
2743 * bfd-in2.h: Regenerate.
2744
508c3946
L
27452006-02-24 H.J. Lu <hongjiu.lu@intel.com>
2746
2747 PR ld/2218
2748 * elf-bfd.h (elf_backend_data): Add elf_backend_fixup_symbol.
2749 (_bfd_elf_link_hash_fixup_symbol): New.
2750
2751 * elflink.c (_bfd_elf_link_hash_fixup_symbol): New.
2752 (_bfd_elf_fix_symbol_flags): Call elf_backend_fixup_symbol if
2753 it isn't NULL.
2754
2755 * elfxx-ia64.c (elf_backend_fixup_symbol): Defined.
2756
2757 * elfxx-target.h (elf_backend_fixup_symbol): New.
2758 (elfNN_bed): Initialize elf_backend_fixup_symbol.
2759
59cf82fe
L
27602006-02-23 H.J. Lu <hongjiu.lu@intel.com>
2761
2762 * cpu-ia64-opc.c (ins_immu5b): New.
2763 (ext_immu5b): Likewise.
2764 (elf64_ia64_operands): Add IMMU5b.
2765
22d606e9
AM
27662006-02-21 Alan Modra <amodra@bigpond.net.au>
2767
2768 PR ld/2218
2769 * elf32-arm.c (allocate_dynrelocs): Ensure undef weak sym in pie
2770 is dynamic.
2771 * elf32-hppa.c (allocate_dynrelocs): Likewise.
2772 * elf32-i386.c (allocate_dynrelocs): Likewise.
2773 * elf32-s390.c (allocate_dynrelocs): Likewise.
2774 * elf32-sh.c (allocate_dynrelocs): Likewise.
2775 * elf64-s390.c (allocate_dynrelocs): Likewise.
2776 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2777 * elf32-m32r.c (allocate_dynrelocs): Likewise. Discard relocs
2778 on undef weak with non-default visibility too.
2779 * elfxx-sparc.c (allocate_dynrelocs): Ditto.
2780
3168356f
AM
27812006-02-21 Alan Modra <amodra@bigpond.net.au>
2782
2783 * bfd.c: (_bfd_default_error_handler): Don't call abort on
2784 error, instead call _exit.
2785 (_bfd_abort): Call _exit not xexit.
2786
888b45b8
KB
27872006-02-17 Kevin Buettner <kevinb@redhat.com>
2788
2789 * elf32-frv.c (elf32_frv_grok_prstatus, elf32_frv_grok_psinfo):
2790 New functions.
2791 * elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
2792
d70c5fc7
NC
27932006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
2794 Anil Paranjape <anilp1@kpitcummins.com>
2795 Shilin Shakti <shilins@kpitcummins.com>
2796
2797 * Makefile.am: Add xc16x related entry
2798 * Makefile.in: Regenerate
2799 * archures.c: Add bfd_xc16x_arch
2800 * bfd-in2.h: Regenerate
2801 * config.bfd: Add xc16x-*-elf
2802 * configure.in: Add bfd_elf32_xc16x_vec
2803 * configure: Regenerate.
2804 * targets.c: Added xc16x related information
2805 * cpu-xc16x.c: New file
2806 * reloc.c: Add new relocations specific to xc16x:
2807 BFD_RELOC_XC16X_PAG, BFD_RELOC_XC16X_POF, BFD_RELOC_XC16X_SEG,
2808 BFD_RELOC_XC16X_SOF
2809 * elf32-xc16x.c: New file.
2810
cab87ef9
AM
28112006-02-17 Alan Modra <amodra@bigpond.net.au>
2812
2813 * elf32-ppc.c (allocate_dynrelocs): Tweak undef weak handling.
2814 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2815
dfbb6ac9
AM
28162006-02-17 Alan Modra <amodra@bigpond.net.au>
2817
2818 PR ld/2218
2819 * elf64-ppc.c (allocate_dynrelocs): Ensure undef weak sym is
2820 dynamic.
2821 (ppc64_elf_relocate_section): Check output reloc section size.
2822 * elf32-ppc.c (allocate_dynrelocs): Simplify undef weak test.
2823
cedc298e
L
28242006-02-16 H.J. Lu <hongjiu.lu@intel.com>
2825
2826 PR ld/2322
2827 * elf.c (get_segment_type): New function.
2828 (_bfd_elf_print_private_bfd_data): Use it.
2829 (print_segment_map): New function.
2830 (assign_file_positions_for_segments): Call print_segment_map
2831 when there are not enough room for program headers.
2832
aaa2ab3d
NH
28332006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
2834
2835 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Use
2836 traditional MIPS ELF targets.
2837
35ccda9e
L
28382006-02-15 H.J. Lu <hongjiu.lu@intel.com>
2839
2840 PR binutils/2338
2841 * dwarf2.c (check_function_name): New function.
2842 (_bfd_dwarf2_find_nearest_line): Use check_function_name to
2843 check if function is correct.
2844
e0ae6d6f
AM
28452006-02-16 Alan Modra <amodra@bigpond.net.au>
2846
2847 * elflink.c (_bfd_elf_default_action_discarded): Return 0 for
2848 debug sections.
2849 (elf_link_input_bfd): Adjust comments.
2850
d55ce4e2
L
28512006-02-10 H.J. Lu <hongjiu.lu@intel.com>
2852
2853 * elf.c (copy_private_bfd_data): Minor update.
2854
84d1d650
L
28552006-02-10 H.J. Lu <hongjiu.lu@intel.com>
2856
2857 PR binutils/2258
2858 * elf.c (copy_private_bfd_data): Renamed to ...
2859 (rewrite_elf_program_header): This.
2860 (copy_elf_program_header): New function.
2861 (copy_private_bfd_data): Likewise.
2862
28632006-02-07 Nathan Sidwell <nathan@codesourcery.com>
266abb8f
NS
2864
2865 * archures.c (bfd_mach_mcf5200, bfd_mach_mcf5206e,
2866 bfd_mach_mcf5307, bfd_mach_mcf5407, bfd_mach_mcf528x,
2867 bfd_mach_mcfv4e, bfd_mach_mcf521x, bfd_mach_mcf5249,
2868 bfd_mach_mcf547x, bfd_mach_mcf548x): Remove.
2869 (bfd_mach_mcf_isa_a, bfd_mach_mcf_isa_a_div,
2870 bfd_mach_mcf_isa_a_div_mac, bfd_mach_mcf_isa_a_div_emac,
2871 bfd_mach_mcf_isa_aplus, bfd_mach_mcf_isa_aplus_mac,
2872 bfd_mach_mcf_isa_aplus_emac, bfd_mach_mcf_isa_aplus_usp,
2873 bfd_mach_mcf_isa_aplus_usp_mac, bfd_mach_mcf_isa_aplus_usp_emac,
2874 bfd_mach_mcf_isa_b, bfd_mach_mcf_isa_b_mac, bfd_mach_mcf_isa_b_emac,
2875 bfd_mach_mcf_isa_b_usp_float, bfd_mach_mcf_isa_b_usp_float_mac,
2876 bfd_mach_mcf_isa_b_usp_float_emac): New.
2877 (bfd_default_scan): Update coldfire mapping.
2878 * bfd-in.h (bfd_m68k_mach_to_features,
2879 bfd_m68k_features_to_mach): Declare.
2880 * bfd-in2.h: Rebuilt.
2881 * cpu-m68k.c (arch_info_struct): Add new coldfire machines,
2882 adjust legacy names.
2883 (m68k_arch_features): New.
2884 (bfd_m68k_mach_to_features,
2885 bfd_m68k_features_to_mach): Define.
2886 * elf32-m68k.c (elf32_m68k_object_p): New.
2887 (elf32_m68k_merge_private_bfd_data): Merge the CF EF flags.
2888 (elf32_m68k_print_private_bfd_data): Print the CF EF flags.
2889 (elf_backend_object_p): Define.
2890 * ieee.c (ieee_write_processor): Update coldfire machines.
2891 * libbfd.h: Rebuilt.
2892
75eb734c
SE
28932006-02-06 Steve Ellcey <sje@cup.hp.com>
2894
2895 * elfxx-ia64.c (elfNN_ia64_fake_sections): Set SHF_IA_64_HP_TLS
2896 if SHF_TLS is set.
2897
134dcee5
AM
28982006-02-05 Arnold Metselaar <arnold.metselaar@planet.nl>
2899
2900 * coff-z80.c (r_imm24): New howto.
2901 (rtype2howto): New case R_IMM24.
2902 (coff_z80_reloc_type_lookup): New case BFD_RELOC_24.
2903 (extra_case): Use bfd_get_8 for R_IMM8, new case R_IMM24.
2904
4005427f
RS
29052006-02-04 Richard Sandiford <richard@codesourcery.com>
2906
2907 * elfxx-mips.c (mips_elf_initialize_tls_index): If a TLS symbol
2908 has already been assigned a GOT index, copy that index to the
2909 current hash table entry.
2910
bb29dfea
EB
29112006-02-01 Eric Botcazou <ebotcazou@libertysurf.fr>
2912
2913 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
2914 for call-to-undefweak reloc overflow.
2915
dc669dc8
EB
29162006-01-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2917
2918 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
2919 for 32-bit relocs overflow.
2920
1a0eb693
PB
29212006-01-27 Paul Brook <paul@codesourcery.com>
2922
2923 * elf32-arm.c (elf32_arm_get_symbol_type): Allow STT_TLS thumb
2924 objects.
2925
67a4f2b7
AO
29262006-01-18 Alexandre Oliva <aoliva@redhat.com>
2927
2928 Introduce TLS descriptors for i386 and x86_64.
2929 * reloc.c (BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_386_TLS_DESC,
2930 BFD_RELOC_386_TLS_DESC_CALL, BFD_RELOC_X86_64_GOTPC32_TLSDESC,
2931 BFD_RELOC_X86_64_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL): New.
2932 * libbfd.h, bfd-in2.h: Rebuilt.
2933 * elf32-i386.c (elf_howto_table): New relocations.
2934 (R_386_tls): Adjust.
2935 (elf_i386_reloc_type_lookup): Map new relocations.
2936 (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
2937 (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
2938 (struct elf_i386_link_hash_entry): Add tlsdesc_got field.
2939 (struct elf_i386_obj_tdata): Add local_tlsdesc_gotent field.
2940 (elf_i386_local_tlsdesc_gotent): New macro.
2941 (struct elf_i386_link_hash_table): Add sgotplt_jump_table_size.
2942 (elf_i386_compute_jump_table_size): New macro.
2943 (link_hash_newfunc): Initialize tlsdesc_got.
2944 (elf_i386_link_hash_table_create): Set sgotplt_jump_table_size.
2945 (elf_i386_tls_transition): Handle R_386_TLS_GOTDESC and
2946 R_386_TLS_DESC_CALL.
2947 (elf_i386_check_relocs): Likewise. Allocate space for
2948 local_tlsdesc_gotent.
2949 (elf_i386_gc_sweep_hook): Handle R_386_TLS_GOTDESC and
2950 R_386_TLS_DESC_CALL.
2951 (allocate_dynrelocs): Count function PLT relocations. Reserve
2952 space for TLS descriptors and relocations.
2953 (elf_i386_size_dynamic_sections): Reserve space for TLS
2954 descriptors and relocations. Set up sgotplt_jump_table_size.
2955 Don't zero reloc_count in srelplt.
2956 (elf_i386_always_size_sections): New. Set up _TLS_MODULE_BASE_.
2957 (elf_i386_relocate_section): Handle R_386_TLS_GOTDESC and
2958 R_386_TLS_DESC_CALL.
2959 (elf_i386_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
2960 (elf_backend_always_size_sections): Define.
2961 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_GOTPC32_TLSDESC,
2962 R_X86_64_TLSDESC, R_X86_64_TLSDESC_CALL.
2963 (R_X86_64_standard): Adjust.
2964 (x86_64_reloc_map): Map new relocs.
2965 (elf64_x86_64_rtype_to_howto): New, split out of...
2966 (elf64_x86_64_info_to_howto): ... this function, and...
2967 (elf64_x86_64_reloc_type_lookup): ... use it to map elf_reloc_val.
2968 (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
2969 (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
2970 (struct elf64_x86_64_link_hash_entry): Add tlsdesc_got field.
2971 (struct elf64_x86_64_obj_tdata): Add local_tlsdesc_gotent field.
2972 (elf64_x86_64_local_tlsdesc_gotent): New macro.
2973 (struct elf64_x86_64_link_hash_table): Add tlsdesc_plt,
2974 tlsdesc_got and sgotplt_jump_table_size fields.
2975 (elf64_x86_64_compute_jump_table_size): New macro.
2976 (link_hash_newfunc): Initialize tlsdesc_got.
2977 (elf64_x86_64_link_hash_table_create): Initialize new fields.
2978 (elf64_x86_64_tls_transition): Handle R_X86_64_GOTPC32_TLSDESC and
2979 R_X86_64_TLSDESC_CALL.
2980 (elf64_x86_64_check_relocs): Likewise. Allocate space for
2981 local_tlsdesc_gotent.
2982 (elf64_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPC32_TLSDESC and
2983 R_X86_64_TLSDESC_CALL.
2984 (allocate_dynrelocs): Count function PLT relocations. Reserve
2985 space for TLS descriptors and relocations.
2986 (elf64_x86_64_size_dynamic_sections): Reserve space for TLS
2987 descriptors and relocations. Set up sgotplt_jump_table_size,
2988 tlsdesc_plt and tlsdesc_got. Make room for them. Don't zero
2989 reloc_count in srelplt. Add dynamic entries for DT_TLSDESC_PLT
2990 and DT_TLSDESC_GOT.
2991 (elf64_x86_64_always_size_sections): New. Set up
2992 _TLS_MODULE_BASE_.
2993 (elf64_x86_64_relocate_section): Handle R_386_TLS_GOTDESC and
2994 R_386_TLS_DESC_CALL.
2995 (elf64_x86_64_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
2996 (elf64_x86_64_finish_dynamic_sections): Set DT_TLSDESC_PLT and
2997 DT_TLSDESC_GOT. Set up TLS descriptor lazy resolver PLT entry.
2998 (elf_backend_always_size_sections): Define.
2999
6dd55cb7
L
30002006-01-17 H.J. Lu <hongjiu.lu@intel.com>
3001
3002 PR binutils/2096
3003 * dwarf2.c (comp_unit_contains_address): Update comment.
3004 (_bfd_dwarf2_find_nearest_line): Use section's vma, instead of
3005 lma. Return TRUE only if both comp_unit_contains_address and
3006 comp_unit_find_nearest_line return TRUE.
3007 (_bfd_dwarf2_find_line): Use section's vma, instead of lma.
3008
64d03ab5
AM
30092006-01-18 Alan Modra <amodra@bigpond.net.au>
3010
3011 * elf-bfd.h (struct elf_backend_data): Add gc_mark_dynamic_ref.
3012 (bfd_elf_gc_mark_dynamic_ref_symbol): Declare.
3013 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Rename from
3014 elf_gc_mark_dynamic_ref_symbol. Make global.
3015 (bfd_elf_gc_sections): Call bed->gc_mark_dynamic_ref.
3016 * elfxx-target.h (elf_backend_gc_mark_dynamic_ref): Define.
3017 (elfNN_bed): Init new field.
3018 * elf64-ppc.c (elf_backend_gc_mark_dynamic_ref): Define.
3019 (ppc64_elf_gc_mark_dynamic_ref): New function.
3020
b56cbdb9
AM
30212006-01-17 Alan Modra <amodra@bigpond.net.au>
3022
3023 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Don't hang forever in loop.
3024
6c10990d
NC
30252006-01-17 Nick Clifton <nickc@redhat.com>
3026
3027 PR binutils/2159
3028 * elf.c (elfcore_write_pstatus): Add ATTRIBUTE_UNUSED to unused
3029 parameters.
3030
d7f735da
NC
30312006-01-11 Nick Clifton <nickc@redhat.com>
3032
3033 * elf32-arm.c (elf32_arm_output_symbol_hook): Install new entry
3034 into the newly (re)allocated map array.
3035
2bfd55ca
NC
30362006-01-09 Alexis Wilke <alexis_wilke@yahoo.com>
3037
3038 * peXXigen.c (tbl): Add comma after "HIGH3ADJ".
3039
bce50a28
JJ
30402006-01-01 Jakub Jelinek <jakub@redhat.com>
3041
3042 * elf64-ppc.c (ppc64_elf_action_discarded): Return 0
3043 for .toc1 section.
3044
e88d958a 3045For older changes see ChangeLog-2005
56882138
AM
3046\f
3047Local Variables:
3048mode: change-log
3049left-margin: 8
3050fill-column: 74
3051version-control: never
3052End: