* elf64-hppa.c (elf64_hppa_grok_prstatus): New function.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
235ecfbc
NC
12006-04-07 Randolph Chung <tausq@debian.org>
2
3 * elf64-hppa.c (elf64_hppa_grok_prstatus): New function.
4 (elf64_hppa_grok_psinfo): Likewise.
5 (elf_backend_grok_pstatus, elf_backend_grok_psinfo): Define.
6
35520cb7
DD
72006-04-06 DJ Delorie <dj@redhat.com>
8
9 * elf32-m32c.c (m32c_elf_relocate_section): Generate a symbol for
10 each plt entry we create.
11
108a6f8e
CD
122006-04-06 Carlos O'Donell <carlos@codesourcery.com>
13
14 * po/Make-in: Add install-html target.
15 * Makefile.am: Rename docdir to bfddocdir. Add datarootdir, docdir
16 htmldir. Add install-html and install-html-recursive targets.
17 * Makefile.in: Regenerate.
18 * configure.in: AC_SUBST for datarootdir, docdir and htmldir.
19 * configure: Regenerate.
20
fbbc3759
L
212006-04-06 H.J. Lu <hongjiu.lu@intel.com>
22
23 * elfxx-ia64.c (elfNN_ia64_relax_section): Skip unneeded passes
24 with the skip_relax_pass_0 and skip_relax_pass_1 bits in the
25 section structure.
26
17e226a8
BS
272006-04-05 Bernd Schmidt <bernd.schmidt@analog.com>
28
29 * elf32-bfin.c (bfinfdpic_relocs_info_hash): Sprinkle casts to
30 eliminate warnings.
31
396a682d
L
322006-04-05 H.J. Lu <hongjiu.lu@intel.com>
33 James E Wilson <wilson@specifixinc.com>
34
35 PR ld/2442
36 * elfxx-ia64.c (elfNN_ia64_dyn_sym_info): Remove next.
37 (elfNN_ia64_local_hash_entry): Add count, sorted_count and
38 size.
39 (elfNN_ia64_link_hash_entry): Likewise.
40 (elfNN_ia64_new_elf_hash_entry): Initialize count, sorted_count
41 and size.
42 (elfNN_ia64_hash_copy_indirect): Updated elfNN_ia64_dyn_sym_info
43 processing.
44 (elfNN_ia64_hash_hide_symbol): Likewise.
45 (elfNN_ia64_global_dyn_sym_thunk): Likewise.
46 (elfNN_ia64_local_dyn_sym_thunk): Likewise.
47 (elfNN_ia64_global_dyn_info_free): New function.
48 (elfNN_ia64_local_dyn_info_free): Likewise.
49 (elfNN_ia64_hash_table_free): Free local and global
50 elfNN_ia64_dyn_sym_info.
51 (addend_compare): New function.
52 (sort_dyn_sym_info): Likewise.
53 (get_dyn_sym_info): Updated to use binary search for addend.
54 (elfNN_ia64_check_relocs): Scan relocations to create dynamic
55 relocation arrays first.
56
0781db9f
BS
572006-04-05 Bernd Schmidt <bernd.schmidt@analog.com>
58
59 * elf32-bfin.c (_bfin_create_got_section): Don't generate a _gp
60 symbol.
61
c0d5a53d
L
622006-04-05 H.J. Lu <hongjiu.lu@intel.com>
63
64 PR ld/2411
65 * elflink.c (check_dynsym): New.
66 (elf_link_output_extsym): Use it.
67 (bfd_elf_final_link): Likewise.
68
580a2b6e
L
692006-04-05 H.J. Lu <hongjiu.lu@intel.com>
70
71 PR ld/2404
72 * elflink.c (_bfd_elf_merge_symbol): Skip the default indirect
73 symbol from the dynamic definition with the default version if
74 its type and the type of existing regular definition mismatch.
75
910600e9
RS
762006-04-05 Richard Sandiford <richard@codesourcery.com>
77 Daniel Jacobowitz <dan@codesourcery.com>
78
79 * config.bfd (sparc-*-vxworks*): New stanza.
80 * configure.in (bfd_elf32_sparc_vxworks_vec): New stanza.
81 (bfd_elf32_sparc_vec, bfd_elf64_sparc_vec): Add elf-vxworks.lo.
82 * configure: Regenerate.
83 * elf32-sparc.c: Include elf-vxworks.h.
84 (elf32_sparc_vxworks_link_hash_table_create: New.
85 (elf32_sparc_vxworks_final_write_processing): New.
86 (TARGET_BIG_SYM): Override for VxWorks.
87 (TARGET_BIG_NAME, ELF_MINPAGESIZE): Likewise.
88 (bfd_elf32_bfd_link_hash_table_create): Likewise.
89 (elf_backend_want_got_plt, elf_backend_plt_readonly): Likewise.
90 (elf_backend_got_header_size, elf_backend_add_symbol_hook): Likewise.
91 (elf_backend_link_output_symbol_hook): Likewise.
92 (elf_backend_emit_relocs): Likewise.
93 (elf_backend_final_write_processing, elf32_bed): Likewise.
94 * elfxx-sparc.c: Include libiberty.h and elf-vxworks.h.
95 (sparc_vxworks_exec_plt0_entry, sparc_vxworks_exec_plt_entry): New.
96 (sparc_vxworks_shared_plt0_entry, sparc_vxworks_shared_plt_entry): New.
97 (_bfd_sparc_elf_link_hash_table_create): Don't initialize
98 build_plt_entry here.
99 (create_got_section): Initialize sgotplt for VxWorks.
100 (_bfd_sparc_elf_create_dynamic_sections): Initialize build_plt_entry,
101 plt_header_size and plt_entry_size, with new VxWorks-specific settings.
102 Call elf_vxworks_create_dynamic_sections for VxWorks.
103 (allocate_dynrelocs): Use plt_header_size and plt_entry_size.
104 Allocate room for .got.plt and .rela.plt.unloaded entries on VxWorks.
105 (_bfd_sparc_elf_size_dynamic_sections): Don't allocate a nop in .plt
106 for VxWorks. Check for the .got.plt section.
107 (sparc_vxworks_build_plt_entry): New function.
108 (_bfd_sparc_elf_finish_dynamic_symbol): Add handling of VxWorks PLTs.
109 Don't make _GLOBAL_OFFSET_TABLE_ and _PROCEDURE_LINKAGE_TABLE_
110 absolute on VxWorks.
111 (sparc32_finish_dyn): Add special handling for DT_RELASZ
112 and DT_PLTGOT on VxWorks.
113 (sparc_vxworks_finish_exec_plt): New.
114 (sparc_vxworks_finish_shared_plt): New.
115 (_bfd_sparc_elf_finish_dynamic_sections): Call them.
116 Use plt_header_size and plt_entry_size.
117 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add is_vxworks,
118 srelplt2, sgotplt, plt_header_size and plt_entry_size fields.
119 * Makefile.am (elfxx-sparc.lo): Depend on elf-vxworks.h.
120 (elf32-sparc.lo): Likewise.
121 * Makefile.in: Regenerate.
122 * targets.c (bfd_elf32_sparc_vxworks_vec): Declare.
123 (_bfd_target_vector): Add a pointer to it.
124
b761a207
BE
1252006-03-30 Ben Elliston <bje@au.ibm.com>
126
127 PR ld/2267
128 * elflink.c (elf_fixup_link_order): Ensure `elfsec' is not a
129 special section number that exceeds the number of ELF sections
130 (eg. SHN_MIPS_SCOMMON).
131
ead49a57
RS
1322006-03-27 Richard Sandiford <richard@codesourcery.com>
133
134 * elfxx-mips.c (mips_got_entry): Add more commentary.
135 (mips_elf_local_got_index): Use the hash table entry to record
136 the GOT index of forced-local symbols.
137 (mips_elf_initialize_tls_index): Rearrange code. Store the index
138 in either the hash table entry or the mips_got_entry, not both.
139 Add more commentary.
140 (mips_elf_multi_got): Make sure the g->next is nonnull when calling
141 mips_elf_initialize_tls_index.
142
3b55e94a
BS
1432006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
144
145 * elf32-bfin.c (bfd_const_reloc, bfd_oper_reloc, bfin_push_reloc,
146 RELOC_STACK_SIZE, reloc_stack, reloc_stack_tos, is_reloc_stack_empty,
147 reloc_stack_push, reloc_stack_pop, reloc_stack_operate,
148 bfin_areloc_howto_table): Delete. All
149 uses deleted as well.
150 (bfin_reloc_map): Delete all stack relocs.
151 (bfin_info_to_howto, bfin_bfd_reloc_type_lookup,
152 bfin_reloc_type_lookup): Don't support them.
153 (bfin_relocate_section): Don't try to handle them.
154
48d502e1
BS
155 * config.bfd (bfin-*-*): Add bfd_elf32_bfinfdpic_vec.
156 * configure.in: Likewise.
157 * configure: Regenerate.
158 * elf32-bfin.c: Include "elf/dwarf2.h" and "hashtab.h".
159 (BFIN_RELOC_MAX): Now 0x21.
160 (bfin_howto_table, bfin_reloc_map): Add FD-PIC relocs.
161 (bfd_elf32_bfinfdpic_vec): Declare.
162 (IS_FDPIC): New macro.
163 (struct bfinfdpic_elf_link_hash_table): New struct.
164 (bfinfdpic_hash_table, bfinfdpic_got_section,
165 bfinfdpic_gotrel_section, bfinfdpic_gotfixup_section,
166 bfinfdpic_plt_setion, bfinfdpic_pltrel_section,
167 bfinfdpic_relocs_info, bfinfdpic_got_initial_offset,
168 bfinfdpic_plt_initial_offset): Accessor macros for it.
169 (BFINFDPIC_SYM_LOCAL, BFINFDPIC_FUNCDESC_LOCAL): New macros.
170 (struct bfinfdpic_relocs_info): New struct.
171 (LZPLT_RESOLVER_EXTRA, LZPLT_NORMAL_SIZE, LZPLT_ENTRIES,
172 BFINFDPIC_LZPLT_BLOCK_SIZE, BFINFDPIC_LZPLT_RESOLV_LOC,
173 DEFAULT_STACK_SIZE): New macros.
174 (bfinfdpic_elf_link_hash_table_create, bfinfdpic_relocs_info_hash,
175 bfinfdpic_relocs_info_eq, bfinfdpics_relocs_info_find,
176 bfinfdpic_relocs_info_for_global, bfinfdpic_relocs_info_for_local,
177 bfinfdpic_pic_merge_early_relocs_info, _bfinfdpic_add_dyn_reloc,
178 _bfinfdpic_add_rofixup, _bfinfdpic_osec_to_segment,
179 _bfinfdpic_osec_readonly_p, bfinfdpic_relocate_section,
180 bfinfdpic_check_relocs, bfinfdpic_gc_sweep_hook,
181 _bfinfdpic_link_omit_section_dynsym, _bfin_create_got_section,
182 elf32_bfinfdpic_create_dynamic_sections, _bfinfdpic_get_fd_entry,
183 _bfinfdpic_compute_got_alloc_data, _bfinfdpic_get_got_entry,
184 _bfinfdpic_assign_got_entries, _bfinfdpic_assign_plt_entries,
185 _bfinfdpic_resolve_final_relocs_info,
186 elf32_bfinfdpic_size_dynamic_sections,
187 elf32_bfinfdpic_always_size_sections,
188 elf32_bfinfdpic_modify_segment_map,
189 _bfinfdpic_count_got_plt_entries,
190 elf32_bfinfdpic_finish_dynamic_sections,
191 elf32_bfinfdpic_adjust_dynamic_symbol,
192 elf32_bfinfdpic_finish_dynamic_symbol,
193 elf32_bfinfdpic_elf_use_relative_eh_frame,
194 elf32_bfinfdpic_elf_encode_eh_address,
195 elf32_bfin_object_p, bfin_elf_copy_private_bfd_data,
196 elf32_bfinfdpic_copy_private_bfd_data,
197 (struct _bfinfdpic_dynamic_got_info,
198 struct _bfinfdpic_dynamic_got_plt_info): New structs.
199 (elf32_bfin_print_private_bfd_data): Print PIC flags.
200 (elf32_bfin_merge_private_bfd_data): Extend to support FD-PIC.
201 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, elf32_bed,
202 elf_backend_got_header_size, bfd_elf32_bfd_link_hash_table_create,
203 elf_backend_always_size_sectinos, elf_backend_modify_segment_map,
204 bfd_elf32_bfd_copy_private_bfd_data,
205 elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
206 elf_backend_size_dynamic_sections, elf_backend_finish_dynamic_symbol,
207 elf_backend_finish_dynamic_sections, elf_backend_relocate_section,
208 elf_backend_can_make_relative_eh_frame, elf_backend_check_relocs,
209 elf_backend_can_make_ldsa_relative_eh_frame, elf_backend_may_use_rel_p,
210 elf_backend_may_use_rela_p, elf_backend_default_use_rela_p,
211 elf_backend_omit_section_dynsym): Redefine these macros and include
212 "elf32-target.h" again to create the elf32-bfinfdpic target.
213 * reloc.c (BFD_RELOC_BFIN_GOT17M4, BFD_RELOC_BFIN_GOTHI,
214 BFD_RELOC_BFIN_GOTLO, BFD_RELOC_BFIN_FUNCDESC,
215 BFD_RELOC_BFIN_FUNCDESC_GOT17M4, BFD_RELOC_BFIN_FUNCDESC_GOTHI,
216 BFD_RELOC_BFIN_FUNCDESC_GOTLO, BFD_RELOC_BFIN_FUNCDESC_VALUE,
217 BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4, BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
218 BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, BFD_RELOC_BFIN_GOTOFFHI,
219 BFD_RELOC_BFIN_GOTOFFLO): New.
220 * targets.c (bfd_elf32_bfinfdpic_vec): New bfd_target.
221 (_bfd_target_vector): Add it.
222 * bfd-in2.h: Regenerate.
223 * libbfd.h: Regenerate.
224
a9d34880
RS
2252006-03-25 Richard Sandiford <richard@codesourcery.com>
226
227 * cpu-m68k.c (bfd_m68k_compatible): Treat ISA A+ and ISA B code as
228 incompatible. Likewise MAC and EMAC code.
229 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Use
230 bfd_get_compatible to set the new bfd architecture. Rely on it
231 to detect incompatibilities.
232
2a23c2c5
BW
2332006-03-22 Bob Wilson <bob.wilson@acm.org>
234
235 * elf32-xtensa.c (xtensa_read_table_entries): Remove assertion that
236 rel->r_addend is zero.
237
6d79d2ed
RS
2382006-03-22 Richard Sandiford <richard@codesourcery.com>
239
240 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Fix type
241 of "loc".
242
0a44bf69
RS
2432006-03-22 Richard Sandiford <richard@codesourcery.com>
244 Daniel Jacobowitz <dan@codesourcery.com>
245 Phil Edwards <phil@codesourcery.com>
246 Zack Weinberg <zack@codesourcery.com>
247 Mark Mitchell <mark@codesourcery.com>
248 Nathan Sidwell <nathan@codesourcery.com>
249
250 * bfd-in2.h: Regenerate.
251 * config.bfd (mips*-*-vxworks*, mips*el-*-vxworks*): New stanzas.
252 * configure.in (bfd_elf32_bigmips_vxworks_vec): New stanza.
253 (bfd_elf32_littlemips_vxworks_vec): Likewise.
254 (bfd_elf32_bigmips_vec): Add elf-vxworks.lo.
255 (bfd_elf32_littlemips_vec): Likewise.
256 (bfd_elf32_nbigmips_vec): Likewise.
257 (bfd_elf32_nlittlemips_vec): Likewise.
258 (bfd_elf32_ntradbigmips_vec): Likewise.
259 (bfd_elf32_ntradlittlemips_vec): Likewise.
260 (bfd_elf32_tradbigmips_vec): Likewise.
261 (bfd_elf32_tradlittlemips_vec): Likewise.
262 (bfd_elf64_bigmips_vec): Likewise.
263 (bfd_elf64_littlemips_vec): Likewise.
264 (bfd_elf64_tradbigmips_vec): Likewise.
265 (bfd_elf64_tradlittlemips_vec): Likewise.
266 * elf32-mips.c: Include elf-vxworks.h.
267 (mips_info_to_howto_rel): Use elf_backend_mips_rtype_to_howto
268 instead of calling mips_elf32_rtype_to_howto directly.
269 (mips_vxworks_copy_howto_rela): New reloc howto.
270 (mips_vxworks_jump_slot_howto_rela): Likewise.
271 (mips_vxworks_bfd_reloc_type_lookup): New function.
272 (mips_vxworks_rtype_to_howto): Likewise.
273 (mips_vxworks_final_write_processing): Likewise.
274 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Override for VxWorks.
275 (TARGET_BIG_SYM, TARGET_BIG_NAME, elf_bed, ELF_MAXPAGESIZE): Likewise.
276 (elf_backend_want_got_plt): Likewise.
277 (elf_backend_want_plt_sym): Likewise.
278 (elf_backend_got_symbol_offset): Likewise.
279 (elf_backend_want_dynbss): Likewise.
280 (elf_backend_may_use_rel_p): Likewise.
281 (elf_backend_may_use_rela_p): Likewise.
282 (elf_backend_default_use_rela_p): Likewise.
283 (elf_backend_got_header_size: Likewise.
284 (elf_backend_plt_readonly): Likewise.
285 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
286 (elf_backend_mips_rtype_to_howto): Likewise.
287 (elf_backend_adjust_dynamic_symbol): Likewise.
288 (elf_backend_finish_dynamic_symbol): Likewise.
289 (bfd_elf32_bfd_link_hash_table_create): Likewise.
290 (elf_backend_add_symbol_hook): Likewise.
291 (elf_backend_link_output_symbol_hook): Likewise.
292 (elf_backend_emit_relocs): Likewise.
293 (elf_backend_final_write_processing: Likewise.
294 (elf_backend_additional_program_headers): Likewise.
295 (elf_backend_modify_segment_map): Likewise.
296 (elf_backend_symbol_processing): Likewise.
297 * elfxx-mips.c: Include elf-vxworks.h.
298 (mips_elf_link_hash_entry): Add is_relocation_target and
299 is_branch_target fields.
300 (mips_elf_link_hash_table): Add is_vxworks, srelbss, sdynbss, srelplt,
301 srelplt2, sgotplt, splt, plt_header_size and plt_entry_size fields.
302 (MIPS_ELF_RELA_SIZE, MIPS_ELF_REL_DYN_NAME): New macros.
303 (MIPS_RESERVED_GOTNO): Take a mips_elf_link_hash_table argument.
304 Return 3 for VxWorks.
305 (ELF_MIPS_GP_OFFSET): Change the argument from a bfd to a
306 mips_elf_link_hash_table. Return 0 for VxWorks.
307 (MIPS_ELF_GOT_MAX_SIZE): Change the argument from a bfd to a
308 mips_elf_link_hash_table. Update the call to ELF_MIPS_GP_OFFSET.
309 (mips_vxworks_exec_plt0_entry): New variable.
310 (mips_vxworks_exec_plt_entry): Likewise.
311 (mips_vxworks_shared_plt0_entry): Likewise.
312 (mips_vxworks_shared_plt_entry): Likewise.
313 (mips_elf_link_hash_newfunc): Initialize the new hash_entry fields.
314 (mips_elf_rel_dyn_section): Change the bfd argument to a
315 mips_elf_link_hash_table. Use MIPS_ELF_REL_DYN_NAME to get
316 the name of the section.
317 (mips_elf_initialize_tls_slots): Update the call to
318 mips_elf_rel_dyn_section.
319 (mips_elf_gotplt_index): New function.
320 (mips_elf_local_got_index): Add an input_section argument.
321 Update the call to mips_elf_create_local_got_entry.
322 (mips_elf_got_page): Likewise.
323 (mips_elf_got16_entry): Likewise.
324 (mips_elf_create_local_got_entry): Add bfd_link_info and input_section
325 arguments. Create dynamic relocations for each entry on VxWorks.
326 (mips_elf_merge_gots): Update the use of MIPS_ELF_GOT_MAX_SIZE.
327 (mips_elf_multi_got): Update the uses of MIPS_ELF_GOT_MAX_SIZE
328 and MIPS_RESERVED_GOTNO.
329 (mips_elf_create_got_section): Update the uses of
330 MIPS_ELF_GOT_MAX_SIZE. Create .got.plt on VxWorks.
331 (is_gott_symbol): New function.
332 (mips_elf_calculate_relocation): Use a dynobj local variable.
333 Update the calls to mips_elf_local_got_index, mips_elf_got16_entry and
334 mips_elf_got_page_entry. Set G to the .got.plt entry when calculating
335 VxWorks R_MIPS_CALL* relocations. Calculate and use G for all GOT
336 relocations on VxWorks. Add dynamic relocations for references
337 to the VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Don't
338 create dynamic relocations for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64
339 in VxWorks executables.
340 (mips_elf_allocate_dynamic_relocations): Add a bfd_link_info argument.
341 Use MIPS_ELF_RELA_SIZE to calculate the size of a VxWorks entry.
342 Don't allocate a null entry on VxWorks.
343 (mips_elf_create_dynamic_relocation): Update the call to
344 mips_elf_rel_dyn_section. Use absolute rather than relative
345 relocations for VxWorks, and make them RELA rather than REL.
346 (_bfd_mips_elf_create_dynamic_sections): Don't make .dynamic
347 read-only on VxWorks. Update the call to mips_elf_rel_dyn_section.
348 Create the .plt, .rela.plt, .dynbss and .rela.bss sections on
349 VxWorks. Likewise create the _PROCEDURE_LINKAGE_TABLE symbol.
350 Call elf_vxworks_create_dynamic_sections for VxWorks and
351 initialize the plt_header_size and plt_entry_size fields.
352 (_bfd_mips_elf_check_relocs): Don't allow GOT relocations to be
353 used in VxWorks executables. Don't allocate dynamic relocations
354 for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 in VxWorks executables.
355 Set is_relocation_target for each symbol referenced by a relocation.
356 Allocate .rela.dyn entries for relocations against the special
357 VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Create GOT
358 entries for all VxWorks R_MIPS_GOT16 relocations. Don't allocate
359 a global GOT entry for symbols mentioned in VxWorks R_MIPS_CALL*,
360 R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 relocations. Update the calls
361 to mips_elf_rel_dyn_section and mips_elf_allocate_dynamic_relocations.
362 Set is_branch_target for symbols mentioned in R_MIPS_PC16 or R_MIPS_26
363 relocations. Don't set no_fn_stub on VxWorks.
364 (_bfd_mips_elf_adjust_dynamic_symbol): Update the call to
365 mips_elf_allocate_dynamic_relocations.
366 (_bfd_mips_vxworks_adjust_dynamic_symbol): New function.
367 (_bfd_mips_elf_always_size_sections): Do not allocate GOT page
368 entries for VxWorks, and do not create multiple GOTs.
369 (_bfd_mips_elf_size_dynamic_sections): Use MIPS_ELF_REL_DYN_NAME.
370 Handle .got specially for VxWorks. Update the uses of
371 MIPS_RESERVED_GOTNO and mips_elf_allocate_dynamic_relocations.
372 Check for sgotplt and splt. Allocate the .rel(a).dyn contents last,
373 once its final size is known. Set DF_TEXTREL for VxWorks. Add
374 DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL, DT_PLTRELSZ and DT_JMPREL
375 tags on VxWorks. Do not add the MIPS-specific tags for VxWorks.
376 (_bfd_mips_vxworks_finish_dynamic_symbol): New function.
377 (mips_vxworks_finish_exec_plt): Likewise.
378 (mips_vxworks_finish_shared_plt): Likewise.
379 (_bfd_mips_elf_finish_dynamic_sections): Remove an unncessary call
380 to mips_elf_rel_dyn_section. Use a VxWorks-specific value of
381 DT_PLTGOT. Handle DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL,
382 DT_PLTRELSZ and DT_JMPREL. Update the uses of MIPS_RESERVED_GOTNO
383 and mips_elf_rel_dyn_section. Use a different GOT header for
384 VxWorks. Don't sort .rela.dyn on VxWorks. Finish the PLT on VxWorks.
385 (_bfd_mips_elf_link_hash_table_create): Initialize the new
386 mips_elf_link_hash_table fields.
387 (_bfd_mips_vxworks_link_hash_table_create): New function.
388 (_bfd_mips_elf_final_link): Set the GP value to _GLOBAL_OFFSET_TABLE_
389 on VxWorks. Update the call to ELF_MIPS_GP_OFFSET.
390 * elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Declare.
391 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
392 (_bfd_mips_vxworks_link_hash_table_create): Likewise.
393 * libbfd.h: Regenerate.
394 * Makefile.am (elfxx-mips.lo): Depend on elf-vxworks.h.
395 (elf32-mips.lo): Likewise.
396 * Makefile.in: Regenerate.
397 * reloc.c (BFD_RELOC_MIPS_COPY, BFD_RELOC_MIPS_JUMP_SLOT): Declare.
398 * targets.c (bfd_elf32_bigmips_vxworks_vec): Declare.
399 (bfd_elf32_littlemips_vxworks_vec): Likewise.
400 (_bfd_target_vector): Add entries for them.
401
a2199086
DA
4022006-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
403
404 * elf64-hppa.c (elf64_hppa_special_sections): Change flags for .tbss
405 section from SHF_PARISC_WEAKORDER to SHF_HP_TLS.
406 (elf_backend_special_sections): Remove #undef.
407
af7cfa33
DA
4082006-03-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
409
410 * elf64-hppa.c (allocate_global_data_opd): Don't create an OPD entry
411 for undefined weak symbols.
412
a4676736
L
4132006-03-17 Daniel Jacobowitz <dan@codesourcery.com>
414
415 PR ld/2462
416 * elflink.c (bfd_elf_final_link): Remove
417 bed->elf_backend_emit_relocs from emit_relocs.
418
e1710606
AO
4192006-03-17 Alexandre Oliva <aoliva@redhat.com>
420
421 * elf32-ppc.c (ppc_elf_relocate_section): Copy addend from
422 first relocation to the second when relaxing TLS GD to LE;
423 zero it out when relaxing to IE.
424
2de92251
AM
4252006-03-17 Alan Modra <amodra@bigpond.net.au>
426
427 PR 2434
428 * elflink.c (elf_link_add_object_symbols): Save and restore
429 warning sym's linked sym.
430
66eb6687
AM
4312006-03-16 Alan Modra <amodra@bigpond.net.au>
432
433 PR 2434
434 * elflink.c (struct elf_smash_syms_data, elf_smash_syms): Delete.
435 (elf_link_add_object_symbols): Delete unnecessary locals. Rename
436 hash_table -> htab. Formatting. Save entire symbol table
437 before loading as-needed syms, and restore afterwards if lib not
438 needed. Use bfd_hash_allocate rather than bfd_alloc for sym
439 name. Free some buffers earlier.
440 * bfd-in.h (struct bfd_hash_table): Add entsize.
441 (bfd_hash_table_init, bfd_hash_table_init_n): Adjust prototype.
442 * elf-bfd.h (_bfd_elf_link_hash_table_init): Likewise
443 * hash.c (bfd_hash_table_init_n): Add entsize param, save to
444 hash table.
445 (bfd_hash_table_init): Add param, adjust calls.
446 * aoutx.h: Adjust all hash_table_init functions and calls.
447 * bfd.c: Likewise.
448 * coff-arm.c: Likewise.
449 * coff-h8300.c: Likewise.
450 * coff-ppc.c: Likewise.
451 * cofflink.c: Likewise.
452 * ecoff.c: Likewise.
453 * ecofflink.c: Likewise.
454 * elf-m10300.c: Likewise.
455 * elf-strtab.c: Likewise.
456 * elf.c: Likewise.
457 * elf32-arm.c: Likewise.
458 * elf32-bfin.c: Likewise.
459 * elf32-cris.c: Likewise.
460 * elf32-frv.c: Likewise.
461 * elf32-hppa.c: Likewise.
462 * elf32-i386.c: Likewise.
463 * elf32-m32r.c: Likewise.
464 * elf32-m68hc1x.c: Likewise.
465 * elf32-m68k.c: Likewise.
466 * elf32-ppc.c: Likewise.
467 * elf32-s390.c: Likewise.
468 * elf32-sh.c: Likewise.
469 * elf32-vax.c: Likewise.
470 * elf64-alpha.c: Likewise.
471 * elf64-hppa.c: Likewise.
472 * elf64-ppc.c: Likewise.
473 * elf64-s390.c: Likewise.
474 * elf64-sh64.c: Likewise.
475 * elf64-x86-64.c: Likewise.
476 * elfxx-ia64.c: Likewise.
477 * elfxx-mips.c: Likewise.
478 * elfxx-sparc.c: Likewise.
479 * i386linux.c: Likewise.
480 * libaout.h: Likewise.
481 * libbfd-in.h: Likewise.
482 * libcoff-in.h: Likewise.
483 * linker.c: Likewise.
484 * m68klinux.c: Likewise.
485 * merge.c: Likewise.
486 * opncls.c: Likewise.
487 * pdp11.c: Likewise.
488 * sparclinux.c: Likewise.
489 * stabs.c: Likewise.
490 * sunos.c: Likewise.
491 * vms.c: Likewise.
492 * xcofflink.c: Likewise.
493 * section.c (struct section_hash_entry): Move to..
494 * libbfd-in.h: ..here.
495 * Makefile.am: Run "make dep-am"
496 * Makefile.in: Regenerate.
497 * bfd-in2.h: Regenerate.
498 * libbfd.h: Regenerate.
499 * libcoff.h: Regenerate.
500
7123df0e
AM
5012006-03-16 Alan Modra <amodra@bigpond.net.au>
502
503 * elf32-ppc.c (ppc_elf_check_relocs): REL24 and REL14 relocs
504 against __GLOBAL_OFFSET_TABLE__ need never be dynamic. Tweak
505 last change to REL32 relocs so that they are counted as
506 possibly dynamic as per REL24 and REL14.
507
fd38b44c
AM
5082006-03-16 Alan Modra <amodra@bigpond.net.au>
509
510 * elf32-ppc.c (ppc_elf_check_relocs): Don't fall into REL24
511 checks from REL32.
512
eb111b1f
BE
5132006-03-15 Ben Elliston <bje@au.ibm.com>
514
515 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Iterate over all
516 in_list elements, not just the first.
517
81d43bff
RS
5182006-03-14 Richard Sandiford <richard@codesourcery.com>
519
520 * elf32-mips.c (mips_elf_adjust_addend): New function, mostly split
521 out from...
522 (_bfd_mips_elf_relocate_section): ...here. Use it to adjust r_addend
523 for final links too.
524
d329bcd1
RS
5252006-03-13 Richard Sandiford <richard@codesourcery.com>
526
527 * elfxx-mips.c (mips_elf_create_got_section): Initialize hgot.
528
75a657ba
L
5292006-03-11 H.J. Lu <hongjiu.lu@intel.com>
530
531 PR ld/2443
532 * dwarf2.c (concat_filename): Don't issue an error if file is
533 0.
534
3a4a14e9
PB
5352006-03-10 Paul Brook <paul@codesourcery.com>
536
537 * elf32-arm.c (INTERWORK_FLAG): Handle EABIv5.
538 (elf32_arm_print_private_bfd_data): Ditto.
539
38406048
PB
5402006-03-09 Paul Brook <paul@codesourcery.com>
541
542 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Recognise additional
543 mapping symbols.
544
eed62c48
NC
5452006-03-09 Khem Raj <khem@mvista.com>
546
547 * elf32-arm.c(elf32_arm_finish_dynamic_sections): Use unsigned
548 char type.
549
6d2cf7d8
L
5502006-03-08 H.J. Lu <hongjiu.lu@intel.com>
551
552 * elfxx-ia64.c (elfNN_ia64_choose_gp): Properly choose gp.
553
00a97672
RS
5542006-03-07 Richard Sandiford <richard@codesourcery.com>
555 Daniel Jacobowitz <dan@codesourcery.com>
556 Zack Weinberg <zack@codesourcery.com>
557 Nathan Sidwell <nathan@codesourcery.com>
558 Paul Brook <paul@codesourcery.com>
559 Ricardo Anguiano <anguiano@codesourcery.com>
560 Phil Edwards <phil@codesourcery.com>
561
562 * configure.in (bfd_elf32_bigarm_vec): Include elf-vxworks.lo.
563 (bfd_elf32_bigarm_symbian_vec): Likewise.
564 (bfd_elf32_bigarm_vxworks_vec): Likewise.
565 (bfd_elf32_littlearm_vec): Likewise.
566 (bfd_elf32_littlearm_symbian_vec): Likewise.
567 (bfd_elf32_littlearm_vxworks_vec): Likewise.
568 * configure: Regenerate.
569 * elf32-arm.c: Include libiberty.h and elf-vxworks.h.
570 (RELOC_SECTION, RELOC_SIZE, SWAP_RELOC_IN, SWAP_RELOC_OUT): New macros.
571 (elf32_arm_vxworks_bed): Add forward declaration.
572 (elf32_arm_howto_table_1): Fix the masks for R_ASM_ABS12.
573 (elf32_arm_vxworks_exec_plt0_entry): New table.
574 (elf32_arm_vxworks_exec_plt_entry): Likewise.
575 (elf32_arm_vxworks_shared_plt_entry): Likewise.
576 (elf32_arm_link_hash_table): Add vxworks_p and srelplt2 fields.
577 (reloc_section_p): New function.
578 (create_got_section): Use RELOC_SECTION.
579 (elf32_arm_create_dynamic_sections): Likewise. Call
580 elf_vxworks_create_dynamic_sections for VxWorks targets.
581 Choose between the two possible values of plt_header_size
582 and plt_entry_size.
583 (elf32_arm_link_hash_table_create): Initialize vxworks_p and srelplt2.
584 (elf32_arm_abs12_reloc): New function.
585 (elf32_arm_final_link_relocate): Call it. Allow the creation of
586 dynamic R_ARM_ABS12 relocs on VxWorks. Use reloc_section_p,
587 RELOC_SIZE, SWAP_RELOC_OUT and RELOC_SECTION. Initialize the
588 r_addend fields of relocs. On rela targets, skip any code that
589 adjusts in-place addends. When using _bfd_link_final_relocate
590 to perform a final relocation, pass rel->r_addend as the addend
591 argument.
592 (elf32_arm_merge_private_bfd_data): If one of the bfds is a VxWorks
593 object, ignore flags that are not standard on VxWorks.
594 (elf32_arm_check_relocs): Allow the creation of dynamic R_ARM_ABS12
595 relocs on VxWorks. Use reloc_section_p.
596 (elf32_arm_adjust_dynamic_symbol): Use RELOC_SECTION and RELOC_SIZE.
597 (allocate_dynrelocs): Use RELOC_SIZE. Account for the size of
598 .rela.plt.unloaded relocs on VxWorks targets.
599 (elf32_arm_size_dynamic_sections): Use RELOC_SIZE. Check for
600 .rela.plt.unloaded as well as .rel(a).plt. Add DT_RELA* tags
601 instead of DT_REL* tags on RELA targets.
602 (elf32_arm_finish_dynamic_symbol): Use RELOC_SECTION, RELOC_SIZE
603 and SWAP_RELOC_OUT. Initialize r_addend fields. Handle VxWorks
604 PLT entries. Do not make _GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
605 (elf32_arm_finish_dynamic_sections): Use RELOC_SECTION, RELOC_SIZE
606 and SWAP_RELOC_OUT. Initialize r_addend fields. Handle DT_RELASZ
607 like DT_RELSZ. Handle the VxWorks form of initial PLT entry.
608 Correct the .rela.plt.unreloaded symbol indexes.
609 (elf32_arm_output_symbol_hook): Call the VxWorks version of this
610 hook on VxWorks targets.
611 (elf32_arm_vxworks_link_hash_table_create): Set vxworks_p to true.
612 Minor formatting tweak.
613 (elf32_arm_vxworks_final_write_processing): New function.
614 (elf_backend_add_symbol_hook): Override for VxWorks and reset
615 for Symbian.
616 (elf_backend_final_write_processing): Likewise.
617 (elf_backend_emit_relocs): Likewise.
618 (elf_backend_want_plt_sym): Likewise.
619 (ELF_MAXPAGESIZE): Likewise.
620 (elf_backend_may_use_rel_p): Minor formatting tweak.
621 (elf_backend_may_use_rela_p): Likewise.
622 (elf_backend_default_use_rela_p): Likewise.
623 (elf_backend_rela_normal): Likewise.
624 * Makefile.in (elf32-arm.lo): Depend on elf-vxworks.h.
625
0b2e31dc
NS
6262006-03-06 Nathan Sidwell <nathan@codesourcery.com>
627
628 * archures.c (bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_b_nousp):
629 New. Adjust other variants.
630 (bfd_default_scan): Update.
631 * bfd-in2.h: Rebuilt.
632 * cpu-m68k.c: Adjust.
633 (bfd_m68k_compatible): New. Use it for architectures.
634 * elf32-m68k.c (elf32_m68k_object_p): Adjust.
635 (elf32_m68k_merge_private_bfd_data): Adjust. Correct isa-a/b
636 mismatch.
637 (elf32_m68k_print_private_bfd_data): Adjust.
638 * ieee.c (ieee_write_processor): Adjust.
639
d8d1c398
AM
6402006-03-06 Alan Modra <amodra@bigpond.net.au>
641
642 * dwarf2.c: Formatting.
643 (add_line_info): Remove outer loop.
644
d4c32a81
L
6452006-03-05 H.J. Lu <hongjiu.lu@intel.com>
646 Alan Modra <amodra@bigpond.net.au>
647
648 PR binutils/2338
649 * dwarf2.c (loadable_section): New struct.
650 (dwarf2_debug): Add loadable_section_count and
651 loadable_sections.
652 (new_line_sorts_after): New.
653 (add_line_info): Use new_line_sorts_after to compare line
654 addresses.
655 (check_function_name): Removed.
656 (unset_sections): New.
657 (place_sections): New.
658 (_bfd_dwarf2_find_nearest_line): Updated. Call place_sections
659 and unset_sections on relocatable files.
660 (_bfd_dwarf2_find_line): Likewise.
661
4cdc7696
NC
6622006-03-03 Nick Clifton <nickc@redhat.com>
663
664 * cpu-avr.c: Update to ISO-C90 formatting.
665 * elf32-avr.c: Likewise.
666
df406460
NC
6672006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
668
669 * elf32-avr.c (avr_reloc_map): Insert BFD_RELOC_AVR_MS8_LDI
670 and R_AVR_MS8_LDI
671 (bfd_elf_avr_final_write_processing): Set
672 EF_AVR_LINKRELAX_PREPARED in e_flags field.
673 (elf32_avr_relax_section): New function.
674 (elf32_avr_relax_delete_bytes): New function.
675 (elf32_avr_get_relocated_section_contents): New function.
676 (avr_pc_wrap_around): New function.
677 (avr_relative_distance_considering_wrap_around): New function.
678 (avr_final_link_relocate): Handle negative int8t_t immediate for R_AVR_LDI.
679 * reloc.c: Add BFD_RELOC_AVR_MS8_LDI and BFD_RELOC_AVR_LDI_NEG
680 * libbfd.h: Regenerate.
681 * bfd-in2.h: Regenerate.
682
a1013894
DD
6832006-03-02 DJ Delorie <dj@redhat.com>
684
685 * elf32-m32c.c (m32c_offset_for_reloc): Fix local symbol
686 calculations.
687
7c492719
RS
6882006-03-02 Richard Sandiford <richard@codesourcery.com>
689
690 * elf32-ppc.c (is_ppc_elf_target): Return true if the target is
691 bfd_elf32_powerpc_vxworks_vec.
692
e970df31
NC
6932006-03-02 Nick Clifton <nickc@redhat.com>
694
695 * elf32-m32c.c (m32c_elf_relax_section): Initialise 'gap'.
696
711de32c
RS
6972006-03-02 Richard Sandiford <richard@codesourcery.com>
698
699 * elf32-i386.c (elf_i386_create_dynamic_sections): Use
700 elf_vxworks_create_dynamic_sections.
701 (elf_i386_size_dynamic_sections): Remove VxWorks GOT and PLT
702 symbol handling.
703 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Use
704 elf_vxworks_create_dynamic_sections.
705 (ppc_elf_size_dynamic_sections): Remove VxWorks GOT and PLT
706 symbol handling.
707 * elf-vxworks.c (elf_vxworks_create_dynamic_sections): New function.
708 * elf-vxworks.h (elf_vxworks_create_dynamic_sections): Declare.
709
9c72ff84
RS
7102006-03-02 Richard Sandiford <richard@codesourcery.com>
711
712 * elf32-i386.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
713 (elf_backend_link_output_symbol_hook): Use
714 elf_vxworks_link_output_symbol_hook instead.
715 * elf32-ppc.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
716 (elf_backend_link_output_symbol_hook): Use
717 elf_vxworks_link_output_symbol_hook instead.
718 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Provide the
719 same interface as elf_backend_link_output_symbol_hook.
720 * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Update
721 prototype accordingly.
722
4a3dc543
RS
7232006-03-02 Richard Sandiford <richard@codesourcery.com>
724
725 * elf32-ppc.c (ppc_elf_plt_type): New enumeration.
726 (ppc_elf_link_hash_table): Replace old_got and new_got with
727 plt_type and can_use_new_plt.
728 (ppc_elf_create_dynamic_sections): Add SEC_HAS_CONTENTS,
729 SEC_LOAD and SEC_READONLY to the VxWorks .plt flags.
730 (ppc_elf_check_relocs): Set can_use_new_plt instead of new_plt.
731 Move from plt_type == PLT_UNSET to PLT_OLD instead of setting old_plt.
732 (ppc_elf_select_plt_layout): Move from plt_type == PLT_UNSET to
733 either plt_type == PLT_OLD or plt_type == PLT_NEW. Assert that
734 this function should not be called for VxWorks targets.
735 (ppc_elf_tls_setup): Use plt_type instead of old_got.
736 (allocate_got): Likewise. Rearrange so that max_before_header
737 is only used for PLT_OLD and PLT_NEW.
738 (allocate_dynrelocs): Use plt_type instead of old_got and is_vxworks.
739 (ppc_elf_size_dynamic_sections): Likewise.
740 (ppc_elf_relax_section): Likewise.
741 (ppc_elf_relocate_section): Likewise.
742 (ppc_elf_finish_dynamic_symbol): Likewise.
743 (ppc_elf_vxworks_link_hash_table_create): Initialize plt_type.
744
5ae0bfb6
RS
7452006-02-28 Richard Sandiford <richard@codesourcery.com>
746
747 * elf32-i386.c (elf_i386_link_hash_table): Add next_tls_desc_index.
748 (elf_i386_link_hash_table_create): Initialize it.
749 (elf_i386_compute_jump_table_size): Use it instead of
750 srelplt->reloc_count.
751 (allocate_dynrelocs): Likewise.
752 (elf_i386_size_dynamic_sections): Likewise.
753 (elf_i386_relocate_section): Likewise.
754
63752a75
JJ
7552006-02-27 Jakub Jelinek <jakub@redhat.com>
756
757 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle S flag.
758 (_bfd_elf_write_section_eh_frame): Likewise.
759
f7d9e5c3
CD
7602006-02-27 Carlos O'Donell <carlos@codesourcery.com>
761
762 * po/Make-in: Add html target.
763
22edb2f1
RS
7642006-02-27 Richard Sandiford <richard@codesourcery.com>
765
766 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Use the
767 cached hgot entry to check for _GLOBAL_OFFSET_TABLE_.
768 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
769 * elf32-bfin.c (bfin_finish_dynamic_symbol): Likewise.
770 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
771 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
772 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
773 * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
774 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Likewise.
775 * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
776 * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
777 * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
778 * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
779 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likewise.
780 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
781 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise. Also use
782 the cached hplt entry to check for _PROCEDURE_LINKAGE_TABLE_.
783 * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
784 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
785 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
786 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
787
7325306f
RS
7882006-02-25 Richard Sandiford <richard@codesourcery.com>
789
790 * elf-bfd.h (elf_link_hash_table): Add hplt field.
791 * elflink.c (_bfd_elf_create_dynamic_sections): Initialize it.
792 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
793 * elf32-frv.c (_frv_create_got_section): Likewise.
794 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
795 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
796 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
797 * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
798 * elf32-i386.c (elf_i386_link_hash_table): Remove hgot and hplt.
799 (elf_i386_link_hash_table_create): Don't initialize them.
800 (elf_i386_size_dynamic_sections): Use the generic ELF hplt and
801 hgot fields.
802 (elf_i386_finish_dynamic_symbol): Likewise.
803 * elf32-ppc.c (ppc_elf_link_hash_table): Remove hplt.
804 (ppc_elf_size_dynamic_sections): Use the generic ELF hplt fields.
805 (ppc_elf_finish_dynamic_symbol): Likewise.
806
6772dd07
DD
8072006-02-24 DJ Delorie <dj@redhat.com>
808
809 * elf32-m32c.c (m32c_elf_howto_table): Add relaxation relocs.
810 (m32c_elf_relocate_section): Don't relocate them.
811 (compare_reloc): New.
812 (relax_reloc): Remove.
813 (m32c_offset_for_reloc): New.
814 (m16c_addr_encodings): New.
815 (m16c_jmpaddr_encodings): New.
816 (m32c_addr_encodings): New.
817 (m32c_elf_relax_section): Relax jumps and address displacements.
818 (m32c_elf_relax_delete_bytes): Adjust for internal syms. Fix up
819 short jumps.
820
821 * reloc.c: Add m32c relax relocs.
822 * libbfd.h: Regenerate.
823 * bfd-in2.h: Regenerate.
824
508c3946
L
8252006-02-24 H.J. Lu <hongjiu.lu@intel.com>
826
827 PR ld/2218
828 * elf-bfd.h (elf_backend_data): Add elf_backend_fixup_symbol.
829 (_bfd_elf_link_hash_fixup_symbol): New.
830
831 * elflink.c (_bfd_elf_link_hash_fixup_symbol): New.
832 (_bfd_elf_fix_symbol_flags): Call elf_backend_fixup_symbol if
833 it isn't NULL.
834
835 * elfxx-ia64.c (elf_backend_fixup_symbol): Defined.
836
837 * elfxx-target.h (elf_backend_fixup_symbol): New.
838 (elfNN_bed): Initialize elf_backend_fixup_symbol.
839
59cf82fe
L
8402006-02-23 H.J. Lu <hongjiu.lu@intel.com>
841
842 * cpu-ia64-opc.c (ins_immu5b): New.
843 (ext_immu5b): Likewise.
844 (elf64_ia64_operands): Add IMMU5b.
845
22d606e9
AM
8462006-02-21 Alan Modra <amodra@bigpond.net.au>
847
848 PR ld/2218
849 * elf32-arm.c (allocate_dynrelocs): Ensure undef weak sym in pie
850 is dynamic.
851 * elf32-hppa.c (allocate_dynrelocs): Likewise.
852 * elf32-i386.c (allocate_dynrelocs): Likewise.
853 * elf32-s390.c (allocate_dynrelocs): Likewise.
854 * elf32-sh.c (allocate_dynrelocs): Likewise.
855 * elf64-s390.c (allocate_dynrelocs): Likewise.
856 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
857 * elf32-m32r.c (allocate_dynrelocs): Likewise. Discard relocs
858 on undef weak with non-default visibility too.
859 * elfxx-sparc.c (allocate_dynrelocs): Ditto.
860
3168356f
AM
8612006-02-21 Alan Modra <amodra@bigpond.net.au>
862
863 * bfd.c: (_bfd_default_error_handler): Don't call abort on
864 error, instead call _exit.
865 (_bfd_abort): Call _exit not xexit.
866
888b45b8
KB
8672006-02-17 Kevin Buettner <kevinb@redhat.com>
868
869 * elf32-frv.c (elf32_frv_grok_prstatus, elf32_frv_grok_psinfo):
870 New functions.
871 * elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
872
d70c5fc7
NC
8732006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
874 Anil Paranjape <anilp1@kpitcummins.com>
875 Shilin Shakti <shilins@kpitcummins.com>
876
877 * Makefile.am: Add xc16x related entry
878 * Makefile.in: Regenerate
879 * archures.c: Add bfd_xc16x_arch
880 * bfd-in2.h: Regenerate
881 * config.bfd: Add xc16x-*-elf
882 * configure.in: Add bfd_elf32_xc16x_vec
883 * configure: Regenerate.
884 * targets.c: Added xc16x related information
885 * cpu-xc16x.c: New file
886 * reloc.c: Add new relocations specific to xc16x:
887 BFD_RELOC_XC16X_PAG, BFD_RELOC_XC16X_POF, BFD_RELOC_XC16X_SEG,
888 BFD_RELOC_XC16X_SOF
889 * elf32-xc16x.c: New file.
890
cab87ef9
AM
8912006-02-17 Alan Modra <amodra@bigpond.net.au>
892
893 * elf32-ppc.c (allocate_dynrelocs): Tweak undef weak handling.
894 * elf64-ppc.c (allocate_dynrelocs): Likewise.
895
dfbb6ac9
AM
8962006-02-17 Alan Modra <amodra@bigpond.net.au>
897
898 PR ld/2218
899 * elf64-ppc.c (allocate_dynrelocs): Ensure undef weak sym is
900 dynamic.
901 (ppc64_elf_relocate_section): Check output reloc section size.
902 * elf32-ppc.c (allocate_dynrelocs): Simplify undef weak test.
903
cedc298e
L
9042006-02-16 H.J. Lu <hongjiu.lu@intel.com>
905
906 PR ld/2322
907 * elf.c (get_segment_type): New function.
908 (_bfd_elf_print_private_bfd_data): Use it.
909 (print_segment_map): New function.
910 (assign_file_positions_for_segments): Call print_segment_map
911 when there are not enough room for program headers.
912
aaa2ab3d
NH
9132006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
914
915 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Use
916 traditional MIPS ELF targets.
917
35ccda9e
L
9182006-02-15 H.J. Lu <hongjiu.lu@intel.com>
919
920 PR binutils/2338
921 * dwarf2.c (check_function_name): New function.
922 (_bfd_dwarf2_find_nearest_line): Use check_function_name to
923 check if function is correct.
924
e0ae6d6f
AM
9252006-02-16 Alan Modra <amodra@bigpond.net.au>
926
927 * elflink.c (_bfd_elf_default_action_discarded): Return 0 for
928 debug sections.
929 (elf_link_input_bfd): Adjust comments.
930
d55ce4e2
L
9312006-02-10 H.J. Lu <hongjiu.lu@intel.com>
932
933 * elf.c (copy_private_bfd_data): Minor update.
934
84d1d650
L
9352006-02-10 H.J. Lu <hongjiu.lu@intel.com>
936
937 PR binutils/2258
938 * elf.c (copy_private_bfd_data): Renamed to ...
939 (rewrite_elf_program_header): This.
940 (copy_elf_program_header): New function.
941 (copy_private_bfd_data): Likewise.
942
9432006-02-07 Nathan Sidwell <nathan@codesourcery.com>
266abb8f
NS
944
945 * archures.c (bfd_mach_mcf5200, bfd_mach_mcf5206e,
946 bfd_mach_mcf5307, bfd_mach_mcf5407, bfd_mach_mcf528x,
947 bfd_mach_mcfv4e, bfd_mach_mcf521x, bfd_mach_mcf5249,
948 bfd_mach_mcf547x, bfd_mach_mcf548x): Remove.
949 (bfd_mach_mcf_isa_a, bfd_mach_mcf_isa_a_div,
950 bfd_mach_mcf_isa_a_div_mac, bfd_mach_mcf_isa_a_div_emac,
951 bfd_mach_mcf_isa_aplus, bfd_mach_mcf_isa_aplus_mac,
952 bfd_mach_mcf_isa_aplus_emac, bfd_mach_mcf_isa_aplus_usp,
953 bfd_mach_mcf_isa_aplus_usp_mac, bfd_mach_mcf_isa_aplus_usp_emac,
954 bfd_mach_mcf_isa_b, bfd_mach_mcf_isa_b_mac, bfd_mach_mcf_isa_b_emac,
955 bfd_mach_mcf_isa_b_usp_float, bfd_mach_mcf_isa_b_usp_float_mac,
956 bfd_mach_mcf_isa_b_usp_float_emac): New.
957 (bfd_default_scan): Update coldfire mapping.
958 * bfd-in.h (bfd_m68k_mach_to_features,
959 bfd_m68k_features_to_mach): Declare.
960 * bfd-in2.h: Rebuilt.
961 * cpu-m68k.c (arch_info_struct): Add new coldfire machines,
962 adjust legacy names.
963 (m68k_arch_features): New.
964 (bfd_m68k_mach_to_features,
965 bfd_m68k_features_to_mach): Define.
966 * elf32-m68k.c (elf32_m68k_object_p): New.
967 (elf32_m68k_merge_private_bfd_data): Merge the CF EF flags.
968 (elf32_m68k_print_private_bfd_data): Print the CF EF flags.
969 (elf_backend_object_p): Define.
970 * ieee.c (ieee_write_processor): Update coldfire machines.
971 * libbfd.h: Rebuilt.
972
75eb734c
SE
9732006-02-06 Steve Ellcey <sje@cup.hp.com>
974
975 * elfxx-ia64.c (elfNN_ia64_fake_sections): Set SHF_IA_64_HP_TLS
976 if SHF_TLS is set.
977
134dcee5
AM
9782006-02-05 Arnold Metselaar <arnold.metselaar@planet.nl>
979
980 * coff-z80.c (r_imm24): New howto.
981 (rtype2howto): New case R_IMM24.
982 (coff_z80_reloc_type_lookup): New case BFD_RELOC_24.
983 (extra_case): Use bfd_get_8 for R_IMM8, new case R_IMM24.
984
4005427f
RS
9852006-02-04 Richard Sandiford <richard@codesourcery.com>
986
987 * elfxx-mips.c (mips_elf_initialize_tls_index): If a TLS symbol
988 has already been assigned a GOT index, copy that index to the
989 current hash table entry.
990
bb29dfea
EB
9912006-02-01 Eric Botcazou <ebotcazou@libertysurf.fr>
992
993 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
994 for call-to-undefweak reloc overflow.
995
dc669dc8
EB
9962006-01-31 Eric Botcazou <ebotcazou@libertysurf.fr>
997
998 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
999 for 32-bit relocs overflow.
1000
1a0eb693
PB
10012006-01-27 Paul Brook <paul@codesourcery.com>
1002
1003 * elf32-arm.c (elf32_arm_get_symbol_type): Allow STT_TLS thumb
1004 objects.
1005
67a4f2b7
AO
10062006-01-18 Alexandre Oliva <aoliva@redhat.com>
1007
1008 Introduce TLS descriptors for i386 and x86_64.
1009 * reloc.c (BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_386_TLS_DESC,
1010 BFD_RELOC_386_TLS_DESC_CALL, BFD_RELOC_X86_64_GOTPC32_TLSDESC,
1011 BFD_RELOC_X86_64_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL): New.
1012 * libbfd.h, bfd-in2.h: Rebuilt.
1013 * elf32-i386.c (elf_howto_table): New relocations.
1014 (R_386_tls): Adjust.
1015 (elf_i386_reloc_type_lookup): Map new relocations.
1016 (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
1017 (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
1018 (struct elf_i386_link_hash_entry): Add tlsdesc_got field.
1019 (struct elf_i386_obj_tdata): Add local_tlsdesc_gotent field.
1020 (elf_i386_local_tlsdesc_gotent): New macro.
1021 (struct elf_i386_link_hash_table): Add sgotplt_jump_table_size.
1022 (elf_i386_compute_jump_table_size): New macro.
1023 (link_hash_newfunc): Initialize tlsdesc_got.
1024 (elf_i386_link_hash_table_create): Set sgotplt_jump_table_size.
1025 (elf_i386_tls_transition): Handle R_386_TLS_GOTDESC and
1026 R_386_TLS_DESC_CALL.
1027 (elf_i386_check_relocs): Likewise. Allocate space for
1028 local_tlsdesc_gotent.
1029 (elf_i386_gc_sweep_hook): Handle R_386_TLS_GOTDESC and
1030 R_386_TLS_DESC_CALL.
1031 (allocate_dynrelocs): Count function PLT relocations. Reserve
1032 space for TLS descriptors and relocations.
1033 (elf_i386_size_dynamic_sections): Reserve space for TLS
1034 descriptors and relocations. Set up sgotplt_jump_table_size.
1035 Don't zero reloc_count in srelplt.
1036 (elf_i386_always_size_sections): New. Set up _TLS_MODULE_BASE_.
1037 (elf_i386_relocate_section): Handle R_386_TLS_GOTDESC and
1038 R_386_TLS_DESC_CALL.
1039 (elf_i386_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
1040 (elf_backend_always_size_sections): Define.
1041 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_GOTPC32_TLSDESC,
1042 R_X86_64_TLSDESC, R_X86_64_TLSDESC_CALL.
1043 (R_X86_64_standard): Adjust.
1044 (x86_64_reloc_map): Map new relocs.
1045 (elf64_x86_64_rtype_to_howto): New, split out of...
1046 (elf64_x86_64_info_to_howto): ... this function, and...
1047 (elf64_x86_64_reloc_type_lookup): ... use it to map elf_reloc_val.
1048 (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
1049 (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
1050 (struct elf64_x86_64_link_hash_entry): Add tlsdesc_got field.
1051 (struct elf64_x86_64_obj_tdata): Add local_tlsdesc_gotent field.
1052 (elf64_x86_64_local_tlsdesc_gotent): New macro.
1053 (struct elf64_x86_64_link_hash_table): Add tlsdesc_plt,
1054 tlsdesc_got and sgotplt_jump_table_size fields.
1055 (elf64_x86_64_compute_jump_table_size): New macro.
1056 (link_hash_newfunc): Initialize tlsdesc_got.
1057 (elf64_x86_64_link_hash_table_create): Initialize new fields.
1058 (elf64_x86_64_tls_transition): Handle R_X86_64_GOTPC32_TLSDESC and
1059 R_X86_64_TLSDESC_CALL.
1060 (elf64_x86_64_check_relocs): Likewise. Allocate space for
1061 local_tlsdesc_gotent.
1062 (elf64_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPC32_TLSDESC and
1063 R_X86_64_TLSDESC_CALL.
1064 (allocate_dynrelocs): Count function PLT relocations. Reserve
1065 space for TLS descriptors and relocations.
1066 (elf64_x86_64_size_dynamic_sections): Reserve space for TLS
1067 descriptors and relocations. Set up sgotplt_jump_table_size,
1068 tlsdesc_plt and tlsdesc_got. Make room for them. Don't zero
1069 reloc_count in srelplt. Add dynamic entries for DT_TLSDESC_PLT
1070 and DT_TLSDESC_GOT.
1071 (elf64_x86_64_always_size_sections): New. Set up
1072 _TLS_MODULE_BASE_.
1073 (elf64_x86_64_relocate_section): Handle R_386_TLS_GOTDESC and
1074 R_386_TLS_DESC_CALL.
1075 (elf64_x86_64_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
1076 (elf64_x86_64_finish_dynamic_sections): Set DT_TLSDESC_PLT and
1077 DT_TLSDESC_GOT. Set up TLS descriptor lazy resolver PLT entry.
1078 (elf_backend_always_size_sections): Define.
1079
6dd55cb7
L
10802006-01-17 H.J. Lu <hongjiu.lu@intel.com>
1081
1082 PR binutils/2096
1083 * dwarf2.c (comp_unit_contains_address): Update comment.
1084 (_bfd_dwarf2_find_nearest_line): Use section's vma, instead of
1085 lma. Return TRUE only if both comp_unit_contains_address and
1086 comp_unit_find_nearest_line return TRUE.
1087 (_bfd_dwarf2_find_line): Use section's vma, instead of lma.
1088
64d03ab5
AM
10892006-01-18 Alan Modra <amodra@bigpond.net.au>
1090
1091 * elf-bfd.h (struct elf_backend_data): Add gc_mark_dynamic_ref.
1092 (bfd_elf_gc_mark_dynamic_ref_symbol): Declare.
1093 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Rename from
1094 elf_gc_mark_dynamic_ref_symbol. Make global.
1095 (bfd_elf_gc_sections): Call bed->gc_mark_dynamic_ref.
1096 * elfxx-target.h (elf_backend_gc_mark_dynamic_ref): Define.
1097 (elfNN_bed): Init new field.
1098 * elf64-ppc.c (elf_backend_gc_mark_dynamic_ref): Define.
1099 (ppc64_elf_gc_mark_dynamic_ref): New function.
1100
b56cbdb9
AM
11012006-01-17 Alan Modra <amodra@bigpond.net.au>
1102
1103 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Don't hang forever in loop.
1104
6c10990d
NC
11052006-01-17 Nick Clifton <nickc@redhat.com>
1106
1107 PR binutils/2159
1108 * elf.c (elfcore_write_pstatus): Add ATTRIBUTE_UNUSED to unused
1109 parameters.
1110
d7f735da
NC
11112006-01-11 Nick Clifton <nickc@redhat.com>
1112
1113 * elf32-arm.c (elf32_arm_output_symbol_hook): Install new entry
1114 into the newly (re)allocated map array.
1115
2bfd55ca
NC
11162006-01-09 Alexis Wilke <alexis_wilke@yahoo.com>
1117
1118 * peXXigen.c (tbl): Add comma after "HIGH3ADJ".
1119
bce50a28
JJ
11202006-01-01 Jakub Jelinek <jakub@redhat.com>
1121
1122 * elf64-ppc.c (ppc64_elf_action_discarded): Return 0
1123 for .toc1 section.
1124
e88d958a 1125For older changes see ChangeLog-2005
56882138
AM
1126\f
1127Local Variables:
1128mode: change-log
1129left-margin: 8
1130fill-column: 74
1131version-control: never
1132End:
This page took 0.363645 seconds and 4 git commands to generate.