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