*** empty log message ***
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
3cbc5de0
NC
12009-11-05 Nick Clifton <nickc@redhat.com>
2
3 * elflink.c (elf_link_add_object_symbols): Improve error
4 message generated when a symbol is left unresolved because a
5 --no-add-needed command line option has prevented the
6 inclusion of the DSO defining it.
7
6567fa84
UW
82009-11-03 Alan Modra <amodra@bigpond.net.au>
9 Ulrich Weigand <uweigand@de.ibm.com>
10
11 * elf32-spu.c (mark_functions_via_relocs): Handle non-branch relocs
12 (jump tables or other references to code labels) as well.
13
62f3b8c8
PB
142009-11-02 Paul Brook <paul@codesourcery.com>
15
16 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle VFPv4
17 attributes.
18
3703bab9
AM
192009-11-02 Alan Modra <amodra@bigpond.net.au>
20
21 * elflink.c (elf_link_add_object_symbols): Don't force debug
22 symbols local.
23
5d5a918a
HPN
242009-10-29 Johan Kristell <johankri@axis.com>
25
26 * elf32-cris.c (cris_elf_plt_sym_val): New function.
27 (elf_backend_plt_sym_val): Define.
28
5fdcb63c
KT
292009-10-27 Kai Tietz <kai.tietz@onevision.com>
30
31 * peXXigen.c (bfdver.h): Add include.
32 (LINKER_VERSION): Do calculation based on BFD_VERSION.
33
d76b263e
MR
342009-10-25 Maciej W. Rozycki <macro@linux-mips.org>
35
36 * elf32-vax.c (elf_vax_relocate_section): Correct assertion.
37
71f136d6
MR
382009-10-25 Maciej W. Rozycki <macro@linux-mips.org>
39
40 * elf32-vax.c (elf_vax_plt_entry): Fix formatting.
41
9e86195c
MR
422009-10-25 Maciej W. Rozycki <macro@linux-mips.org>
43
44 * elf32-vax.c (elf_vax_relocate_section): Fix a typo.
45
406dba13
KT
462009-10-23 Kai Tietz <kai.tietz@onevision.com>
47
48 * coff-x86_64.c (coff_amd64_rtype_to_howto): Subtract offset
49 of R_AMD64_PCRLONG_<X> relocations from addend.
50
98950613
AM
512009-10-23 Alan Modra <amodra@bigpond.net.au>
52
53 * plugin.c: Produce empty object if not BFD_SUPPORTS_PLUGINS.
54
dbde1c12
AM
552009-10-20 Alan Modra <amodra@bigpond.net.au>
56
57 PR binutils/10802
58 * opncls.c (_maybe_make_executable): Make DYNAMIC files executable.
59
ebf275e3
HPN
602009-10-19 Hans-Peter Nilsson <hp@axis.com>
61
62 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_DTPREL>:
63 Don't subtract the size of the TLS block for non-shared objects
64 from the relocation.
65
6c293e26
AM
662009-10-17 Arnold Metselaar <arnold.metselaar@planet.nl>
67
68 * coff-z80.c (z80coff_vec): Allow sections to be of type
69 SEC_CODE or SEC_DATA
70
493152cb
AM
712009-10-16 Alan Modra <amodra@bigpond.net.au>
72
73 PR binutils/10785
74 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Don't bfd_alloc
75 bim and bim->buffer. bfd_malloc instead.
76 * peicode.h (pe_ILF_build_a_bfd): Similarly.
77 (ILF_DATA_SIZE): Don't include bim.
78 * opncls.c (bfd_close): Test bim->buffer non-NULL before freeing.
79
f88dc410
AM
802009-10-14 Alan Modra <amodra@bigpond.net.au>
81
82 * aoutx.h (aout_link_check_ar_symbols): Typo fix.
83
cd2b2c10
L
842009-10-13 H.J. Lu <hongjiu.lu@intel.com>
85
86 PR binutils/10763
87 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Declare plt
88 earlier.
89
fc3e1e3c
AM
902009-10-13 Alan Modra <amodra@bigpond.net.au>
91
92 * elflink.c (_bfd_elf_merge_symbol): Revert previous patch.
93
f8076f98
RM
942009-10-12 Roland McGrath <roland@frob.com>
95
96 * elflink.c (elf_link_add_object_symbols, _bfd_elf_merge_symbol):
97 Fix %s that should be %B in several message formats.
98
f0803690
AM
992009-10-10 Alan Modra <amodra@bigpond.net.au>
100
101 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols for
102 excluded output sections.
103
0c9b2b4c
TG
1042009-10-09 Tristan Gingold <gingold@adacore.com>
105
106 * mach-o.c (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_RPATH.
107 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
108
ab273af8
TG
1092009-10-09 Tristan Gingold <gingold@adacore.com>
110
111 * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Rename to
112 bfd_mach_o_read_symtab_symbols.
113 (bfd_mach_o_scan_write_thread): Rename to bfd_mach_o_write_thread.
114 (bfd_mach_o_scan_write_relocs): Rename to bfd_mach_o_write_relocs.
115 (bfd_mach_o_scan_write_section_32): Rename to
116 bfd_mach_o_write_section_32.
117 (bfd_mach_o_scan_write_section_64): Rename to
118 bfd_mach_o_write_section_64.
119 (bfd_mach_o_scan_write_segment_32): Rename to
120 bfd_mach_o_write_segment_32.
121 (bfd_mach_o_scan_write_segment_64): Rename to
122 bfd_mach_o_write_segment_64.
123 (bfd_mach_o_scan_write_symtab): Rename to bfd_mach_o_write_symtab.
124 (bfd_mach_o_scan_read_section_32): Rename to
125 bfd_mach_o_read_section_32.
126 (bfd_mach_o_scan_read_section_64): Rename to
127 bfd_mach_o_read_section_64.
128 (bfd_mach_o_scan_read_section): Rename to bfd_mach_o_read_section.
129 (bfd_mach_o_scan_read_symtab_strtab): Rename to
130 bfd_mach_o_read_symtab_strtab.
131 (bfd_mach_o_scan_read_symtab_symbol): Rename to
132 bfd_mach_o_read_symtab_symbol.
133 (bfd_mach_o_scan_read_dysymtab_symbol): Rename to
134 bfd_mach_o_read_dysymtab_symbol.
135 (bfd_mach_o_scan_read_dylinker): Rename to bfd_mach_o_read_dylinker.
136 (bfd_mach_o_scan_read_dylib): Rename to bfd_mach_o_read_dylib.
137 (bfd_mach_o_scan_read_prebound_dylib): Rename to
138 bfd_mach_o_read_prebound_dylib.
139 (bfd_mach_o_scan_read_thread): Rename to bfd_mach_o_read_thread.
140 (bfd_mach_o_scan_read_dysymtab): Rename to bfd_mach_o_read_dysymtab.
141 (bfd_mach_o_scan_read_symtab): Rename to bfd_mach_o_read_symtab.
142 (bfd_mach_o_scan_read_uuid): Rename to bfd_mach_o_read_uuid.
143 (bfd_mach_o_scan_read_linkedit): Rename to bfd_mach_o_read_linkedit.
144 (bfd_mach_o_scan_read_str): Rename to bfd_mach_o_read_str.
145 (bfd_mach_o_scan_read_dyld_info): Rename to bfd_mach_o_read_dyld_info.
146 (bfd_mach_o_scan_read_segment): Rename to bfd_mach_o_read_segment.
147 (bfd_mach_o_scan_read_segment_32): Rename to
148 bfd_mach_o_read_segment_32.
149 (bfd_mach_o_scan_read_segment_64): Rename to
150 bfd_mach_o_read_segment_64.
151 (bfd_mach_o_scan_read_command): Rename to bfd_mach_o_read_command.
152 * mach-o.h (bfd_mach_o_scan_read_dysymtab_symbol): Rename to
153 bfd_mach_o_read_dysymtab_symbol.
154
b2b62060
TG
1552009-10-09 Tristan Gingold <gingold@adacore.com>
156
157 * mach-o.c (bfd_mach_o_section_get_entry_size): Moved.
158 (bfd_mach_o_section_get_nbr_indirect): Ditto.
159 (bfd_mach_o_get_synthetic_symtab): New function.
160 (bfd_mach_o_print_private_header): Print the number of commands
161 in decimal.
162 * mach-o.h (bfd_mach_o_get_synthetic_symtab): Add prototype.
163 * mach-o-target.c: Do not defined bfd_mach_o_get_synthetic_symtab.
164
615b63d4
TG
1652009-10-08 Tristan Gingold <gingold@adacore.com>
166
167 * config.bfd: Add bfd_mach_o_i386_vec in x86_64-darwin targ_selvecs.
168
8654b68a
L
1692009-10-06 H.J. Lu <hongjiu.lu@intel.com>
170
171 * bfd-in2.h: Regenerated.
172
4a056f14
AM
1732009-10-02 Alan Modra <amodra@bigpond.net.au>
174
175 * aout-cris.c (N_SHARED_LIB): Don't define.
176 * hp300bsd.c (N_SHARED_LIB): Don't define.
177 * i386bsd.c (N_SHARED_LIB): Don't define.
178 * i386linux.c (N_SHARED_LIB): Don't define.
179 * i386lynx.c (N_SHARED_LIB): Don't define.
180 * m68klinux.c (N_SHARED_LIB): Don't define.
181 * m88kmach3.c (N_SHARED_LIB): Don't define.
182 * mipsbsd.c (N_SHARED_LIB): Don't define.
183 * newsos3.c (N_SHARED_LIB): Don't define.
184 * pc532-mach.c (N_SHARED_LIB): Don't define.
185 * pdp11.c (N_SHARED_LIB): Don't define.
186 * sparclinux.c (N_SHARED_LIB): Don't define.
187 * vaxbsd.c (N_SHARED_LIB): Don't define.
188
eb503a00
DK
1892009-10-01 Dave Korn <dave.korn.cygwin@gmail.com>
190
191 * cofflink.c (_bfd_coff_generic_relocate_section): Look for the aux
192 symbol for a weak undef in the auxbfd, not the input bfd.
193
64028ad7
UW
1942009-10-01 Ulrich Weigand <uweigand@de.ibm.com>
195
196 * elf32-spu.c (spu_elf_auto_overlay): Insert icache linker script
197 after .toe instead of before .text section. Set the LMA of all
198 overlay sections to their icache IA address.
199 (spu_elf_find_overlays): Determine icache set id without reference
200 to the LMA.
201
27a5525e
TG
2022009-09-30 Tristan Gingold <gingold@adacore.com>
203
204 * configure.com: Use hosts/alphavms.h on both alpha and ia64 VMS.
205
464d3bd4
L
2062009-09-29 H.J. Lu <hongjiu.lu@intel.com>
207
208 * elf64-x86-64.c (elf64_x86_64_append_rela): New.
209 (elf64_x86_64_relocate_section): Use it.
210 (elf64_x86_64_finish_dynamic_symbol): Likewise.
211
c7927a3c
NC
2122009-09-29 DJ Delorie <dj@redhat.com>
213
214 * Makefile.am (ALL_MACHINES): Add cpu-rx.lo.
215 (ALL_MACHINES_CFILES): Add cpu-rx.c.
216 (BFD32_BACKENDS): Add elf32-rx.lo.
217 (BFD32_BACKENDS_CFILES): Add elf32-rx.c.
218 * archures.c (bfd_architecture): Add bfd_arch_rx and bfd_mach_rx.
219 Export bfd_rx_arch.
220 (bfd_archures_list): Add bfd_rx_arch.
221 * config.bfd: Add entry for rx-*-elf.
222 * configure.in: Add entries for bfd_elf32_rx_le_vec and
223 bfd_elf32_rx_be_vec.
224 * reloc.c: Add RX relocations.
225 * targets.c: Add RX target vectors.
226 * Makefile.in: Regenerate.
227 * bfd-in2.h: Regenerate.
228 * configure: Regenerate.
229 * libbfd.h: Regenerate.
230 * cpu-rx.c: New file.
231 * elf32-rx.c: New file.
232
0505e902
SR
2332009-09-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
234
235 * elf32-cr16.c (elf32_cr16_relocate_section): Removed
f8076f98 236 info->relocatable to fix the ld/testsuites/ld-elf/linkonce1 test case.
0505e902 237
caa83f8b
NC
2382009-09-28 Nick Clifton <nickc@redhat.com>
239
240 PR 10478: Accepting Solaris binaries.
241 * elf.c (bfd_section_from_shdr): Allow SHN_BEFORE and SHN_AFTER
242 section link values in x86 binaries.
243 * elfcode.h (elf_object_p): Likewise.
244
fc9f1df9
NC
2452009-09-28 Philippe De Muyter <phdm@macqel.be>
246
247 * elf32-m68k.c (elf_m68k_final_write_processing): New function.
248 (elf_backend_final_write_processing): Macro defined as above function.
249
21d799b5
NC
2502009-09-25 Martin Thuresson <martint@google.com>
251
4a056f14 252 Update sources to make alpha and arm targets compile cleanly with
21d799b5
NC
253 -Wc++-compat:
254 * ecoff.c: Add casts.
255 * ecofflink.c: Add casts.
256 * elf64-alpha.c: Add casts.
257 (struct alpha_elf_got_entry, struct alpha_elf_reloc_entry): Move
258 to top level.
259 (SKIP_HOWTO): Use enum name.
260 * elf32-arm.c: Add casts.
261 (elf32_arm_vxworks_bed): Update code to avoid multiple
262 declarations.
263 (struct map_stub): Move to top level.
264
935bd1e0
L
2652009-09-24 H.J. Lu <hongjiu.lu@intel.com>
266
267 PR ld/10630
268 * elflink.c (elf_link_output_extsym): Turn off visibility on
269 local symbol.
270 (bfd_elf_final_link): Turn off visibility on dynamic local
271 symbol.
272
107601c8
AM
2732009-09-24 Alan Modra <amodra@bigpond.net.au>
274
275 PR binutils/10654
276 * dwarf2.c (lookup_address_in_line_info_table): Remove workaround
277 for invalid location lists generated by gcc-2.95 and Intel 6.0 C++.
278 Remove "function" parm, adjust caller.
279
7ee314fa
AM
2802009-09-23 Matt Rice <ratmice@gmail.com>
281
282 * bfd-in.h (bfd_elf_size_dynamic_sections): Add audit and depaudit
283 arguments.
284 * elflink.c (bfd_elf_size_dynamic_sections): Generate DT_AUDIT,
285 DT_DEPAUDIT from audit/depaudit arguments.
286 (elf_finalize_dynstr): Finalize DT_AUDIT and DT_DEPAUDIT strtab entries.
287 (elf_link_add_object_symbols): Set dt_audit target data when finding a
288 DT_AUDIT.
289 * bfd-in2.h: Regenerate.
290 * bfd-elf.h: Add dt_audit to elf_obj_tdata, and elf_dt_audit macro.
291
d3e32c2e
JZ
2922009-09-23 Jie Zhang <jie.zhang@analog.com>
293
294 * elf32-bfin.c (_bfinfdpic_size_got_plt): Make sure empty
295 .rel.plt and .plt sections are removed.
296 (elf32_bfinfdpic_size_dynamic_sections): Remove empty .dynbss
297 section. Remove the duplicated removing of empty .rel.plt
298 section.
299
a10917ef
RS
3002009-09-21 Richard Sandiford <rdsandiford@googlemail.com>
301
302 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Extend previous
303 patch to handle the new personality relaxation.
304
30af5962
RS
3052009-09-21 Richard Sandiford <rdsandiford@googlemail.com>
306
307 * elf-eh-frame.c (make_pc_relative): New function.
308 (_bfd_elf_write_section_eh_frame): Use it.
309
a7f2871e
AM
3102009-09-21 Alan Modra <amodra@bigpond.net.au>
311
312 * elf32-ppc.c (TLS_GET_ADDR_GLINK_SIZE): Define.
313 (ADD_3_12_2, BEQLR, CMPWI_11_0, LWZ_11_3, LWZ_12_3): Define.
314 (MR_0_3, MR_3_0): Define.
315 (struct ppc_elf_link_hash_table): Add no_tls_get_addr_opt.
316 (ppc_elf_select_plt_layout): Save emit_stub_syms param earlier.
317 (ppc_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
318 table. Check for presense of __tls_get_addr_opt
319 (allocate_dynrelocs): Increase glink entry size for __tls_get_addr.
320 (ppc_elf_size_dynamic_sections): Add DT_PPC_TLS_OPT tag.
321 (write_glink_stub): Add param p.
322 (ppc_elf_relocate_section): Adjust write_glink_stub call.
323 (ppc_elf_finish_dynamic_symbol): Emit special glink call stub for
324 __tls_get_addr.
325 * elf32-ppc.h (ppc_elf_tls_setup): Update prototype.
326 * elf64-ppc.c (struct ppc_link_hash_table): Add no_tls_get_addr_opt.
327 (ppc64_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
328 table. Check for presense of __tls_get_addr_opt.
329 (ppc64_elf_size_dynamic_sections): Add DT_PPC64_TLS_OPT tag.
330 (LD_R11_0R3, LD_R12_0R3, MR_R0_R3, CMPDI_R11_0, ADD_R3_R12_R13,
331 BEQLR, MR_R3_R0, MFLR_R11, STD_R11_0R1, BCTRL, LD_R11_0R1,
332 LD_R2_0R1, MTLR_R11): Define.
333 (build_tls_get_addr_stub): New function.
334 (ppc_build_one_stub): Call it.
335 (ppc_size_one_stub): Add extra size for __tls_get_addr stub.
336 (ppc64_elf_relocate_section): Don't change nop to ld 2,40(1) for
337 __tls_get_addr plt call.
338 * elf64-ppc.h (ppc64_elf_tls_setup): Update prototype.
339
18e04883
RS
3402009-09-19 Richard Sandiford <rdsandiford@googlemail.com>
341
342 * elf-bfd.h (eh_cie_fde): Add personality_offset and
343 make_per_encoding_relative to the CIE structure. Add a padding field.
344 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Use 0x70
345 rather than 0xf0 when masking out the base address encoding
346 Record the offset of personality data from the start of the CIE.
347 Remove a repeated elf_backend_can_make_relative_eh_frame check.
348 (find_merged_cie): Take an info argument. If the personality
349 binds locally, try converting an absolute personality into
350 a local one.
351 (_bfd_elf_discard_section_eh_frame): Use 0x70 rather than 0xf0
352 when masking out the base address encoding. Update the call to
353 find_merged_cie.
354 (_bfd_elf_eh_frame_section_offset): Discard relocations against
355 the personality data if we are converting into PC-relative form.
356 (_bfd_elf_write_section_eh_frame): Use 0x70 rather than 0xf0
357 when masking out the base address encoding. Handle
358 make_per_encoding_relative.
359
bd6c6e2b
AM
3602009-09-18 Alan Modra <amodra@bigpond.net.au>
361
362 PR ld/10406
363 * elf32-ppc.c (ppc_elf_howto_raw): Make R_PPC_EMB_SDAI16 and
364 R_PPC_EMB_SDA2I16 complain_overflow_signed.
365 (create_sdata_sym): Pass info rather than htab.
366 Update all callers. Ensure symbols are hidden.
367 (ppc_elf_check_relocs): Allow SDAREL16 when shared.
368 (ppc_elf_size_dynamic_sections): When shared, equate _SDA_BASE_ to
369 _GLOBAL_OFFSET_TABLE_.
370 (elf_finish_pointer_linker_section): Don't assume that sdata base
371 symbol is always at 0x8000 offset. Don't subtract the addend here.
372 (is_static_defined): New function.
373 (ppc_elf_relocate_section): Verify symbol base used in SDA relocs
374 is statically defined. Clear addend for EMB_SDAI16 and EMB_SDA2I16
375 relocs. Downgrade error on unexpected section for EMB_SDA2REL
376 reloc symbols to a warning.
377
ca58b19f
NC
3782009-09-18 Nick Clifton <nickc@redhat.com>
379
380 * po/es.po: Updated Spanish translation.
2f0205e8 381 * po/vi.po: Updated Vietnamese translation.
ca58b19f 382
b31867b6
AM
3832009-09-18 Alan Modra <amodra@bigpond.net.au>
384
385 * elf64-ppc.c (follow_link, elf_follow_link, ppc_follow_link): New
386 functions. Use throughout.
387 (ppc64_elf_copy_indirect_symbol): Set direct symbol "oh" field
388 from indirect symbol.
389 (lookup_fdh): Rename from get_fdh. Follow indirect sym links.
390 (add_symbol_adjust): Simplify.
391 (defined_code_entry, defined_func_desc): New functions.
392 (ppc64_elf_gc_keep): Follow indirect sym links. Use defined_code_entry.
393 (ppc64_elf_gc_mark_dynamic_ref): Use defined_func_desc and
394 defined_code_entry to follow indirect sym links.
395 (ppc64_elf_gc_mark_hook, func_desc_adjust): Likewise.
396 (ppc_type_of_stub): Follow indirect sym links.
397 (toc_adjusting_stub_needed): Likewise.
398 (ppc_build_one_stub): Likewise. Make undefined dot-symbols weak
399 rather than defining them at stub.
400 (ppc64_elf_relocate_section): Rewrite call test to avoid multiple
401 assignments in test.
402
afecc97c 4032009-09-16 Tristan Gingold <gingold@adacore.com>
7ee314fa 404
afecc97c
TG
405 * mach-o.h (bfd_mach_o_filetype): Add new constants from darwin10.
406 Reindent.
407 * mach-o.c (bfd_mach_o_cpu_name): Reindent.
408 (bfd_mach_o_filetype_name): Complete with new constants. Reindent.
409 (bfd_mach_o_print_private_header): Use fputs instead of fprintf
410 when possible to avoid warnings.
411 (bfd_mach_o_print_section_map): Ditto.
412 (bfd_mach_o_section_get_entry_size): New function.
413 (bfd_mach_o_section_get_nbr_indirect): Simplify using the newly
414 added function.
415 (bfd_mach_o_print_dysymtab): Print address of indirect symbols.
416
df58f7b0
NC
4172009-09-14 Nick Clifton <nickc@redhat.com>
418
419 * po/fi.po: Updated Finnish translation.
420
1e9cc1c2
NC
4212009-09-11 Nick Clifton <nickc@redhat.com>
422
423 * po/bfd.pot: Updated by the Translation project.
424
8b31b6c4
NC
4252009-09-11 Philippe De Muyter <phdm@macqel.be>
426
427 * binary.c (binary_object_p): Remove bfd_external_binary_architecture
428 hack. objcopy `-B' (`--binary-architecture') option is now handled
429 in a generic way.
430
681fe688
NC
4312009-09-11 Nick Clifton <nickc@redhat.com>
432
433 * rs6000-core.c (read_hdr): Fix typo in recent C++ compatibility
434 changes.
435
3b6cfd4e 4362009-09-11 Jie Zhang <jie.zhang@analog.com>
83fd9437
JZ
437
438 * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return
439 NULL if `ht' is NULL.
440
a50b1753
NC
4412009-09-09 Martin Thuresson <martin@mtme.org>
442
4a056f14 443 Update sources to compile cleanly with -Wc++-compat:
a50b1753
NC
444 * aoutx.h: Add casts.
445 * archive.c: Add casts.
446 * archive64.c: Add casts.
447 * archures.c: Add casts.
448 * bfd-in2.h: Regenerated.
449 * bfd.c: Add casts. (enum bfd_direction): Move out to top level.
450 * bfdio.c: Add casts.
451 * binary.c: Add casts.
452 * cache.c (cache_bseek,cache_bread_1,cache_bwrite): Updated
453 parameter to use enum value instead of int.
454 * coffcode.h: Add casts.
455 * coffgen.c: Add casts.
456 * cofflink.c: Add casts.
457 * compress.c: Add casts.
458 * dwarf1.c: Add casts.
459 * dwarf2.c: Add casts. (struct dwarf2_debug): Rename member bfd to
460 bfd_ptr. Update code to use new name.
461 * elf-attrs.c: Add casts.
462 * elf-bfd.h (elf_link_virtual_table_entry): Gives name to
463 anonymous struct. (union gotplt_union, struct
464 elf_link_virtual_table_entry): Move to top level.
465 * elf-eh-frame.c: Add casts.
466 * elf-strtab.c: Add casts.
467 * elf.c: Add casts. (_bfd_elm_make_Section_from_phdr): Change
468 argument name from typename to type_name.
469 * elf32-i386.c: Add casts.
470 * elf64-x86-64.c: Add casts.
471 * elfcode.h: Add casts.
472 * elfcore.h: Add casts.
473 * elflink.c: Add casts.
474 * format.c: Add casts.
475 * hash.c: Add casts.
476 * ihex.c: Add casts.
477 * libaout.h (enum aout_subformat, enum aout_magic): Move to top
478 level.
479 * libbfd.c: Add casts.
480 * linker.c: Add casts.
481 * merge.c: Add casts.
482 * opncls.c: Add casts.
483 * peXXigen.c: Add casts.
484 * peicode.h: Add casts.
485 * reloc.c: Add casts.
486 * section.c: Add casts.
487 * simple.c: Add casts.
488 * srec.c: Add casts.
489 * stabs.c: Add casts.
490 * syms.c: Add casts.
491 * targets.c: Add casts.
492 * tekhex.c: Add casts.
493 * verilog.c: Add casts.
494
f3b4f6d0
PB
4952009-09-09 Paolo Bonzini <bonzini@gnu.org>
496
497 * configure: Regenerate.
498
67d74e43
DJ
4992009-09-09 Daniel Jacobowitz <dan@codesourcery.com>
500
501 * elf32-arm.c (elf32_arm_final_link_relocate): Set sym_flags
502 for the mode of target PLT entries.
503 (allocate_dynrelocs): Only adjust symbol type if setting its
504 value.
505
07c58694
PB
5062009-09-09 Paolo Bonzini <bonzini@gnu.org>
507
f3b4f6d0 508 * configure: Regenerate.
07c58694 509
cfcac11d
NC
5102009-09-09 Nick Clifton <nickc@redhat.com>
511
512 PR 10478:
513 * elf.c (bfd_section_from_shdr): Do not reject sparc binaries with
514 section headers containing sh_link values of SHN_BEFORE or
515 SHN_AFTER.
516 * elfcode.h (elf_object_p): Likewise.
517
ad86f1fb
TG
5182009-09-09 Tristan Gingold <gingold@adacore.com>
519
520 Handle DYLD_INFO introduced by Darwin10.
521 * mach-o.h (bfd_mach_o_load_command_type): Add
522 BFD_MACH_O_LC_DYLD_INFO.
523 (bfd_mach_o_dyld_info_command): New type.
524 (bfd_mach_o_load_command): Add dyld_info field.
525 * mach-o.c (bfd_mach_o_scan_read_str): Reduce size of buf.
526 (bfd_mach_o_scan_read_dyld_info): New function.
527 (bfd_mach_o_scan_read_command): Handle BFD_MACH_O_LC_DYLD_INFO.
528 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
529 (bfd_mach_o_load_command_name): AddB FD_MACH_O_LC_DYLD_INFO.
530 (bfd_mach_o_print_dyld_info): New function.
531
1004c3e1
SR
5322009-09-09 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
533
534 * elf32-cr16.c (elf32_cr16_relocate_section): Add code to discard the
535 linkonce or linker script discarded section.
536
498199fc
AM
5372009-09-09 Alan Modra <amodra@bigpond.net.au>
538
539 * elf32-xtensa.c (elf_xtensa_relax_section): Delete -r check.
540
c86ad514
AS
5412009-09-07 Andreas Schwab <schwab@linux-m68k.org>
542
543 * elf32-m68k.c (rtype_to_howto): If the reloc index is out of
544 range call the bfd error hander and use R_68K_NONE instead.
545
b11d79f2
TG
5462009-09-07 Tristan Gingold <gingold@adacore.com>
547
23f938f1
TG
548 * po/SRC-POTFILES.in: Regenerate.
549 * po/bfd.pot: Regenerate.
550
b11d79f2
TG
551 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
552 BFD_HAVE_SYS_STAT_TYPE_MEMBER): Moved to gas/acinclude.m4
553 * configure.in: Move tests for tm_gmtoff, st_mtim.tv_sec and
554 st_mtim.tv_nsec to gas/configure.in
555 (bfd_elf64_ia64_vms_vec): Remove vmsutil.lo
556 * configure: Regenerate.
557 * config.in: Regenerate.
558 * vmsutil.c: Moved to gas/config/te-vms.c
559 * vmsutil.h: Removed.
560 * Makefile.am (BFD32_BACKENDS_CFILES): Remove vmsutil.c
561 (BFD32_BACKENDS): Remove vmsutil.lo
562 * Makefile.in: Regenerate.
563
3d03da9a
EZ
5642009-09-05 Eli Zaretskii <eliz@gnu.org>
565
566 * coffcode.h: Include libiberty.h.
567
96d56e9f
NC
5682009-09-05 Martin Thuresson <martin@mtme.org>
569
570 * coff-arm.c (coff_arm_relocate_section)
571 (record_thumb_to_arm_glue, bfd_arm_process_before_allocation):
572 Change member name class to symbol_class.
573 * coff-i960.c (coff_i960_relocate_section) Rename variable
574 class to class_val. Change member name class to symbol_class.
575 * coff-rs6000.c (_bfd_xcoff_swap_aux_in)
576 (_bfd_xcoff_swap_aux_out): Rename arguments class to in_class.
577 * coff-stgo32.c (adjust_aux_in_post)
578 (adjust_aux_out_pre, adjust_aux_out_post): Rename arguments class
579 to in_class.
580 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in)
581 (_bfd_xcoff64_swap_aux_out): Rename arguments class to in_class.
582 * coffcode.h (coff_pointerize_aux_hook): Rename variable class
583 to n_sclass.
584 * coffgen.c (coff_write_symbol, coff_pointerize_aux): Rename
585 variables named class to n_sclass. (coff_write_symbols): Rename
586 variable class to sym_class. (bfd_coff_set_symbol_class): Rename
587 argument class to symbol_class.
588 * cofflink.c (_bfd_coff_link_hash_newfunc)
589 (coff_link_add_symbols, _bfd_coff_link_input_bfd)
590 (_bfd_coff_write_global_sym, _bfd_coff_generic_relocate_section):
591 Update code to use renamed members.
592 * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Rename
593 argument class to in_class.
594 * libcoff-in.h (struct coff_link_hash_entry, struct
595 coff_debug_merge_type) Renamed members class to symbol_class and
596 type_class.
597 * libcoff.h Regenerated.
598 * peXXigen.c: (_bfd_XXi_swap_aux_in, _bfd_XXi_swap_aux_out):
599 Rename argument class to in_class.
600 * pef.c (bfd_pef_parse_imported_symbol): Update code to use
601 renamed members.
602 * pef.h (struct bfd_pef_imported_symbol): Changed name of
603 member class to symbol_class.
604
df7e4f42
L
6052009-09-04 H.J. Lu <hongjiu.lu@intel.com>
606
607 * configure: Regenerated.
608
bac4da50
TG
6092009-09-04 Tristan Gingold <gingold@adacore.com>
610
611 * configure.in: Bump version to 2.20.51
bac4da50 612
57e96a08
AM
6132009-09-04 Alan Modra <amodra@bigpond.net.au>
614
615 * elf32-spu.c (spu_elf_relocate_section): Correct 2009-07-24 logic.
616
153d38f6
JZ
6172009-09-04 Jie Zhang <jie.zhang@analog.com>
618
619 * elf32-bfin.c (elf32_bfinfdpic_create_dynamic_sections): Always
620 create .rela.bss.
621 (elf32_bfinfdpic_size_dynamic_sections): Set SEC_EXCLUDE flag
622 for empty .rela.bss and .rel.plt sections.
623
5bbc5ae7
AN
6242009-09-03 Adam Nemet <anemet@caviumnetworks.com>
625
626 * elfxx-mips.c (mips_elf_calculate_relocation): Don't relocate
627 R_MIPS_JALR unless symbol resolves locally.
628
99da6b5f
AN
6292009-09-03 Adam Nemet <anemet@caviumnetworks.com>
630
631 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Don't set
632 has_static_relocs for R_MIPS_JALR.
633
fcbc2f09
MR
6342009-09-03 Maciej W. Rozycki <macro@codesourcery.com>
635
636 * elf64-mips.c (mips_elf64_howto_table_rela): Add support for
637 R_MIPS_TLS_DTPMOD64 and R_MIPS_TLS_TPREL64, replacing the
638 respective stubs.
639
90d60710
L
6402009-09-01 H.J. Lu <hongjiu.lu@intel.com>
641
642 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Declare
643 plt earlier.
644
11d73275
TG
6452009-09-01 Tristan Gingold <gingold@adacore.com>
646
647 * makefile.vms: Ported to Itanium VMS. Remove useless variable and
648 dependencies. Reindent.
649 * configure.com: Ported to Itanium VMS. Now generates a build.com
650 to build without make. Add messages but make edit silent.
651 * hosts/alphavms.h: Add a prototype for stpcpy.
652 * vms.c: Add a missing include for Alpha VMS.
653 * elfxx-ia64.c (ELF_OSABI): Define for OpenVMS.
654
94be91de
JB
6552009-08-31 Jan Beulich <jbeulich@novell.com>
656
657 * elf-bfd.h (bfd_elf_get_default_section_type): Declare.
658 * elf.c (bfd_elf_get_default_section_type): New.
659 (elf_fake_sections): Use bfd_elf_get_default_section_type.
660
883c7410
L
6612009-08-30 H.J. Lu <hongjiu.lu@intel.com>
662
663 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert the
664 accidental checkin.
665 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likwise.
666
095106a2
AM
6672009-08-30 Alan Modra <amodra@bigpond.net.au>
668
669 PR ld/10569
670 * bfd.c (bfd_emul_get_maxpagesize): Don't abort.
671 (bfd_emul_get_commonpagesize): Likewise.
672
d3ce72d0
NC
6732009-08-29 Martin Thuresson <martin@mtme.org>
674
675 * elf32-arm.c (struct stub_def): Rename member template to
676 template_sequence. (arm_build_one_stub,
677 find_stub_size_and_template, arm_size_one_stub, arm_map_one_stub):
678 Rename variable template to template_sequence.
679 * elfxx-ia64.c (elfNN_ia64_relax_br, elfNN_ia64_relax_brl):
680 Rename variable template to template_val.
681 * aoutx.h (NAME (aout, make_empty_symbol)): Rename variable
682 new to new_symbol.
683 * coffgen.c (coff_make_empty_symbol)
684 (coff_bfd_make_debug_symbol): Rename variable new to new_symbol.
685 * cpu-ia64-opc.c (ext_reg, ins_imms_scaled): Rename variable
686 new to new_insn.
687 * ecoff.c (_bfd_ecoff_make_empty_symbol): Rename variable new
688 to new_symbol.
689 * elf32-m68k.c (elf_m68k_get_got_entry_type): Rename argument
690 new to new_reloc.
691 * hash.c (bfd_hash_lookup): Rename variable new to new_string.
692 * ieee.c (ieee_make_empty_symbol): Rename variable new to
693 new_symbol.
694 * linker.c (bfd_new_link_order): Rename variable new to
695 new_lo.
696 * mach-o.c (bfd_mach_o_sizeof_headers): Rename variable new to
697 symbol.
698 * oasys.c (oasys_make_empty_symbol): Rename variable new to
699 new_symbol_type.
700 * pdp11.c (NAME (aout, make_empty_symbol)): Rename variable
701 new to new_symbol_type.
702 * plugin.c (bfd_plugin_make_empty_symbol): Rename variable new
703 to new_symbol.
704 * rs6000-core.c (CoreHdr, VmInfo): Rename union member new to
705 new_dump.
706 (read_hdr, rs6000coff_core_p)
707 (rs6000coff_core_file_matches_executable_p)
708 (rs6000coff_core_file_failing_command)
709 (rs6000coff_core_file_failing_signal): Updated function to use new
710 union member name.
711 * som.c (som_make_empty_symbol): Rename variable new to
712 new_symbol_type.
713 * syms.c (_bfd_generic_make_empty_symbol): Rename variable new
714 to new_symbol.
715 * tekhex.c (first_phase, tekhex_make_empty_symbol): Rename
716 variable new to new_symbol.
717
573e8a1c
RW
7182009-08-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
719
720 * acinclude.m4 (AM_INSTALL_LIBBFD): Call AM_SUBST_NOTMAKE for
721 bfdlibdir and bfdincludedir.
722 * Makefile.am (bfdlibdir, bfdincludedir): Move definition ...
723 [INSTALL_LIBBFD]: ... here, ...
724 [INSTALL_LIBBFD]: ... and empty overrides here.
725 [!INSTALL_LIBBFD]: (rpath_bfdlibdir): New variable.
726 [!INSTALL_LIBBFD] (libbfd_la_LDFLAGS): Use it.
727 * Makefile.in: Regenerate.
728 * configure: Regenerate.
729
325e58c7
NC
7302009-08-26 Maxim Kuvyrkov <maxim@codesourcery.com>
731
732 * elf32-m68k.c: Rewrite initialization of GOT entries for TLS
733 relocations. Rewrite output of dynamic TLS relocations.
734 (DTP_OFFSET, TP_OFFSET): New constants.
735 (dtpoff_base): Update.
736 (tpoff): Rename to tpoff_base, update.
737 (elf_m68k_init_got_entry_static, elf_m68k_init_got_entry_local_shared):
738 New functions. Move code from elf_m68k_relocate_section here.
739 (elf_m68k_relocate_section): Update.
740 (elf_m68k_finish_dynamic_symbol): Fix handling of local TLS symbols.
741
e5f2b1de
NC
7422009-08-26 Maxim Kuvyrkov <maxim@codesourcery.com>
743
744 * elf32-m68k.c (elf_m68k_copy_indirect_symbol): Propagate
745 non_got_ref value.
746 (elf_m68k_check_relocs): Handle dynamic TLS relocations.
747 Handle non_got_ref field.
748 (elf_m68k_adjust_dynamic_symbol): Handle non_got_ref field.
749
0666b2c3
AM
7502009-08-26 Alan Modra <amodra@bigpond.net.au>
751
600b8686 752 PR ld/10518
0666b2c3
AM
753 * linker.c (bfd_find_version_for_sym): Revert warning.
754
78a03297
AM
7552009-08-26 Alan Modra <amodra@bigpond.net.au>
756
600b8686 757 PR ld/10518
78a03297
AM
758 * linker.c (bfd_find_version_for_sym): Override a "*" match by any
759 other wildcard match. Warn on multiple wildcard matches.
760
81ecdfbb
RW
7612009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
762
14ec8efd
RW
763 * Makefile.am (libbfd_la_LDFLAGS): Initialize early, to allow
764 appending.
765 [INSTALL_LIBBFD] (bfdlib_LTLIBRARIES, bfdinclude_HEADERS): Set
766 only in this condition.
767 [!INSTALL_LIBBFD] (noinst_LTLIBRARIES, libbfd_la_LDFLAGS): New,
768 to build but not install libbfd.la in this condition.
769 (install-bfdlibLTLIBRARIES, uninstall-bfdlibLTLIBRARIES)
770 (install_libbfd, install_libbfd): Remove.
771 * Makefile.in: Regenerate.
772 * doc/Makefile.am (AM_CPPFLAGS): Renamed from ...
773 (INCLUDES): ... this.
774 ($(MKDOC)): Adjust.
775 * doc/Makefile.in: Regenerate.
776
95b40122
RW
777 * Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, instead use
778 no-dist and foreign.
779 (EXTRA_libbfd_la_SOURCES): New, list $(CFILES) to allow
780 dependency tracking to work for them.
781 (targets.lo, archures.lo, dwarf.lo): Rewrite to
782 use automake dependency tracking mechanism.
783 (MKDEP, DEP, DEP1, dep.sed, dep, dep-in, dep-am): Remove.
784 (mkdep section): Remove.
785 (BUILT_SOURCES): New, list $(BUILD_HFILES).
786 * Makefile.in: Regenerate.
787 * po/SRC-POTFILES.in, po/bfd.pot: Regenerate.
788
af542c2e
RW
789 * Makefile.am (datarootdir, docdir, htmldor, pdfdir)
790 (install-pdf, install-pdf-recursive, install-html)
791 (install-html-recursive): Remove.
792 * Makefile.in: Regenerate.
793
81ecdfbb
RW
794 * Makefile.in: Regenerate.
795 * aclocal.m4: Likewise.
796 * config.in: Likewise.
797 * configure: Likewise.
798
cd1dac3d
DG
7992009-08-21 Daniel Gutson <dgutson@codesourcery.com>
800
801 * elf32-arm.c (arch_has_thumb2_nop): New function.
802 (arch_has_arm_nop): New function.
803 (elf32_arm_final_link_relocate): NOP opcodes changed.
804
440ae135
DE
8052009-08-16 Doug Evans <dje@google.com>
806
807 * opncls.c (bfd_close): Until BFD_IN_MEMORY has an iovec,
808 at least don't leak memory.
809
a109e2f5
DD
8102009-08-13 DJ Delorie <dj@redhat.com>
811
812 * elf32-m32c.c (m32c_elf_relax_delete_bytes): Adjust symbol sizes
813 if needed.
814
c1742541
NC
8152009-08-12 Nick Clifton <nickc@redhat.com>
816
817 * po/fi.po: Updated Finnish translation.
818
6a9adeca
BS
8192009-08-11 Bernd Schmidt <bernd.schmidt@analog.com>
820
821 Merge some FRV FDPIC changes into the Blackfin code.
822 * elf32-bfin.c (struct bfinfdpic_elf_link_hash_table): Add pointer to
823 summary reloc information.
824 (bfinfdpic_dynamic_got_plt_info): New.
825 (_bfin_create_got_section): Create the PLT section here.
826 (elf32_bfinfdpic_create_dynamic_sections): Not here.
827 (_bfinfdpic_count_nontls_entries): Move out of...
828 (_bfinfdpic_count_got_plt_entries): ... here.
829 (_bfinfdpic_count_relocs_fixups): Likewise.
830 (_bfinfdpic_reset_got_plt_entries): New.
831 (_bfinfdpic_size_got_plt): Move out of...
832 (elf32_bfinfdpic_size_dynamic_sections): ... here.
833 (bfinfdpic_relocate_section): Be careful not to call
834 _bfinfdpic_add_rofixup or _bfinfdpic_add_dyn_reloc for deleted relocs.
835 (bfinfdpic_check_discarded_relocs, bfinfdpic_elf_discard_info):
836 New functions.
837 (elf_backend_discard_info): Define for FD-PIC.
838
5dabe785
AM
8392009-08-11 Alan Modra <amodra@bigpond.net.au>
840
841 * elflink.c: Add FIXMEs for some places that require octets_per_byte
842 adjustments.
843 * elf-eh-frame.c: Likewise.
844 * merge.c: Likewise.
845
ea7a63de
AM
8462009-08-11 Alan Modra <amodra@bigpond.net.au>
847
848 * configure.in: Remove elf-ifunc.lo from common ELF files. Add
849 to x86 and x86_64 configurations.
850 * configure: Regenerate.
851
9bf609ec
JK
8522009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
853
854 Stop using bfd_usrdata in libbfd.
855 * coff-stgo32.c (bfd_coff_go32stub): Remove.
856 (stub_bytes, comment): Replace STUBSIZE by GO32_STUBSIZE.
857 (adjust_filehdr_in_post): Declare the abfd parameter as unused.
858 Replace STUBSIZE by GO32_STUBSIZE. Save now the stub in
859 filehdr_dst->u.go32.stub. New comment with the reason.
860 (adjust_filehdr_out_pre): Replace STUBSIZE by GO32_STUBSIZE.
861 Substitute the removed macro bfd_coff_go32stub.
862 (adjust_filehdr_out_post, adjust_scnhdr_in_post, adjust_scnhdr_out_pre)
863 (adjust_scnhdr_out_post, adjust_aux_in_post, adjust_aux_out_pre)
864 (adjust_aux_out_post): Replace STUBSIZE by GO32_STUBSIZE.
865 (create_go32_stub, go32_stubbed_coff_bfd_copy_private_bfd_data):
866 Replace STUBSIZE by GO32_STUBSIZE. Substitute the removed macro
867 bfd_coff_go32stub.
868 * coffcode.h (coff_mkobject_hook): Initialize coff->go32stub.
869 * libcoff-in.h (coff_data_type): New field go32stub.
870 * libcoff.h: Regenerated.
871
e39e47bd
JK
8722009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
873
874 Fix go32 stub preservation by objcopy.
875 * coff-stgo32.c (adjust_filehdr_in_post): Use bfd_malloc.
876 (go32_stubbed_coff_bfd_copy_private_bfd_data): Optionally allocate OBFD
877 go32stub.
878
ffcb4889
NS
8792009-08-10 Nathan Sidwell <nathan@codesourcery.com>
880
881 * elf32-arm.c (elf32_arm_size_stubs): Don't die on undefined local
882 symbols.
883 (elf32_arm_final_link_relocate): Treat local undefined symbols the
884 same as global undefined symbols.
885 (elf32_arm_relocate_section): Give an error for local undefined
886 non-weak symbols, unless the reloc will not use the symbol.
887
01017ef8
NS
8882009-08-10 Nathan Sidwell <nathan@codesourcery.com>
889
890 * elf32-ppc.c (shared_stub_entry, stub_entry): Use r12, not r11.
891 (ppc_elf_relax_section): Use symbol index to distinguish
892 relocatable stubs.
893
a8ad78a7
AM
8942009-08-10 Alan Modra <amodra@bigpond.net.au>
895
896 * elf32-ppc.c (ppc_elf_relax_section): Ignore non-code sections.
897
91e21fb7
AM
8982009-08-10 Alan Modra <amodra@bigpond.net.au>
899
900 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Don't clear plt
901 info for STT_GNU_IFUNC.
902 * elf32-ppc.c (ppc_elf_check_relocs): Count a needed plt entry
903 on got refs in case the symbol turns out to be ifunc.
904 (ppc_elf_gc_sweep_hook): Similarly.
905 (ppc_elf_adjust_dynamic_symbol): Adjust assertion.
906 (allocate_dynrelocs): Don't specially allocate got relocs for ifunc.
907 (ppc_elf_size_dynamic_sections): Likewise.
908 (ppc_elf_relocate_section): Likewise.
909
6a9adeca 9102009-08-09 Bernd Schmidt <bernd.schmidt@analog.com>
cb88ce9f
BS
911
912 From Mike Frysinger <michael.frysinger@analog.com>
913 * elf32-bfin.c (bfin_howto_table, bfin_reloc_map, bfin_check_relocs,
914 bfin_final_link_relocate, bfin_relocate_section, bfin_gc_sweep_hook,
915 _bfinfdpic_emit_got_relocs_plt_entries, bfinfdpic_relocate_section,
916 bfinfdpic_gc_sweep_hook, bfinfdpic_check_relocs,
917 bfin_finish_dynamic_symbol, bfd_bfin_elf32_create_embedded_relocs):
918 Adjust to match the renamed reloc definitions.
7ee314fa 919
e7e75368
AM
9202009-08-08 Alan Modra <amodra@bigpond.net.au>
921
922 PR 10494
923 * elf.c (_bfd_elf_make_section_from_shdr): When setting up section
924 LMAs, use ELF_IS_SECTION_IN_SEGMENT to match sections with headers.
925
918d9742
TT
9262009-08-07 Tom Tromey <tromey@redhat.com>
927
928 * elf32-microblaze.c (microblaze_elf_check_relocs): Avoid strict
929 aliasing error.
930
7ba29e2a
NC
9312009-08-06 Michael Eager <eager@eagercon.com>
932
933 * Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}.
934 * Makefile.in: Regenerate.
935 * archures.c: Add bfd_arch_microblaze.
936 * bfd-in2.h: Regenerate.
937 * config.bfd: Add microblaze target.
938 * configure.in: Add bfd_elf32_microblaze_vec target.
939 * configure: Regenerate.
940 * cpu-microblaze.c: New.
941 * elf32-microblaze.c: New.
942 * libbfd-in.h: Add prototype _bfd_dwarf2_fixup_section_debug_loc().
943 * libbfd.h: Regenerate.
944 * reloc.c: Add MICROBLAZE relocations.
945 * section.c: Add struct relax_table and relax_count to section.
946 * targets.c: Add bfd_elf32_microblaze_vec.
947
e47bf690
JJ
9482009-08-06 Jakub Jelinek <jakub@redhat.com>
949 Alan Modra <amodra@bigpond.net.au>
950
951 PR binutils/10492
952 * elf.c (sym_is_global): Return true even for BSF_GNU_UNIQUE
953 symbols.
954 * elf32-mips.c (mips_elf_sym_is_global): Likewise.
955 * elfn32-mips.c (mips_elf_sym_is_global): Likewise.
956
3ae046cc
NS
9572009-08-06 Nathan Sidwell <nathan@codesourcery.com>
958
959 * elf32-arm.c (elf32_arm_size_stubs): Call layout_sections_again
960 at least once when fixing cortex-a8.
961
cd8d5a82
CF
9622009-08-05 Chao-ying Fu <fu@mips.com>
963
964 * elf32-mips.c (mips_reloc_map): Add BFD_RELOC_MIPS_JALR.
965 * elfxx-mips.c (JAL_TO_BAL_P): New define to transform JAL to BAL
966 for CPUs. It is true for RM9000.
967 (JALR_TO_BAL_P): New define to transform JALR to BAL. It is true
968 for all CPUs.
969 (mips_elf_perform_relocation): Use JAL_TO_BAL_P and JALR_TO_BAL_P
970 to guard the transformation.
971
9cc305ec
TS
9722009-08-05 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
973
974 * elf32-spu.h (spu_elf_params): Add member emit_fixups.
975 (spu_elf_size_sections): Declare prototype.
976 * elf32-spu.c (spu_link_hash_table): Add member sfixup.
977 (FIXUP_RECORD_SIZE, FIXUP_GET, FIXUP_PUT): New macros.
978 (spu_elf_emit_fixup): New function.
979 (spu_elf_relocate_section): Emit fixup for each SPU_ADDR32.
980 (spu_elf_size_sections): New function.
981
eb7c4339
NS
9822009-08-05 Nathan Sidwell <nathan@codesourcery.com>
983
984 * elf32-arm.c (elf32_arm_stub_type): Add arm_stub_a8_veneer_lwm.
985 (arm_build_one_stub): Build a8 veneers as a separate pass.
986 (cortex_a8_erratum_scan): Add prev_num_a8_fixes and stub_changed_p
987 parameters. Use them to check if we create a different a8 fixup
988 than the previous pass.
989 (elf32_arm_size_stubs): Move scope of stub_changed and
990 prev_num_a8_fixes into main loop.
991 (elf32_arm_build_stubs): Build a8 veneers in a second pass.
992
a9585d22
AM
9932009-08-04 Alan Modra <amodra@bigpond.net.au>
994
995 * elf32-ppc.c (ppc_elf_relax_section): Correct conditions under
996 which find_plt_ent is called. Delete redundant code.
997
45b222d6
L
9982009-08-03 H.J. Lu <hongjiu.lu@intel.com>
999
1000 PR binutils/10363
1001 * elf.c (bfd_elf_string_from_elf_section): Return NULL on
1002 invalid string offset.
1003
004fb780
L
10042009-08-03 H.J. Lu <hongjiu.lu@intel.com>
1005
1006 PR ld/10433
1007 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set got
1008 to htab->init_got_offset and plt to htab->init_plt_offset
1009 when discarding space for dynamic relocations.
1010
a877a2b6
AM
10112009-08-03 Alan Modra <amodra@bigpond.net.au>
1012
1013 * elf32-ppc.c (struct plt_entry): Revise comments.
1014 (ppc_elf_check_relocs): Don't create needless plt_entry info
1015 for non-pie executables. Don't test info->pie when info->shared
1016 already covers that case.
1017 (ppc_elf_gc_sweep_hook): Adjust for above change.
1018 (add_stub_sym): Don't test info->pie when info->shared tested.
1019 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Likewise.
1020 (write_glink_stub, ppc_elf_finish_dynamic_symbol): Likewise.
1021 (ppc_elf_relax_section): Adjust find_plt_ent arguments.
1022 (ppc_elf_relocate_section): Likewise.
1023
de972ffa
AM
10242009-08-03 Alan Modra <amodra@bigpond.net.au>
1025
1026 * elf32-ppc.c (ppc_elf_check_relocs): Always add a plt ref count
1027 for local ifunc symbols in non-pie executables, regardless of
1028 reloc type. Don't specially create ifunc dyn relocs. Tidy ifunc
1029 code so that it's obvious that we only do anything special for
1030 local ifunc syms.
1031 (ppc_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
1032 (allocate_dynrelocs): Correct comment for syms defined in plt.
1033 Don't specially allocate ifunc dyn relocs.
1034 (ppc_elf_relax_section): Relax branches to ifunc plt entries too.
1035 (ppc_elf_relocate_section): Set "relocation" value for ifunc
1036 syms in non-pie executables. No specially allocated dyn relocs
1037 for ifunc to write. Allow for local sym on R_PPC_RELAX32_PLT.
1038 (ppc_elf_finish_dynamic_symbol): Set value of ifunc symbols in
1039 a non-pie executable.
1040
1d85728f
L
10412009-08-02 H.J. Lu <hongjiu.lu@intel.com>
1042 Jakub Jelinek <jakub@redhat.com>
1043
1044 PR ld/6443
1045 * elf32-i386.c (elf_i386_tls_transition): Check executable
1046 instead of shared for TLS when building PIE.
1047 (elf_i386_check_relocs): Likewise.
1048 (elf_i386_allocate_dynrelocs): Likewise.
1049 (elf_i386_relocate_section): Likewise.
1050
1051 * elf64-x86-64.c (elf64_x86_64_tls_transition): Check executable
1052 instead of shared for TLS when building PIE.
1053 (elf64_x86_64_check_relocs): Likewise.
1054 (elf64_x86_64_allocate_dynrelocs): Likewise.
1055 (elf64_x86_64_relocate_section): Likewise.
1056
5d8d4872
AG
10572009-07-31 Anthony Green <green@moxielogic.com>
1058
1059 * config.bfd (targ_cpu): Add moxie-uclinux support.
1060
080a1b9f
HPN
10612009-07-31 Hans-Peter Nilsson <hp@bitrange.com>
1062
1063 * linker.c (fix_syms): Consider SEC_LOAD when choosing section.
1064
25f23106
AM
10652009-07-30 Alan Modra <amodra@bigpond.net.au>
1066
1067 * elf32-ppc.c (ppc_elf_check_relocs): Always set up sections
1068 used by indirect function support. Count dynamic relocs for
1069 ifunc syms.
1070 (ppc_elf_adjust_dynamic_symbol): Tweak for ifunc.
1071 (allocate_dynrelocs): Allocate all non-dynamic ifunc plt entries
1072 in iplt and their relocs in reliplt. Don't make ifunc syms
1073 dynamic. Allocate got entry relocs for non-dynamic ifunc in
1074 reliplt. Handle other dynamic relocs for ifunc.
1075 (ppc_elf_size_dynamic_sections): Alloc dyn relocs for static
1076 ifunc in reliplt, likewise relocs for got against local ifunc.
1077 Typo fix on reliplt size adjust.
1078 (ppc_elf_relocate_section): Don't use plt scheme of allocating
1079 relocs 1-1 with entries for iplt, instead just add using
1080 reloc_count. Write got relocs and dyn relocs for ifunc to reliplt.
1081 Error on invalid ifunc dyn relocs.
1082 (ppc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt
1083 in iplt/reliplt.
1084 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_JMP_IREL,
1085 R_PPC64_REL16, R_PPC64_REL16_LO, R_PPC64_REL16_HI, R_PPC64_REL16_HA.
1086 (ppc64_elf_reloc_type_lookup): Handle new relocs.
1087 (ppc64_elf_check_relocs): Likewise. Count dyn relocs for ifunc.
1088 (allocate_dynrelocs): As for elf32-ppc.c above.
1089 (ppc64_elf_size_dynamic_sections): Likewise.
1090 (ppc_build_one_stub): Put non-dynamic ifunc plt call stubs in iplt,
1091 and their relocs in reliplt. Use R_PPC64_JMP_IREL.
1092 (ppc_size_one_stub): Similarly.
1093 (ppc64_elf_relocate_section): As for elf32-ppc.c above. Handle new
1094 relocs too.
1095 (ppc64_elf_finish_dynamic_symbol): As for elf32-ppc.c above.
1096
80f540b7
HPN
10972009-07-29 Hans-Peter Nilsson <hp@bitrange.com>
1098
1099 * elf64-mmix.c (mmix_elf_relax_section): Revert 2009-05-27
1100 change. Add note to head comment.
1101
4ad4f3cb
JB
11022009-07-28 Jan Beulich <jbeulich@novell.com>
1103
1104 * archive.c (get_extended_arelt_filename): Remove redundant
1105 range check on index.
1106
d8d2f433
DK
11072009-07-27 Doug Kwan <dougkwan@google.com>
1108
1109 * elf32-arm.c (stub_hash_newfunc): Initialize field output_name.
1110
9e675548
L
11112009-07-27 H.J. Lu <hongjiu.lu@intel.com>
1112
1113 * archures.c bfd_*_arch): Sorted.
1114 (bfd_archures_list): Likewise.
1115
86514226
SR
11162009-07-27 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
1117
9e675548 1118 * elf32-cr16.c (elf_cr16_final_link_relocate): Add code to handle
86514226
SR
1119 to R_cr16_NUM32 relocation.
1120
305f7588
MS
11212009-07-26 Michael Eager <eager@eagercon.com>
1122
1123 * archures.c: Add bfd_mach_ppc_405
1124 * bfd-in2.h: Same.
1125
b1995b01
L
11262009-07-25 H.J. Lu <hongjiu.lu@intel.com>
1127
1128 * cpu-i386.c (bfd_x86_64_arch): Fix comment typos.
1129 * cpu-l1om.c (bfd_l1om_arch): Likewise.
1130
8a9036a4
L
11312009-07-25 H.J. Lu <hongjiu.lu@intel.com>
1132
1133 * archures.c (bfd_architecture): Add bfd_arch_l1om.
1134 (bfd_l1om_arch): New.
1135 (bfd_archures_list): Add &bfd_l1om_arch.
1136 * bfd-in2.h: Regenerated.
1137
1138 * config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if
1139 bfd_elf64_x86_64_vec is supported. Add bfd_elf64_l1om_freebsd_vec
1140 if bfd_elf64_x86_64_freebsd_vec is supported.
1141 (targ_selvecs): Likewise.
1142
1143 * configure.in: Support bfd_elf64_l1om_vec and
1144 bfd_elf64_l1om_freebsd_vec.
1145 * configure: Regenerated.
1146
1147 * cpu-l1om.c: New.
1148
1149 * elf64-x86-64.c (elf64_l1om_elf_object_p): New.
1150 (bfd_elf64_l1om_vec): Likewise.
1151 (bfd_elf64_l1om_freebsd_vec): Likewise.
1152
1153 * Makefile.am (ALL_MACHINES): Add cpu-l1om.lo.
1154 (ALL_MACHINES_CFILES): Add cpu-l1om.c.
1155 * Makefile.in: Regenerated.
1156
1157 * targets.c (bfd_elf64_l1om_vec): New.
1158 (bfd_elf64_l1om_freebsd_vec): Likewise.
1159 (_bfd_target_vector): Add bfd_elf64_l1om_vec and
1160 bfd_elf64_l1om_freebsd_vec.
1161
8fdcc58d
TS
11622009-07-24 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
1163 Alan Modra <amodra@bigpond.net.au>
1164
1165 * reloc.c (BFD_RELOC_SPU_ADD_PIC): Define.
1166 * bfd-in2.h: Regenerate.
1167 * libbfd.h: Regenerate.
1168 * elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC.
1169 (spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC.
1170 (spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC.
1171
9b769489
L
11722009-07-23 H.J. Lu <hongjiu.lu@intel.com>
1173
1174 PR ld/10434
1175 * elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable
1176 instead of shared for R_X86_64_TPOFF32.
1177 (elf64_x86_64_relocate_section): Likewise.
1178
3e7a7d11
NC
11792009-07-23 Ulrich Drepper <drepper@redhat.com>
1180
1181 * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
1182 * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols
1183 with the BSF_GNU_UNIQUE flag bit set.
1184 * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag
1185 for symbols with STB_GNU_UNIQUE binding.
1186 * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols
1187 with the STB_GNU_UNIQUE binding.
1188 (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for
1189 symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for
1190 symbols with the unique_global field set.
1191 (elf_link_output_extsym): Set unique_global field for symbols with
1192 the STB_GNU_UNIQUE binding.
1193 * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit.
1194 (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE
1195 symbols.
1196 (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE
1197 symbols.
1198 * bfd-in2.h: Regenerate.
1199
5f35ea9c
L
12002009-07-22 H.J. Lu <hongjiu.lu@intel.com>
1201
107601c8 1202 * elflink.c (elf_link_output_extsym): Revert the last change.
5f35ea9c 1203
b63cc625
L
12042009-07-22 H.J. Lu <hongjiu.lu@intel.com>
1205
107601c8
AM
1206 PR ld/10433
1207 * elflink.c (elf_link_output_extsym): Special case ifunc syms
1208 when ref_regular, not def_regular.
b63cc625 1209
2955ec4c
L
12102009-07-21 H.J. Lu <hongjiu.lu@intel.com>
1211
107601c8
AM
1212 PR ld/10426
1213 * elflink.c (elf_link_add_object_symbols): Turn an IFUNC symbol
1214 from a DSO into a normal FUNC symbol.
1215 (elf_link_output_extsym): Turn an undefined IFUNC symbol into
1216 a normal FUNC symbol.
2955ec4c 1217
6d30f5b2
NC
12182009-07-17 Chao-ying Fu <fu@mips.com>
1219
1220 * elfxx-mips.c (LOAD_INTERLOCKS_P): New define.
1221 (_bfd_mips_elf_size_dynamic_sections): For CPUs without load
1222 interlocking, the last PLT entry needs a nop in the branch delay slot.
1223 (_bfd_mips_elf_finish_dynamic_symbol): For CPUs with load itnerlocking,
1224 output the last two PLT entries in reverse order.
1225
1f85278f
L
12262009-07-16 H.J. Lu <hongjiu.lu@intel.com>
1227
1228 * elf32-i386.c (elf_i386_relocate_section): Don't get local
1229 STT_GNU_IFUNC symbol for relocatable link.
1230 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1231
f07749bb
L
12322009-07-10 H.J. Lu <hongjiu.lu@intel.com>
1233
1234 * bfdio.c (bfd_iovec): Add comments for bmmap.
1235 * bfd-in2.h: Regenerated.
1236
8455dd2c
L
12372009-07-10 H.J. Lu <hongjiu.lu@intel.com>
1238
1239 * Makefile.am: Run "make dep-am".
1240 * Makefile.in: Regenerated.
1241
cedfb179
DK
12422009-07-10 Doug Kwan <dougkwan@google.com>
1243
1244 * elf32-arm.c (stub_hash_newfunc): Initialize fields
1245 target_addend and orig_insn.
1246
fa8f86ff
TT
12472009-07-10 Tom Tromey <tromey@redhat.com>
1248
1249 * Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h.
1250 (elf-eh-frame.lo): Likewise.
1251 (elf32-bfin.lo): Likewise.
1252 (elf32-frv.lo): Likewise.
1253 (elf32-xc16x.lo): Likewise.
1254 * Makefile.in: Rebuild.
1255 * dwarf2.c: Included dwarf.h, not elf/dwarf2.h.
1256 * elf-eh-frame.c: Likewise.
1257 * elf32-bfin.c: Likewise.
1258 * elf32-frv.c: Likewise.
1259 * elf32-xc16x.c: Likewise.
1260
33c6a8fc
JB
12612009-07-10 Julian Brown <julian@codesourcery.com>
1262
1263 * elf32-arm.c (arm_build_one_stub): Use the hash entry of the
1264 symbol a stub entry is derived from, not the entry for the stub
1265 itself, in call to elf32_arm_final_link_relocate.
1266
1d770845
L
12672009-07-10 H.J. Lu <hongjiu.lu@intel.com>
1268
1269 * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
1270 when reporting addends.
1271
52cfded7
AM
12722009-07-10 Alan Modra <amodra@bigpond.net.au>
1273
1274 * elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
1275 data even when no stubs.
1276 (spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust.
1277
e054468f
AM
12782009-07-10 Alan Modra <amodra@bigpond.net.au>
1279
1280 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE.
1281 (ppc_elf_get_synthetic_symtab): Report addend.
1282 (PLT_IFUNC): Define.
1283 (struct ppc_elf_link_hash_table): Add iplt and reliplt.
1284 (ppc_elf_create_glink): New function.
1285 (ppc_elf_create_dynamic_sections): Use it.
1286 (ppc_elf_add_symbol_hook): Set has_ifunc_symbols.
1287 (update_local_sym_info): Allocate space for local_plt array.
1288 Don't bump local_got_refcounts for PLT_IFUNC. Return local_plt
1289 entry pointer.
1290 (is_branch_reloc): New function.
1291 (ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols.
1292 (ppc_elf_gc_sweep_hook): Likewise.
1293 (ppc_elf_adjust_dynamic_symbol): Likewise.
1294 (allocate_dynrelocs): Likewise.
1295 (ppc_elf_size_dynamic_sections): Likewise.
1296 (ppc_elf_relocate_section): Likewise.
1297 (branch_reloc_hash_match): Use is_branch_reloc.
1298 (ppc_elf_tls_optimize): Adjust for local_plt.
1299 (write_glink_stub): New function, extracted from..
1300 (ppc_elf_finish_dynamic_symbol): ..here. Handle STT_GNU_IFUNC.
1301 (ppc_elf_finish_dynamic_sections): Only write plt resolver and
1302 branch table when dynamic.
1303 (elf_backend_post_process_headers): Define.
1304 * elf64-ppc.c (elf_backend_post_process_headers): Define.
1305 (ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE.
1306 (ppc64_elf_get_synthetic_symtab): Report addend.
1307 (struct ppc_stub_hash_entry): Add plt_ent.
1308 (PLT_IFUNC): Define.
1309 (struct ppc_link_hash_table): Add iplt and reliplt.
1310 (create_linkage_sections): Make .iplt and .rela.iplt sections.
1311 (ppc64_elf_add_symbol_hook): Set has_ifunc_symbols.
1312 (update_local_sym_info): Allocate space for local_plt array.
1313 Don't bump local_got_ents for PLT_IFUNC. Return local_plt
1314 entry pointer.
1315 (update_plt_info): Pass pointer to plt_entry rather than sym hash,
1316 and don't change hash flags here.
1317 (is_branch_reloc): New function.
1318 (ppc64_elf_check_relocs): Handle STT_GNU_IFUNC.
1319 (ppc64_elf_gc_sweep_hook): Likewise.
1320 (ppc64_elf_adjust_dynamic_symbol): Likewise.
1321 (allocate_dynrelocs): Likewise.
1322 (ppc64_elf_size_dynamic_sections): Likewise.
1323 (ppc_build_one_stub, ppc_size_one_stub): Likewise.
1324 (ppc64_elf_size_stubs): Likewise.
1325 (ppc64_elf_relocate_section): Likewise.
1326 (get_sym_h): Adjust for local_plt.
1327 (branch_reloc_hash_match): Use is_branch_reloc.
1328 (ppc_type_of_stub): Pass plt_entry pointer and handle ifunc.
1329 (ppc64_elf_toc): Ignore SEC_EXCLUDE sections.
1330
041de40d
AM
13312009-07-10 Alan Modra <amodra@bigpond.net.au>
1332
1333 * elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
1334
7ae26bc1
AM
13352009-07-10 Alan Modra <amodra@bigpond.net.au>
1336
1337 * elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
1338 and ref_regular_nonweak comment.
1339 * elflink.c (elf_link_output_extsym): Special case ifunc syms
1340 when def_regular, not ref_regular.
1341 (elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
1342 * elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
1343 * elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
1344
9c4d0c1f
AM
13452009-07-09 Alan Modra <amodra@bigpond.net.au>
1346
1347 * elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
1348 of malloc'd struct call_info.
1349 (pasted_function): Likewise, priority too.
1350
2fc6d3b0
AM
13512009-07-07 Alan Modra <amodra@bigpond.net.au>
1352
1353 * elf32-spu.c (spu_elf_auto_overlay): Take into account section
1354 alignment when packing sections into overlays.
1355
9e1f7c0e
DK
13562009-07-03 Cary Coutant <ccoutant@google.com>
1357
1358 * dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
1359
4a768870
DK
13602009-07-03 Dave Korn <dave.korn.cygwin@gmail.com>
1361
1362 * coffcode.h (sec_to_styp_flags): Partially revert (functional
1363 changes only) earlier patch:-
1364
107601c8 13652009-06-25 Kai Tietz <kai.tietz@onevision.com>
4a768870 1366
107601c8
AM
1367 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1368 give .debug and .reloc data characteristics.
1369 (DOT_RELOC): New define for .reloc section string.
1370 (coff_write_object_contents): Use DOT_RELOC instead of string.
4a768870 1371
848f5748
TT
13722009-07-02 Tom Tromey <tromey@redhat.com>
1373
1374 * aoutx.h (aout_get_external_symbols): Declare 'amt' locally.
1375 * bfdwin.c (bfd_free_window): Cast to unsigned long.
1376
dda46a27
L
13772009-07-01 Nick Clifton <nickc@redhat.com>
1378
1379 * elf-m10300.c: Remove trailing white space.
1380 * reloc.c: Likewise.
1381
efde2f2c
NC
13822009-07-01 Douglas B Rupp <rupp@gnat.com>
1383
dda46a27 1384 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
efde2f2c 1385 BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions.
dda46a27
L
1386 * configure.in: Use them.
1387 * configure: Regenerate.
b11d79f2 1388 * config.in: Regenerate.
dda46a27 1389 * vmsutil.c: Include sysdep.h, remove ansidecl.h.
efde2f2c
NC
1390 #define _BSD_SOURCE. Add comments.
1391 (vms_file_stats_name): Calculate creation date based on available
1392 runtime data. Return 1 for version instead of 0.
1393
e1ec24c6
NC
13942009-07-01 Nick Clifton <nickc@redhat.com>
1395
1396 PR 10072
1397 * elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle
1398 to R_ARM_THM_PC8 relocation.
1399
2709f570
NC
14002009-06-29 Nick Clifton <nickc@redhat.com>
1401
1402 * elf-m10300.c (mn10300_elf_relax_section): Allow for the
1403 different uses of the relocations addend when a symbol is in a
1404 merged section.
1405
83b89087
L
14062009-06-27 H.J. Lu <hongjiu.lu@intel.com>
1407
1408 PR ld/10337
1409 * elf.c (bfd_section_from_shdr): Don't change sh_link for
1410 SHT_REL/SHT_RELA sections on executable nor shared library.
1411 Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF
1412 as a normal section.
1413
be7035c6
NC
14142009-06-25 Nick Clifton <nickc@redhat.com>
1415
1416 * elf-m10300.c (mn10300_elf_relax_section): Handle non-section
1417 symbols with SEC_MERGE flag.
1418
bdeb4032
KT
14192009-06-25 Kai Tietz <kai.tietz@onevision.com>
1420
1421 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1422 give .debug and .reloc data characteristics.
1423 (DOT_RELOC): New define for .reloc section string.
1424 (coff_write_object_contents): Use DOT_RELOC instead of string.
1425
b32e07d7
TG
14262009-06-25 Tristan Gingold <gingold@adacore.com>
1427
1428 * mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound)
1429 (bfd_mach_o_canonicalize_dynamic_symtab)
1430 (bfd_mach_o_get_synthetic_symtab): Defines.
1431 (TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry.
1432 (TARGET_NAME): Use Mach-O specific functions for dynamic.
1433
1434 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes
1435 for scattered relocations.
1436 (bfd_mach_o_i386_print_thread): New function.
1437 (bfd_mach_o_print_thread): Define.
1438
1439 * mach-o.c (text_section_names_xlat): Add an entry for __const.
7ee314fa 1440 (bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs):
b32e07d7
TG
1441 New functions extracted from ...
1442 (bfd_mach_o_canonicalize_reloc): ... This. Simplified.
1443 (bfd_mach_o_get_dynamic_reloc_upper_bound): New function.
1444 (bfd_mach_o_canonicalize_dynamic_reloc): New function.
1445 (bfd_mach_o_i386_flavour_string): Adjusted after enum renaming.
1446 (bfd_mach_o_ppc_flavour_string): Reindentation. Add 64 bits cases.
1447 (bfd_mach_o_scan_read_dylinker): Do not create a section anymore.
1448 Set name_str field.
1449 (bfd_mach_o_scan_read_dylib): Ditto.
1450 (bfd_mach_o_scan_read_thread): Set mdata at declaration. Add comments,
1451 reindent.
1452 (bfd_mach_o_scan_read_dysymtab): Set mdata at declaration. Correctly
1453 decode isym and flags on little endian targets. Set dysymtab field.
1454 (bfd_mach_o_scan_start_address): Adjust for enum names.
1455 (bfd_mach_o_lookup_section): Do not look for segments anymore.
1456 (bfd_mach_o_print_section): Display bfd section name.
1457 (bfd_mach_o_print_segment): Display none if no name.
1458 (bfd_mach_o_print_dysymtab): Display next index for local, external
1459 and undefined symbols.
1460 (bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str.
1461 Display dylinker name. Display thread and unixthread commands content.
1462 (bfd_mach_o_print_thread): New macro.
1463
1464 * mach-o.h (bfd_mach_o_mach_header_magic): Align numbers.
1465 (bfd_mach_o_ppc_thread_flavour): Ditto.
1466 (bfd_mach_o_i386_thread_flavour): Ditto.
1467 (BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum.
1468 (BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces
1469 BFD_MACH_O_THREAD_STATE_NONE.
1470 (bfd_mach_o_segment_command): Remove segment field.
1471 (bfd_mach_o_thread_flavour): Field offset is now unsigned long.
1472 (bfd_mach_o_dylinker_command): Remove section field, add name_str.
1473 (bfd_mach_o_prebound_dylib_command): Ditto.
1474 (bfd_mach_o_dylib_command): Ditto.
1475 (bfd_mach_o_prebound_dylib_command): Remove section field.
1476 (mach_o_data_struct): Add dysymtab field.
1477 (bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field.
1478 (bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc)
1479 (bfd_mach_o_build_commands): Remove parameter names and attributes.
1480 (bfd_mach_o_get_dynamic_reloc_upper_bound)
1481 (bfd_mach_o_canonicalize_dynamic_reloc): New prototypes.
1482
c41ba836
DK
14832009-06-25 Rafael Avila de Espindola <espindola@google.com>
1484
1485 * plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
1486 field of struct dirent.
1487
3188b070
TG
14882009-06-23 Tristan Gingold <gingold@adacore.com>
1489
1490 * vms.c (vms_get_synthetic_symtab): Remove duplicate definition
1491 of this macro. Fix indentation.
1492
022f8312
CL
14932009-06-22 Christophe Lyon <christophe.lyon@st.com>
1494
1495 * elf32-arm.c (elf32_arm_size_stubs): Use PLT address as
1496 destination for defined dynamic symbols when deciding whether to
1497 insert a stub or not.
1498 (allocate_dynrelocs): Make sure functions are not marked as Thumb
1499 when actually accessed through a PLT, even when generating a
1500 shared lib.
1501
d297e807
TG
15022009-06-22 Tristan Gingold <gingold@adacore.com>
1503
1504 * mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
1505 the relocs array.
1506
ceaf50a2
AM
15072009-06-22 Alan Modra <amodra@bigpond.net.au>
1508
1509 * elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
1510 * elf32-v850.c (v850_elf_relocate_section): Warning fix.
1511
983bddc8
AM
15122009-06-22 Alan Modra <amodra@bigpond.net.au>
1513
1514 * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
1515
f8703194
L
15162009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1517
1518 * elflink.c (elf_link_add_object_symbols): Avoid warning
1519 from -Wjump-misses-init in gcc 4.5.0.
1520
09a24cbf
L
15212009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1522
1523 * elf32-i386.c (elf_i386_check_relocs): Properly check local
1524 symbol on error.
1525 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1526
4c544807
L
15272009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1528
1529 * elf32-i386.c (elf_i386_tls_transition): Add a parameter,
1530 r_symndx. Report local symbol name on error.
1531 (elf_i386_check_relocs): Updated. Report local symbol name on
1532 error.
1533 (elf_i386_gc_sweep_hook): Updated.
1534 (elf_i386_relocate_section): Likewise.
1535
1536 * elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
1537 r_symndx. Report local symbol name on error.
1538 (elf64_x86_64_check_relocs): Updated. Report local symbol name
1539 on error.
1540 (elf64_x86_64_gc_sweep_hook): Updated.
1541 (elf64_x86_64_relocate_section): Likewise.
1542
b8674692
TG
15432009-06-19 Tristan Gingold <gingold@adacore.com>
1544
1545 * mach-o.c (bfd_mach_o_print_private_header): Fix format character.
1546
046b007d
TG
15472009-06-19 Tristan Gingold <gingold@adacore.com>
1548
1549 * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
1550 (bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
1551 (bfd_mach_o_valid): Ditto.
1552 (bfd_mach_o_wide_p): Ditto.
1553 (bfd_mach_o_canonicalize_reloc): Ditto.
1554 (bfd_mach_o_build_commands): Ditto.
1555 (bfd_mach_o_scan_read_thread): Ditto.
1556 (bfd_mach_o_flatten_sections): Ditto.
1557 (bfd_mach_o_scan_start_address): Ditto.
1558 (bfd_mach_o_lookup_section): Ditto.
1559 (bfd_mach_o_core_fetch_environment): Ditto.
1560 (bfd_mach_o_write_contents): Ditto. Handle reexport_dylib.
1561 (bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
1562 (bfd_mach_o_scan_write_symtab): Ditto.
1563 Use macros instead of hard-coded values.
1564 (bfd_mach_o_scan_read_symtab_symbol): Make the function static.
1565 Use bfd_mach_o_get_data instead of direct access. Use macros
1566 instead of hard-coded values.
1567 (bfd_mach_o_scan_read_symtab_strtab): Make the function static.
1568 Remove sym argument and get section from mdata.
1569 Move code into the else branch.
1570 (bfd_mach_o_scan_read_symtab_symbols): Make the function static.
1571 Remove sym argument and get section from mdata. Adjust code.
1572 (bfd_mach_o_scan_read_dylib): Move assertion into the created
1573 switch (which replaces consecutive if statements).
1574 (bfd_mach_o_scan_read_dysymtab): Rename seg to cmd. Load
1575 module table, table of content, indirect symbols and external
1576 referenced symbols.
1577 (bfd_mach_o_scan_read_symtab): Renames seg to symtab. Set symtab
1578 field.
1579 (bfd_mach_o_scan_read_linkedit): New function.
1580 (bfd_mach_o_scan_read_str): Ditto.
1581 (bfd_mach_o_count_symbols): Simplify the code by using the symtab
1582 field of mdata.
1583 (bfd_mach_o_get_symtab_upper_bound): Remove check as
1584 bfd_mach_o_count_symbols never returns an error.
1585 (bfd_mach_o_canonicalize_symtab): Simplify the code by using the
1586 symtab field (there might be only one symtab).
1587 (bfd_mach_o_scan_read_command): Handle reexported dylib.
1588 Handle sub frameworks, sub umbrella, sub library and sub client.
1589 Read code signature and segment split info commands.
1590 (bfd_mach_o_scan): Reindent.
1591 (bfd_mach_o_xlat_name): New type.
1592 (bfd_mach_o_print_flags): New function.
1593 (bfd_mach_o_get_name): Ditto.
1594 (bfd_mach_o_cpu_name): New variable.
1595 (bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
1596 (bfd_mach_o_section_type_name)
1597 (bfd_mach_o_section_attribute_name)
1598 (bfd_mach_o_load_command_name): New variables.
1599 (bfd_mach_o_print_private_header): New function.
1600 (bfd_mach_o_print_section_map): New function extracted from
1601 bfd_mach_o_print_private_bfd_data.
1602 (bfd_mach_o_print_section): Ditto. Print more infos.
1603 (bfd_mach_o_print_segment): Ditto.
1604 (bfd_mach_o_print_dysymtab): Ditto.
1605 (bfd_mach_o_bfd_print_private_bfd_data): Reworked. Handle
1606 load weak dylib, reexport dylib and id dylib.
1607 Handle code signature and segment_split info.
1608 Handle sub frameworks, sub umbrella, sub library and sub client.
1609 (bfd_mach_o_section_get_nbr_indirect): New function.
1610
1611 * mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro. Add comment.
1612 (bfd_mach_o_header_flags): New enum to define header flags.
1613 (bfd_mach_o_section_attribute): New enum to replace ...
1614 (BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
1615 BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
1616 BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
1617 BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
1618 BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
1619 these removed macros.
1620 (BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
1621 (bfd_mach_o_dylib_module): New type.
1622 (BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
1623 macros.
1624 (bfd_mach_o_dylib_table_of_content): New type.
1625 (BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
1626 (bfd_mach_o_dylib_reference): New type.
1627 (BFD_MACH_O_REFERENCE_SIZE): New macro.
1628 (bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
1629 modules, toc, references and indirect syms.
1630 (BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
1631 (bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
1632 unused). Add comment.
1633 (bfd_mach_o_dylib_command): Ditto.
1634 (bfd_mach_o_prebound_dylib_command): Ditto.
1635 (bfd_mach_o_linkedit_command): New type.
1636 (bfd_mach_o_str_command): New type.
1637 (bfd_mach_o_load_command): Add linkedit and str fields.
1638 (mach_o_data_struct): Add symtab field.
1639 (bfd_get_mach_o_data): Renamed to ...
1640 (bfd_mach_o_get_data): ... this new macro.
1641 (bfd_mach_o_scan_read_symtab_symbol,
1642 bfd_mach_o_scan_read_symtab_strtab,
1643 bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.
1644
1645 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
1646 instead of direct access.
1647
6d78d0b9
AM
16482009-06-19 Alan Modra <amodra@bigpond.net.au>
1649
1650 * elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
1651 R_PPC_PLTREL24 relocs.
1652 (ppc_elf_relocate_section): Likewise.
1653
3ec01793
AM
16542009-06-19 Alan Modra <amodra@bigpond.net.au>
1655
1656 * elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
1657 pointer to sym hash. Update all uses.
1658 (update_plt_info): Likewise. Don't check addend here.
1659
c2e61a4e
L
16602009-06-18 H.J. Lu <hongjiu.lu@intel.com>
1661
1662 * elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
1663 bfd_sym_from_r_symndx.
1664 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1665
87d72d41
AM
16662009-06-18 Alan Modra <amodra@bigpond.net.au>
1667
1668 * elf-bfd.h (struct sym_sec_cache): Delete.
1669 (struct sym_cache): New.
1670 (bfd_section_from_r_symndx): Delete prototype.
1671 (bfd_sym_from_r_symndx): Define prototype.
1672 * elf.c (bfd_section_from_r_symndx): Delete, replace with..
1673 (bfd_sym_from_r_symndx): ..new function.
1674 * elf32-arm.c: Update all uses of struct sym_sec_cache and
1675 bfd_section_from_r_symndx to new struct and function.
1676 * elf32-bfin.c: Likewise.
1677 * elf32-hppa.c: Likewise.
1678 * elf32-i386.c: Likewise.
1679 * elf32-m32r.c: Likewise.
1680 * elf32-m68hc1x.c: Likewise.
1681 * elf32-m68hc1x.h: Likewise.
1682 * elf32-m68k.c: Likewise.
1683 * elf32-ppc.c: Likewise.
1684 * elf32-s390.c: Likewise.
1685 * elf32-sh.c: Likewise.
1686 * elf64-ppc.c: Likewise.
1687 * elf64-s390.c: Likewise.
1688 * elf64-x86-64.c: Likewise.
1689 * elfxx-sparc.c: Likewise.
1690 * elfxx-sparc.h: Likewise.
1691
14aae723
L
16922009-06-18 H.J. Lu <hongjiu.lu@intel.com>
1693
1694 * elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
1695 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1696
5e486aa1
NC
16972009-06-18 Nick Clifton <nickc@redhat.com>
1698
1699 * elflink.c (elf_link_sort_relocs): Return early if there are no
1700 relocs to sort.
1701
361dff73
DK
17022009-06-18 Dave Korn <dave.korn.cygwin@gmail.com>
1703
32425da9
NC
1704 Merge cegcc and mingw32ce target name changes from
1705 CeGCC project:
361dff73 1706
32425da9 1707 2007-12-25 Pedro Alves <pedro_alves@portugalmail.pt>
361dff73
DK
1708
1709 * config.bfd: Add arm*-*-cegcc* target.
1710
32425da9 1711 2007-12-17 Pedro Alves <pedro_alves@portugalmail.pt>
361dff73
DK
1712
1713 * config.bfd: Add arm-*-mingw32ce* target.
1714
e03a8ed8
L
17152009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1716
1717 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
1718 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
1719 * elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
1720 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1721
17222009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1723
1724 * elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
1725 * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
1726 * elf32-i386.c (elf_i386_check_relocs): Use it.
1727 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1728
17292009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1730
1731 * elf-bfd.h (elf_dyn_relocs): New.
1732
1733 * elf32-i386.c (elf_i386_dyn_relocs): Removed.
1734 (elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
1735 elf_dyn_relocs.
1736 (elf_i386_copy_indirect_symbol): Likewise.
1737 (elf_i386_check_relocs): Likewise.
1738 (elf_i386_gc_sweep_hook): Likewise.
1739 (elf_i386_allocate_dynrelocs): Likewise.
1740 (elf_i386_readonly_dynrelocs): Likewise.
1741 (elf_i386_size_dynamic_sections): Likewise.
1742
1743 * elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
1744 (elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
1745 with elf_dyn_relocs.
1746 (elf64_x86_64_copy_indirect_symbol): Updated.
1747 (elf64_x86_64_check_relocs): Likewise.
1748 (elf64_x86_64_gc_sweep_hook): Likewise.
1749 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1750 (elf64_x86_64_allocate_dynrelocs): Likewise.
1751 (elf64_x86_64_readonly_dynrelocs): Likewise.
1752 (elf64_x86_64_size_dynamic_sections): Likewise.
1753
64e77c6d
L
17542009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1755
1756 * elf32-arm.c (create_got_section): Get existing .rela.got
1757 section.
1758 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1759 * elf32-lm32.c (create_got_section): Likewise.
1760 * elf32-m32r.c (create_got_section): Likewise.
1761 * elf32-ppc.c (ppc_elf_create_got): Likewise.
1762 * elf32-s390.c (create_got_section): Likewise.
1763 * elf32-sh.c (create_got_section): Likewise.
1764 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1765 * elf64-s390.c (create_got_section): Likewise.
1766 * elfxx-sparc.c (create_got_section): Likewise.
1767
1768 * elflink.c (_bfd_elf_create_got_section): Properly initialize
1769 the GOT size.
1770
d2149d72
L
17712009-06-16 H.J. Lu <hongjiu.lu@intel.com>
1772
1773 * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.
1774
1775 * elf32-i386.c (elf_i386_local_hash): Removed.
1776 (elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
1777 (elf_i386_get_local_sym_hash): Likewise.
1778
1779 * elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
1780 (elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
1781 (elf64_x86_64_get_local_sym_hash): Likewise.
1782 * elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
1783 (get_local_sym_hash): Likewise.
1784
cc3bd654
L
17852009-06-16 H.J. Lu <hongjiu.lu@intel.com>
1786
1787 * elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
1788 rel_got_sec and plt_sec.
1789 (elfNN_ia64_relax_section): Updated.
1790 (elfNN_ia64_create_dynamic_sections): Likewise.
1791 (get_got): Likewise.
1792 (allocate_dynrel_entries): Likewise.
1793 (elfNN_ia64_size_dynamic_sections): Likewise.
1794 (set_got_entry): Likewise.
1795 (elfNN_ia64_choose_gp): Likewise.
1796 (elfNN_ia64_relocate_section): Likewise.
1797 (elfNN_ia64_finish_dynamic_symbol): Likewise.
1798 (elfNN_ia64_finish_dynamic_sections): Likewise.
1799
be3e406d
UW
18002009-06-16 Ulrich Weigand <uweigand@de.ibm.com>
1801
1802 * elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
1803 also for calls.
1804
6de2ae4a
L
18052009-06-16 H.J. Lu <hongjiu.lu@intel.com>
1806
1807 * configure.in (elf): Add elf-ifunc.lo.
1808
1809 * configure: Regenerated.
1810 * Makefile.in: Likewise.
1811
1812 * elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
1813 srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.
1814
1815 * elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
1816 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
1817 irelifunc.
1818 (elf_i386_link_hash_table_create): Likewise.
1819 (elf_i386_create_dynamic_sections): Likewise.
1820 (elf_i386_check_relocs): Likewise.
1821 (elf_i386_allocate_dynrelocs): Likewise.
1822 (elf_i386_size_dynamic_sections): Likewise.
1823 (elf_i386_relocate_section): Likewise.
1824 (elf_i386_finish_dynamic_symbol): Likewise.
1825 (elf_i386_finish_dynamic_sections): Likewise.
1826 (elf_i386_create_got_section): Removed.
1827
1828 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
1829 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
1830 irelifunc.
1831 (elf64_x86_64_compute_jump_table_size): Updated.
1832 (elf64_x86_64_link_hash_table_create): Likewise.
1833 (elf64_x86_64_create_dynamic_sections): Likewise.
1834 (elf64_x86_64_check_relocs): Likewise.
1835 (elf64_x86_64_allocate_dynrelocs): Likewise.
1836 (elf64_x86_64_size_dynamic_sections): Likewise.
1837 (elf64_x86_64_relocate_section): Likewise.
1838 (elf64_x86_64_finish_dynamic_symbol): Likewise.
1839 (elf64_x86_64_finish_dynamic_sections): Likewise.
1840 (elf64_x86_64_create_got_section): Removed.
1841
1842 * elflink.c (_bfd_elf_create_got_section): Use log_file_align
1843 for pointer alignment. Set up section pointers.
1844 (_bfd_elf_create_dynamic_sections): Likewise.
1845 (_bfd_elf_create_ifunc_sections): Moved to ...
1846 * elf-ifunc.c: Here. New.
1847
1848 * Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
1849 (BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
1850 Run "make dep-am".
1851
81694485
NC
18522009-06-16 Doug Kwan <dougkwan@google.com>
1853
6de2ae4a
L
1854 * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
1855 to bfd_signed_vma. Cast constant operands which are used in
1856 offset related expressions to bfd_signed_vma type as appropriate.
81694485 1857
6db7e006
MR
18582009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1859
1860 * elf32-vax.c (elf_vax_plt_sym_val): New function.
1861 (elf_backend_plt_sym_val): Define.
1862
9b90d8fd
MR
18632009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1864
1865 * elf32-vax.c (elf_vax_reloc_type_class): New function.
1866 (elf_backend_reloc_type_class): Define.
1867
04981bc1
MR
18682009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1869
1870 * elf32-vax.c (elf_vax_relocate_section): For symbol references
1871 from an executable to a shared library treat R_VAX_PC32
1872 relocations as R_VAX_PLT32 ones.
1873
886815b2
MR
18742009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1875
1876 * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
1877 symbols in GOT space calculation.
1878 (elf_vax_relocate_section): Adjust accordingly.
1879
6c4fb25a
MR
18802009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1881
1882 * elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
1883 include <R11:R2>.
1884
7b6021f1
MR
18852009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1886
1887 * elf32-vax.c (elf_vax_check_relocs): Handle the visibility
1888 attribute.
1889 (elf_vax_relocate_section): Likewise.
1890
188dbb07
L
18912009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1892
1893 * elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
1894 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1895
048cbda4
L
18962009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1897
1898 * elf32-i386.c (elf_i386_check_relocs): Reformat.
1899 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1900
482c6ce9
L
19012009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1902
1903 * Makefile.am: Run "make dep-am".
1904 * Makefile.in: Regenerated.
1905
eba077f2
L
19062009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1907
1908 * elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
1909 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1910
ec68b083
NC
19112009-06-15 Nick Clifton <nickc@redhat.com>
1912
1913 * po/ru.po: New Russian translation.
1914 * configure.in (ALL_LINGUAS): Add ru.
1915 * configure: Regenerate.
1916
b80ee1aa
L
19172009-06-14 H.J. Lu <hongjiu.lu@intel.com>
1918
1919 * elf32-i386.c: Remove duplicated comments.
1920
44c4ea11
L
19212009-06-14 H.J. Lu <hongjiu.lu@intel.com>
1922
1923 PR ld/10270
1924 * elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
1925 dynamic IFUNC pointer in non-shared object. Use .got.plt
1926 for IFUNC definition in PIE.
1927 (elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
1928 PIE locally.
1929
1930 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
1931 dynamic IFUNC pointer in non-shared object. Use .got.plt
1932 for IFUNC definition in PIE.
1933 (elf64_x86_64_relocate_section): Resolve IFUNC definition in
1934 PIE locally.
1935
8b7e2992
L
19362009-06-13 H.J. Lu <hongjiu.lu@intel.com>
1937
1938 * elf32-i386.c (elf_i386_check_relocs): Properly report
1939 local symbol for unhandled relocation against STT_GNU_IFUNC
1940 symbol.
637fa7af 1941 (elf_i386_relocate_section): Likewise.
8b7e2992 1942 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
637fa7af 1943 (elf64_x86_64_relocate_section): Likewise.
8b7e2992 1944
c25bc9fc
L
19452009-06-13 H.J. Lu <hongjiu.lu@intel.com>
1946
1947 PR ld/10269
1948 * elf32-i386.c: Include "objalloc.h" and "hashtab.h".
1949 (elf_i386_link_hash_table): Add loc_hash_table and
1950 loc_hash_memory.
1951 (elf_i386_local_hash): New.
1952 (elf_i386_local_htab_hash): Likewise.
1953 (elf_i386_local_htab_eq): Likewise.
1954 (elf_i386_get_local_sym_hash): Likewise.
1955 (elf_i386_link_hash_table_free): Likewise.
1956 (elf_i386_allocate_local_dynrelocs): Likewise.
1957 (elf_i386_finish_local_dynamic_symbol): Likewise.
1958 (bfd_elf64_bfd_link_hash_table_free): Likewise.
1959 (elf_i386_link_hash_table_create): Create loc_hash_table and
1960 loc_hash_memory.
1961 (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
1962 (elf_i386_size_dynamic_sections): Likewise.
1963 (elf_i386_relocate_section): Likewise.
1964 (elf_i386_finish_dynamic_sections): Likewise.
1965 (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
1966 isn't NULL.
1967
1968 * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
1969 (elf64_x86_64_link_hash_table): Add loc_hash_table and
1970 loc_hash_memory.
1971 (elf64_x86_64_local_hash): New.
1972 (elf64_x86_64_local_htab_hash): Likewise.
1973 (elf64_x86_64_local_htab_eq): Likewise.
1974 (elf64_x86_64_get_local_sym_hash): Likewise.
1975 (elf64_x86_64_link_hash_table_free): Likewise.
1976 (elf64_x86_64_allocate_local_dynrelocs): Likewise.
1977 (elf64_x86_64_finish_local_dynamic_symbol): Likewise.
1978 (bfd_elf64_bfd_link_hash_table_free): Likewise.
1979 (elf64_x86_64_link_hash_table_create): Create loc_hash_table
1980 and loc_hash_memory.
1981 (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
1982 symbols.
1983 (elf64_x86_64_size_dynamic_sections): Likewise.
1984 (elf64_x86_64_relocate_section): Likewise.
1985 (elf64_x86_64_finish_dynamic_sections): Likewise.
1986 (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
1987 sym isn't NULL.
1988
dec9d5df
PB
19892009-06-10 Philip Blundell <philb@gnu.org>
1990
1991 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
1992 elf_sec->this_hdr == NULL.
1993
92bc0e80
TG
19942009-06-12 Tristan Gingold <gingold@adacore.com>
1995
1996 * reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
1997 * bfd-in2.h: Regenerated.
1998 * libbfd.h: Regenerated.
1999
2000 * mach-o.c (FILE_ALIGN): New macro.
2001 (bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
2002 (bfd_mach_o_print_symbol): Ditto.
2003 (bfd_mach_o_scan_write_thread): Adjust type of variable offset.
2004 (bfd_mach_o_get_reloc_upper_bound): New function.
2005 (bfd_mach_o_canonicalize_reloc): Ditto.
2006 (bfd_mach_o_scan_write_relocs): Ditto.
2007 (bfd_mach_o_scan_write_section_32): Remove offset argument.
2008 (bfd_mach_o_scan_write_section_64): Ditto.
2009 (bfd_mach_o_scan_write_segment_32): Write relocs. Fix size of data
2010 written for load command. Do not compute section file offset.
2011 (bfd_mach_o_scan_write_segment_64): Ditto.
2012 (bfd_mach_o_scan_write_symtab): Compute file offset first.
2013 Adjust for bfd_mach_o_asymbol. Move code to convert from BFD to
2014 Mach-O to ...
2015 (bfd_mach_o_mangle_symbols): ... this new function.
046b007d 2016 (bfd_mach_o_write_contents): Be sure to have load commands built.
92bc0e80
TG
2017 Call bfd_mach_o_mangle_symbols.
2018 (bfd_mach_o_build_commands): Adjust for filelen field.
2019 Use FILE_ALIGN macro. Clear section file offset if section is empty.
2020 Do not set symtab file offset anymore here.
2021 (bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
2022 (bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
2023 Set reloc_count and rel_filepos section fields.
2024 (bfd_mach_o_scan_read_section_32): Type of argument offset is now
2025 unsigned int.
2026 (bfd_mach_o_scan_read_section_64): Ditto.
2027 (bfd_mach_o_scan_read_section): Ditto.
2028 (bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
2029 bfd_mach_o_asymbol. Use unsigned int for file offset type.
2030 (bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
2031 Handle weak-ref symbols.
2032 (bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
2033 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2034 (bfd_mach_o_scan): Remove assignment to removed field.
2035 (bfd_mach_o_mkobject_init): Ditto.
2036 (bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
2037 (bfd_mach_o_bfd_reloc_type_lookup): New macro.
2038 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
2039 (bfd_mach_o_swap_reloc_in): Ditto.
2040 (bfd_mach_o_swap_reloc_out): Ditto.
2041
2042 * mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
2043 (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
2044 (BFD_MACH_O_REFERENCE_FLAG_DEFINED)
2045 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
2046 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
2047 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
2048 (BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
2049 (BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
2050 (BFD_MACH_O_N_WEAK_DEF): New macros.
2051 Add comments.
2052 (bfd_mach_o_section_type): Add new enumeration values.
2053 (BFD_MACH_O_S_SELF_MODIFYING_CODE)
2054 (BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
2055 (BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
2056 (BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
2057 macros.
2058 (BFD_MACH_O_GENERIC_RELOC_VANILLA)
2059 (BFD_MACH_O_GENERIC_RELOC_PAIR)
2060 (BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
2061 (BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
2062 (BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
2063 (BFD_MACH_O_RELENT_SIZE): Ditto.
2064 (BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
2065 (BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
2066 (BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
2067 (BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
2068 (BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
2069 (BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
2070 (BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
2071 (BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
2072 (bfd_mach_o_reloc_info): New struct.
2073 (bfd_mach_o_asymbol): New struct.
2074 (bfd_mach_o_symtab_command): The symbols field is now of type
2075 bfd_mach_o_asymbol.
2076 (bfd_mach_o_load_command): The offset and len fields are now of type
2077 unsigned int.
2078 (mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
2079 Add a filelen field. Add comments.
2080 (bfd_mach_o_backend_data): New struct.
2081 (bfd_mach_o_get_backend_data): New macro.
2082 (bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
2083 bfd_mach_o_asymbol.
2084 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2085 (bfd_mach_o_get_reloc_upper_bound): New prototype.
2086 (bfd_mach_o_canonicalize_reloc): Ditto.
7ee314fa 2087
92bc0e80
TG
2088 * mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
2089 duplicated macro. Now defined to _bfd_generic_is_local_label.
2090 (TARGET_NAME_BACKEND): New macro...
2091 (TARGET_NAME_BACKEND): ... used to name a new variable.
2092 (TARGET_NAME): Define relocs table using bfd_mach_o, reference
2093 Mach-O backend data.
2094
2095 * mach-o-i386.c (i386_howto_table): New variable.
2096 (bfd_mach_o_i386_swap_reloc_in): New function.
2097 (bfd_mach_o_i386_swap_reloc_out): Ditto.
2098 (bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
2099 (bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
2100 (bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
2101 (bfd_mach_o_bfd_reloc_type_lookup)
2102 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
2103
8c7d38e8
NC
21042009-06-11 Eric Paris <eparis@redhat.com>
2105 Nick Clifton <nickc@redhat.com>
2106
2107 * opncls.c (_maybe_make_executable): New function. Gives execute
2108 permission to an executable bfd that was opened for writing
2109 provided that it is a regular file. Replaces common code found in...
2110 (bfd_close): here and ...
2111 (bfd_close_all_done): here.
2112
f865a31d
AG
21132009-06-11 Anthony Green <green@moxielogic.com>
2114
2115 * reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
2116 * bfd-in2.h: Rebuilt.
2117 * libbfd.h: Rebuilt.
2118 * elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
2119 relocation support.
2120 (moxie_reloc_map): Ditto.
2121 Clean up copyright notice.
2122
25b88f33 21232009-06-10 Paul Pluzhnikov <ppluzhnikov@google.com>
7ee314fa 2124
1372b818 2125 * bfd-in2.h: bfd_mmap prototype.
25b88f33
PP
2126 * bfdio.c (bfd_mmap): New function.
2127 * libbfd.h (bfd_iovec): Add bmmap.
1372b818 2128 * cache.c (cache_bmmap): New function.
25b88f33
PP
2129 (cache_iovec): Initialize bmmap member.
2130 * opencls.c (opncls_bmmap): New function.
7ee314fa
AM
2131 (opncls_iovec): Initialize bmmap member.
2132
c2f09c75
TG
21332009-06-09 Tristan Gingold <gingold@adacore.com>
2134
2135 * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
2136 and stabstr_segment fields.
2137 (mach_o_be_vec, mach_o_le_vec): Removed
2138 (bfd_mach_o_version): New prototype.
2139
2140 * mach-o.c (bfd_mach_o_version): Make this function public.
2141 (mach_o_wide_p): New function.
2142 (bfd_mach_o_wide_p): Ditto.
2143 (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
2144 weird names.
2145 (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
2146 Search in the list only if the name starts with a dot.
2147 (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
2148 test. Check bfd_seek status.
2149 (bfd_mach_o_scan_write_thread): Check bfd_seek status.
2150 (bfd_mach_o_scan_write_section_32): Ditto.
2151 (bfd_mach_o_scan_write_section_64): Ditto.
2152 (bfd_mach_o_scan_write_section): Removed.
2153 (bfd_mach_o_scan_write_segment): Split into ...
2154 (bfd_mach_o_scan_write_segment_32): ... this and ...
2155 (bfd_mach_o_scan_write_segment_64): ... this. Check bfd_seek status.
2156 (bfd_mach_o_scan_write_symtab_symbols): Moved into ...
2157 (bfd_mach_o_scan_write_symtab): ... this. Write symtab from BFD
2158 symbol table. Now returns a boolean.
2159 (bfd_mach_o_write_contents): Set filetype. Check bfd_seek status.
2160 Adjust for status type.
2161 (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
2162 test. Write symbol table. Numbers the sections.
2163 (bfd_mach_o_read_header): Check bfd_seek status.
2164 Use mach_o_wide_p instead of hard-coded test.
2165 (bfd_mach_o_scan_read_section_32): Check bfd_seek status.
2166 (bfd_mach_o_scan_read_section_64): Ditto.
2167 (bfd_mach_o_scan_read_symtab_symbol): Ditto. Check bfd_seek status.
2168 Use BFD_MACH_O_N_TYPE instead of hard-coded value. Correctly
2169 handled common symbols.
2170 (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
2171 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2172 (bfd_mach_o_scan_read_dylinker): Ditto.
2173 (bfd_mach_o_scan_read_dylib): Ditto.
2174 (bfd_mach_o_scan_read_thread): Ditto.
2175 (bfd_mach_o_scan_read_symtab): Ditto.
2176 Do not create a section for the stabs.
2177 (bfd_mach_o_scan_read_uuid): Check bfd_seek status.
2178 (bfd_mach_o_scan_read_segment): Ditto.
2179 (bfd_mach_o_scan_read_command): Ditto.
2180 (bfd_mach_o_scan_start_address): Ditto.
2181 (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
2182 (bfd_mach_o_archive_p): Check bfd_seek status.
2183 (bfd_mach_o_core_fetch_environment): Ditto.
2184
2185 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
2186
2a81c24a
L
21872009-06-06 H.J. Lu <hongjiu.lu@intel.com>
2188
2189 * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
2190 (elf_i386_link_hash_table_create): Initialize irelifunc.
2191 (elf_i386_check_relocs): Updated. Set up irelifunc for
2192 shared objects.
2193 (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
2194 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
2195 shared objects.
2196 (elf_i386_relocate_section): Likewise.
2197
2198 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
2199 (elf64_x86_64_link_hash_table_create): Initialize irelifunc.
2200 (elf64_x86_64_check_relocs): Updated. Set up irelifunc for
2201 shared objects.
2202 (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
2203 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
2204 shared objects.
2205 (elf64_x86_64_relocate_section): Likewise.
2206
2207 * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
2208 ...
2209 (_bfd_elf_create_ifunc_sections): This.
2210
c2f09c75 2211 * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
2a81c24a
L
2212 ...
2213 (_bfd_elf_create_ifunc_sections): This. Create .rel[a].ifunc
2214 for shared objects.
2215
710ab287
L
22162009-06-06 H.J. Lu <hongjiu.lu@intel.com>
2217
2218 * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
2219 relocation for R_386_32 against STT_GNU_IFUNC symbol when
2220 building shared object. Check info->executable instead of
2221 !info->shared when setting non_got_ref.
2222 (elf_i386_allocate_dynrelocs): Allocate dynamic relocation
2223 for non-GOT reference of STT_GNU_IFUNC symbol in shared
2224 object. Allocate GOT relocation agsinst STT_GNU_IFUNC
2225 symbol if needed.
2226 (elf_i386_relocate_section): Output dynamic relocation for
2227 R_386_32 against STT_GNU_IFUNC symbol to get the real
2228 function address when building shared object.
2229 (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
2230 relocation for STT_GNU_IFUNC symbol in shared object.
2231
2232 * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
2233 dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
2234 symbol when building shared object. Check info->executable
2235 instead of !info->shared when setting non_got_ref.
2236 (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
2237 for non-GOT reference of STT_GNU_IFUNC symbol in shared
2238 library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
2239 if needed.
2240 (elf64_x86_64_relocate_section): Output dynamic relocation
2241 for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
2242 function address when building shared object.
2243 (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
2244 relocation for STT_GNU_IFUNC symbol in shared object.
2245
9e93c730
JK
22462009-06-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2247
2248 * Makefile.am: Run "make dep-am".
2249 (BFD32_BACKENDS): Add mach-o-i386.lo.
2250 (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
2251 * Makefile.in: Regenerate.
2252
74681fc4
AM
22532009-06-06 Alan Modra <amodra@bigpond.net.au>
2254
2255 * elf32-spu.c (spu_elf_relocate_section): Match overlay number
2256 when looking for soft-icache stubs.
2257
154a1ee5
TG
22582009-06-05 Tristan Gingold <gingold@adacore.com>
2259
2260 * mach-o.h: Update copyright year.
2261 (bfd_mach_o_mach_header_magic): New enum.
2262 (bfd_mach_o_cpu_subtype): Now an enum.
2263 (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
2264 (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
2265 (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
2266 (bfd_mach_o_load_command): Field type_required is now a boolean.
2267 Reindent prototypes.
2268 (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
2269 (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
2270 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
2271 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
2272 (bfd_mach_o_get_symtab_upper_bound): Ditto.
2273 (bfd_mach_o_canonicalize_symtab): Ditto.
2274 (bfd_mach_o_get_symbol_info): Ditto.
2275 (bfd_mach_o_print_symbol): Ditto.
2276 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
2277 (bfd_mach_o_make_empty_symbol): Ditto.
2278 (bfd_mach_o_write_contents): Ditto.
2279
2280 * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
2281 bfd_mach_o_mkobject): Defines.
2282 (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
2283 Do not check with target vector but with flavour.
2284 (struct mach_o_section_name_xlat): New declaration.
2285 (dwarf_section_names_xlat): Ditto.
2286 (text_section_names_xlat): Ditto.
2287 (data_section_names_xlat): Ditto.
2288 (struct mach_o_segment_name_xlat): Ditto.
2289 (segsec_names_xlat): Ditto.
2290 (bfd_mach_o_convert_section_name_to_bfd): New function.
2291 (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
2292 (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
2293 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
2294 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
2295 Accept any input and output flavour. Do not share private data
2296 anymore.
2297 (bfd_mach_o_count_symbols): Add a comment.
2298 (bfd_mach_o_get_symtab_upper_bound): Make it public.
2299 (bfd_mach_o_canonicalize_symtab): Ditto.
2300 (bfd_mach_o_get_symbol_info): Ditto.
2301 (bfd_mach_o_print_symbol): Ditto.
2302 (bfd_mach_o_write_header): Now returns a boolean instead of an int.
2303 Use constants instead of hard-coded values.
2304 (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
2305 values.
2306 (bfd_mach_o_scan_write_section_64): Ditto.
2307 (bfd_mach_o_scan_write_segment): Ditto.
2308 Do not copy sections anymore.
2309 (bfd_mach_o_write_contents): Make it public.
2310 Remove dead code. Rewrite typeflag assignment.
2311 (bfd_mach_o_build_commands): New function.
2312 (bfd_mach_o_set_section_contents): Ditto.
2313 (bfd_mach_o_make_empty_symbol): Make it public.
2314 (bfd_mach_o_read_header): Make it static.
2315 Convert to bfd_boolean.
2316 Use constants instead of hard-coded values.
2317 (bfd_mach_o_make_bfd_section): Call
2318 bfd_mach_o_convert_section_name_to_bfd to create name.
2319 (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
2320 values.
2321 (bfd_mach_o_scan_read_section_64): Ditto.
2322 (bfd_mach_o_scan_read_segment): Do not create a bfd section for
2323 a segment anymore. Use constants instead of hard-coded values.
2324 (bfd_mach_o_scan_read_command): Fix style.
2325 (bfd_mach_o_scan): Use constants instead of hard-coded values.
2326 Get rid of BFD_IO_FUNCS.
2327 (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
2328 (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
2329 (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
2330 (bfd_mach_o_object_p): Removed.
2331 (bfd_mach_o_gen_core_p): New function, replaces ...
2332 (bfd_mach_o_core_p): ... deleted.
2333 (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
2334
2335 * mach-o-i386.c: New file.
2336 * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
2337 * configure.in (TDEFINES): Add mach_o_i386_vec.
2338 * configure: Regenerated.
2339 * targets.c: Add mach_o_i386_vec.
2340
2341 * mach-o.c: Update copyright years.
2342 (BFD_IO_FUNCS): Remove (was not used).
2343 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
2344 bfd_mach_o_slurp_extended_name_table,
2345 bfd_mach_o_construct_extended_name_table,
2346 bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
2347 bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
2348 bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
2349 bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
2350 bfd_mach_o_get_section_contents_in_window,
2351 bfd_mach_o_bfd_is_local_label_name,
2352 bfd_mach_o_bfd_is_target_special_symbol,
2353 bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
2354 bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
2355 bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
2356 bfd_mach_o_minisymbol_to_symbol,
2357 bfd_mach_o_bfd_get_relocated_section_contents,
2358 bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
2359 bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
2360 bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
2361 bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
2362 bfd_mach_o_bfd_merge_private_bfd_data,
2363 bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
2364 bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
2365 bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
2366 bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
2367 bfd_mach_o_bfd_copy_private_header_data,
2368 bfd_mach_o_core_file_matches_executable_p): Move these defines ...
2369 * mach-o-target.c: ... here.
2370 Update copyright years.
2371
a1ef399e
AM
23722009-06-04 Alan Modra <amodra@bigpond.net.au>
2373
2374 * dep-in.sed: Don't use \n in replacement part of s command.
2375 * Makefile.am (DEP1): LC_ALL for uniq.
2376 Run "make dep-am".
2377 * Makefile.in: Regenerate.
2378
2e75bb35
L
23792009-06-03 H.J. Lu <hongjiu.lu@intel.com>
2380
2381 * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
2382 h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
2383 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2384
0018b0a3
L
23852009-06-03 H.J. Lu <hongjiu.lu@intel.com>
2386
2387 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
2388 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
2389 (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
2390 against STT_GNU_IFUNC symbols for static executables.
2391 (elf_i386_finish_dynamic_symbol): Load GOT entry with
2392 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2393
2394 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
2395 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
2396 (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
2397 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2398
94313f36
RS
23992009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com>
2400
2401 * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
2402 symbols to be left unimported when linking statically.
2403 * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
2404 code when linking statically.
2405
7afd84dc
L
24062009-06-02 H.J. Lu <hongjiu.lu@intel.com>
2407
2408 * elf32-i386.c (elf_i386_check_relocs): Increment
2409 got.refcount for R_386_GOT32/R_386_GOTOFF relocations
2410 against STT_GNU_IFUNC symbol.
2411 (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
2412 local STT_GNU_IFUNC definition is used.
2413 (elf_i386_relocate_section): Handle got.offset != -1 for
2414 R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
2415 symbol.
2416
2417 * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
2418 got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
2419 relocations against STT_GNU_IFUNC symbol.
2420 (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
2421 local STT_GNU_IFUNC definition is used.
2422 (elf64_x86_64_relocate_section): Handle got.offset != -1
2423 for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
2424 STT_GNU_IFUNC symbol.
2425
cbe950e9
L
24262009-06-01 H.J. Lu <hongjiu.lu@intel.com>
2427
2428 PR ld/10205
2429 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
2430 (elf_i386_reloc_type_lookup): Likewise.
2431 (R_386_tls): Removed.
2432 (R_386_irelative): New.
2433 (R_386_vt_offset): Updated.
2434 (elf_i386_rtype_to_howto): Likewise.
2435 (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
2436 (elf_i386_link_hash_table_create): Initialize igotplt,
2437 iplt and irelplt.
2438 (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
2439 (elf_i386_adjust_dynamic_symbol): Likewise.
2440 (elf_i386_allocate_dynrelocs): Likewise.
2441 (elf_i386_relocate_section): Likewise.
2442 (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
2443 sections.
2444 (elf_i386_finish_dynamic_symbol): When building a static
2445 executable, use .iplt, .igot.plt and .rel.iplt sections for
2446 STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
2447 locally defined STT_GNU_IFUNC symbol.
2448
2449 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
2450 (x86_64_reloc_map): Likewise.
2451 (R_X86_64_standard): Updated.
2452 (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
2453 (elf64_x86_64_link_hash_table_create): Initialize igotplt,
2454 iplt and irelplt.
2455 (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
2456 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
2457 (elf64_x86_64_allocate_dynrelocs): Likewise.
2458 (elf64_x86_64_relocate_section): Likewise.
2459 (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
2460 sections.
2461 (elf64_x86_64_finish_dynamic_symbol): When building a static
2462 executable, use .iplt, .igot.plt and .rela.iplt sections for
2463 STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
2464 for locally defined STT_GNU_IFUNC symbol.
2465
2466 * reloc.c (BFD_RELOC_386_IRELATIVE): New.
2467 (BFD_RELOC_X86_64_IRELATIVE): Likewise.
2468
2469 * bfd-in2.h: Regenerated.
2470 * libbfd.h: Likewise.
2471
3aa14d16
L
24722009-06-01 H.J. Lu <hongjiu.lu@intel.com>
2473
2474 * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
2475 (_bfd_elf_make_ifunc_reloc_section): Removed.
2476 (_bfd_elf_is_ifunc_symbol): Likewise.
2477 (_bfd_elf_create_static_ifunc_sections): New.
2478
2479 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
2480 symbol check to ...
2481 (elf_link_add_object_symbols): Here.
2482 (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
2483 STT_GNU_IFUNC symbol.
2484 (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
2485 if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
2486 (IFUNC_INFIX): Removed.
2487 (get_ifunc_reloc_section_name): Likewise.
2488 (_bfd_elf_make_ifunc_reloc_section): Likewise.
2489 (_bfd_elf_is_ifunc_symbol): Likewise.
2490 (_bfd_elf_create_static_ifunc_sections): New.
2491
eb4ff4d6
L
24922009-05-29 H.J. Lu <hongjiu.lu@intel.com>
2493
2494 * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
2495 (create_got_section): Likewise.
2496 (allocate_dynrelocs): Likewise.
2497 (readonly_dynrelocs): Likewise.
2498 (set_tls_module_base): Likewise.
2499 (dtpoff_base): Likewise.
2500 (tpoff): Likewise.
2501 (elf_i386_link_hash_table_create): Updated.
2502 (elf_i386_create_dynamic_sections): Likewise.
2503 (elf_i386_check_relocs): Likewise.
2504 (elf_i386_size_dynamic_sections): Likewise.
2505 (elf_i386_relocate_section): Likewise.
2506
2507 * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
2508 (create_got_section): Likewise.
2509 (allocate_dynrelocs): Likewise.
2510 (readonly_dynrelocs): Likewise.
2511 (set_tls_module_base): Likewise.
2512 (dtpoff_base): Likewise.
2513 (tpoff): Likewise.
2514 (elf64_x86_64_link_hash_table_create): Updated.
2515 (elf64_x86_64_create_dynamic_sections): Likewise.
2516 (elf64_x86_64_check_relocs): Likewise.
2517 (elf64_x86_64_size_dynamic_sections): Likewise.
2518 (elf64_x86_64_relocate_section): Likewise.
2519
fc579192
NC
25202009-05-28 Nick Clifton <nickc@redhat.com>
2521
2522 * targets.c (_bfd_target_vector): Only include plugin target in
2523 all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
2524
5ebe2858
UW
25252009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
2526
2527 * elf32-spu.c (struct call_info): New member broken_cycle.
2528 (remove_cycle): Instead of physically removing call_info structures
2529 to break call graph cycles, mark them using the broken_cycle flag.
2530 (mark_overlay_section): Respect broken_cycle flag.
2531 (unmark_overlay_section): Likewise.
2532 (collect_lib_sections): Likewise.
2533 (collect_overlays): Likewise.
2534 (sum_stack): Likewise.
2535
34ad4cb0
UW
25362009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
2537
2538 * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
2539 (mark_functions_via_relocs): Initialize callee->count to 1.
2540 (pasted_function): Likewise.
2541 (spu_elf_auto_overlay): Honor call counts when determining number
2542 of stubs required in software i-cache mode.
2543
fc579192
NC
25442009-05-27 Rafael Avila de Espindola <espindola@google.com>
2545
2546 * plugin.c (program_name): Remove.
2547 (plugin_program_name): New.
2548 (bfd_plugin_set_program_name): New.
2549 (try_load_plugin): Use plugin_program_name.
2550 * plugin.h (bfd_plugin_set_program_name): New.
2551
25522009-05-27 Rafael Avila de Espindola <espindola@google.com>
5691d22d
NC
2553
2554 * aclocal.m4: Include ../config/plugins.m4.
2555 * configure.in: Use AC_PLUGINS.
2556 * configure: Regenerate.
2557 * Makefile.in: Regenerate.
2558 * doc/Makefile.in: Regenerate.
2559
c8a1f254
NS
25602009-05-27 Nathan Sidwell <nathan@codesourcery.com>
2561
2562 * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
2563 link.
2564 * bout.c (b_out_bfd_relax_section): Reject relocatable links.
2565 * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
2566 * elf32-avr.c (elf32_avr_relax_section): Likewise.
2567 * elf32-frv.c (elf32_avr_relax_section): Likewise.
2568 * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
2569 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2570 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2571 * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
2572 * reloc.c (bfd_generic_relax_section): Likewise.
2573 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
2574 * vms.c (vms_bfd_relax_section): Likewise.
2575
68d7e96a
L
25762009-05-26 H.J. Lu <hongjiu.lu@intel.com>
2577
2578 * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
2579
2580 * elf32-i386.c (is_indirect_symbol): Renamed to ...
2581 * elflink.c (_bfd_elf_is_ifunc_symbol): This.
2582
2583 * elf32-i386.c (allocate_dynrelocs): Updated.
2584 (elf_i386_relocate_section): Likewise.
2585 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2586 (elf64_x86_64_relocate_section): Likewise.
2587
2588 * elf64-x86-64.c (is_indirect_symbol): Removed.
2589
f12e7348
NC
25902009-05-26 Nick Clifton <nickc@redhat.com>
2591
2592 * po/id.po: Updated Indonesian translation.
2593
ce3c775b
NC
25942009-05-26 Rafael Avila de Espindola <espindola@google.com>
2595
2596 * Makefile.am: Run "make dep-am".
2597 (AM_CPPFLAGS): New.
2598 (LIBDL): New.
2599 (ALL_MACHINES): Add cpu-plugin.lo.
2600 (ALL_MACHINES_CFILES): Add cpu-plugin.c.
2601 (BFD32_BACKENDS): Add plugin.lo.
2602 (BFD32_BACKENDS_CFILES): Add plugin.c.
2603 (libbfd_la_LIBADD): Add LIBDL
2604 * archures.c (bfd_architecture): Add bfd_arch_plugin.
2605 (bfd_plugin_arch): Declare.
2606 * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
2607 * bfd.c (bfd): Add plugin_data.
2608 * config.bfd: Handle the plugin target.
2609 * configure.in: Check for --enable-plugins.
2610 (LT_INIT): Use the dlopen option.
2611 * cpu-plugin.c: New.
2612 * plugin.c: New.
2613 * plugin.h: New.
2614 * targets.c (plugin_vec): Declare.
2615 (_bfd_target_vector): Add plugin_vec.
2616 * Makefile.in: Regenerate.
2617 * bfd-in2.h: Regenerate.
2618 * configure: Regenerate.
2619
9e097a72
AM
26202009-05-26 Alan Modra <amodra@bigpond.net.au>
2621
2622 * dep-in.sed: Don't modify .o to .lo here. Output one filename
2623 per line with all lines having continuation backslash. Prefix
2624 first line with "A", following lines with "B".
2625 * Makefile.am (DEP): Don't use dep.sed here.
2626 (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
2627 dep.sed here on dependencies, sort and uniq.
2628 * Makefile.in: Regenerate.
2629
d5acff2f
TG
26302009-05-25 Tristan Gingold <gingold@adacore.com>
2631
2632 * makefile.vms: Add verilog.obj to object list OBJS.
2633
5c93f09b
AM
26342009-05-24 Alan Modra <amodra@bigpond.net.au>
2635
107601c8
AM
2636 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
2637 for BFD_IN_MEMORY is cleared.
2638 (bfd_bwrite): Zero excess memory allocated.
5c93f09b 2639
48229727
JB
26402009-05-22 Julian Brown <julian@codesourcery.com>
2641
2642 * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
2643 macros.
2644 (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
2645 (elf32_arm_stub_a8_veneer_blx): New stub sequences.
2646 (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
2647 arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
2648 (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
2649 (a8_erratum_fix, a8_erratum_reloc): New structs.
2650 (elf32_arm_link_hash_table): Add a8_erratum_fixes,
2651 num_a8_erratum_fixes, fix_cortex_a8 fields.
2652 (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
2653 (elf32_arm_add_stub): Split into two parts, creating...
2654 (elf32_arm_create_or_find_stub_sec): New function.
2655 (elf32_arm_final_link_relocate): Add forward declaration.
2656 (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
2657 relocations, multiple relocations per stub.
2658 (find_stub_size_and_template): New (using parts of arm_size_one_stub).
2659 (arm_size_one_stub): Use find_stub_size_and_template.
2660 (a8_reloc_compare): New.
2661 (find_thumb_glue): Add forward declaration.
2662 (cortex_a8_erratum_scan): New.
2663 (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
2664 (bfd_elf32_arm_set_cortex_a8_fix): New.
2665 (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
2666 (arm_map_one_stub): Add THUMB32_TYPE support.
2667 (a8_branch_to_stub_data): New.
2668 (make_branch_to_a8_stub): New.
2669 (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
2670 * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
2671 (bfd_elf32_arm_set_target_relocs): Add argument for controlling
2672 Cortex-A8 erratum workaround.
2673 * bfd-in2.h: Regenerate.
2674
2b3decb5
AM
26752009-05-22 Alan Modra <amodra@bigpond.net.au>
2676
2677 * Makefile.am: Run "make dep-am".
2678 * Makefile.in: Regenerate.
2679 * po/SRC-POTFILES.in: Regenerate.
2680
930e005c
AM
26812009-05-21 Alan Modra <amodra@bigpond.net.au>
2682
2683 * elflink.c (elf_link_input_bfd): Correct *pindex change in last
2684 commit.
2685
6e0b88f1
AM
26862009-05-21 Alan Modra <amodra@bigpond.net.au>
2687
2688 * elf-bfd.h (struct elf_backend_data
2689 <elf_backend_link_output_symbol_hook>): Return an int.
2690 * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
2691 symbols on deleted .opd entries.
2692 * elflink.c (elf_link_output_sym): Return without outputting sym
2693 if output_symbol_hook returns 2.
2694 (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
2695 Abort if we must not discard sym.
2696 (elf_link_input_bfd): Similarly, don't set finfo->indices for
2697 local syms.
2698 (bfd_elf_final_link): Adjust elf_link_output_sym calls.
2699 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
2700 elf_backend_link_output_symbol_hook return type change.
2701 * elf32-arm.c (output_arch_syminfo): Likewise.
2702 (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
2703 (elf32_arm_output_arch_local_syms): Likewise.
2704 * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
2705 * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
2706 (bfd_score_elf_link_output_symbol_hook): Likewise.
2707 * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
2708 * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
2709 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
2710 * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
2711 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
2712 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
2713 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
2714 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
2715 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
2716 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2717 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2718
5ef11c02
AM
27192009-05-21 Alan Modra <amodra@bigpond.net.au>
2720
2721 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
2722 out of range .opd symbols.
2723
ebf12fbe
DK
27242009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
2725
2726 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
2727 fprintf_vma directly.
2728 * peXXigen.c (pe_print_edata): Likewise.
2729 (pe_print_pdata): Likewise.
2730 (_bfd_XX_print_ce_compressed_pdata): Likewise.
2731 (_bfd_XX_print_private_bfd_data_common): Likewise.
2732
c1711530
DK
27332009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
2734
2735 * cofflink.c (process_embedded_commands): Ignore "-aligncomm".
2736
22a8f80e 27372009-05-15 Andrew Stubbs <ams@codesourcery.com>
164e7efc 2738 Paul Brook <paul@codesourcery.com>
22a8f80e
PB
2739
2740 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
2741 fix discarded sections.
2742
335bd8f2
UW
27432009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2744
2745 * elf32-spu.c (mark_overlay_section): Move .init and .fini
2746 sections into the software icache.
2747
cdc83fba
UW
27482009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2749
2750 * elf32-spu.c (build_stub): Always build "compact" sofware
2751 i-cache stubs.
2752
97fc8d84
UW
27532009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2754
2755 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
2756 (spu_elf_setup): Initialize it.
2757 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
2758 Update to new-sytle cache manager data structures.
2759 (spu_elf_build_stubs): Generate new-style cache manager data
2760 structures and symbols.
2761 (spu_elf_auto_overlay): Update size computation.
2762
452de53c
UW
27632009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2764
2765 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
2766 segments first amongst the program headers.
2767
d342a8b1
UW
27682009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2769
2770 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
2771 into addresses for relocation types that look at high bits. Remove
2772 special handling of relocation overflow warnings.
2773
cc210763
UW
27742009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2775
2776 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
2777 control flow graph between fragments of a function.
2778
c1ea05bb
UW
27792009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2780
2781 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
2782 generate only a 16-byte .toe section.
2783 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
2784
bbb0fc04
AM
27852009-05-14 Alan Modra <amodra@bigpond.net.au>
2786
2787 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
2788 (spu_elf_place_overlay_data): ..here. New function.
2789 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
2790
6e6718a3
AJ
27912009-05-13 Andrew Jenner <andrew@codesourcery.com>
2792
2793 * elf32-arm.c: Move sysdep.h to start of file.
2794
77ae44b0
AM
27952009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
2796
2797 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
2798 start of overlays.
2799 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
2800 __icache_tag_array and __icache_tag_array_size.
2801
51408ec2
AM
28022009-05-11 Masaki Muranaka <monaka@monami-software.com>
2803
2804 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
2805 ATTRIBUTE_UNUSED.
2806 (bfinfdpic_link_omit_section_dynsym): Likewise.
2807 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
2808
2468f9c9
PB
28092009-05-05 Paul Brook <paul@codesourcery.com>
2810
2811 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
2812 * bfd-in2.h: Regenerate.
2813 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
2814 (_arm_elf_section_data): Add text and exidx fields.
2815 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
2816 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
2817 copy_exidx_entry): New functions.
2818 (elf32_arm_write_section): Fixup .ARM.exidx contents.
2819
738a79f6
CL
28202009-05-05 Christophe lyon <christophe.lyon@st.com>
2821
2822 * elf32-arm.c (DEF_STUBS): New helper define.
2823 (DEF_STUB): Likewise.
2824 (stub_def): New type.
2825 (stub_definitions): New array, containing stub template pointers
2826 and sizes.
2827 (arm_size_one_stub): Make use of stub_definitions.
2828
09e2aba4
DK
28292009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
2830
2831 * elflink.c (find_version_for_sym): Remove from here, ...
2832 * linker.c (bfd_find_version_for_sym): ... rename, replace
2833 here, make public and update all callers.
2834 * bfd-in2.h: Regenerate.
2835
d8045f23
NC
28362009-04-30 Nick Clifton <nickc@redhat.com>
2837
2838 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
2839 section pointer.
2840 (struct elf_obj_data): Add has_ifunc_symbols boolean.
2841 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
2842 into a STT_GNU_IFUNC symbol type.
2843 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
2844 type.
2845 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
2846 the binary contains ifunc symbols.
2847 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
2848 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
2849 * elf32-i386.c (is_indirect_function): New function.
2850 (elf_i386_check_relocs): Create an ifunc output section.
2851 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
2852 section if necessary.
2853 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
2854 if necessary.
2855 (elf_i386_add_symbol_hook): New function. Set the
2856 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
2857 symbol is encountered.
2858 (elf_backend_post_process_headers): Define.
2859 (elf_backend_add_symbol_hook): Define.
2860 (elf_i386_post_process_headers): Rename to
2861 elf_i388_fbsd_post_process_headers.
2862 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
2863 (is_indirect_function): New function.
2864 (elf64_x86_64_check_relocs): Create an ifunc output section.
2865 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
2866 section if necessary.
2867 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
2868 symbol if necessary.
2869 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
2870 elf_obj_data structure if an ifunc symbol is encountered.
2871 (elf_backend_post_process_headers): Define.
2872 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
2873 if we have ifunc symbols to handle.
2874 (get_ifunc_reloc_section_name): New function. Computes the name
2875 for an ifunc section.
2876 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
2877 section to hold ifunc relocs.
2878 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
2879 (bfd_print_symbol_vandf): Handle ifunc symbols.
2880 (bfd_decode_symclass): Likewise.
2881 * bfd-in2.h: Regenerate.
2882
96c23d59
JM
28832009-04-30 Joseph Myers <joseph@codesourcery.com>
2884
2885 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
2886 MOVW and MOVT relocations in a shared library link.
2887
c067354b
NC
28882009-04-27 Anthony Green <green@moxielogic.com>
2889
2890 * verilog.c: New file.
2891 * Makefile.am (BFD32_LIBS): Add verilog.c.
2892 (BFD32_LIBS_CFILES): Add verilog.c.
2893 (verilog.lo): New build rule.
2894 * Makefile.in: Rebuilt.
2895 * targets.c: Add verilog support.
2896 * bfd.c (tdata union): Add Verilog private data field.
2897 * bfd-in2.h: Regenerate.
2898
325c681d
L
28992009-04-27 H.J. Lu <hongjiu.lu@intel.com>
2900
2901 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
2902 copy pe_opthdr.
2903
ba775898
DK
29042009-04-23 Matthias Klose <doko@ubuntu.com>
2905
2e28a5fc 2906 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
ba775898 2907
155d87d7
CL
29082009-04-22 Christophe Lyon <christophe.lyon@st.com>
2909
2910 PR9743
2911 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
2912 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
2913 (elf32_arm_size_stubs): Likewise.
2914 (record_thumb_to_arm_glue): Deleted unused function.
2915 (bfd_elf32_arm_process_before_allocation): No longer handle
2916 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
2917 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
2918 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
2919
3e6b1042
DJ
29202009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
2921
2922 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
2923 (elf32_arm_write_section): Declare early.
2924 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
2925 (arm_allocate_glue_section_space): Exclude empty sections.
2926 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
2927 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
2928 BFD.
2929 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
2930 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
2931 (elf32_arm_size_dynamic_sections): Allocate interworking
2932 sections here.
2933 (bfd_elf32_bfd_final_link): Define.
2934
4f360784
L
29352009-04-21 H.J. Lu <hongjiu.lu@intel.com>
2936
2937 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
154a1ee5 2938
4f360784
L
2939 * coffcode.h (coff_compute_section_file_positions): Clear
2940 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
2941
2942 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
2943 force_minimum_alignment.
2944
2945 * libcoff.h: Regenerated.
2946
2947 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
2948 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
2949
2950 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
2951 nor target_subsystem.
2952
2953 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
2954 force_minimum_alignment nor target_subsystem.
2955
e48570bb
DK
29562009-04-21 Kai Tietz <kai.tietz@onevision.com>
2957
2958 * coff-x86_64.c (PEI_HEADERS): Protect includes.
2959 (bfd_pe_print_pdata): Remove #ifdef PE variation.
2960 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
2961 include in coff-x86_64.c of headers.
2962 (PDATA_ROW_SIZE): New define.
2963 (pex_regs[]): New static array.
2964 (pex64_get_runtime_function): New static function.
2965 (pex64_get_unwind_info): Likewise.
2966 (pex64_get_scope_entry): Likewise.
2967 (pex64_xdata_print_uwd_codes): Likewise.
2968 (pex64_get_section_by_rva): Likewise.
2969 (pex64_dump_xdata): Likewise.
2970 (pex64_bfd_print_pdata): Likewise.
2971 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
2972 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
2973 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
2974
383c383f 29752009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
4f360784
L
2976 Alan Modra <amodra@bigpond.net.au>
2977 Dave Korn <dave.korn.cygwin@gmail.com>
383c383f
AM
2978
2979 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
2980 long names and non-NUL-terminated strings.
2981
b6b450f1
L
29822009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2983
2984 * bfd-in2.h: Regenerated.
2985
d9118602
L
29862009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2987
2988 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
2989 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
2990
92dd4511
L
29912009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2992
2993 PR binutils/10074
2994 * coffcode.h (bfd_pei_p): New.
2995
2996 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
2997 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
2998 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
2999 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
3000 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
3001 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
3002
3003 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
3004 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
3005 bfd_efi_rtdrv_x86_64_vec,
3006 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
3007 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
3008 * targets.c: Likewise.
3009
3010 * configure: Regenerated.
3011 * libcoff.h: Likewise.
3012 * Makefile.in: Likewise.
3013
3014 * efi-app-ia32.c: Removed.
3015 * efi-app-x86_64.c: Likewise.
3016 * efi-bsdrv-ia32.c: Likewise.
3017 * efi-bsdrv-ia64.c: Likewise.
3018 * efi-bsdrv-x86_64.c: Likewise.
3019 * efi-rtdrv-ia32.c: Likewise.
3020 * efi-rtdrv-ia64.c: Likewise.
3021 * efi-rtdrv-x86_64.c: Likewise.
3022 * efi-rtdrv-ia32.c: Likewise.
3023
3024 * efi-app-ia64.c: Moved to ...
3025 * pei-ia64.c: This.
3026 (TARGET_SYM): Set to bfd_pei_ia64_vec.
3027 (TARGET_NAME): Set to pei-ia64.
3028
3029 * libpei.h (bfd_target_pei_p): Removed.
3030 (bfd_target_pei_arch): Likewise.
3031 (bfd_target_efi_app_p): Likewise.
3032 (bfd_target_efi_app_arch): Likewise.
3033 (bfd_target_efi_bsdrv_p): Likewise.
3034 (bfd_target_efi_bsdrv_arch): Likewise.
3035 (bfd_target_efi_rtdrv_p): Likewise.
3036 (bfd_target_efi_rtdrv_arch): Likewise.
3037 (bfd_pe_executable_p): Likewise.
3038
3039 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
3040 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
3041 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
3042 and efi-rtdrv-ia32.c.
3043 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
3044 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
3045 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
3046 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
3047 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
3048 efi-rtdrv-x86_64.c. Add pei-ia64.c.
3049 (efi-app-ia64.lo): Removed.
3050 (efi-bsdrv-ia32.lo): Likewise.
3051 (efi-rtdrv-ia32.lo): Likewise.
3052 (efi-app-ia64.lo): Likewise.
3053 (efi-bsdrv-ia64.lo): Likewise.
3054 (efi-rtdrv-ia64.lo): Likewise.
3055 (efi-app-x86_64.lo): Likewise.
3056 (efi-bsdrv-x86_64.lo): Likewise.
3057 (efi-rtdrv-x86_64.lo): Likewise.
3058 (pei-ia64.lo): New.
3059
3060 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
3061 with bfd_pei_p.
3062 (arch_type): Removed.
3063 (pe_arch): Likewise.
3064 (pe_bfd_object_p): Just return coff_object_p.
3065
3066 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
3067 bfd_pe_executable_p with bfd_pei_p.
3068
69c5861e
CL
30692009-04-17 Christophe Lyon <christophe.lyon@st.com>
3070
3071 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
3072 PLT entries to an undefined symbol when generating a shared
3073 library.
3074
e9cd0660
NC
30752009-04-17 Nick Clifton <nickc@redhat.com>
3076
3077 PR 9909
3078 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
3079
3023e3f6
RS
30802009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
3081
3082 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
3083 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
3084 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
3085 * binary.c (binary_bfd_define_common_symbol): Likewise.
3086 * bout.c (b_out_bfd_define_common_symbol): Likewise.
3087 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
3088 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
3089 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
3090 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
3091 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
3092 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
3093 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
3094 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
3095 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
3096 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
3097 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
3098 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
3099 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
3100 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
3101 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
3102 * som.c (som_bfd_define_common_symbol): Likewise.
3103 * srec.c (srec_bfd_define_common_symbol): Likewise.
3104 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
3105 * versados.c (versados_bfd_define_common_symbol): Likewise.
3106 * vms.c (vms_bfd_define_common_symbol): Likewise.
3107 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
3108 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
3109 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
3110 (pmac_xcoff_vec): Likewise.
3111 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3112 (aix5coff64_vec): Likewise.
3113 * linker.c (bfd_generic_define_common_symbol): New function.
3114 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
3115 (_bfd_define_common_symbol): New field.
3116 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
3117 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
3118 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
3119 symbols here.
3120 * bfd-in2.h: Regenerate.
3121 * libbfd.h: Likewise.
3122 * libcoff.h: Likewise.
3123
20135e4c
NC
31242009-04-15 Anthony Green <green@moxielogic.com>
3125
3126 * targets.c: Add moxie support.
3127 * Makefile.am: Ditto.
3128 * Makefile.in: Rebuilt.
3129 * cpu-moxie.c, elf32-moxie.c: New files.
3130 * archures.c: Add moxie support.
3131 * configure.in: Add moxie support.
3132 * configure: Rebuilt.
3133 * config.bfd, archures.c: Add moxie support.
3134 * bfd-in2.h: Rebuilt.
3135
82b5c97a
CL
31362009-04-15 Christophe Lyon <christophe.lyon@st.com>
3137
3138 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
3139 branch to an undef weak symbol into a jump to next instruction if
3140 a PLT entry will be created.
3141
0408dee6
DK
31422009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
3143
3144 * coffgen.c (make_a_section_from_file): Set the backend long
3145 section names enable if long section names found on input.
3146 * coffcode.h: Extend long section names documentation to match.
3147
a0c402a5
L
31482009-04-08 H.J. Lu <hongjiu.lu@intel.com>
3149
3150 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
3151 machine code.
3152
4d28413b
DD
31532009-04-07 DJ Delorie <dj@redhat.com>
3154
3155 * archures.c: Add bfd_mach_mep_c5.
3156 * bfd-in2.h: Likewise.
3157 * cpu-mep.c: Add bfd_c5_arch.
3158 * elf32-mep.c: Support it.
3159
bb6198d2
L
31602009-04-07 H.J. Lu <hongjiu.lu@intel.com>
3161
3162 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
3163 info->callbacks->einfo.
3164 * linker.c (_bfd_generic_section_already_linked): Likewise.
3165
bcb012d3
DD
31662009-04-06 DJ Delorie <dj@redhat.com>
3167
3168 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
3169
db1fe6e9
L
31702009-04-06 H.J. Lu <hongjiu.lu@intel.com>
3171
3172 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
3173 _bfd_pex64_print_pdata only if PE is defined.
3174
3175 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
3176 (_bfd_pex64_print_pdata): This.
3177
3178 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
3179 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
3180 is defined.
3181
c7c7219d
KT
31822009-04-05 Kai Tietz <kai.tietz@onevision.com>
3183
3184 * coff-x86_64.c (bfd_pe_print_pdata): Define as
3185 _bfd_pep_print_x64_pdata.
3186 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
3187 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
3188
3df502ae
SA
31892009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
3190
154a1ee5 3191 * elf32-xtensa.c (relax_property_section): Always set r_offset
3df502ae
SA
3192 to zero.
3193
d3626fb0
CL
31942009-04-02 Christophe Lyon <christophe.lyon@st.com>
3195
3196 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
3197 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
3198 branch stubs.
3199 (elf32_arm_stub_type): New enum values for the two new stubs.
3200 (arm_type_of_stub): Make use of the two new stubs.
3201 (arm_size_one_stub): Handle the two new stubs.
3202
fe723c87
MT
32032009-04-01 Matt Thomas <matt@netbsd.org>
3204
3205 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
3206 hidden symbols into the GOT or PLT.GOT.
154a1ee5 3207 (elf_vax_relocate_section): Do not emit a PCREL reloc
fe723c87
MT
3208 into a shared object if it is against a hidden symbol.
3209
ee698300
RS
32102009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3211
3212 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
3213 and know_contains_shared_object_p.
3214 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
3215 Cache the result in the archive_info table.
3216 (xcoff_auto_export_p): Add an "info" parameter and update the
3217 call to xcoff_archive_contains_shared_object_p.
3218 (xcoff_mark_auto_exports): Update accordingly.
3219 (xcoff_post_gc_symbol): Likewise.
3220
54e2dbe0
RS
32212009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3222
3223 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
3224 rather than C_EXT.
3225
2e470849
RS
32262009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3227
3228 * coff-rs6000.c (member_layout): New structure.
3229 (archive_iterator): Likewise.
3230 (member_layout_init): New function.
3231 (archive_iterator_begin): Likewise.
3232 (archive_iterator_next): Likewise.
3233 (xcoff_write_armap_old): Use the new iterator functions.
3234 (do_shared_object_padding): Delete.
3235 (xcoff_write_armap_big): Use the new iterator functions. Simplify
3236 handling of arch_info.
3237 (xcoff_write_archive_contents_old): Allocate arelt_data in the
3238 first loop rather than the second. Allocate a member header if
3239 there isn't one, then work out the stat information and length
3240 in the first loop too. Use the new iterators for the second loop.
3241 (xcoff_write_archive_contents_big): Likewise.
3242
24c611d1
RS
32432009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3244
3245 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
3246 (bfd_xcoff_set_archive_import_path): Likewise.
3247 * bfd-in2.h: Regenerate.
3248 * xcofflink.c: Include libiberty.h.
3249 (xcoff_archive_info): New structure.
3250 (xcoff_archive_info_hash): New function.
3251 (xcoff_archive_info_eq): Likewise.
3252 (xcoff_get_archive_info): Likewise.
3253 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
3254 (bfd_xcoff_split_import_path): New function.
3255 (bfd_xcoff_set_archive_import_path): Likewise.
3256 (xcoff_set_import_path): Move earlier in file.
3257 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
3258 object to the the directory part of the bfd's filename. Get the
3259 import path and filename of an archive object from the archive's
3260 xcoff_tdata, initializing it if necessary. Update use of
3261 import_file_id.
3262 (bfd_link_input_bfd): Update use of import_file_id.
3263 (xcoff_write_global_symbol): Likewise.
3264
d286971a
RS
32652009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3266
3267 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
3268
32692009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3270
3271 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
3272 a .loader section for relocatable links.
3273 (xcoff_need_ldrel_p): New function.
3274 (xcoff_mark): Use it.
3275 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
3276 a loader section.
3277 (xcoff_build_ldsym): New function, split out from...
3278 (xcoff_build_ldsyms): ...here. Rename to...
3279 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
3280 call xcoff_build_ldsym, if there's a loader section.
3281 (xcoff_build_loader_section): New function, extracted verbatim from...
3282 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
3283 there's a loader section. Only add an __rtinit loader symbol
3284 if there's a loader section. Update after above name change.
3285 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
3286 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
3287 and xcoff_create_ldrel.
3288 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
3289 (xcoff_reloc_link_order): Likewise, but only call it if there's
3290 a loader section. Use xcoff_symbol_section.
3291 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
3292 if there's a loader section.
3293
8707bb87
RS
32942009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
3295
3296 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
3297
e780aef2
CL
32982009-04-01 Christophe Lyon <christophe.lyon@st.com>
3299
3300 * elf32-arm.c (group_sections): Rewrite loops for better
3301 readability.
3302
c301e700
DD
33032009-03-30 DJ Delorie <dj@redhat.com>
3304
3305 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
3306 relocs when doing a relocatable link.
3307
3895f852
MM
33082009-03-28 Mark Mitchell <mark@codesourcery.com>
3309
3310 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
3311 "ERROR:", in error messages.
3312 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
3313 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
3314 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
3315 (elf32_arm_merge_eabi_attributes): Likewise.
3316 (elf32_arm_merge_private_bfd_data): Likewise.
3317
ea882e87
NC
33182009-03-27 Nick Clifton <nickc@redhat.com>
3319
3320 * section.c (bfd_get_section_contents): Detect and handle the case
3321 where a section has the SEC_IN_MEMORY flag set but no actual
3322 contents allocated.
3323
9433b9b1
AM
33242009-03-26 Alan Modra <amodra@bigpond.net.au>
3325
3326 PR 6494
3327 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
3328 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
3329 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
3330 if we don't find matching PT_LOAD when copying.
3331
dc1aa734
SR
33322009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
3333
3334 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
3335 the reloc descriptions.
3336
34d3d6b9
HPN
33372009-03-25 Hans-Peter Nilsson <hp@axis.com>
3338
3339 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3340 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
3341 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
3342
34274ccc
L
33432009-03-24 H.J. Lu <hongjiu.lu@intel.com>
3344
3345 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
3346 (bfd_i386_arch_intel_syntax): Likewise.
3347 (i8086_arch): Likewise.
3348 (bfd_x86_64_arch): Likewise.
3349
019c5a2e
HPN
33502009-03-24 Hans-Peter Nilsson <hp@axis.com>
3351
6718f446
HPN
3352 * elf32-cris.c (cris_elf_relocate_section): <case
3353 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
3354 symbols for non-allocated sections. Don't check whether to
3355 generate R_CRIS_DTPMOD for non-allocated sections.
3356 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
3357 handle relocation GC:ing if applied to non-allocated section.
3358 (cris_elf_check_relocs): Similar.
3359
019c5a2e
HPN
3360 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3361 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
3362 when emitting a known TP offset in the GOT.
3363
ffcfec52
AM
33642009-03-23 Alan Modra <amodra@bigpond.net.au>
3365
3366 * elf64-ppc.c (synthetic_opd): Delete.
3367 (compare_symbols): Look for .opd name rather than section match.
3368 (ppc64_elf_get_synthetic_symtab): Likewise.
3369
c6dd29ce
AM
33702009-03-21 Alan Modra <amodra@bigpond.net.au>
3371
3372 * elf32-ppc.c (is_pic_glink_stub): Delete.
3373 (is_nonpic_glink_stub): New function.
3374 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
3375 than first pic one.
3376 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
3377
8c21ca21
AK
33782009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
3379 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
3380
3381 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
4f360784 3382 macros for visibilty and locality checks.
8c21ca21
AK
3383 (elf_s390_adjust_dynamic_symbol): Likewise.
3384 (allocate_dynrelocs): Likewise.
3385 (elf_s390_relocate_section): Likewise.
3386 (elf_s390_finish_dynamic_symbol): Likewise.
3387 * elf64-s390.c (elf_s390_check_relocs): Likewise.
3388 (elf_s390_adjust_dynamic_symbol): Likewise.
3389 (allocate_dynrelocs): Likewise.
3390 (elf_s390_relocate_section): Likewise.
3391 (elf_s390_finish_dynamic_symbol): Likewise.
3392
156621f3
KT
33932009-03-19 Kai Tietz <kai.tietz@onevision.com>
3394
3395 * bfd-in2.h: Regenerated.
3396 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
3397 for debugging sections and map memory read/write dependent on
3398 SEC_COFF_NOREAD.
3399 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
3400 without memory read flags set.
3401 * section.c: Add SEC_COFF_NOREAD to section flags.
3402
d1fa68d3
AS
34032009-03-19 Andreas Schwab <schwab@linux-m68k.org>
3404
3405 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
3406 for format string.
3407
ad2adbc8
AM
34082009-03-19 Alan Modra <amodra@bigpond.net.au>
3409
3410 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
3411 "no overlays" return. If there are overlays, create overlay
3412 manager entry symbols here, so that..
3413 (spu_elf_build_stubs): ..we don't need to set them up here.
3414 Simplify entry symbol tests.
3415 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
3416
67cc5033
MK
34172009-03-18 Mark Kettenis <kettenis@gnu.org>
3418
d1fa68d3 3419 * elf.c (elfcore_grok_openbsd_procinfo)
67cc5033
MK
3420 (elfcore_grok_openbsd_note): New functions.
3421 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
3422
8d25cc3d
AM
34232009-03-18 Alan Modra <amodra@bigpond.net.au>
3424
3889c459 3425 * vms-hdr.c: Don't include alloca.h.
8d25cc3d
AM
3426 * elf32-m68hc1x.c: Include alloca-conf.h.
3427 * xsym.c: Likewise.
3428 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
3429 * som.c: Likewise.
3430 * Makefile.am: Run "make dep-am".
3431 * Makefile.in: Regenerate.
3432
a89e6478
DJ
34332009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
3434
3435 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
3436
a7e11ee1
AM
34372009-03-17 Alan Modra <amodra@bigpond.net.au>
3438
3439 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
3440 Add compact_stub.
3441 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
3442 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
3443 ovly_return fields with ovly_entry[2]. Adjust all users.
3444 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
3445 when soft-icache.
3446 (spu_elf_build_stubs): Likewise.
3447 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
3448 ovly_flavour changes. Update all callers.
3449 (ovl_stub_size_log2): New function.
3450 (build_stub): Handle compact icache stubs. Use different manager
3451 entry point for stubs in non-icache area.
3452 (spu_elf_size_stubs): Don't allocate space for indirect branch
3453 descriptors.
3454 (spu_elf_build_stubs): And don't built them.
3455
607a83c9
AS
34562009-03-16 Andrew Stubbs <ams@codesourcery.com>
3457
3458 * dwarf2.c (read_section): Always use rawsize, if available.
3459
588f62fc
AM
34602009-03-16 Alan Modra <amodra@bigpond.net.au>
3461
3462 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
3463 of rawsize and size for buffer.
3464
a14c90c1
UW
34652009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
3466
3467 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
3468 parameter just because fixed sections fit into local store.
3469 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
3470 generating overlays if fixed sections plus reserved stack
3471 and heap space fit into local store.
3472
30c665df
AM
34732009-03-15 Alan Modra <amodra@bigpond.net.au>
3474
3475 * elf32-spu.c (build_stub): Correct icache set_id.
3476 (spu_elf_relocate_section): Likewise.
3477
f95942a3
RS
34782009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3479
3480 * xcofflink.c (xcoff_link_check_archive_element): Only free the
3481 symbol table if it was created by the current call.
3482
670562e9
RS
34832009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3484
3485 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
3486 class XMC_DS rather than XMC_UA.
3487
b64232cc
RS
34882009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3489
3490 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
3491 bfd_boolean export_defineds parameter with an unsigned int
3492 auto_export_flags parameter.
3493 * bfd-in2.h: Regenerate.
3494 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
3495 split out from xcoff_build_ldsyms.
3496 (xcoff_covered_by_expall_p): New function.
3497 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
3498 but with extra code to handle -bexpfull and -bexpall.
3499 (xcoff_mark_auto_exports): New function.
3500 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
3501 a function should be automatically exported.
3502 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
3503 parameter with an auto_export_flags parameter. Update ldinfo
3504 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
3505 exported symbols.
3506
7d504122
RS
35072009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3508
3509 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
3510 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
3511 init and fini functions. Do garbage collection for objects
3512 without an entry point too.
3513
8602d4fe
RS
35142009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3515
3516 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
3517 check whether a symbol has csect information.
3518 (coff_print_aux): Likewise.
3519 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
3520 information for C_AIX_WEAKEXT too.
3521 (_bfd_xcoff_swap_aux_out): Likewise.
3522 (xcoff_reloc_type_br): Handle defweak symbols too.
3523 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
3524 information for C_AIX_WEAKEXT too.
3525 (_bfd_xcoff64_swap_aux_out): Likewise.
3526 (xcoff64_reloc_type_br): Handle defweak symbols too.
3527 * coffgen.c (coff_print_symbol): Handle auxillary function
3528 information for C_AIX_WEAKEXT too.
3529 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
3530 instead of BSF_GLOBAL if the L_WEAK flag is set.
3531 (xcoff_dynamic_definition_p): New function.
3532 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
3533 defines h. Don't change h if ldsym isn't the definition. Otherwise,
3534 always take the symbol class from the ldsym. Use weak bfd symbol
3535 types for weak ldsyms.
3536 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
3537 Fix the check for whether a definition is from a shared object.
3538 Allow redefinitions of weak symbols.
3539 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
3540 (xcoff_keep_symbol_p): Likewise.
3541 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
3542 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
3543 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
3544 but mark them as L_WEAK.
3545 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
3546 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
3547
5b49f6dc
RS
35482009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3549
3550 * xcofflink.c (xcoff_mark): When walking the relocations,
3551 only mark the target symbol or the target section, not both.
3552 (xcoff_final_definition_p): New function.
3553 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
3554 symbol is a valid definition of the associated output symbol.
3555 Use XCOFF_ALLOCATED to stop the same hash table entry having
3556 two output symbols.
3557 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
3558 keeping a symbol.
3559 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
3560
c4037431
RS
35612009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3562
3563 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
3564 symbols as XMC_XO.
3565
3df13c4a
RS
35662009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3567
3568 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
3569 * libcoff.h: Regenerate.
3570 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
3571 line-number counts in the bfd's lineno_counts field.
3572 Don't keep per-csect line-number counts.
3573 (xcoff_sweep): Don't update per-csect line-number counts.
3574 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
3575 entries in each output section.
3576 (xcoff_link_input_bfd): Get the number of line numbers from
3577 the bfd's lineno_counts field, rather than recalculating it
3578 from scratch. Fix the range check when updating C_BINCL and
3579 C_EINCL symbols.
3580 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
3581 here. Don't expect csects to have line-number counts.
3582
e450936a
RS
35832009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3584
3585 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
3586 * libcoff.h: Regenerate.
3587 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
3588 "skip" logic from xcoff_link_input_bfd.
3589 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
3590 objects in a dynamic link, rather than checking whether csectpp
3591 is null. Always allocate debug_index for other objects,
3592 and always go through the loop. Update the type of debug_index
3593 after the change above. Read the auxillary csect information
3594 and use xcoff_keep_symbol_p to decide whether a symbol should
3595 be kept. Set its debug_index to -2 if not.
3596 (xcoff_link_input_bfd): Update the type of debug_index after
3597 the change above and always expect it to be nonnull. Use it to
3598 test whether a symbol should be stripped, rather than making the
3599 decision here. Postpone all symbol creation to the second pass.
3600
47dfb2ca
RS
36012009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3602
3603 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
3604 creating a descriptor.
3605 (xcoff_sweep): Don't mark toc_section unless it's needed.
3606 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
3607 when marking every bfd.
3608 (xcoff_link_input_bfd): Skip all TOC anchors.
3609 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
3610 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
3611 to -1; call xcoff_find_tc0 instead.
3612
4cc02a02
RS
36132009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3614
3615 * libcoff-in.h (xcoff_section_tdata): Update commentary.
3616 * libcoff.h: Regenerate.
3617 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
3618 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
3619 the previous symbol's csect. Treat last_symndx as an inclusive value
3620 and simplify its handling.
3621 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
3622 symbols with the right csect. Don't mark rsec when processing
d1fa68d3 3623 relocations against undefined or absolute sections.
4cc02a02
RS
3624 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
3625 of bfd_und_section_ptr.
3626 (xcoff_link_input_bfd): Likewise.
3627
858ef0ce
RS
36282009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3629
3630 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
3631 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
3632 flag is set. Assert that all undefined symbols are either
3633 imported or defined by a dynamic object.
3634 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3635 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
3636 handling to all relocations. Only set XCOFF_CALLED for function
3637 symbols.
3638 (xcoff_find_function): New function, split out from...
3639 (bfd_xcoff_export_symbol) ...here.
3640 (xcoff_set_import_path): New function, split out from...
3641 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
3642 meaning of XCOFF_CALLED.
3643 (xcoff_mark_symbol): If we mark an undefined and unimported
3644 symbol, find some way of defining it. If the symbol is a function
3645 descriptor, fill in its definition automatically. If the symbol
3646 is a function, mark its descriptor and allocate room for global
3647 linkage code. Otherwise mark the symbol as implicitly imported.
3648 Move the code for creating function descriptors from...
d1fa68d3 3649 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
858ef0ce
RS
3650 check for symbols that were implicitly defined.
3651 (xcoff_mark): Don't count any dynamic relocations against
3652 function symbols.
3653 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
3654 in the xcoff link info.
3655 (xcoff_link_input_bfd): Remove handling of undefined and
3656 unexported symbols.
3657
12b2cce9
RS
36582009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3659
3660 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
3661 if the target is absolute. Fix comment typo.
3662 (xcoff_ppc_relocate_section): Remove FIXME.
3663 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
3664 if the target is absolute.
3665
0e3212ad
RS
36662009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3667
3668 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
3669 R_POS and R_NEG relocations against absolute symbols to the
3670 .loader section.
3671
d19d97e9
RS
36722009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3673
3674 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
3675 to 2 for bfd_mach_ppc_620.
3676
e5231592
RS
36772009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3678
3679 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
3680 * configure.in: Likewise.
3681 * configure: Regenerate.
3682
3516e984
L
36832009-03-13 H.J. Lu <hongjiu.lu@intel.com>
3684
3685 PR binutils/9945
3686 * elf.c (assign_section_numbers): Generate symbol table if there
3687 is any relocation in output.
3688 (_bfd_elf_compute_section_file_positions): Likewise.
3689
ce98a316
NC
36902009-03-13 Nick Clifton <nickc@redhat.com>
3691
3692 PR 9934
3693 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
3694 * elflink.c (elf_link_read_relocs_from_section): Use
3695 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
3696 relocs but no symbol table.
3697 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
3698
c4fb387b
L
36992009-03-12 H.J. Lu <hongjiu.lu@intel.com>
3700
3701 PR ld/9938
3702 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
3703 to check ___tls_get_addr.
3704
3705 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
3706 strncmp to check __tls_get_addr.
3707
53638231
AS
37082009-03-12 Andrew Stubbs <ams@codesourcery.com>
3709
3710 * dwarf2.c (read_section): Always check the offset, even when the
3711 section has been read before.
3712
09e8c3bf
L
37132009-03-11 H.J. Lu <hongjiu.lu@intel.com>
3714
3715 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
3716 comments.
3717
36e4dce6
CD
37182009-03-11 Chris Demetriou <cgd@google.com>
3719
3720 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
3721 * bfd-in2.h: Regenerate.
3722 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
3723 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
3724 mode.
3725 (bsd_write_armap): Likewise.
3726 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
3727 flag is set, do nothing.
3728 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
3729 for timestamp.
3730
9b175a76
UW
37312009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
3732
3733 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
3734 used to update stack pointer.
3735
f501de17
DA
37362009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3737
3738 PR binutils/9921
3739 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
3740 for unknown symbols in absolute section.
3741
d11fd249
NC
37422009-03-06 Nick Clifton <nickc@redhat.com>
3743
3744 * po/es.po: Updated Spanish translation.
3745
8cd931b7
CL
37462009-03-05 Christophe Lyon <christophe.lyon@st.com>
3747
3748 * elf32-arm.c (group_sections): Take next section size into
3749 account before accepting to group it.
3750
5fa9e92f
CL
37512009-03-05 Christophe Lyon <christophe.lyon@st.com>
3752
3753 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
3754 PLT entries.
3755 (elf32_arm_final_link_relocate): Likewise.
3756
b92997d6
AM
37572009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
3758
3759 PR 9923
3760 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
3761
727fc41e
AM
37622009-03-04 Alan Modra <amodra@bigpond.net.au>
3763
3764 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
3765 * section.c (struct bfd_section): Add has_tls_get_addr_call.
3766 (BFD_FAKE_SECTION): Init new flag.
3767 * ecoff.c (bfd_debug_section): Likewise.
3768 * bfd-in2.h: Regenerate.
3769 * libbfd.h: Regenerate.
3770 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
3771 (ppc_elf_reloc_type_lookup): Handle new relocs.
3772 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
3773 without marker relocs.
3774 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
3775 if section has no old-style calls.
3776 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
3777 Don't try to optimize new-style __tls_get_addr call when handling
3778 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
3779 relocs.
3780 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
3781 (ppc64_elf_reloc_type_lookup): Handle new relocs.
3782 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
3783 without marker relocs.
3784 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
3785 if section has no old-style calls. Set toc_ref for new relocs as
3786 appropriate.
3787 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
3788 Don't try to optimize new-style __tls_get_addr call when handling
3789 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
3790 relocs.
3791
51dec227
AM
37922009-03-04 Alan Modra <amodra@bigpond.net.au>
3793
3794 PR 6768
3795 * configure.in: Test for ld --as-needed support. Link shared
3796 libbfd against libm.
3797 * configure: Regenerate.
3798
a1f7ca36
AM
37992009-03-03 Alan Modra <amodra@bigpond.net.au>
3800
3801 * Makefile.am: Run "make dep-am".
3802 * Makefile.in: Regenerate.
3803
c3b7224a
NC
38042009-03-02 Qinwei <qinwei@sunnorth.com.cn>
3805
3806 * elf32-score7.c: New file.
3807 * elf32-score.h: New file.
3808 * elf32-score.c: Add code to support score 7. Set score7 as the
3809 default.
3810 * cpu-score.c: Add score7 architecure.
3811 (compatibile): New function.
3812 * Makefile.am: Add rules for building elf32-score7 object.
3813 * Makefile.in: Regenerate.
3814 * configure.in: Add elf32-score7 object to score vectors.
3815 * configure: Regenerate.
3816 * reloc.c: Add score7 relocs.
3817 * archures.c: Add score3 and score7 machine numbers.
3818 * bfd-in2.h: Regenerate.
3819 * libbfd.h: Regenerate.
3820
58e24671
RW
38212009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3822
3823 * configure: Regenerate.
3824
5887528b
DA
38252009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3826
d45b7d74
DA
3827 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
3828 (elf32_hppa_check_relocs): Use it.
3829
5887528b
DA
3830 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
3831 elf64-hppa.c.
3832 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
3833 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
3834 (elf_hppa_is_dynamic_loader_symbol): Likewise.
3835 (elf_hppa_record_segment_addrs): Likewise.
3836 (elf_hppa_final_link): Likewise.
3837 (elf_hppa_relocate_insn): Likewise.
3838 (elf_hppa_final_link_relocate): Likewise.
3839 (elf64_hppa_relocate_section): Likewise.
3840 * elf64-hppa.c: Insert above.
3841
a03bd320
DA
38422009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3843
3844 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
3845 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
3846 (elf_hppa_relocate_section): Likewise.
3847 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
3848 from struct elf_link_hash_entry. Add count field.
3849 (struct elf64_hppa_dyn_hash_table): Delete.
3850 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
3851 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
3852 (hppa_elf_hash_entry, eh_name): Define.
3853 (elf64_hppa_new_dyn_hash_entry): Delete.
3854 (elf64_hppa_dyn_hash_lookup): Delete.
3855 (elf64_hppa_dyn_hash_traverse): Delete.
3856 (get_dyn_name): Delete.
3857 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
3858 of struct elf64_hppa_dyn_hash_entry *.
3859 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
3860 allocate_global_data_plt, allocate_global_data_stub,
3861 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
3862 Likewise.
3863 (hppa64_link_hash_newfunc): New.
3864 (elf64_hppa_hash_table_create): Rework.
3865 (count_dyn_reloc): Likewise.
3866 (hppa64_elf_local_refcounts): New.
3867 (elf64_hppa_check_relocs): Rework using standard technique for recording
3868 local DLT, PLT and OPD reference counts.
3869 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
3870 elf_link_hash_entry *.
3871 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
3872 allocate_global_data_plt, allocate_global_data_stub,
3873 allocate_global_data_opd, allocate_dynrel_entries,
3874 elf64_hppa_adjust_dynamic_symbol,
3875 elf64_hppa_mark_milli_and_exported_functions): Likewise.
3876 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
3877 Use hppa_link_hash_table. Rework.
3878 (elf64_hppa_link_output_symbol_hook): Rework.
3879 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
3880 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
3881 elf64_hppa_finish_dynamic_sections): Likewise.
3882
ebe24dd4
CL
38832009-02-26 Christophe Lyon <christophe.lyon@st.com>
3884
3885 * elf32-arm.c (stub_reloc_type): Removed.
3886 (insn_sequence): Renamed reloc_type field to r_type.
3887 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
3888 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
3889 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
3890 (elf32_arm_stub_type): Add new enum entries for the new stubs.
3891 (arm_stub_is_thumb): Catch new stubs.
3892 (arm_type_of_stub): Handle new stubs.
3893 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
3894 (bfd_elf32_arm_process_before_allocation): Remove useless
3895 condition.
3896
b9d678e0
L
38972009-02-25 H.J. Lu <hongjiu.lu@intel.com>
3898
3899 * elf.c (elf_find_function): Use is_function_type to check
3900 function symbol.
3901
56fb3749
SA
39022009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
3903
3904 * xtensa-modules.c: Revert to previous version 1.11 due
3905 to inadvertant commit.
3906
658ff993
SA
39072009-02-24 Sterling Augustine <sterling@tensilica.com>
3908
3909 * elf32-xtensa.c (text_action_add): Separate test for action
3910 type. Break if saved action is ta_widen_insn at same offset.
3911
cf3eccff
DJ
39122009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
3913
3914 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
3915 to elf32_arm_stub_long_branch_any_arm_pic.
3916 (elf32_arm_stub_long_branch_any_thumb_pic): New.
3917 (enum elf32_arm_stub_type, arm_type_of_stub)
3918 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
3919 separately.
3920
07d72278
DJ
39212009-02-24 Joseph Myers <joseph@codesourcery.com>
3922
3923 * elf32-arm.c (PREV_SEC): Update comment.
3924 (group_sections): Rename argument to stubs_always_after_branch.
3925 Reverse the list and place stubs at the end of input sections.
3926 Undefine NEXT_SEC.
3927 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
3928
4e31c731
DJ
39292009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
3930
3931 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
3932 Fix formatting.
3933 (arm_size_one_stub): Remove unnecessary break.
3934 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
3935
39362009-02-23 Christophe Lyon <christophe.lyon@st.com>
461a49ca
DJ
3937
3938 * elf32-arm.c (stub_insn_type): New type.
3939 (stub_reloc_type): Likewise.
3940 (insn_sequence): Likewise.
3941 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
3942 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
3943 (elf32_arm_stub_long_branch_thumb_only): Likewise.
3944 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
3945 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
3946 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
3947 (elf32_arm_stub_hash_entry): Add new helper fields.
3948 (stub_hash_newfunc): Initialize these new fields.
3949 (arm_build_one_stub): Encode Arm and Thumb instructions separately
3950 to take endianness into account.
3951 (arm_size_one_stub): Compute size of stubs using insn_sequence.
3952 (arm_map_one_stub): Code is now more generic, thanks to
3953 insn_sequence.
3954
c2b4a39d
CL
39552009-02-23 Christophe Lyon <christophe.lyon@st.com>
3956
3957 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
3958 code.
3959 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
3960 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
3961 BLX is not available. Fix typo in warning message. Add comments
3962 and improve formatting.
3963 (arm_build_one_stub): Adjust to new
3964 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
3965 (arm_map_one_stub): Likewise.
3966
0c376465 39672009-02-23 Tristan Gingold <gingold@adacore.com>
a60a89d6
TG
3968 Eric Botcazou <ebotcazou@adacore.com>
3969 Douglas B Rupp <rupp@gnat.com>
0c376465
TG
3970
3971 * vms.h: Update copyright year, fix comments, reorder declarations.
3972 (_bfd_save_vms_section): Remove the prototype.
3973 (EGPS_S_V_NO_SHIFT): New constant.
3974 (bfd_vms_set_section_flags): New prototype.
3975 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
3976 constants.
3977 (EGSY_S_W_FLAGS): Ditto.
3978 (EGSY_S_V_QUAD_VAL): Ditto.
3979 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
3980 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
3981 EGST_S_B_NAMLNG): Ditto.
3982 (ESRF_S_B_NAMLNG): Ditto.
3983 (ETIR_S_C_HEADER_SIZE): Ditto.
3984 (EGPS_S_V_ALLOC_64BIT): Ditto.
3985 (DST_S_C_EPILOG): Ditto.
3986 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
3987 (DST_S_C_SRC_INCRLNUM_B): Ditto.
3988 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
3989 (DST_S_L_PCLINE_UNSLONG): Ditto.
3990 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
3991 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
3992 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
3993 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
3994 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
3995 (DST_S_B_SRC_UNSBYTE): Ditto.
3996 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
3997 Add prototypes.
3998 (vms_section, vms_reloc): Remove types.
3999 (hdr_struc): Replaced by ...
4000 (hdr_struct): ... new type.
4001 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
4002 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
4003 (EMH_DATE_LENGTH): Ditto.
4004 (eom_struc): Replaced by ...
4005 (eom_struct): ... new type.
4006 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
4007 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
4008 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
4009 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
4010 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
4011 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
4012 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
4013 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
4014 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
4015 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
4016 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
4017 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
4018 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
4019 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
4020 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
4021 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
4022 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
4023 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
4024 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
4025 (enum file_type_enum): New type.
4026 (struct location_struct): Removed.
4027 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
4028 (struct funcinfo, struct module): Ditto.
4029 (struct vms_private_data_struct): Update fields.
4030 (struct vms_section_data_struct): New type.
4031
4032 * vms.c: Update copyright year, fix comments,
4033 Fix includes for DECC, add prototypes.
4034 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
4035 some initializers.
4036 Use flavour to set is_vax, location_stack is removed.
4037 (struct pair): Declare.
4038 (fill_section_ptr): Initialize variables at declaration.
4039 Add guard to set SECTION_SYM flag, handlde und section.
4040 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
4041 (_bfd_vms_slurp_object_records): New function, replaces previous
4042 vms_object_p.
4043 (vms_slurp_module): New function.
4044 (vms_slurp_image): Ditto.
4045 (vms_object_p): Complete rewrite.
4046 (vms_mkobject): Use is_vax field to slect architecture.
4047 (free_reloc_stream): New function.
4048 (vms_convert_to_var): Ditto.
4049 (vms_convert_to_var_1): Ditto.
4050 (vms_convert_to_var_unix_filename): Ditto.
4051 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
4052 VAR format on VMS.
4053 (vms_new_section_hook): Set alignment to 0, allocate private data.
4054 (vms_get_section_contents): Load content.
4055 (vms_get_symbol_info): Handle undefined section.
4056 (vms_find_nearest_line): Handle.
4057 (alloc_reloc_stream): New function.
4058 (vms_slurp_reloc_table): Ditto.
4059 (vms_get_reloc_upper_bound): Make it real.
4060 (vms_canonicalize_reloc): Do the real work.
4061 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
4062 ALPHA_R_BOH.
4063 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
4064 (vms_set_arch_mach): Check arch.
4065 (vms_set_section_contents): Copy the content after allocation.
4066 (vms_alpha_vec): Update object flags.
4067
4068 * vms-tir.c: Update copyright year, fix comments,
4069 add prototypes for new functions.
4070 (dst_define_location): New function.
4071 (dst_restore_location): New function.
4072 (dst_retrieve_location): New function.
4073 (dst_check_allocation): New function.
4074 (image_dump): Call dst_check_allocation.
4075 (image_write_b): Ditto.
4076 (image_write_w): Ditto.
4077 (image_write_l): Ditto.
4078 (image_write_q): Ditto.
4079 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
4080 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
4081 CTL_STKDL.
4082 Call error handler instead of abort if name is not known.
4083 (etir_sta): Add quarter_relocs argument and set it.
4084 Fix cast.
4085 (etir_sto): Ditto.
4086 (etir_opr): Ditto, return FALSE in case of error.
4087 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
4088 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
4089 (etir_stc): Add quarter_relocs argument and set it, fix cast.
4090 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
4091 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
4092 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
4093 Return FALSE in case of error.
4094 (tir_sta): Change sign of psect.
4095 (tir_ctl): Ditto.
4096 (tir_cmd): Fix cast. Makes tir_table static const.
4097 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
4098 add argument to explain.
4099 (analyze_etir): Initialize maxptr, add quarter_relocs
4100 declaration, move some declarations into inner scopes.
4101 Handle quarter_relocs and STO_IMM.
4102 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
4103 (_bfd_vms_slurp_relocs): New function.
4104 (_bfd_vms_decode_relocs): New function.
4105 (sto_imm): Rewritten.
4106 (start_first_etbt_record): New function.
4107 (start_another_etbt_record): Ditto.
4108 (etir_output_check): Ditto.
4109 (defer_reloc_p): Ditto.
4110 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
4111 a for-loop. Correctly deals with contents, deals with .vmsdebug,
4112 rewritte relocations handling.
4113 (_bfd_vms_write_tbt): Removed.
4114 (_bfd_vms_write_dbg): Ditto.
4115
4116 * vms-misc.c: Update copyright year, Fix comments.
4117 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
4118 (maybe_adjust_record_pointer_for_object): New function.
4119 (_bfd_vms_get_first_record): New function, replaces ...
4120 (_bfd_vms_get_record): .. removed.
4121 (_bfd_vms_get_object_record): New function.
4122 (_bfd_vms_get_object_record): New function.
4123 (vms_get_remaining_object_record): New function, replaces ...
4124 (_bfd_vms_get_next_record): ... removed.
4125 (add_new_contents): Removed.
4126 (_bfd_save_vms_section): Removed.
4127 (_bfd_get_vms_section): Removed.
4128 (_bfd_vms_output_flush): Write in VAR format.
4129 (new_symbol): Don't make UND section.
4130
4131 * vms-hdr.c: Update copyright year, update list of record handled.
4132 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
4133 (_bfd_vms_write_hdr): Strip vms and unix patches,
4134 add comments, truncate module name at 31 characters,
4135 use constants instead of hard-coded value,
4136 write BFD version instead of a fixed string.
4137 (_bfd_vms_slurp_ihd): New function.
4138 (_bfd_vms_slurp_isd): Ditto.
4139 (_bfd_vms_slurp_ihs): Ditto.
4140 (new_module): Ditto.
4141 (parse_module): Ditto
4142 (build_module_list): Ditto.
4143 (module_find_nearest_line): Ditto.
4144 (_bfd_vms_find_nearest_dst_line): Ditto.
4145 (vms_slurp_debug): Ditto.
4146 (_bfd_vms_slurp_dbg): Ditto.
4147 (_bfd_vms_slurp_tbt): Ditto.
4148 (_bfd_vms_write_dbg): Ditto.
4149 (_bfd_vms_write_tbt): Ditto.
4150
4151 * vms-gsd.c: Update copyright year, update list of records handled.
4152 (EVAX_LITERALS_NAME): New macro.
4153 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
4154 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
4155 (register_universal_symbol): New function and prototype.
4156 (_bfd_vms_slurp_gsd): Fix indentations and casts,
4157 improve debug messages,
4158 use constants instead of hard-coded value,
4159 fix missing endianness conversion,
4160 handle global symbol (SYMG).
4161 (bfd_vms_set_section_flags): New function.
4162 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
4163 handle section literals,
4164 fix indentation,
4165 handle section bfd and vms flags,
4166 don't output LIB$INITIALIZE symbol,
4167 fix handling of weak symbols,
4168 fix evax vs vax procedure descriptor,
4169 handle absolute symbols.
4170
4171 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
4172 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
4173
4174 * makefile.vms (DEFS): Fix flags for VMS.
4175
4176 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
4177
4178 * bfd-in2.h: Regenerated.
4179 * libbfd.h: Regenerated.
4180
47149254
CC
41812009-02-20 Cary Coutant <ccoutant@google.com>
4182
4183 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
4184 in struct stat.
4185
6b1cecf3
DK
41862009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
4187
4188 PR gas/7059
4189 * coffcode.h (coff_write_object_contents): Don't let the string
4190 table offset overflow the s_name field when using long section names.
4191
88183869
DK
41922009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
4193
4194 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
4195 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
4196 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4197 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
4198 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
4199 (bfd_pmac_xcoff_backend_data): Likewise.
4200 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
4201 (bfd_xcoff_aix5_backend_data): Likewise.
4202 (xcoff64_write_object_contents): Delete unused long_section_names
4203 local variable.
4204 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
4205 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
4206 struct non-const.
4207 * coffcode.h (documentation): Update to describe long section names.
4208 (COFFLONGSECTIONCATHELPER): New helper macro.
4209 (BLANKOR1TOODD): Likewise.
4210 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
4211 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
4212 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
4213 (bfd_coff_set_long_section_names_allowed): New function.
4214 (bfd_coff_set_long_section_names_disallowed): Likewise.
4215 (struct bfd_coff_backend_data): Add new backend hook function
4216 pointer _bfd_coff_set_long_section_names.
4217 (bfd_coff_set_long_section_names): New backend hook.
4218 (coff_write_object_contents): Only generate long section names if
4219 bfd_coff_long_section_names() indicates they are currently enabled.
4220 (bfd_coff_std_swap_table): Make non-const, and initialise long
4221 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
4222 (ticoff0_swap_table): Likewise to both.
4223 (ticoff1_swap_table): Again, likewise to both.
4224 * coffgen.c (make_a_section_from_file): Allow long section names
4225 as inputs even if not currently allowed for outputs.
4226 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
4227 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
4228 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
4229 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
4230 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
4231 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
4232 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
4233 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
4234 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
4235 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
4236 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
4237 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
4238 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
4239 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
4240 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
4241 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
4242 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
4243 * libcoff-in.h: Update copyright year to cause updated copyright
4244 year in generated libcoff.h, and fix typo.
4245 * libcoff.h: Regenerated.
4246 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
4247 (_bfd_ecoff_no_long_sections): Add prototype.
4248 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
4249 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
4250 defined by an including .c file.
4251 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
4252 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
4253 (ticoff1_swap_table): Likewise to both.
4254
90d8a22c
CL
42552009-02-18 Christophe Lyon <christophe.lyon@st.com>
4256
4257 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
4258 stub. Catch default case error.
4259 (arm_map_one_stub): Add missing Thumb mapping symbol.
4260
12123067
NC
42612009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
4262
4263 PR 9841
4264 * elf32-avr.c: Handle case where no local symbos exist correctly.
4265
fea2b4d6
CL
42662009-02-16 Christophe Lyon <christophe.lyon@st.com>
4267
4268 bfd/
4269 * elf32-arm.c (arm_long_branch_stub,
4270 arm_thumb_v4t_long_branch_stub,
4271 arm_thumb_thumb_long_branch_stub,
4272 arm_thumb_arm_v4t_long_branch_stub,
4273 arm_thumb_arm_v4t_short_branch_stub,
4274 arm_pic_long_branch_stub):
4275 Renamed to elf32_arm_stub_long_branch_any_any,
4276 elf32_arm_stub_long_branch_v4t_arm_thumb,
4277 elf32_arm_stub_long_branch_thumb_only,
4278 elf32_arm_stub_long_branch_v4t_thumb_arm,
4279 elf32_arm_stub_short_branch_v4t_thumb_arm,
4280 elf32_arm_stub_long_branch_any_any_pic.
4281 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
4282 arm_thumb_thumb_stub_long_branch,
4283 arm_thumb_arm_v4t_stub_long_branch,
4284 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
4285 Renamed to arm_stub_long_branch_any_any,
4286 arm_stub_long_branch_v4t_arm_thumb,
4287 arm_stub_long_branch_thumb_only,
4288 arm_stub_long_branch_v4t_thumb_arm,
4289 arm_stub_short_branch_v4t_thumb_arm,
4290 arm_stub_long_branch_any_any_pic.
4291
13e0a874
DA
42922009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4293
4294 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
4295 in branch offset check.
4296
3a71aa26
AM
42972009-02-15 Alan Modra <amodra@bigpond.net.au>
4298
4299 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
4300 add toc.symndx and toc.add.
4301 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
4302 Set up toc.add.
4303 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
4304 callers.
4305 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
4306 (branch_reloc_hash_match): New function, extracted from..
4307 (ppc64_elf_tls_optimize): ..here.
4308 (ppc64_elf_relocate_section): Properly set addends when optimizing
4309 tls sequences. Avoid unnecessary reading and writing of insns.
4310 Only redo reloc when symbol changed. Bypass symbol checks when
4311 using tlsld_got.
4312 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
4313 (branch_reloc_hash_match): New function, extracted from..
4314 (ppc_elf_tls_optimize): ..here.
4315 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
4316 Don't clear addend on zapped __tls_get_addr reloc.
4317
2c2b4ed4
NC
43182009-02-12 Nick Clifton <nickc@redhat.com>
4319
4320 PR 9827
4321 * elflink.c (bfd_elf_final_link): When counting the relocations,
4322 if the header size has not been set yet then assume that it will
4323 match the output section's reloc type.
4324
453f5985
NS
43252009-02-12 Nathan Sidwell <nathan@codesourcery.com>
4326
4327 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
4328 relocatable link.
4329
3209bffa
AM
43302009-02-09 Alan Modra <amodra@bigpond.net.au>
4331
4332 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
4333 (find_function): Likewise.
4334 (pasted_function): Don't error if no prior function found.
4335 (discover_functions): Revert 2008-12-10 change. Extend first
4336 function range to start of section.
4337
813c8a3c
DA
43382009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4339
4340 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
4341 functions to C90.
4342 * elf64-hppa.h: Likewise.
4343
2d0f9ad9
JM
43442009-02-06 Joseph Myers <joseph@codesourcery.com>
4345
4346 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
4347 .sbss handling.
4348
50e00962
AM
43492009-02-04 Alan Modra <amodra@bigpond.net.au>
4350
4351 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
4352 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
4353
52b6b6b9
JM
43542009-02-03 Sandip Matte <sandip@rmicorp.com>
4355
4356 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
4357 * archures.c (bfd_mach_mips_xlr): Define.
4358 * bfd-in2.h: Regenerate.
4359 * cpu-mips.c (I_xlr): Define.
4360 (arch_info_struct): Add XLR entry.
4361 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
4362 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
4363 (mips_mach_extensions): Add XLR entry.
4364
654c3c9f
EW
43652009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
4366
4367 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
4368
31dd3154
JM
43692009-02-03 Carlos O'Donell <carlos@codesourcery.com>
4370
4371 * configure.in: AC_SUBST pdfdir.
d1fa68d3 4372 * Makefile.am: Add install-pdf, install-pdf-am
31dd3154
JM
4373 and install-pdf-recursive targets. Define pdfdir.
4374 * doc/Makefile.am: Define pdf__strip_dir. Add
4375 install-pdf and install-pdf-am targets.
d1fa68d3 4376 * po/Make-in: Add install-pdf target.
31dd3154
JM
4377 * configure: Regenerate.
4378 * Makefile.in: Regenerate
4379 * doc/Makefile.in: Regenerate.
4380
cf869cce
NC
43812009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
4382
4383 * bfd-in2.h: Regenerate.
4384 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
4385 fields from n_entries to n_slots where appropriate, update comments.
4386 (HOWTO): Add TLS relocations.
4387 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
4388 (enum elf_m68k_got_offset_size): New enum.
4389 (struct elf_m68k_got_entry.type): Move field to ...
4390 (struct elf_m68k_got_entry_key): ... here. Update all uses.
4391 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
4392 functions.
4393 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
4394 functions.
4395 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
4396 fields into n_entries array. Update comments.
4397 (elf_m68k_init_got): Simplify, update all uses.
4398 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
4399 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
4400 GOT entries; update name, update all uses.
4401 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
4402 (elf_m68k_get_got_entry): Update.
4403 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
4404 simplify.
4405 (elf_m68k_remove_got_entry_type): Simplify.
4406 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
4407 (elf_m68k_can_merge_gots): Update.
4408 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
4409 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
4410 GOT entries, simplify.
4411 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
4412 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
4413 field, remove obsoleted local_n_entries field.
4414 (elf_m68k_partition_multi_got_2): New static function.
4415 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
4416 update.
4417 (elf_m68k_remove_got_entry_type): Update.
4418 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
d1fa68d3 4419 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
cf869cce
NC
4420 update of sgot->size and srelgot->size.
4421 (elf_m68k_gc_sweep_hook): Update.
4422 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
4423 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
4424 TLS relocations.
4425 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
4426 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
4427
c1a0a41f
DD
44282009-02-02 DJ Delorie <dj@redhat.com>
4429
4430 * elf32-mep.c (config_names): Regenerate configuration.
4431
72a80a16
AM
44322009-02-02 Alan Modra <amodra@bigpond.net.au>
4433
4434 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
4435 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
4436 * elf.c (bfd_elf_get_str_section): Make static.
4437 (bfd_elf_find_section): Delete.
4438 * libbfd.h: Regenerate.
4439
273f4430
JK
44402009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4441
4442 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
4443 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
4444
010e5ae2
AM
44452009-01-31 Alan Modra <amodra@bigpond.net.au>
4446
4447 * elflink.c (on_needed_list): New function.
4448 (elf_link_add_object_symbols): Link in --as-needed libs if they
4449 satisfy undefined symbols in other libs.
4450
33a7ffc2
JM
44512009-01-30 Julian Brown <julian@codesourcery.com>
4452
4453 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
4454 EXEC_P or DYNAMIC flags, and skip sections which are being linked
4455 with --just-symbols (-R).
4456
13d72a14
AN
44572009-01-29 Adam Nemet <anemet@caviumnetworks.com>
4458
4459 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
4460 high_pc in order to properly sign-extend VMAs.
4461
d334575b 44622009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
d1fa68d3
AS
4463 Mark Shinwell <shinwell@codesourcery.com>
4464 Catherine Moore <clm@codesourcery.com>
d334575b
JM
4465
4466 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
4467
528aeb62
CM
44682009-01-28 Catherine Moore <clm@codesourcery.com>
4469
4470 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
4471 SEC_LOAD for dynamic relocation sections.
4472
f6f05983
HPN
44732009-01-27 Hans-Peter Nilsson <hp@axis.com>
4474
4475 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
4476 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
4477 the size of local TLS data.
4478
27cc28f9
AS
44792009-01-27 Andreas Schwab <schwab@suse.de>
4480
4481 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
4482 architectures in the archive.
4483
b3bf42d8
HPN
44842009-01-27 Hans-Peter Nilsson <hp@axis.com>
4485
f551b6f0
HPN
4486 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
4487 <R_CRIS_32_DTPREL>: Correct relocation value.
4488
b3bf42d8
HPN
4489 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
4490 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
4491 symbols with non-default visibility.
4492
9bc4e62b
NS
44932009-01-26 Nathan Sidwell <nathan@codesourcery.com>
4494
4495 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
4496 describing the trampolines.
4497 (ppc_elf_relocate_section): Update relocs to describe the
4498 trampolines.
4499
aeaf6540
DA
45002009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4501
4502 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
4503 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
4504 and R_PARISC_PCREL12F relocations.
4505
1e8fa21e
AM
45062009-01-24 Alan Modra <amodra@bigpond.net.au>
4507
4508 PR 6022
4509 * elflink.c (find_version_for_sym): New function split out from,
4510 but without export_dynamic test, ..
4511 (_bfd_elf_link_assign_sym_version): ..here.
4512 (_bfd_elf_export_symbol): Use it.
4513
28caa186
AM
45142009-01-23 Alan Modra <amodra@bigpond.net.au>
4515
4516 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
4517 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
4518 * elflink.c: ..here, somewhat modified.
4519 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
4520 _bfd_elf_link_find_version_dependencies,
4521 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
4522 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
4523 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
4524 declare..
4525 * elflink.c: ..and make static here.
4526 (_bfd_elf_link_find_version_dependencies): Adjust for removal
4527 of output_bfd from struct elf_find_verdep_info.
4528 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
4529 struct elf_info_failed.
4530 (bfd_elf_size_dynamic_sections): Adjust.
4531
be04437d
AM
45322009-01-22 Alan Modra <amodra@bigpond.net.au>
4533
4534 PR 6832
4535 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
4536 after comp_unit_find_line call.
4537
58f9615c
NC
45382009-01-21 Nick Clifton <nickc@redhat.com>
4539
4540 PR 9769
4541 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
4542 tm_gmtoff field in struct tm.
4543
fb266b8b
AM
45442009-01-21 Alan Modra <amodra@bigpond.net.au>
4545
4546 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
4547 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
4548 sections in soft-icache lines unless non_ia_text. Don't add
4549 rodata if doing so would exceed line size.
4550
451ffe63
HPN
45512009-01-19 Hans-Peter Nilsson <hp@axis.com>
4552
4553 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
4554 types than bfd_link_hash_indirect, before early return, call
4555 _bfd_elf_link_hash_copy_indirect.
4556
5aa6ff7c
AS
45572009-01-19 Andrew Stubbs <ams@codesourcery.com>
4558
4559 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
4560 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
4561 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
4562 (elf_backend_obj_attrs_order): New define.
4563 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
4564 (elfNN_bed): Add elf_backend_obj_attrs_order.
4565
3483fe2e
AS
45662009-01-19 Andrew Stubbs <ams@codesourcery.com>
4567
4568 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
4569 (obj_attr_size): Likewise.
4570 (write_obj_attribute): Likewise.
4571 (_bfd_elf_copy_obj_attributes): Likewise.
4572 (_bfd_elf_parse_attributes): Likewise.
4573 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
4574 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
4575 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
4576 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
4577 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
4578 with macros.
4579
2d0bb761
AS
45802009-01-19 Andrew Stubbs <ams@codesourcery.com>
4581
4582 * elf-attrs.c (is_default_attr): Support defaultless attributes.
4583 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
4584 (bfd_elf_add_obj_attr_string): Likewise.
4585 (bfd_elf_add_obj_attr_int_string): Likewise.
4586 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
4587 * elf-bfd.h (struct obj_attribute): Document new flag bit.
4588 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
4589 Tag_nodefaults has no default value.
4590 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
4591 comment to reflect the new state.
4592
a77e83b7
AM
45932009-01-19 Alan Modra <amodra@bigpond.net.au>
4594
4595 PR 9695
4596 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
4597 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
4598 (adjust_z_magix): Delete dead code handling QMAGIC.
4599
f6d29e26
KT
46002009-01-16 Kai Tietz <kai.tietz@onevision.com>
4601
4602 * coffcode.h (styp_to_sec_flags): Correct interpretation of
4603 IMAGE_SCN_MEM_DISCARDABLE.
4604
29670fb9
AM
46052009-01-16 Alan Modra <amodra@bigpond.net.au>
4606
4607 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
4608 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
4609 * configure.in (commonbfdlib): Delete.
4610 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
4611 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
4612 is available, not just for linux.
4613 * po/SRC-POTFILES.in: Regenerate.
4614 * Makefile.in: Regenerate.
4615 * configure: Regenerate.
4616
91e22acd
AS
46172009-01-15 Andrew Stubbs <ams@codesourcery.com>
4618 Julian Brown <julian@codesourcery.com>
4619
4620 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
4621 ARM attributes in ABI 2.07.
4622 * elf32-arm.c (get_secondary_compatible_arch): New function.
4623 (set_secondary_compatible_arch): New function.
4624 (tag_cpu_arch_combine): New function.
4625 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
4626 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
4627 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
4628 make it fit with order_01243.
4629 Add support for Tag_also_compatible_with,
4630 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
4631 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
4632 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
4633 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
4634 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
4635 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
4636 Rework the way unknown attributes are handled.
4637 Defer errors until all attributes have been processed.
4638
7b86a9fa
AS
46392009-01-15 Andrew Stubbs <ams@codesourcery.com>
4640
4641 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
4642 bfd_elf_add_obj_attr_int_string.
4643 Read Tag_compatibility from its new location in the attribute array,
4644 rather than the attribute list.
4645 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
4646 bfd_elf_add_obj_attr_int_string.
4647 (_bfd_elf_parse_attributes): Likewise.
4648 (_bfd_elf_merge_object_attributes): There's now only one
4649 Tag_compatibility, and it's in the array, not the list.
4650 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
4651 Tag_compatibility.
4652 (bfd_elf_add_obj_attr_compat): Rename to
4653 bfd_elf_add_obj_attr_int_string.
4654 (bfd_elf_add_proc_attr_compat): Rename to
4655 bfd_elf_add_proc_attr_int_string.
4656 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
4657 Tag_compatibility.
4658
01e1a5bc
NC
46592009-01-15 Douglas B Rupp <rupp@gnat.com>
4660
4661 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
4662 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
4663 (vmsutil.lo): Add dependency rule.
4664 * Makefile.in: Regenerate.
4665 * config.bfd (ia64*-*-*vms*): Add case.
4666 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
4667 * configure: Regenerate.
4668 * vmsutil.c: New file.
4669 * vmsutil.h: New file.
4670 * elf-bfd.h (struct bfd_elf_special_section): Change type of
4671 attr to bfd_vma.
4672 * elfxx-ia64.c (elfNN_vms_post_process_headers,
4673 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
4674 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
4675 elfNN_vms_object_p): New functions
4676 * targets.c (bfd_elf64_ia64_vms_vec): New target.
4677
a33dafc3
L
46782009-01-14 H.J. Lu <hongjiu.lu@intel.com>
4679
4680 PR ld/9727
4681 * elflink.c (elf_gc_sweep): Exclude the group section if the
4682 first member of the section group is excluded.
4683
13c0e967
AM
46842009-01-14 Alan Modra <amodra@bigpond.net.au>
4685
4686 PR 9735
4687 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
4688 saved filename, use bfd_alloc rather than bfd_malloc for it.
4689
460e679b
AM
46902009-01-13 Alan Modra <amodra@bigpond.net.au>
4691
4692 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
4693
25076afa
AM
46942009-01-13 Alan Modra <amodra@bigpond.net.au>
4695
4696 * elf32-spu.c (remove_cycles): Always set call->max_depth.
4697
37107878
AM
46982009-01-12 Alan Modra <amodra@bigpond.net.au>
4699
4700 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
4701
cd4a7468
AM
47022009-01-12 Alan Modra <amodra@bigpond.net.au>
4703
4704 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
4705 num_lines_log2.
4706 (struct got_entry): Add br_addr.
4707 (struct call_info): Add priority.
4708 (struct function_info): Add lr_store and sp_adjust.
4709 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
4710 (spu_elf_find_overlays): For soft-icache, mark any section within cache
4711 area as an overlay, and check that no other overlays exist. Look up
4712 icache overlay manager entry sym.
4713 (BRA_STUBS, BRA, BRASL): Define.
4714 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
4715 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
4716 in branch insn.
4717 (count_stub, build_stub): Support soft-icache.
4718 (build_spuear_stubs, process_stubs): Adjust build_stub call.
4719 (spu_elf_size_stubs): Size soft-icache stubs.
4720 (overlay_index): New function.
4721 (spu_elf_build_stubs): Make static. Support soft-icache.
4722 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
4723 (find_function_stack_adjust): Save lr store and stack adjust insn
4724 offsets.
4725 (maybe_insert_function): Adjust find_function_stack_adjust call.
4726 (mark_functions_via_relocs): Retrieve priority.
4727 (remove_cycles): Only warn about pruned arcs when stack_analysis.
4728 (sort_calls): Sort by priority first.
4729 (mark_overlay_section): Ignore .ovl.init.
4730 (sum_stack): Only print when stack_analysis.
4731 (print_one_overlay_section): New function, extracted from..
4732 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
4733 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
4734 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
4735 analysis. Call spu_elf_build_stubs.
4736 (spu_elf_relocate_section): For soft-icache encode overlay index
4737 into addresses.
4738 (spu_elf_output_symbol_hook): Support soft-icache.
4739 (spu_elf_modify_program_headers: Likewise.
37107878 4740
cd4a7468
AM
4741 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
4742 num_regions to num_lines. Add line_size and max_branch.
4743 (enum _ovly_flavour): Add ovly_soft_icache.
4744 (spu_elf_build_stubs): Delete.
4745
80c29487
JK
47462009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
4747
4748 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
4749 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
4750
1bc86aea
HPN
47512009-01-07 Hans-Peter Nilsson <hp@axis.com>
4752
4753 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
4754 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
4755 the program, the known offset starts at the negative size of the
4756 TLS section.
4757 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
4758 Similar.
4759
3baa454d 47602009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
75606e85 4761
3baa454d 4762 * config.bfd: Add lm32-*-rtems*.
75606e85 4763
9dbe8890
L
47642009-01-03 H.J. Lu <hongjiu.lu@intel.com>
4765
4766 * coff-ppc.c: Add 2009 to Copyright.
4767 * elf32-cris.c: Likewise.
4768 * elflink.c: Likewise.
4769
0bdf8d40
HPN
47702009-01-03 Hans-Peter Nilsson <hp@axis.com>
4771
4772 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
4773 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
4774
54ac0771
L
47752009-01-02 H.J. Lu <hongjiu.lu@intel.com>
4776
4777 PR ld/9679
4778 * elflink.c (elf_merge_st_other): New.
4779 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
4780 hide them if needed.
4781 (elf_link_add_object_symbols): Updated.
4782
d8880531
L
47832009-01-02 H.J. Lu <hongjiu.lu@intel.com>
4784
4785 PR ld/9676
4786 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
4787 ref_dynamic and dynamic_def fields when setting def_regular
4788 to 1.
4789
b70b5c14
NC
47902009-01-02 Curtis Mackie <curtmackevo@gmail.com>
4791
4792 PR 9682
4793 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
4794 literal.
4795
d8880531 4796For older changes see ChangeLog-2008
56882138
AM
4797\f
4798Local Variables:
4799mode: change-log
4800left-margin: 8
4801fill-column: 74
4802version-control: never
4803End:
This page took 0.706046 seconds and 4 git commands to generate.