gdb/
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
3cf9e6c4
L
12012-10-13 H.J. Lu <hongjiu.lu@intel.com>
2
3 * Makefile.am (LIBDL): Replace -ldl with @lt_cv_dlopen_libs@.
4 * configure.in (lt_cv_dlopen_libs): AC_SUBST.
5 * Makefile.in: Regenerated.
6 * configure: Likewise.
7
f073ced3
AM
82012-10-08 Alan Modra <amodra@gmail.com>
9
10 PR binutils/14662
11 * elf.c (_bfd_elf_make_section_from_shdr): Treat .gdb_index as
12 SEC_DEBUGGING.
13
535127d2
WL
142012-09-20 Walter Lee <walt@tilera.com>
15
16 * elf32-tilepro.c (tilepro_elf_relocate_section): Adjust got
17 relocations with value of hgot.
18 * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
19
795e8513
SE
202012-09-19 Steve Ellcey <sellcey@mips.com>
21
22 * config.bfd: Add mips*-mti-elf* target.
23
37a9e49a
L
242012-09-18 H.J. Lu <hongjiu.lu@intel.com>
25
26 PR ld/14591
f073ced3 27 * elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return
37a9e49a
L
28 if the old symbol is weak.
29
30 * elf32-sh-symbian.c (sh_symbian_relocate_section): Update
31 _bfd_elf_merge_symbol call.
32
33 * elflink.c (_bfd_elf_merge_symbol): Add an argument to return
34 if the old symbol is weak.
35 (_bfd_elf_add_default_symbol): Update _bfd_elf_merge_symbol
36 call.
37 (elf_link_add_object_symbols): Don't update symbol type from a
38 weak definition. Update symbol type from a common symbol when
39 overriding a weak symbol.
40
fbdc86d9
L
412012-09-17 H.J. Lu <hongjiu.lu@intel.com>
42
43 * elf32-i386.c (elf_i386_convert_mov_to_lea): Ignore discarded
44 section.
45 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
46
cec7f46a
L
472012-09-17 H.J. Lu <hongjiu.lu@intel.com>
48
49 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Replace return
50 FALSE with abort.
51 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
52
5ec61378
WL
532012-09-17 Walter Lee <walt@tilera.com>
54
55 * elf32-tilepro.c (tilepro_elf_relocate_section): Remove unused
56 got_base variable.
57 * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
58
901e60ca
WL
592012-09-17 Walter Lee <walt@tilera.com>
60
61 * elf32-tilepro.c (tilepro_elf_relocate_section): Fix computation
62 of got relocations for when .got.plt section is merged with .got.
63 * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
64
6c9c0a50
DE
652012-09-14 David Edelsohn <dje.gcc@gmail.com>
66
67 * configure: Regenerate.
68
e202fa84
AG
692012-09-13 Anthony Green <green@moxielogic.com>
70
71 * targets.c (bfd_elf32_bigmoxie_vec, bfd_elf32_littlemoxie_vec):
72 Define.
73 (bfd_elf32_moxie_vec): Remove.
74 * config.bfd, configure.in: Add bi-endian support for moxie.
75 * configure: Rebuilt.
76 * elf32-moxie.c (TARGET_LITTLE_NAME, TARGET_LITTLE_SYM): Define.
77 (TARGET_BIG_NAME, TARGET_BIG_SYM): Update for bi-endian support.
78
31c76678
DK
792012-09-12 Doug Kwan <dougkwan@google.com>
80
81 * elf64-ppc.c (ppc64_elf_relocate_section): Use pre-adjusted
82 relocation for stub lookup.
83
f41aef5f
RE
842012-09-12 Chris Schlumberger-Socha <chris.schlumberger-socha@arm.com>
85
86 * bfd-in2.h: Regenerated.
87 * elf64-aarch64.c
88 (elf64_aarch64_howto_table): Add R_AARCH64_GOT_LD_PREL19 reloc to HOWTO.
89 (elf64_aarch64_reloc_map): Add reloc entry.
90 (aarch64_resolve_relocation): Likewise.
91 (bfd_elf_aarch64_put_addend): Likewise.
92 (aarch64_reloc_got_type): Likewise.
93 (elf64_aarch64_final_link_relocate): Likewise.
94 (lf64_aarch64_check_relocs): Likewise.
95 (elf64_aarch64_check_relocs): New case for R_AARCH64_ADR_PREL_LO21
96 reloc.
97 * libbfd.h: Regenerated.
98 * reloc.c (R_AARCH64_GOT_LD_PREL19): New reloc.
99
00716ab1
AM
1002012-09-10 Matthias Klose <doko@ubuntu.com>
101
102 * config.in: Disable sanity check for kfreebsd.
103
6d2920c8
L
1042012-09-10 H.J. Lu <hongjiu.lu@intel.com>
105
106 * configure: Regenerated.
107
b3e14eda
L
1082012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com>
109
110 * cpu-ia64-opc.c (ins_cnt6a): New function.
111 (ext_cnt6a): Ditto.
112 (ins_strd5b): Ditto.
113 (ext_strd5b): Ditto.
114 (elf64_ia64_operands): Add new operand types.
115
c6d8cab4
L
1162012-09-04 H.J. Lu <hongjiu.lu@intel.com>
117
118 PR binutils/14493
119 * elf.c (ignore_section_sym): Also ignore section symbols without
120 a BFD section.
121
31db78f6
AK
1222012-09-03 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
123
124 * elf32-s390.c (elf_s390_relocate_section): Handle PLTOFF for
125 local and global ifunc symbols.
126 * elf64-s390.c (elf_s390_relocate_section): Likewise.
127
9637f6ef
L
1282012-09-02 H.J. Lu <hongjiu.lu@intel.com>
129
130 * elf-bfd.h (elf_link_hash_table): Add hdynamic for the
131 _DYNAMIC symbol.
132
133 * elflink.c (_bfd_elf_link_create_dynamic_sections): Set
134 hdynamic.
135
136 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Check
137 hdynamic instead of "_DYNAMIC".
138 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
139 * elf32-cr16.c (elf32_arm_finish_dynamic_symbol): Likewise.
140 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
141 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
142 * elf32-i386.c (elf_i386_convert_mov_to_lea): Likewise.
143 * elf32-lm32.c (lm32_elf_finish_dynamic_symbol): Likewise.
144 * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
145 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
146 * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
147 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
148 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
149 * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
150 * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
151 * elf64-aarch64.c elf64_aarch64_finish_dynamic_symbol(): Likewise.
152 * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
153 * elf64-ia64-vms.c (elf64_ia64_finish_dynamic_symbol): Likewise.
154 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
155 * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
156 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
157 * elfnn-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
158 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
159 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
160 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
161
162 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Check
163 hdynamic, hgot, hplt instead of _DYNAMIC, _GLOBAL_OFFSET_TABLE_,
164 _PROCEDURE_LINKAGE_TABLE_.
165 * elf32-score.c (s3_bfd_score_elf_finish_dynamic_symbol): Likewise.
166 * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_symbol): Likewise.
167
3f65f599
L
1682012-08-31 H.J. Lu <hongjiu.lu@intel.com>
169
170 * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't optimize
171 _DYNAMIC.
172 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
173
daa67607
L
1742012-08-31 H.J. Lu <hongjiu.lu@intel.com>
175
176 * elf32-i386.c (elf_i386_convert_mov_to_lea): New.
177 (elf_i386_size_dynamic_sections): Use it on input sections.
178 (elf_i386_relocate_section): Don't convert
179 "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
180 for local symbols here.
181
182 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): New.
183 (elf_x86_64_size_dynamic_sections): Use it on input sections.
184 (elf_x86_64_relocate_section): Don't convert
185 "mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
186 for local symbols here.
187
80d87326
L
1882012-08-30 H.J. Lu <hongjiu.lu@intel.com>
189
190 * elf32-i386.c (elf_i386_relocate_section): Convert
191 "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
192 for local symbols.
193
194 * elf64-x86-64.c (elf_x86_64_relocate_section): Convert
195 "mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
196 for local symbols.
197
b69fdb4e
AM
1982012-08-31 Alan Modra <amodra@gmail.com>
199
200 PR ld/14464
201 * elf64-ppc.c (ppc64_elf_relocate_section): Map symbols defined
202 by a linker script in .opd to corresponding input .opd section.
203
14acf4dc
MR
2042012-08-28 Maciej W. Rozycki <macro@codesourcery.com>
205
206 * elf32-ppc.c (ppc_elf_relocate_section): Assert that dynindx is
207 not minus one.
208 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
209
aed81c4e
MR
2102012-08-28 Maciej W. Rozycki <macro@codesourcery.com>
211
212 * elflink.c (_bfd_elf_merge_symbol): Also override the version
213 a dynamic symbol defaulted to if preempted with a hidden or
214 internal definition.
215
663b5850
WL
2162012-08-28 Walter Lee <walt@tilera.com>
217
218 * elf32-tilepro.c (allocate_dynrelocs): Use PLT_ENTRY_SIZE as size
219 of header.
220 (tilepro_plt_entry_build): Account for new header size.
221 (tilepro_elf_finish_dynamic_sections): Ditto.
222 (tilepro_elf_plt_sym_val): Ditto.
223 * elfxx-tilegx.c (allocate_dynrelocs): Use PLT_ENTRY_SIZE as size
224 of header + tail.
225 (tilegx_elf_finish_dynamic_sections): Account for new padding.
226
e5b95258
WL
2272012-08-27 Walter Lee <walt@tilera.com>
228
229 * reloc.c (Add BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
230 BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
231 BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
232 BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
233 BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
234 BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
235 BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
236 BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
237 BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
238 BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
239 BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
240 BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
241 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
242 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): new relocations.
243 * elfxx-tilegx.c (tilegx_elf_howto_table): Handle new relocations.
244 (tilegx_reloc_map): Ditto.
245 (reloc_to_create_func): Ditto.
246 (tilegx_elf_check_relocs): Ditto.
247 (tilegx_elf_gc_sweep_hook): Ditto.
248 (tilegx_elf_relocate_section): Ditto.
249 * libbfd.h: Regenerate.
250 * bfd-in2.h: Regenerate.
251
bca38921
MGD
2522012-08-24 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
253
254 * elf32-arm.c (v8): New array.
255 (tag_cpu_arch_combine): Add support for ARMv8 attributes.
256 (elf32_arm_merge_eabi_attributes): Likewise.
257 (VFP_VERSION_COUNT): New define.
258
06e7acd7
TT
2592012-08-20 Tom Tromey <tromey@redhat.com>
260
261 * vms-lib.c (_bfd_vms_lib_get_module): Use bfd_zmalloc for
262 areltdata.
263 * opncls.c (_bfd_delete_bfd): Free arelt_data.
264 * mach-o.c (bfd_mach_o_fat_member_init): Use bfd_zmalloc for
265 areltdata.
266 * ecoff.c (_bfd_ecoff_slurp_armap): Use free for mapdata.
267 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Use bfd_zmalloc for
268 areltdata.
269 (xcoff_write_archive_contents_old): Likewise.
270 (xcoff_write_archive_contents_big): Likewise.
271 * archive64.c (bfd_elf64_archive_slurp_armap): Use free for
272 areltdata.
273 * archive.c (_bfd_generic_read_ar_hdr_mag): Use bfd_zmalloc and
274 free for areltdata.
275 (_bfd_get_elt_at_filepos): Likewise. Clear n_nfd->arelt_data on
276 failure.
277 (do_slurp_bsd_armap): Use bfd_zmalloc and free for areltdata.
278 (do_slurp_coff_armap): Likewise.
279 (_bfd_slurp_extended_name_table): Likewise.
280 (bfd_slurp_bsd_armap_f2): Likewise. Don't leak 'mapdata'.
281
eb80cb87
NC
2822012-08-17 Nick Clifton <nickc@redhat.com>
283
284 * po/vi.po: Updated Vietnamese translation.
285
a8685210
AM
2862012-08-17 Yuri Chornoivan <yurchor@ukr.net>
287
288 * elf-bfd.h, * elf32-ppc.c, * elf64-ia64-vms.c, * elfnn-ia64.c,
289 * elfxx-mips.c, * vms-alpha.c: Typo fixes.
290
ed668b34
AM
2912012-08-17 Alan Modra <amodra@gmail.com>
292
293 PR binutils/14475:
294 * archive.c (bfd_ar_hdr_from_filesystem): Revert last change.
295 Instead malloc areltdata.
296
a3074307
TT
2972012-08-16 Tom Tromey <tromey@redhat.com>
298
299 PR binutils/14475:
300 * archive.c (bfd_ar_hdr_from_filesystem): Allocate areltdata on
301 'member' BFD. Don't try to free 'ared'.
302
63a79b61
NC
3032012-08-14 Nick Clifton <nickc@redhat.com>
304
305 * po/uk.po: Updated Ukranian translation.
306
af0edeb8
MR
3072012-08-13 Maciej W. Rozycki <macro@codesourcery.com>
308
309 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Look up
310 the options section in the output rather than input BFD to
311 decide if to add a DT_MIPS_OPTIONS tag.
312
9edaacb3
MR
3132012-08-13 Maciej W. Rozycki <macro@codesourcery.com>
314
315 * config.bfd: Wrap mips*el-*-linux* and mips*-*-linux* into
316 #ifdef BFD64.
317
a06ea964
NC
3182012-08-13 Ian Bolton <ian.bolton@arm.com>
319 Laurent Desnogues <laurent.desnogues@arm.com>
320 Jim MacArthur <jim.macarthur@arm.com>
321 Marcus Shawcroft <marcus.shawcroft@arm.com>
322 Nigel Stephens <nigel.stephens@arm.com>
323 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
324 Richard Earnshaw <rearnsha@arm.com>
325 Sofiane Naci <sofiane.naci@arm.com>
326 Tejas Belagod <tejas.belagod@arm.com>
327 Yufeng Zhang <yufeng.zhang@arm.com>
328
329 * Makefile.am: Add AArch64 files.
330 * Makefile.in: Regenerate.
331 * archures.c (bfd_aarch64_arch): New declaration.
332 (bfd_archures_list): Use bfd_archures_list.
333 * bfd-in.h (bfd_elf64_aarch64_init_maps): New declaration.
334 (bfd_aarch64_process_before_allocation): New declaration.
335 (bfd_elf64_aarch64_process_before_allocation): New declaration.
336 (bfd_elf64_aarch64_set_options): New declaration.
337 (bfd_elf64_aarch64_add_glue_sections_to_bfd): New declaration.
338 (BFD_AARCH64_SPECIAL_SYM_TYPE_MAP): New definition.
339 (BFD_AARCH64_SPECIAL_SYM_TYPE_TAG): New definition.
340 (BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER): New definition.
341 (BFD_AARCH64_SPECIAL_SYM_TYPE_ANY): New definition.
342 (bfd_is_aarch64_special_symbol_name): New declaration.
343 (bfd_aarch64_merge_machines): New declaration.
344 (bfd_aarch64_update_notes): New declaration.
345 (int bfd_aarch64_get_mach_from_notes): New declaration.
346 (elf64_aarch64_setup_section_lists): New declaration.
347 (elf64_aarch64_next_input_section): New declaration.
348 (elf64_aarch64_size_stubs): New declaration.
349 (elf64_aarch64_build_stubs): New declaration.
350 * config.bfd: Add AArch64.
351 * configure.in: Add AArch64.
352 * configure: Regenerate.
353 * cpu-aarch64.c: New file.
354 * elf-bfd.h: Add AArch64.
355 * bfd-in2.h: Regenerate.
356 * libbfd.h: Regenerate.
357 * elf64-aarch64.c: New file.
358 * reloc.c: Add AArch64 relocations.
359 * targets.c: Add AArch64.
360 * po/SRC-POTFILES.in: Regenerate.
361
9f1a453e
MR
3622012-08-13 Maciej W. Rozycki <macro@codesourcery.com>
363
364 * elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling
365 of protected symbols.
366
44534af3
AM
3672012-08-10 Alan Modra <amodra@gmail.com>
368
369 PR binutils/14444
370 * elf.c (IS_VALID_GROUP_SECTION_HEADER) Add minsize param.
371 (setup_group): Adjust uses.
372 (bfd_section_from_shdr): Allow SHT_GROUP sections with just a flag
373 word.
374
3c892704
NC
3752012-08-09 Nick Clifton <nickc@redhat.com>
376
377 * po/vi.po: Updated Vietnamese translation.
378
d21911ea
MR
3792012-08-09 Maciej W. Rozycki <macro@codesourcery.com>
380
381 * elfxx-mips.c (LA25_LUI_MICROMIPS_1, LA25_LUI_MICROMIPS_2):
382 Remove macros, folding them into...
383 (LA25_LUI_MICROMIPS): ... this new macro.
384 (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise into...
385 (LA25_J_MICROMIPS): ... this new macro.
386 (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise
387 into...
388 (LA25_ADDIU_MICROMIPS): ... this new macro.
389 (bfd_put_micromips_32, bfd_get_micromips_32): New functions.
390 (mips_elf_create_la25_stub): Use them.
391 (check_br32_dslot, check_br32, check_relocated_bzc): Likewise.
392 (_bfd_mips_elf_relax_section): Likewise.
393
eeb1f9ae
AM
3942012-08-09 Alan Modra <amodra@gmail.com>
395 Tom Tromey <tromey@redhat.com>
396
397 * archive.c (SECTION Archives): Update documentation.
398 (_bfd_delete_archive_data): Remove.
399 (_bfd_add_bfd_to_archive_cache): Set 'parent_cache' and 'key'.
400 (archive_close_worker, _bfd_archive_close_and_cleanup): New
401 functions.
402 * libbfd-in.h (struct areltdata <parent_cache, key>): New fields.
403 (_bfd_delete_archive_data): Don't declare.
404 (_bfd_archive_close_and_cleanup): Declare.
405 (_bfd_generic_close_and_cleanup): Redefine.
406 * libbfd.h: Rebuild.
407 * opncls.c (_bfd_delete_bfd): Don't call _bfd_delete_archive_data.
408 (bfd_close): Don't close nested thin archives here.
409
a988325c
NC
4102012-08-07 Tom Tromey <tromey@redhat.com>
411
412 * archive.c (_bfd_delete_archive_data): New function.
413 * libbfd-in.h (_bfd_delete_archive_data): Declare.
414 * libbfd.h: Rebuild.
415 * opncls.c (_bfd_delete_bfd): Call _bfd_delete_archive_data.
416
5125d2b0
NC
4172012-08-07 Nick Clifton <nickc@redhat.com>
418
419 * po/uk.po: Updated Ukranian translation.
420
eb8476a6
MR
4212012-08-06 Maciej W. Rozycki <macro@codesourcery.com>
422
423 * elflink.c (bfd_elf_record_link_assignment): Remove --defsym
424 symbols special case.
425
a22a8039
MR
4262012-08-05 Maciej W. Rozycki <macro@linux-mips.org>
427
428 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Don't allocate
429 PLT slots for local symbols.
430
1a6c3ca2
MR
4312012-08-03 Maciej W. Rozycki <macro@codesourcery.com>
432
433 * elf64-mips.c (mips16_elf64_howto_table_rela): Correct src_mask
434 field initializers throughout.
435 * elfn32-mips.c (elf_mips16_howto_table_rela): Likewise.
436
3bdf9505
MR
4372012-08-03 Maciej W. Rozycki <macro@codesourcery.com>
438
439 * elfxx-mips.c (mips_elf_perform_relocation): Update the
440 cross-mode jump message.
441
6e6be592
MR
4422012-08-03 Maciej W. Rozycki <macro@codesourcery.com>
443
444 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Update the
445 comment on DT_MIPS_RLD_MAP.
446
7b84f8da
TT
4472012-08-03 Tom Tromey <tromey@redhat.com>
448
449 * opncls.c (_bfd_delete_bfd): Now static.
450 * libbfd-in.h (_bfd_delete_bfd): Don't declare.
451 * libbfd.h: Rebuild.
452
9a92d0ce
SK
4532012-08-02 Sean Keys <skeys@ipdatasys.com>
454
455 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Modified
456 conditional statment to allow suppression of mismatched bank
457 warning.
458
1c37913d
AM
4592012-08-01 Alan Modra <amodra@gmail.com>
460
461 * dwarf2.c (struct dwarf2_debug): Add close_on_cleanup.
462 (_bfd_dwarf2_slurp_debug_info): Set close_on_cleanup if we open
463 gnu_debuglink bfd.
464 (_bfd_dwarf2_cleanup_debug_info): Act on close_on_cleanup.
465
a6dc81d2
NC
4662012-07-30 Nick Clifton <nickc@redhat.com>
467
468 * po/bfd.pot: Updated template.
469 * po/es.po: Updated Spanish translation.
470 * po/fi.po: Updated Finnish translation.
471 * po/fr.po: Updated French translation.
472 * po/ru.po: Updated Russian translation.
473 * po/uk.po: Updated Ukranian translation.
474
c4dd807e
MF
4752012-07-27 Mike Frysinger <vapier@gentoo.org>
476
477 * configure.in (AC_INIT): Call with the args bfd and 2.22.52.
478 (AM_INIT_AUTOMAKE): Remove args.
479 * configure: Regenerate.
480
c92b291c
AK
4812012-07-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
482
483 * cpu-s390.c (bfd_s390_64_arch, bfd_s390_arch): Pick the default
484 arch depending on the target size.
485
ecdf0cbb
TG
4862012-07-27 Tristan Gingold <gingold@adacore.com>
487
488 * configure.in: Bump version to 2.23.51
489 * configure: Regenerate.
490
f725daa8
CC
4912012-07-26 Teresa Johnson <tejohnson@google.com>
492
493 * bfd/dwarf2.c (find_line): Initialize discriminator_ptr
494 if it is non-NULL.
495
05456594
NC
4962012-07-26 Meador Inge <meadori@codesourcery.com>
497 Nick Clifton <nickc@redhat.com>
498
499 PR ld/14397
500 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Report an error
501 if a required section is missing from the linker script.
502
6aa82b64
EW
5032012-07-24 Jan Waclawek <konfera@efton.sk>
504 PR 13899
505 * elf32-avr.c (elf32_avr_relax_delete_bytes): Call
506 _bfd_elf_link_read_relocs with keep_memory as TRUE.
507
9b8d1a36
CC
5082012-07-24 Teresa Johnson <tejohnson@google.com>
509
510 * bfd.c (bfd_find_nearest_line_discriminator): New macro.
511 * coff-rs6000.c: Init _bfd_find_nearest_line_discriminator.
512 * coff64-rs6000.c: Likewise.
513 * dwarf2.c (struct line_info): Add discriminator field.
514 (add_line_info): Fill in new discriminator field.
515 (decode_line_info): Record discriminator information instead
44534af3 516 of ignoring it.
9b8d1a36 517 (lookup_address_in_line_info_table): Return discriminator field if
44534af3 518 requested.
9b8d1a36
CC
519 (comp_unit_find_nearest_line): Add discriminator argument.
520 (find_line): Likewise.
521 (_bfd_dwarf2_find_nearest_line): Likewise.
522 (_bfd_dwarf2_find_line): Likewise.
523 * elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New.
44534af3
AM
524 (_bfd_elf_find_line_discriminator): Likewise.
525 (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined.
9b8d1a36 526 * elf.c (_bfd_elf_find_nearest_line): Change to a wrapper
44534af3
AM
527 that invokes _bfd_elf_find_nearest_line_discriminator with correct
528 arguments.
9b8d1a36
CC
529 (_bfd_elf_find_nearest_line_discriminator): New.
530 (_bfd_elf_find_line): Change to a wrapper
44534af3
AM
531 that invokes _bfd_elf_find_line_discriminator with correct
532 arguments.
9b8d1a36
CC
533 (_bfd_elf_find_line_discriminator): New.
534 * coffgen.c (coff_find_nearest_line_with_names): Handle
44534af3 535 new discriminator argument.
9b8d1a36
CC
536 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
537 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
538 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
539 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
540 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator
44534af3
AM
541 argument.
542 (_bfd_dwarf2_find_line): Likewise.
543 (_bfd_generic_find_nearest_line_discriminator): New.
9b8d1a36
CC
544 * libbfd.c (_bfd_generic_find_nearest_line_discriminator): New.
545 * bfd-in2.h: Regenerated.
546 * libbfd.h: Likewise.
547 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize
44534af3
AM
548 _bfd_find_nearest_line_discriminator with
549 _bfd_generic_find_nearest_line_discriminator.
550 (bfd_target): Add _bfd_find_nearest_line_discriminator.
9b8d1a36 551
082d1122
NC
5522012-07-24 Sean Keys <skeys@ipdatasys.com>
553
44534af3 554 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Added code
082d1122 555 that enables the linker to offset addresses, when linking against
44534af3 556 symbols from the XGATE processor and vice versa.
082d1122 557
d86492f2
NC
5582012-07-23 Nick Clifton <nickc@redhat.com>
559
560 * cisco-core.c (cisco_core_file_failing_command): Make static.
561 (cisco_core_file_failing_signal): Make static.
562
7c960184
L
5632012-07-18 H.J. Lu <hongjiu.lu@intel.com>
564
565 * bfd-in2.h: Regenerated.
566
c06fc9eb
L
5672012-07-18 Nicolàs Alejandro Di Risio <sheeva@tiscali.it>
568
569 PR binutils/14335
570 * section.c: Fix a typo in comments.
571
470b557a
AK
5722012-07-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
573
574 * elf64-s390.c: Include elf-s390-common.c.
575 (R_390_IRELATIVE): New reloc.
576 (elf_s390_reloc_type_lookup): Support R_390_IRELATIVE.
577 (RELA_ENTRY_SIZE): New macro.
578 (elf_s390_link_hash_entry): New fields ifunc_resolver_address and
579 *ifunc_resolver_section.
580 (struct plt_entry): New struct.
581 (struct elf_s390_obj_tdata): New field local_plt.
582 (elf_s390_local_plt): New macro.
583 (struct elf_s390_link_hash_table): New field irelifunc.
584 (ELF64): New macro.
585 (link_hash_newfunc): Initialize new fields.
586 (elf_s390_check_relocs): Handle IFUNC symbols.
587 (elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC
588 symbols.
589 (allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for
590 IFUNC symbols.
591 (elf_s390_size_dynamic_sections): Handle IFUNC symbols.
592 (elf_s390_relocate_section): Likewise.
593 (elf_s390_finish_dynamic_symbol): Likewise.
594 (elf_s390_finish_dynamic_sections): Handle local IFUNC symbols.
595 (elf_s390_finish_ifunc_symbol): New function.
596 (elf_s390_gc_sweep_hook): Handle local plt entries.
597 (elf_backend_add_symbol_hook): Define.
598 * elf32-s390.c: See elf64-s390.c changes.
599 * elf-s390-common.c: New file.
600 * bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field.
601 * libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for
602 BFD_RELOC_390_IRELATIVE.
603 * reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation.
604
2c3fc389
NC
6052012-07-13 Nick Clifton <nickc@redhat.com>
606
607 * aix386-core.c: Remove use of PTR and PARAMS macros.
608 * archive.c: Likewise.
609 * cache.c: Likewise.
610 * cisco-core.c: Likewise.
611 * coff-alpha.c: Likewise.
612 * coff-apollo.c: Likewise.
613 * coff-aux.c: Likewise.
614 * coff-h8300.c: Likewise.
615 * coff-h8500.c: Likewise.
616 * coff-i386.c: Likewise.
617 * coff-i960.c: Likewise.
618 * coff-ia64.c: Likewise.
619 * coff-m68k.c: Likewise.
620 * coff-m88k.c: Likewise.
621 * coff-mcore.c: Likewise.
622 * coff-mips.c: Likewise.
623 * coff-or32.c: Likewise.
624 * coff-ppc.c: Likewise.
625 * coff-rs6000.c: Likewise.
626 * coff-sh.c: Likewise.
627 * coff-sparc.c: Likewise.
628 * coff-stgo32.c: Likewise.
629 * coff-tic30.c: Likewise.
630 * coff-tic4x.c: Likewise.
631 * coff-tic54x.c: Likewise.
632 * coff-tic80.c: Likewise.
633 * coff-w65.c: Likewise.
634 * cofflink.c: Likewise.
635 * cpu-arc.c: Likewise.
636 * cpu-cris.c: Likewise.
637 * cpu-h8500.c: Likewise.
638 * cpu-i960.c: Likewise.
639 * cpu-msp430.c: Likewise.
640 * cpu-ns32k.c: Likewise.
641 * cpu-powerpc.c: Likewise.
642 * cpu-rs6000.c: Likewise.
643 * cpu-tic4x.c: Likewise.
644 * cpu-w65.c: Likewise.
645 * ecoff.c: Likewise.
646 * ecofflink.c: Likewise.
647 * elf-m10200.c: Likewise.
648 * elf32-bfin.c: Likewise.
649 * elf32-cris.c: Likewise.
650 * elf32-crx.c: Likewise.
651 * elf32-fr30.c: Likewise.
652 * elf32-frv.c: Likewise.
653 * elf32-h8300.c: Likewise.
654 * elf32-i960.c: Likewise.
655 * elf32-m32c.c: Likewise.
656 * elf32-m68hc11.c: Likewise.
657 * elf32-m68hc12.c: Likewise.
658 * elf32-m68hc1x.c: Likewise.
659 * elf32-m68k.c: Likewise.
660 * elf32-mcore.c: Likewise.
661 * elf32-rl78.c: Likewise.
662 * elf32-rx.c: Likewise.
663 * elf32-s390.c: Likewise.
664 * elf32-vax.c: Likewise.
665 * elf64-alpha.c: Likewise.
666 * elf64-mmix.c: Likewise.
667 * elf64-s390.c: Likewise.
668 * elf64-sparc.c: Likewise.
669 * elfnn-ia64.c: Likewise.
670 * elfxx-mips.c: Likewise.
671 * elfxx-sparc.c: Likewise.
672 * hash.c: Likewise.
673 * hp300hpux.c: Likewise.
674 * hppabsd-core.c: Likewise.
675 * hpux-core.c: Likewise.
676 * i386dynix.c: Likewise.
677 * i386linux.c: Likewise.
678 * i386lynx.c: Likewise.
679 * i386mach3.c: Likewise.
680 * i386msdos.c: Likewise.
681 * i386os9k.c: Likewise.
682 * irix-core.c: Likewise.
683 * lynx-core.c: Likewise.
684 * m68klinux.c: Likewise.
685 * mach-o.h: Likewise.
686 * mipsbsd.c: Likewise.
687 * netbsd-core.c: Likewise.
688 * nlm32-i386.c: Likewise.
689 * osf-core.c: Likewise.
690 * pc532-mach.c: Likewise.
691 * pef.c: Likewise.
692 * ppcboot.c: Likewise.
693 * ptrace-core.c: Likewise.
694 * reloc16.c: Likewise.
695 * sco5-core.c: Likewise.
696 * som.h: Likewise.
697 * sparclinux.c: Likewise.
698 * sparclynx.c: Likewise.
699 * ticoff.h: Likewise.
700 * trad-core.c: Likewise.
701 * vms-lib.c: Likewise.
702 * xsym.h: Likewise.
703
14160578
AM
7042012-07-09 Alan Modra <amodra@gmail.com>
705
706 PR ld/14323
707 * elflink.c (elf_sort_symbol): Sort by size too.
708 (elf_link_add_object_symbols <weakdefs>): Simplify binary search.
709 Do not depend on ordering of symbol aliases. Match largest size.
710
1c52a645
L
7112012-07-03 H.J. Lu <hongjiu.lu@intel.com>
712
713 * elf.c (assign_section_numbers): Check if number of sections
714 >= SHN_LORESERVE.
715 * elfcode.h (elf_object_p): Likewise.
716
5f8ebec5
NC
7172012-07-03 Nick Clifton <nickc@redhat.com>
718
719 * archive.c (bsd_write_armap): Catch attempts to create an archive
720 with indicies bigger than 4Gb.
721 (coff_write_armap): Likewise.
722
5a5ed5b0
L
7232012-07-03 H.J. Lu <hongjiu.lu@intel.com>
724
725 PR binutils/14319
726 * elf.c (_bfd_elf_make_section_from_shdr): Don't compress empty
727 debug section.
728
90c984fc
L
7292012-07-03 H.J. Lu <hongjiu.lu@intel.com>
730
731 PR ld/3351
732 * elflink.c (_bfd_elf_update_dynamic_flags): New.
733 (_bfd_elf_merge_symbol): Update both real and indirect symbol
734 dynamic flags.
735 (_bfd_elf_add_default_symbol): Make the real symbol dynamic if
736 the indirect symbol is defined in a shared library.
737 (elf_link_add_object_symbols): Likewise. If the indirect
738 symbol has been forced local, don't make the real symbol
739 dynamic.
740 (elf_link_check_versioned_symbol): Check indirect symbol.
741 (elf_link_output_extsym): Use real symbol definition when
742 reporting indirect symbol error. Check version info for
743 dynamic versioned symbol.
744
3146fac4
AM
7452012-07-03 Alan Modra <amodra@gmail.com>
746
747 PR ld/14207
748 * elf.c (assign_file_positions_for_load_sections): Remove assertions
749 that only PT_LOAD headers include file header and section headers.
750 (assign_file_positions_for_non_load_sections): Similarly don't
751 assert PT_GNU_RELRO header does not include file and section headers.
752 Compare first section vma rather than PT_LOAD p_vaddr against
753 relro_start when looking for PT_LOAD covering PT_GNU_RELRO. Replace
754 abort with assertion.
755
87e0a731
AM
7562012-07-02 Alan Modra <amodra@gmail.com>
757
758 * elf32-m32c.c (m32c_elf_check_relocs): Use bfd_make_section
759 "anyway" variant when creating .plt.
760 (m32c_elf_relax_plt_section): Remove redundant test and unused param.
761 (m32c_elf_relax_section): Test SEC_LINKER_CREATED before calling
762 m32c_elf_relax_plt_section.
763 * elfxx-mips.c (mips_elf_create_got_section): Use make anyway variant
764 when creating .got and .got.plt.
765 (_bfd_mips_elf_final_link): Likewise for .rtproc, and use
766 bfd_get_linker_section.
767 * sunos.c: Similarly throughout.
768
bc823199
AS
7692012-07-01 Andreas Schwab <schwab@linux-m68k.org>
770
771 * elf.c (_bfd_elf_make_section_from_shdr): Fix typo in error
772 message.
773
a040981f
L
7742012-06-29 H.J. Lu <hongjiu.lu@intel.com>
775
776 * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE
777 on unresolvable relocation.
778
d5abbdf3
L
7792012-06-29 H.J. Lu <hongjiu.lu@intel.com>
780
781 * archive.c (_bfd_compute_and_write_armap): Simplify global
782 symbol handling.
783
a8c887dd
NC
7842012-06-29 Nick Clifton <nickc@redhat.com>
785
786 PR ld/14189
787 * elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount
788 for locally bound symbols.
789
3d4d4302
AM
7902012-06-29 Alan Modra <amodra@gmail.com>
791
792 * section.c (bfd_get_linker_section): New function.
793 * elf32-arm.c: When retrieving SEC_LINKER_CREATED sections, use
794 the above throughout rather than bfd_get_section_by_name. Use
795 bfd_make_section_anyway rather than bfd_make_section when creating
796 them.
797 * elf32-bfin.c: Likewise.
798 * elf32-cr16.c: Likewise.
799 * elf32-cris.c: Likewise.
800 * elf32-frv.c: Likewise.
801 * elf32-hppa.c: Likewise.
802 * elf32-i370.c: Likewise.
803 * elf32-i386.c: Likewise.
804 * elf32-lm32.c: Likewise.
805 * elf32-m32c.c: Likewise.
806 * elf32-m32r.c: Likewise.
807 * elf32-m68k.c: Likewise.
808 * elf32-microblaze.c: Likewise.
809 * elf32-ppc.c: Likewise.
810 * elf32-rl78.c: Likewise.
811 * elf32-s390.c: Likewise.
812 * elf32-score.c: Likewise.
813 * elf32-score7.c: Likewise.
814 * elf32-sh.c: Likewise.
815 * elf32-tic6x.c: Likewise.
816 * elf32-tilepro.c: Likewise.
817 * elf32-vax.c: Likewise.
818 * elf32-xstormy16.c: Likewise.
819 * elf32-xtensa.c: Likewise.
820 * elf64-alpha.c: Likewise.
821 * elf64-hppa.c: Likewise.
822 * elf64-ia64-vms.c: Likewise.
823 * elf64-ppc.c: Likewise.
824 * elf64-s390.c: Likewise.
825 * elf64-sh64.c: Likewise.
826 * elf64-sparc.c: Likewise.
827 * elf64-x86-64.c: Likewise.
828 * elfnn-ia64.c: Likewise.
829 * elfxx-mips.c: Likewise.
830 * elfxx-sparc.c: Likewise.
831 * elfxx-tilegx.c: Likewise.
832 * elflink.c: Likewise.
833 * elf-vxworks.c: Likewise.
834 * elf-m10300.c: Likewise. Also make use of htab plt, got and
835 gotplt shortcuts.
836 * bfd-in2.h: Regenerate.
837 * elf32-lm32.c (lm32_elf_check_relocs): Use the correct bfd when
838 calling create_rofixup_section.
839 * elflink.c (bfd_elf_final_link): Simplify test for .dynstr.
840
66e17d7f
AM
8412012-06-29 Alan Modra <amodra@gmail.com>
842
843 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't create .rela
844 section for bss type sections, except for .rela.bss.
845 * elf-m10300.c (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
846 * elf32-cr16.c (_bfd_cr16_elf_create_dynamic_sections): Likewise.
847 * elf32-lm32.c (lm32_elf_create_dynamic_sections): Likewise.
848 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
849 * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
850
6034aab8
RM
8512012-06-28 Roland McGrath <mcgrathr@google.com>
852
853 * elf32-arm.c (elf32_arm_populate_plt_entry): Use int32_t for
854 displacement calculation in nacl_p case.
855
4c6a93d3
NC
8562012-06-28 Nick Clifton <nickc@redhat.com>
857
858 * po/uk.po: New Ukranian translation.
859 * configure.in (ALL_LINGUAS): Add uk.
860 * configure: Regenerate.
861
a4fd3de5
AM
8622012-06-26 Alan Modra <amodra@gmail.com>
863
864 * elf64-ppc.c (ppc64_elf_next_toc_section): Don't error if input
865 file has multiple .got/.toc sections and all don't fit in
866 current toc group.
867
62655c7b
RM
8682012-06-22 Roland McGrath <mcgrathr@google.com>
869
870 * elf.c (assign_file_positions_for_non_load_sections): Define
871 __ehdr_start symbol if it's referenced and there's a PT_LOAD
872 segment that covers both the file and program headers.
873
b70e7a2f
AS
8742012-06-22 Andreas Schwab <schwab@linux-m68k.org>
875
876 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Don't make
877 _GLOBAL_OFFSET_TABLE_ and _DYNAMIC absolute.
878
27fc25a1
AM
8792012-06-22 Alan Modra <amodra@gmail.com>
880
881 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line
882 save/restore functions when relocatable. Make "funcs" static.
883
51806b97
HPN
8842012-06-18 Hans-Peter Nilsson <hp@axis.com>
885
886 * elf32-cris.c (cris_elf_plt_sym_val): Rewrite to work in presence
887 of merged .got and .got.plt entries.
888
46691134
AM
8892012-06-18 John Szakmeister <john@szakmeister.net>
890
891 * elf32-arm.c (elf32_arm_final_link_relocate): Correct return value.
892
26a48bb3
HPN
8932012-06-17 Hans-Peter Nilsson <hp@axis.com>
894
895 * elf32-cris.c (cris_elf_relocate_section): <R_CRIS_32_IE>
896 <R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>: Handle references to
897 thread common symbols.
898
5968a7b8
NC
8992012-06-13 Nick Clifton <nickc@redhat.com>
900
901 * elf32-arm.c (bfd_arm_get_mach_from_attributes): New function.
902 (elf32_arm_object_p): If the machine number could not be deduced
903 from the notes, call bfd_arm_get_mach_from_attributes to get the
904 number from the attributes.
905
8981c88a
L
9062012-06-12 H.J. Lu <hongjiu.lu@intel.com>
907
908 PR bfd/14207
909 * elf.c (assign_file_positions_for_non_load_sections): Abort if
910 PT_GNU_RELRO segment doesn't fit in PT_LOAD segment.
911
3832a4d8
AM
9122012-06-12 Alan Modra <amodra@gmail.com>
913
914 PR ld/14207
915 * elf.c (_bfd_elf_map_sections_to_segments): Disregard bss type
916 sections at end of PT_LOAD segment when searching for segment
917 that contains end of relro extent.
918
f3944f72
L
9192012-06-11 H.J. Lu <hongjiu.lu@intel.com>
920
921 * elf.c (assign_file_positions_for_non_load_sections): Reindent.
922
be01b344
L
9232012-06-11 H.J. Lu <hongjiu.lu@intel.com>
924
925 * elf.c (_bfd_elf_map_sections_to_segments): Reindent.
926
ffbc01cc
AM
9272012-06-06 Alan Modra <amodra@gmail.com>
928
929 * elflink.c (elf_link_input_bfd): Provide a file symbol for
930 each input file with local syms, if the input lacks such.
931 (bfd_elf_final_link): Add a file symbol to mark end of locals
932 for which we can associate with input files.
933 (struct elf_final_link_info): Add filesym_count field.
934 (struct elf_outext_info): Add need_second_pass and second_pass.
935 (elf_link_output_extsym): Detect symbols defined in the output
936 file, emit them on second pass over locals.
937
fe78531d
JK
9382012-06-04 Jan Kratochvil <jan.kratochvil@redhat.com>
939
940 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
941 of target_read_memory as bfd_size_type.
942 * bfd-in2.h: Regenerate.
943 * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
944 argument of target_read_memory as bfd_size_type.
945 (_bfd_elf32_bfd_from_remote_memory): Likewise.
946 (_bfd_elf64_bfd_from_remote_memory): Likewise.
947 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
948 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
949
aef36ac1
AM
9502012-06-03 Alan Modra <amodra@gmail.com>
951
952 PR binutils/13897
953 * elf.c (elf_find_function): Cache last function sym info.
954 (_bfd_elf_maybe_function_sym): Return function size, pass in
955 section of interest.
956 * elf-bfd.h (struct elf_backend_data <maybe_function_sym>): Likewise.
957 (_bfd_elf_maybe_function_sym): Likewise.
958 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
959 (opd_entry_value): Add in_code_sec param. Revert caching code.
960 Return -1 if in_code_sec and function found in wrong section.
961 Update all calls.
962
5299c1c4
JK
9632012-06-01 Siddhesh Poyarekar <siddhesh@redhat.com>
964
965 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
966 of target_read_memory as size_t.
967 * bfd-in2.h: Regenerate.
968 * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
969 argument of target_read_memory as size_t.
970 (_bfd_elf32_bfd_from_remote_memory): Likewise.
971 (_bfd_elf64_bfd_from_remote_memory): Likewise.
972 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
973 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
974
ee1e4ede
AM
9752012-06-01 Alan Modra <amodra@gmail.com>
976
977 PR binutils/13897
978 * elf64-ppc.c (opd_entry_value): Rewrite cache code.
979
6f0c7050
TT
9802012-05-29 Tom Tromey <tromey@redhat.com>
981
982 * opncls.c (bfd_fopen): Always close fd on failure.
983 (bfd_fdopenr): Likewise.
984
f5eda473
AM
9852012-05-27 Alan Modra <amodra@gmail.com>
986
987 PR ld/14170
988 * elflink.c (_bfd_elf_merge_symbol): When a symbol defined in
989 a dynamic library finds a new instance with non-default
990 visibility in a regular object, correctly handle symbols
991 already on the undefs list and undo dynamic symbol state when
992 the new symbol is hidden or internal.
993
bbf96e4e
L
9942012-05-25 H.J. Lu <hongjiu.lu@intel.com>
995
996 * elf32-i386.c (elf_i386_create_dynamic_sections): Don't use
997 dynamic_sec_flags to create PLT .eh_frame section.
998 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
999
9a2a56cc
AM
10002012-05-25 Alan Modra <amodra@gmail.com>
1001
1002 PR ld/13909
1003 * elf-eh-frame.c (_bfd_elf_eh_frame_present): New function.
1004 (_bfd_elf_maybe_strip_eh_frame_hdr): Use it here.
1005 * elf-bfd.h (_bfd_elf_eh_frame_present): Declare.
1006 * elflink.c (bfd_elf_size_dynamic_sections): Let the backend
1007 size dynamic sections before stripping eh_frame_hdr.
1008 (bfd_elf_gc_sections): Handle multiple .eh_frame sections.
1009 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Drop glink_eh_frame
1010 if no other .eh_frame sections exist.
1011 * elf64-ppc.c (ppc64_elf_size_stubs): Likewise.
1012 * elf32-i386.c (elf_i386_create_dynamic_sections): Don't size
1013 or alloc plt_eh_frame here..
1014 (elf_i386_size_dynamic_sections): ..do it here instead. Don't
1015 specially keep sgotplt, iplt, tgotplt, sdynbss for symbols.
1016 (elf_i386_finish_dynamic_sections): Check plt_eh_frame->contents
1017 before writing plt offset.
1018 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't size
1019 or alloc plt_eh_frame here..
1020 (elf_x86_64_size_dynamic_sections): ..do it here instead.
1021 (elf_x86_64_finish_dynamic_sections): Check plt_eh_frame->contents
1022 before writing plt offset.
1023
4bbe044a
AM
10242012-05-24 Alan Modra <amodra@gmail.com>
1025
1026 PR ld/14158
1027 * elf64-ppc.c (ppc64_elf_size_stubs): Round up glink_eh_frame
1028 size to output section alignment.
1029 (ppc64_elf_build_stubs): Likewise, and extend last FDE to cover.
1030
89b2bec8
AM
10312012-05-23 Alan Modra <amodra@gmail.com>
1032
1033 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle
44534af3 1034 BFDs with multiple .eh_frame sections.
89b2bec8 1035
259b427a
AM
10362012-05-23 Alan Modra <amodra@gmail.com>
1037
1038 PR ld/13909
1039 * elflink.c (bfd_elf_discard_info): Don't ignore dynamic BFDs.
1040
e4de50d4
L
10412012-05-22 H.J. Lu <hongjiu.lu@intel.com>
1042
1043 PR ld/13909
1044 * elf32-i386.c (elf_i386_create_dynamic_sections): Revert the
1045 last change.
1046 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1047
7e01508c
AM
10482012-05-22 Alan Modra <amodra@gmail.com>
1049
1050 * elflink.c (bfd_elf_discard_info): Look for next .eh_frame if
1051 first one is zero size or discarded.
1052 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set most of
1053 glink_eh_frame contents here..
1054 (ppc_elf_finish_dynamic_sections): ..rather than here. Just set
1055 offset to .glink.
1056
5d4f7eb2
L
10572012-05-22 H.J. Lu <hongjiu.lu@intel.com>
1058
1059 PR ld/13909
1060 * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT
1061 eh_frame section if there is an input .eh_frame section.
1062 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1063
2fe0fd06
L
10642012-05-22 H.J. Lu <hongjiu.lu@intel.com>
1065
1066 PR ld/14105
1067 * elf32-i386.c (elf_i386_create_dynamic_sections): Always
1068 create PLT eh_frame section with SEC_LINKER_CREATED.
1069 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1070
90061c33
AM
10712012-05-22 Alan Modra <amodra@gmail.com>
1072
1073 * elflink.c (bfd_elf_discard_info): Handle multiple .eh_frame
1074 sections attached to a BFD.
1075 * section.c (bfd_get_section_by_name): Rewrite description.
1076 (bfd_get_next_section_by_name): New function.
1077 * bfd-in2.h: Regenerate.
1078
8bbeae90
AS
10792012-05-21 Andreas Schwab <schwab@linux-m68k.org>
1080
1081 * elf32-m68k.c (elf_m68k_grok_prstatus): New function.
1082 (elf_m68k_grok_psinfo): New function.
1083 (elf_backend_grok_prstatus): Define.
1084 (elf_backend_grok_psinfo): Define.
1085
a44acb1e
MR
10862012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
1087
1088 * elf64-mips.c (elf_backend_got_header_size): Correct definition.
1089 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF
1090 backend's GOT header size instead of hardcoding it.
1091
751c1fe7
MR
10922012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
1093
1094 * elf32-vax.c (elf_vax_relocate_section)
1095 <R_VAX_8, R_VAX_16, R_VAX_32>: Don't check if info->shared again.
1096
ddd74d3c
MR
10972012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
1098
1099 * elf32-vax.c (elf_vax_relocate_section)
1100 <R_VAX_8, R_VAX_16, R_VAX_32>: Use section flags rather than
1101 its name as the check for text sections.
1102
b0189df0
MR
11032012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
1104
1105 * elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure
1106 the third reloc offset is the same as the first.
1107
94caa966
AM
11082012-05-19 Alan Modra <amodra@gmail.com>
1109
1110 * elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete.
1111 (has_tls_reloc, has_tls_get_addr_call): Move back to..
1112 * elf32-ppc.c: ..here.
1113 (ppc_elf_section_flags, elf_backend_section_flags): Delete.
1114 (ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections.
1115
220cf809
L
11162012-05-18 H.J. Lu <hongjiu.lu@intel.com>
1117
1118 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make
1119 _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute.
1120 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1121
3a11e31e
RM
11222012-05-18 Roland McGrath <mcgrathr@google.com>
1123
1124 * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as
1125 not to clobber the ar_fmag field stored in ARED->arch_header.
1126
2a0bfc8d
PA
11272012-05-18 Pedro Alves <palves@redhat.com>
1128
1129 * mach-o.h: Don't include sysdep.h.
1130
0bee45d9
NC
11312012-05-18 Nick Clifton <nickc@redhat.com>
1132
1133 PR 14072
1134 * bfd-in.h: Check for PACKAGE or PACKAGE_VERSION before
1135 complaining about config.h not having been included.
1136 * bfd-in2.h: Regenerate.
1137
f2c621e4
AS
11382012-05-18 Andreas Schwab <schwab@linux-m68k.org>
1139
1140 * aclocal.m4: Regenerate.
1141 * Makefile.in: Regenerate.
1142
df7b86aa
NC
11432012-05-17 Daniel Richard G. <skunk@iskunk.org>
1144 Nick Clifton <nickc@redhat.com>
1145
1146 PR 14072
1147 * configure.in: Add check that sysdep.h has been included before
1148 any system header files.
1149 * configure: Regenerate.
1150 * config.in: Regenerate.
1151 * aclocal.m4: Regenerate.
1152 * bfd-in.h: Generate an error if included before config.h.
1153 * sysdep.h: Likewise.
1154 * bfd-in2.h: Regenerate.
1155 * compress.c: Remove #include "config.h".
1156 * plugin.c: Likewise.
1157 * elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h.
1158 * elf64-hppa.c: Likewise.
1159 * som.c: Likewise.
1160 * xsymc.c: Likewise.
1161
2633a79c
AM
11622012-05-17 Maciej W. Rozycki <macro@linux-mips.org>
1163 Alan Modra <amodra@gmail.com>
1164
1165 * elf.c (ignore_section_sym): Correct comment. Don't return
1166 true for absolute section.
1167 (elf_map_symbols): Move stray comment. Adjust for above change.
1168 Don't discard global section symbols.
1169
ab6dce23
AM
11702012-05-17 Alan Modra <amodra@gmail.com>
1171
1172 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make _DYNAMIC,
1173 _GLOBAL_OFFSET_TABLE_ or _PROCEDURE_LINKAGE_TABLE_ absolute.
1174 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Don't make _DYNAMIC
1175 absolute.
1176
e1dad58d
AM
11772012-05-17 Alan Modra <amodra@gmail.com>
1178
1179 * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call, has_vle_insns,
1180 is_ppc_vle): Move to..
1181 * elf32-ppc.h: ..here, making is_ppc_vle a macro.
1182
a0f49396
NC
11832012-05-16 Sergio Durigan Junior <sergiodj@redhat.com>
1184
1185 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma,
1186 bfd_get_section_lma, bfd_get_section_alignment,
1187 bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros
1188 in order to use the `bfd' argument.
1189 * bfd-in2.h: Regenerate.
1190 * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd'
1191 as the first argument for `bfd_get_section_alignment'.
1192 * elf32-arm.c (create_ifunc_sections): Likewise, for
1193 `bfd_set_section_alignment'.
1194 * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for
1195 `bfd_get_section_name'.
1196 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
1197 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1198 (ppc_elf_relocate_section): Likewise.
1199 * elf64-mmix.c (mmix_final_link_relocate): Likewise, for
1200 `bfd_get_section_vma'.
1201 * elf64-ppc.c (create_linkage_sections): Likewise, for
1202 `bfd_set_section_alignment'.
1203
40551fb8
NC
12042012-05-16 Georg-Johann Lay <avr@gjlay.de>
1205
1206 PR target/13503
1207 * reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO.
1208 * bfd-in2.h: Regenerate.
1209 * libbfd.h: Regenrate.
1210 * elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to
1211 R_AVR_8_HLO8.
1212 (avr_reloc_map): Likewise.
1213
691bf19c
NC
12142012-05-16 Daniel Richard G. <skunk@iskunk.org>
1215
1216 PR binutils/13558
1217 * bfd/aout-cris.c: Include sysdep.h before bfd.h.
1218 * bfd/aout-ns32k.c: Likewise.
1219 * bfd/aout-sparcle.c: Likewise.
1220 * bfd/aout0.c: Likewise.
1221 * bfd/bfd-in2.h: Likewise.
1222 * bfd/coff-stgo32.c: Likewise.
1223 * bfd/cpu-lm32.c: Likewise.
1224 * bfd/cpu-microblaze.c: Likewise.
1225 * bfd/cpu-score.c: Likewise.
1226 * bfd/cpu-tilegx.c: Likewise.
1227 * bfd/cpu-tilepro.c: Likewise.
1228 * bfd/elf32-lm32.c: Likewise.
1229 * bfd/elf32-microblaze.c: Likewise.
1230 * bfd/elf32-score7.c: Likewise.
1231 * bfd/elf32-tilepro.c: Likewise.
1232 * bfd/elfxx-tilegx.c: Likewise.
1233 * bfd/mach-o.h: Likewise.
1234 * bfd/nlm32-ppc.c: Likewise.
1235 * bfd/ns32knetbsd.c: Likewise.
1236 * bfd/pef.h: Likewise.
1237 * bfd/plugin.c: Likewise.
1238 * bfd/stab-syms.c: Likewise.
1239 * bfd/sunos.c: Likewise.
1240 * bfd/syms.c: Likewise.
1241 * bfd/xsym.h: Likewise.
1242
8b127cbc
AM
12432012-05-16 Alan Modra <amodra@gmail.com>
1244
1245 * elflink.c: Rename flaginfo to flinfo throughout, except..
1246 (bfd_elf_lookup_section_flags): ..here, rename finfo to flaginfo.
1247 Formatting, style. Simplify flag match.
1248
a2a50954
AM
12492012-05-16 Alan Modra <amodra@gmail.com>
1250
1251 * dwarf2.c: Formatting.
1252 (arange_add): Pass in unit rather than bfd. Update callers.
1253 Ignore empty ranges. Don't ask for cleared memory.
1254 (parse_comp_unit): Only set unit->base_address if processing
1255 DW_TAG_compile_unit.
1256 (find_debug_info): Optimise section lookup.
1257 (place_sections): Use bfd_alloc for stash->adjusted_sections.
1258 (find_line): Match previously parsed comp unit addresses as we
1259 do for newly parsed comp units.
1260
df35687a
AM
12612012-05-16 Alan Modra <amodra@gmail.com>
1262
1263 * archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf
1264 stops at end of ar_size field.
1265
eee3b786
AM
12662012-05-16 Alan Modra <amodra@gmail.com>
1267
44534af3
AM
1268 PR ld/13962
1269 PR ld/7023
eee3b786
AM
1270 * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is
1271 out of range. As a special case, fix sh_info for zero sh_size.
1272 Do the same for .symtab.
1273
6927f982
NC
12742012-05-15 James Murray <jsm@jsm-net.demon.co.uk>
1275 Stephane Carrez <stcarrez@nerim.fr>
1276
1277 * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg.
1278 * config.bfd: Likewise.
1279 * cpu-m9s12x.c: New.
1280 * cpu-m9s12xg.c: New.
1281 * elf32-m68hc12.c: Add S12X and XGATE co-processor support.
1282 Add option to offset S12 addresses into XGATE memory space.
1283 Fix carry bug in IMM16 (IMM8 low/high) relocate.
1284 * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg.
1285 (ALL_MACHINES_CFILES): Likewise.
1286 * reloc.c: Add S12X relocs.
1287 * Makefile.in: Regenerate.
1288 * bfd-in2.h: Regenerate.
1289 * libbfd.h: Regenerate.
1290
b9c361e0
JL
12912012-05-14 James Lemke <jwlemke@codesourcery.com>
1292 Catherine Moore <clm@codesourcery.com>
1293
1294 * bfd.c (bfd_lookup_section_flags): Add section parm.
1295 * ecoff.c (bfd_debug_section): Remove flag_info initializer.
1296 * elf-bfd.h (bfd_elf_section_data): Move in section_flag_info.
1297 (bfd_elf_lookup_section_flags): Add section parm.
1298 * elf32-ppc.c (is_ppc_vle): New function.
1299 (ppc_elf_modify_segment_map): New function.
1300 (elf_backend_modify_segment_map): Define.
1301 (has_vle_insns): New define.
1302 * elf32-ppc.h (ppc_elf_modify_segment_map): Declare.
1303 * elflink.c (bfd_elf_lookup_section_flags): Add return value & parm.
1304 Move in logic to omit / include a section.
1305 * libbfd-in.h (bfd_link_info): Add section parm.
1306 (bfd_generic_lookup_section_flags): Likewise.
1307 * reloc.c (bfd_generic_lookup_section_flags): Likewise.
1308 * section.c (bfd_section): Move out section_flag_info.
1309 (BFD_FAKE_SECTION): Remove flag_info initializer.
1310 * targets.c (_bfd_lookup_section_flags): Add section parm.
1311
13122012-05-14 Catherine Moore <clm@codesourcery.com>
1313
1314 * archures.c (bfd_mach_ppc_vle): New.
1315 * bfd-in2.h: Regenerated.
1316 * cpu-powerpc.c (bfd_powerpc_archs): New entry for vle.
1317 * elf32-ppc.c (split16_format_type): New enumeration.
1318 (ppc_elf_vle_split16): New function.
1319 (HOWTO): Add entries for R_PPC_VLE relocations.
1320 (ppc_elf_reloc_type_lookup): Handle PPC_VLE relocations.
1321 (ppc_elf_section_flags): New function.
1322 (ppc_elf_lookup_section_flags): New function.
1323 (ppc_elf_section_processing): New function.
1324 (ppc_elf_check_relocs): Handle PPC_VLE relocations.
1325 (ppc_elf_relocation_section): Likewise.
1326 (elf_backend_lookup_section_flags_hook): Define.
1327 (elf_backend_section_flags): Define.
1328 (elf_backend_section_processing): Define.
6927f982 1329 * elf32-ppc.h (ppc_elf_section_processing): Declare.
b9c361e0
JL
1330 * libbfd.h: Regenerated.
1331 * reloc.c (BFD_RELOC_PPC_VLE_REL8, BFD_RELOC_PPC_VLE_REL15,
1332 BFD_RELOC_PPC_VLE_REL24, BFD_RELOC_PPC_VLE_LO16A,
1333 BFD_RELOC_PPC_VLE_LO16D, BFD_RELOC_PPC_VLE_HI16A,
1334 BFD_RELOC_PPC_VLE_HI16D, BFD_RELOC_PPC_VLE_HA16A,
1335 BFD_RELOC_PPC_VLE_HA16D, BFD_RELOC_PPC_VLE_SDA21,
1336 BFD_RELOC_PPC_VLE_SDA21_LO, BFD_RELOC_PPC_VLE_SDAREL_LO16A,
1337 BFD_RELOC_PPC_VLE_SDAREL_LO16D, BFD_RELOC_PPC_VLE_SDAREL_HI16A,
1338 BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A,
1339 BFD_RELOC_PPC_VLE_SDAREL_HA16D): New bfd relocations.
1340
8b127cbc 13412012-05-11 Georg-Johann Lay <avr@gjlay.de>
99700d6f
NC
1342
1343 PR target/13503
1344 * reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
1345 BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
1346 * bfd-in2.h: Regenerate.
1347 * libbfd.h: Regenrate.
1348 * elf32-avr.c (elf_avr_howto_table): Add entries for
1349 R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
1350 (avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
1351 R_AVR_8_HHI8.
1352
268a8d3a
L
13532012-05-10 H.J. Lu <hongjiu.lu@intel.com>
1354
1355 * elf64-x86-64.c (elf_x86_64_relocate_section): Use int in x32
1356 addend overflow check.
1357
74b1e045
DD
13582012-05-10 DJ Delorie <dj@redhat.com>
1359
1360 * elf32-rx.c (rx_elf_object_p): Ignore empty segments.
1361
6f2c9068
L
13622012-05-10 H.J. Lu <hongjiu.lu@intel.com>
1363
1364 * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed
1365 hex number in x32 addend overflow check.
1366
1da80baa
L
13672012-05-10 H.J. Lu <hongjiu.lu@intel.com>
1368
1369 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle
1370 R_X86_64_RELATIVE64.
1371
8cf0d2dd
L
13722012-05-09 H.J. Lu <hongjiu.lu@intel.com>
1373
1374 * elf64-x86-64.c (elf_x86_64_relocate_section): Check addend
1375 overflow for R_X86_64_RELATIVE64.
1376
2d16d28e
DK
13772012-05-08 Ben Cheng <bccheng@google.com>
1378
8b127cbc 1379 * elf.c: Preserve the original p_align and p_flags if they are
2d16d28e
DK
1380 valid.
1381
2de5d135
AM
13822012-05-07 Alan Modra <amodra@gmail.com>
1383
1384 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Update
1385 RELOC_AGAINST_DISCARDED_SECTION invocation.
1386
a134cc9b
HPN
13872012-05-07 Hans-Peter Nilsson <hp@axis.com>
1388
1389 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Declare and use
1390 local variable i_ instead of assuming and using a variable i.
1391
545fd46b
MR
13922012-05-07 Maciej W. Rozycki <macro@linux-mips.org>
1393
1394 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound
1395 relocations.
1396 * elfxx-mips.c (mips_reloc_against_discarded_section): New
1397 function.
1398 (_bfd_mips_elf_relocate_section): Call it, in place of
1399 RELOC_AGAINST_DISCARDED_SECTION.
1400 * elf-m10200.c (mn10200_elf_relocate_section): Update arguments
1401 to RELOC_AGAINST_DISCARDED_SECTION.
1402 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1403 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
1404 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1405 * elf32-bfin.c (bfin_relocate_section): Likewise.
1406 (bfinfdpic_relocate_section): Likewise.
1407 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
1408 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
1409 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1410 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
1411 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
1412 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
1413 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1414 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1415 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1416 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1417 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1418 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1419 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1420 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1421 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1422 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1423 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1424 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1425 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1426 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1427 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1428 * elf32-mep.c (mep_elf_relocate_section): Likewise.
1429 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
1430 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
1431 * elf32-mt.c (mt_elf_relocate_section): Likewise.
1432 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1433 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1434 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
1435 * elf32-rx.c (rx_elf_relocate_section): Likewise.
1436 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1437 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1438 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1439 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1440 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1441 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1442 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1443 * elf32-v850.c (v850_elf_relocate_section): Likewise.
1444 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1445 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
1446 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1447 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1448 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
1449 (elf64_alpha_relocate_section): Likewise.
1450 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1451 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
1452 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1453 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1454 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1455 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1456 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1457 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1458 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1459
62ab84ec
AM
14602012-05-05 Alan Modra <amodra@gmail.com>
1461
1462 PR ld/14052
1463 PR ld/13621
1464 * linker.c (_bfd_nearby_section): Revert 2012-02-13 change.
1465
45dfa85a
AM
14662012-05-05 Alan Modra <amodra@gmail.com>
1467
1468 * aout-arm.c: Replace all uses of bfd_abs_section, bfd_com_section,
1469 bfd_und_section and bfd_ind_section with their _ptr variants, or
1470 use corresponding bfd_is_* macros.
1471 * aout-ns32k.c: Likewise.
1472 * aout-tic30.c: Likewise.
1473 * coff-arm.c: Likewise.
1474 * coff-tic54x.c: Likewise.
1475 * cpu-ns32k.c: Likewise.
1476 * elf-attrs.c: Likewise.
1477 * elfcode.h: Likewise.
1478 * peicode.h: Likewise.
1479 * reloc.c: Likewise.
1480 * riscix.c: Likewise.
1481 * versados.c: Likewise.
1482 * section.c: Likewise.
1483 (bfd_abs_section, bfd_ind_section, bfd_com_section,
1484 bfd_ind_section): Delete.
1485 (std_section): New array replacing above.
1486 (bfd_abs_section_ptr, bfd_ind_section_ptr, bfd_com_section_ptr,
1487 bfd_ind_section_ptr, STD_SECTION): Update.
1488 (BFD_FAKE_SECTION, GLOBAL_SYM_INIT): Remove unnecessary casts.
36ab465d 1489 * bfd-in2.h: Regenerate.
45dfa85a 1490
f6c1a2d5
NC
14912012-05-03 Sean Keys <skeys@ipdatasys.com>
1492
1493 * cpu-xgate.c: New file. Added XGATE support.
1494 * archures.c (bfd_architecture): Add XGATE architecture.
1495 (bfd_archures_list): Add reference to XGATE architecture info.
1496 * elf-bfd.h (prep_headers): Handle bfd_arch_xgate.
1497 * reloc.c: Add various XGATE relocation enums.
1498 * targets.c (bfd_elf32_xgate_vec): Declare and add to target vector
1499 list.
1500 * Makefile.am: Add support for XGATE elf.
1501 * configure.in: Ditto.
1502 * config.bfd: Ditto.
1503 * Makefile.in: Regenerate.
1504 * configure: Ditto.
1505 * bfd-in2.h: Ditto.
1506 * libbfd.h: Ditto.
1507 Added files for XGATE relocations.
1508 * elf32-xgate.c: Created minimal relocation file.
1509 * elf32-xgate.h: Created minimal header file for elf32-xgate.
1510
fec16237
TG
15112012-05-03 Tristan Gingold <gingold@adacore.com>
1512
1513 * dwarf2.c (decode_line_info): Ignore
1514 DW_LNE_HP_source_file_correlation.
1515
57402f1e
NC
15162012-05-01 Nick Clifton <nickc@redhat.com>
1517
1518 PR binutils/13121
1519 * aoutx.h: Rename 'finfo' to 'flaginfo' to avoid conflicts with
1520 AIX system headers.
1521 * coff-ppc.c: Likewise.
1522 * cofflink.c: Likewise.
1523 * elf32-arm.c: Likewise.
1524 * elf64-sparc.c: Likewise.
1525 * elflink.c: Likewise.
1526 * pdp11.c: Likewise.
1527 * rescoff.c: Likewise.
1528
c49ead2f
MW
15292012-04-26 Mark Wielaard <mjw@redhat.com>
1530
1531 * dwarf2.c (scan_unit_for_symbols): Account for DW_AT_high_pc
1532 possibly being relative to DW_AT_low_pc.
1533 (parse_comp_unit): Likewise.
1534
cab0ad83
AS
15352012-04-26 Andreas Schwab <schwab@linux-m68k.org>
1536
1537 * elf32-m68k.c (elf_m68k_check_relocs): Mark non-GOT references
1538 also when generating PIE.
1539 (elf_m68k_discard_copies): Mark undefined weak symbols referenced
1540 by relocations as dynamic.
1541
2b56b3f3
HPN
15422012-04-26 Hans-Peter Nilsson <hp@axis.com>
1543
1544 Provide a way for programs to recognize BFD_ASSERT calls.
1545 * bfd.c (bfd_assert_handler_type): New API type.
1546 (bfd_set_assert_handler, bfd_get_assert_handler): New API functions.
1547 (_bfd_assert_handler): New variable.
1548 (_bfd_default_assert_handler): New function.
1549 (bfd_assert): Call _bfd_assert_handler, not _bfd_error_handler.
1550 * libbfd-in.h (_bfd_assert_handler): Declare.
1551 * libbfd.h, bfd-in2.h: Regenerate.
1552
27586251
HPN
15532012-04-24 Hans-Peter Nilsson <hp@axis.com>
1554
1555 PR ld/13990
1556 * elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local
1557 symbol, where PLT refcount is set to -1.
1558
dbaa2011
AM
15592012-04-24 Alan Modra <amodra@gmail.com>
1560
1561 PR ld/13991
8b127cbc 1562 * elf-bfd.h (_bfd_elf_link_just_syms): Define as
dbaa2011 1563 _bfd_generic_link_just_syms.
8b127cbc
AM
1564 * elflink.c (_bfd_elf_link_just_syms): Delete.
1565 * linker.c (_bfd_generic_link_just_syms): Set sec_info_type.
dbaa2011 1566
8b127cbc
AM
1567 * bfd-in.h (discarded_section): Renamed from elf_discarded_section.
1568 * section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS,
dbaa2011
AM
1569 SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME,
1570 SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE.
8b127cbc
AM
1571 * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
1572 * elf.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
1573 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c,
1574 * elf32-crx.c, * elf32-d10v.c, * elf32-epiphany.c,
1575 * elf32-fr30.c, * elf32-frv.c, * elf32-h8300.c,
1576 * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c,
1577 * elf32-i860.c, * elf32-ip2k.c, * elf32-iq2000.c,
1578 * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c,
1579 * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
1580 * elf32-mep.c, * elf32-moxie.c, * elf32-msp430.c,
1581 * elf32-mt.c, * elf32-openrisc.c, * elf32-ppc.c,
1582 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c,
1583 * elf32-score.c, * elf32-score7.c, * elf32-sh.c,
1584 * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c,
1585 * elf32-v850.c, * elf32-vax.c, * elf32-xc16x.c,
1586 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
1587 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
1588 * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c,
1589 * elf64-x86-64.c, * elflink.c, * elfnn-ia64.c,
1590 * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c,
1591 * reloc.c: Update all references.
1592 * bfd-in2.h: Regenerate.
dbaa2011 1593
87049b0d
AK
15942012-04-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1595
1596 * elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
1597 * elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
1598
85e02784
TS
15992012-04-19 Thomas Schwinge <thomas@codesourcery.com>
1600
1601 * elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for
1602 got_type.
1603 (allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use
1604 it.
1605
87458ed2
KK
16062012-04-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1607
1608 * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic
1609 relocations when LE conversion happens on the IE tls symbol.
1610
ea2d813e
RM
16112012-04-17 Roland McGrath <mcgrathr@google.com>
1612
1613 * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding
1614 so that 32-byte boundary is a proper instruction boundary.
1615
da03bf4d
TG
16162012-04-17 Tristan Gingold <gingold@adacore.com>
1617
1618 * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to
1619 member of an object archive.<
1620
d2226024
TG
16212012-04-17 Tristan Gingold <gingold@adacore.com>
1622
1623 * vms-lib.c (MAX_EKEYLEN): Define.
1624 (MAX_KEYLEN): Fix value.
1625 (vms_write_index): Add comments and fix indentation.
1626 Adjust comparaison. Add assertions. Free kbn_blk.
1627 (_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN.
1628 Compense MAX_KEYLEN adjustment.
1629
cb4437b8
MR
16302012-04-16 Maciej W. Rozycki <macro@linux-mips.org>
1631
1632 * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs.
1633 (_bfd_mips_elf_check_relocs): Update accordingly.
1634
aed64b35
L
16352012-04-13 Alan Modra <amodra@gmail.com>
1636
1637 PR ld/13947
1638 * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for
1639 reloc sections.
1640
2615994e
DM
16412012-04-12 David S. Miller <davem@davemloft.net>
1642
1643 * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32,
1644 BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs.
1645 * libbfd.h: Regenerate.
1646 * bfd-in2.h: Likewise.
1647 * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function.
1648 (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34,
1649 R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10.
1650 (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs.
1651 (_bfd_sparc_elf_check_relocs): Likewise.
1652 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1653 (_bfd_sparc_elf_relocate_section): Likewise.
1654
b38cadfb
NC
16552012-04-12 Roland McGrath <mcgrathr@google.com>
1656
1657 * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry):
1658 New variables.
1659 (struct elf32_arm_link_hash_table): New member `nacl_p'.
1660 (elf32_arm_link_hash_table_create): Initialize it.
1661 (elf32_arm_nacl_link_hash_table_create): New function.
1662 (arm_movw_immediate, arm_movt_immediate): New functions.
1663 (elf32_arm_populate_plt_entry): Test HTAB->nacl_p.
1664 (elf32_arm_finish_dynamic_sections): Likewise.
1665 (elf32_arm_output_plt_map_1): Likewise.
1666 (bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec):
1667 New backend vector stanza.
1668 (elf32_arm_nacl_modify_segment_map): New function.
1669 * config.bfd: Handle arm-*-nacl*, armeb-*-nacl*.
1670 * targets.c: Support bfd_elf32_{big,little}_nacl_vec.
1671 * configure.in: Likewise.
1672 (bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here.
1673 (bfd_elf32_littlearm_nacl_vec): Likewise.
1674 (bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise.
1675 (bfd_elf32_bigarm_symbian_vec): Likewise.
1676 (bfd_elf32_littlearm_symbian_vec): Likewise.
1677 (bfd_elf32_bigarm_vxworks_vec): Likewise.
1678 (bfd_elf32_littlearm_vxworks_vec): Likewise.
1679 * configure: Regenerated.
1680
202e2356
NC
16812012-04-12 Tristan Gingold <gingold@adacore.com>
1682
1683 * elflink.c (elf_link_output_extsym): Add a guard.
1684 (bfd_elf_final_link): Remove assertion.
1685 (bfd_elf_final_link): Add a guard.
1686 * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed.
1687 (elfNN_vms_section_from_shdr, elfNN_vms_object_p)
1688 (elfNN_vms_post_process_headers, elfNN_vms_section_processing)
1689 (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup):
1690 Remove.
1691 (elfNN-ia64-vms target): Move to ...
1692 * elf64-ia64-vms.c: New file.
1693 * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo
1694 * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo.
1695 (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c.
1696 * configure: Regenerate.
1697 * Makefile.in: Regenerate.
1698
4841cf0c
NC
16992012-04-11 Nick Clifton <nickc@redhat.com>
1700
1701 PR binutils/13897
1702 * elf64-ppc.c (opd_entry_value): When dealing with sections
1703 without relocs, keep the last section loaded in order to avoid
1704 unnecessary reloads.
1705
d324f6d6
RM
17062012-04-09 Roland McGrath <mcgrathr@google.com>
1707
1708 * elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs.
1709 * elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs.
1710 (nacl_modify_program_headers): Likewise.
1711
5a68afcf
RM
17122012-04-03 Roland McGrath <mcgrathr@google.com>
1713
1714 * elf-nacl.c: New file.
1715 * elf-nacl.h: New file.
1716 * elf32-i386.c (elf_backend_modify_segment_map): Define for
1717 bfd_elf32_i386_nacl_vec.
1718 (elf_backend_modify_program_headers): Likewise.
1719 * elf64-x86-64.c (elf_backend_modify_segment_map): Define for
1720 bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec.
1721 (elf_backend_modify_program_headers): Likewise.
1722 * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here.
1723 (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here.
1724 * Makefile.in: Regenerated.
1725 * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here.
1726 (bfd_elf32_x86_64_nacl_vec): Likewise.
1727 (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise.
1728 (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise.
1729 (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise.
1730 (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise.
1731 (bfd_elf32_i386_nacl_vec): Likewise.
1732 (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise.
1733 (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise.
1734 * configure: Regenerated.
1735
3a4ae681
AS
17362012-03-31 Andreas Schwab <schwab@linux-m68k.org>
1737
1738 * elf32-m68k.c (elf_m68k_relocate_section): Allow
1739 R_68K_TLS_LE{8,16,32} for PIE.
1740
a7e28bbe
AK
17412012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1742
1743 * elf64-s390.c: Fix several comments regarding PLT entry
1744 description.
1745 * elf32-s390.c: Likewise.
1746
f41345a7
AK
17472012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1748
1749 * elf64-s390.c: Use the section pointer shortcuts in
1750 elf_link_hash_table and remove them from the target specific
1751 variant.
1752 * elf32-s390.c: Likewise.
1753
9aa17453
AK
17542012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1755
1756 * elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry):
1757 New definitions.
1758 (PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove.
1759 (elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32.
1760 (elf_s390_finish_dynamic_sections): Likewise.
1761 * elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry)
1762 (elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry)
1763 (elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions.
1764 (PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*)
1765 (PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove.
1766
00d8c7a9
AK
17672012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1768
1769 * elf32-s390.c (struct elf_s390_dyn_relocs): Remove.
1770 Rename all occurrences in the file to elf_dyn_relocs.
1771 * elf64-s390.c: Likewise.
1772
a66eed7a
AM
17732012-03-30 Alan Modra <amodra@gmail.com>
1774
1775 * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic
1776 libraries.
1777
f67f98b5
AM
17782012-03-29 Alan Modra <amodra@gmail.com>
1779
1780 * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete.
1781 * bfd-in2.h: Regenerate.
1782
e8d2ba53
AM
17832012-03-23 Alan Modra <amodra@gmail.com>
1784
1785 * elf.c (assign_file_positions_for_non_load_sections): Don't warn
1786 on empty alloc sections.
1787
051d833a
AM
17882012-03-23 Alan Modra <amodra@gmail.com>
1789
1790 * linker.c (_bfd_nearby_section): New function, split out from..
1791 (fix_syms): ..here.
1792 * bfd-in.h (_bfd_nearby_section): Declare.
1793 * bfd-in2.h: Regenerate.
1794 * elflink.c (elf_link_input_bfd): Don't use text_index_section or
1795 data_index_section with ld -q or ld -r output relocs against
1796 stripped output sections. Instead use _bfd_nearby_section.
1797
62599110
AM
17982012-03-23 Alan Modra <amodra@gmail.com>
1799
1800 PR binutils/13894
1801 * elf64-ppc.c (opd_entry_value): Read full symbol table when
1802 sym hashes unavailable.
1803
b781d74f
JM
18042012-03-21 Eliot Dresselhaus <eliot@sonic.net>
1805
1806 * elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE
1807 for non-C6X objects.
1808
17d5dae2
KT
18092012-03-20 Kai Tietz <ktietz@redhat.com>
1810
1811 PR ld/12742
1812 * configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h.
1813 * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined.
1814 Add windows.h header include if HAVE_WINDOWS_H is defined.
1815 (dlerror): New static function if windows variant is used instead
1816 of dlfcn.h.
1817 (dlclose): Likewise.
1818 (dlopen): Likewise.
1819 (dlsym): Likewise.
1820 * configure: Regenerated.
1821 * config.in: Regenerated.
1822
bdb892b9
L
18232012-03-20 H.J. Lu <hongjiu.lu@intel.com>
1824
1825 PR ld/13880
1826 * elf32-i386.c (elf_i386_relocate_section): Don't issue an error
1827 for R_386_GOTOFF relocation against protected function if
1828 SYMBOLIC_BIND is true.
1829
1830 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an
1831 error for R_X86_64_GOTOFF64 relocation against protected function
1832 when building executable or SYMBOLIC_BIND is true.
1833
8059fb19
RM
18342012-03-16 Roland McGrath <mcgrathr@google.com>
1835
1836 * config.bfd: Handle x86_64-*-nacl*.
1837 * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza.
1838 (bfd_elf32_x86_64_nacl_vec): Likewise.
1839 * targets.c: Support them.
1840 * configure.in: Likewise.
1841 * configure: Regenerated.
1842
ac56ee8f
MGD
18432012-03-16 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1844
1845 * elf32-arm.c (elf32_arm_attributes_accept_div): New function.
1846 (elf32_arm_attributes_forbid_div): Likewise.
1847 (elf32_arm_merge_eabi_attributes): Correct handling of
1848 Tag_DIV_use.
1849
eed180f8
RM
18502012-03-15 Roland McGrath <mcgrathr@google.com>
1851
a4456d24
RM
1852 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
1853 elf_x86_64_backend_data parameters for plt_eh_frame.
1854
eed180f8
RM
1855 * elf64-x86-64.c (struct elf_x86_64_backend_data): New type.
1856 (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros.
1857 (elf_x86_64_arch_bed): New variable.
1858 (elf_backend_arch_data): New macro.
1859 (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE.
1860 (elf_x86_64_allocate_dynrelocs): Likewise.
1861 (elf_x86_64_relocate_section): Likewise.
1862 (elf_x86_64_plt_sym_val): Likewise.
1863 (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data
1864 parameters for PLT details.
1865 (elf_x86_64_finish_dynamic_sections): Likewise.
1866
caa0075c
RM
18672012-03-14 Roland McGrath <mcgrathr@google.com>
1868
1869 * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up
1870 to the full size, padding out with nop instructions.
1871
1d7e9d18
AM
18722012-03-12 Alan Modra <amodra@gmail.com>
1873
1874 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn
1875 on zero size dynbss symbol.
1876 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
1877 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
1878 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
1879 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1880 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
1881 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
1882 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
1883 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
1884 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
1885 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1886 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1887 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
1888 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
1889 * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise.
1890 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
1891 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1892 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1893 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
1894 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1895 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
1896 * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise.
1897
aea77599
AM
18982012-03-10 Edmar Wienskoski <edmar@freescale.com>
1899
1900 * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
1901 * bfd-in2.h: Regenerate.
1902 * cpu-powerpc.c (bfd_powerpc_archs): Add entries for
1903 bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
1904
56b8aada
L
19052012-03-09 H.J. Lu <hongjiu.lu@intel.com>
1906
1907 PR ld/13817
8b127cbc 1908 * elf32-i386.c (elf_i386_relocate_section): Restore
56b8aada
L
1909 R_386_IRELATIVE.
1910
8b127cbc 1911 * elf64-x86-64.c (elf_x86_64_relocate_section): Restore
56b8aada
L
1912 R_X86_64_IRELATIVE.
1913
460f1cdc
TG
19142012-03-08 Tristan Gingold <gingold@adacore.com>
1915
1916 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum
1917 keylen according to archive kind. Set nextvbn and nextrfa lhd
1918 fields. Add comments.
1919
0a22ae8e
NC
19202012-03-07 Nick Clifton <nickc@redhat.com>
1921
1922 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type
1923 field.
1924 (elf32_mn10300_link_hash_table): Add tls_ldm_got entry;
1925 (elf_mn10300_tdata): Define.
1926 (elf_mn10300_local_got_tls_type): Define.
1927 (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD,
1928 R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
1929 R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
1930 R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs.
1931 (mn10300_reloc_map): Likewise.
1932 (elf_mn10300_tls_transition): New function.
1933 (dtpoff, tpoff, mn10300_do_tls_transition): New functions.
1934 (mn10300_elf_check_relocs): Add TLS support.
1935 (mn10300_elf_final_link_relocate): Likewise.
1936 (mn10300_elf_relocate_section): Likewise.
1937 (mn10300_elf_relax_section): Likewise.
1938 (elf32_mn10300_link_hash_newfunc): Initialise new field.
1939 (_bfd_mn10300_copy_indirect_symbol): New function.
1940 (elf32_mn10300_link_hash_table_create): Initialise new fields.
1941 (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support.
1942 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1943 (_bfd_mn10300_elf_reloc_type_class): Allocate an
1944 elf_mn10300_obj_tdata structure.
1945 (elf_backend_copy_indirect_symbol): Define.
1946 * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD,
1947 BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE,
1948 BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD,
1949 BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations.
1950 (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to
1951 alongside other MN10300 relocations.
1952 * bfd-in2.h: Regenerate.
1953 * libbfd.h: Regenerate.
1954
3ce231f8
JJ
19552012-03-06 Jakub Jelinek <jakub@redhat.com>
1956
1957 * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE
1958 set relocate to TRUE.
1959
0bef263a
RO
19602012-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1961
1962 PR ld/12152
1963 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore
1964 overflows for R_SPARC_UA32 in .stab sections.
1965
84abc003
AM
19662012-03-01 Alan Modra <amodra@gmail.com>
1967
1968 * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning.
1969
3d301fdc
AM
19702012-02-27 Alan Modra <amodra@gmail.com>
1971
1972 * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd
1973 before calling elf specific function.
1974 (sh_elf_osec_readonly_p): Test for error return from above.
1975
cb83c803
AM
19762012-02-27 Alan Modra <amodra@gmail.com>
1977
1978 * elf32-spu.c (build_stub): Fix malloc under-allocation.
1979
6f7be959
WL
19802012-02-25 Walter Lee <walt@tilera.com>
1981 * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL,
1982 BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
1983 BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
1984 BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
1985 BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
1986 BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
1987 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
1988 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
1989 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
1990 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
1991 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
1992 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
1993 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
1994 BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
1995 BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
1996 BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
1997 BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
1998 BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
1999 BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
2000 BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
2001 BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
2002 BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
2003 BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD,
2004 BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
2005 BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
2006 BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD.
2007 Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT,
2008 BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT,
2009 BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT,
2010 BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT,
2011 BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT,
2012 BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT,
2013 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT,
2014 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT,
2015 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD,
2016 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD,
2017 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD,
2018 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD,
2019 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD,
2020 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD,
2021 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD,
2022 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD,
2023 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE,
2024 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE,
2025 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE,
2026 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE,
2027 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE,
2028 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE,
2029 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE,
2030 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE.
2031 * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro
2032 relocations.
2033 (tilepro_reloc_map): Ditto.
2034 (tilepro_info_to_howto_rela): Ditto.
2035 (reloc_to_create_func): Ditto.
2036 (tilepro_tls_translate_to_le): New.
2037 (tilepro_tls_translate_to_ie): New.
2038 (tilepro_elf_tls_transition): New.
2039 (tilepro_elf_check_relocs): Handle new tls relocations.
2040 (tilepro_elf_gc_sweep_hook): Ditto.
2041 (allocate_dynrelocs): Ditto.
2042 (tilepro_elf_relocate_section): Ditto.
2043 (tilepro_replace_insn): New.
2044 (insn_mask_X1): New.
2045 (insn_mask_X0_no_dest_no_srca): New
2046 (insn_mask_X1_no_dest_no_srca): New
2047 (insn_mask_Y0_no_dest_no_srca): New
2048 (insn_mask_Y1_no_dest_no_srca): New
2049 (srca_mask_X0): New
2050 (srca_mask_X1): New
2051 (insn_tls_le_move_X1): New
2052 (insn_tls_le_move_zero_X0X1): New
2053 (insn_tls_ie_lw_X1): New
2054 (insn_tls_ie_add_X0X1): New
2055 (insn_tls_ie_add_Y0Y1): New
2056 (insn_tls_gd_add_X0X1): New
2057 (insn_tls_gd_add_Y0Y1): New
2058 * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx
2059 relocations.
2060 (tilegx_reloc_map): Ditto.
2061 (tilegx_info_to_howto_rela): Ditto.
2062 (reloc_to_create_func): Ditto.
2063 (tilegx_elf_link_hash_table): New field disable_le_transition.
2064 (tilegx_tls_translate_to_le): New.
2065 (tilegx_tls_translate_to_ie): New.
2066 (tilegx_elf_tls_transition): New.
2067 (tilegx_elf_check_relocs): Handle new tls relocations.
2068 (tilegx_elf_gc_sweep_hook): Ditto.
2069 (allocate_dynrelocs): Ditto.
2070 (tilegx_elf_relocate_section): Ditto.
2071 (tilegx_copy_bits): New.
2072 (tilegx_replace_insn): New.
2073 (insn_mask_X1): New.
2074 (insn_mask_X0_no_dest_no_srca): New.
2075 (insn_mask_X1_no_dest_no_srca): New.
2076 (insn_mask_Y0_no_dest_no_srca): New.
2077 (insn_mask_Y1_no_dest_no_srca): New.
2078 (insn_mask_X0_no_operand): New.
2079 (insn_mask_X1_no_operand): New.
2080 (insn_mask_Y0_no_operand): New.
2081 (insn_mask_Y1_no_operand): New.
2082 (insn_tls_ie_ld_X1): New.
2083 (insn_tls_ie_ld4s_X1): New.
2084 (insn_tls_ie_add_X0X1): New.
2085 (insn_tls_ie_add_Y0Y1): New.
2086 (insn_tls_ie_addx_X0X1): New.
2087 (insn_tls_ie_addx_Y0Y1): New.
2088 (insn_tls_gd_add_X0X1): New.
2089 (insn_tls_gd_add_Y0Y1): New.
2090 (insn_move_X0X1): New.
2091 (insn_move_Y0Y1): New.
2092 (insn_add_X0X1): New.
2093 (insn_add_Y0Y1): New.
2094 (insn_addx_X0X1): New.
2095 (insn_addx_Y0Y1): New.
2096 * libbfd.h: Regenerate.
2097 * bfd-in2.h: Regenerate.
2098
82590249
WL
20992012-02-25 Walter Lee <walt@tilera.com>
2100
fb6cedde
WL
2101 * config.bfd (tilegx-*-*): rename little endian vector; add big
2102 endian vector.
2103 (tilegxbe-*-*): New case.
2104 * configure.in (bfd_elf32_tilegx_vec): Rename...
2105 (bfd_elf32_tilegx_le_vec): ... to this.
2106 (bfd_elf32_tilegx_be_vec): New vector.
2107 (bfd_elf64_tilegx_vec): Rename...
2108 (bfd_elf64_tilegx_le_vec): ... to this.
2109 (bfd_elf64_tilegx_be_vec): New vector.
2110 * configure: Regenerate.
2111 * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename.
2112 (TARGET_LITTLE_NAME): Ditto.
2113 (TARGET_BIG_SYM): Define.
2114 (TARGET_BIG_NAME): Define.
2115 * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename.
2116 (TARGET_LITTLE_NAME): Ditto.
2117 (TARGET_BIG_SYM): Define.
2118 (TARGET_BIG_NAME): Define.
2119 * targets.c (bfd_elf32_tilegx_vec): Rename...
2120 (bfd_elf32_tilegx_le_vec): ... to this.
2121 (bfd_elf32_tilegx_be_vec): Declare.
2122 (bfd_elf64_tilegx_vec): Rename...
2123 (bfd_elf64_tilegx_le_vec): ... to this.
2124 (bfd_elf64_tilegx_be_vec): Declare.
2125 (_bfd_target_vector): Add / rename above vectors.
82590249
WL
2126 * arctures.c (bfd_architecture): Define bfd_mach_tilegx32.
2127 * bfd-in2.h: Regenerate.
2128 * cpu-tilegx.c (bfd_tilegx32_arch): define.
fb6cedde 2129 (bfd_tilegx_arch): link to bfd_tilegx32_arch.
82590249 2130
4115917d
NC
21312012-02-24 Nick Clifton <nickc@redhat.com>
2132
2133 PR ld/13730
2134 * reloc.c (bfd_generic_get_relocated_section_contents): Issue an
2135 error message instead of aborting, when an outofrange reloc is
2136 encountered.
2137
19765f52
IS
21382012-02-23 Iain Sandoe <idsandoe@googlemail.com>
2139
2140 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New.
2141 (bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc
2142 bit-fields when target and host differ in endian-ness. When
2143 PAIRs are non-scattered find the 'symbol' from the preceding
2144 reloc. Add FIXME re. reloc symbols on section boundaries.
2145 (bfd_mach_o_swap_out_non_scattered_reloc): New.
2146 (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc.
2147
6639d37a
IS
21482012-02-17 Iain Sandoe <idsandoe@googlemail.com>
2149
2150 * mach-o-i386.c (i386_howto_table): Add support for 16 bit
2151 sect-diffs.
2152 (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs.
2153 (bfd_mach_o_i386_swap_reloc_out): Likewise.
2154
e1e81ed3
IS
21552012-02-17 Tristan Gingold <gingold@adacore.com>
2156
2157 * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF):
2158 * libbfd.h: Regenerated.
2159 * bfd-in2.h: Likewise.
2160 * mach-o-i386.c (i386_howto_table): Include local sectdiff.
2161 (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff.
2162 (bfd_mach_o_i386_swap_reloc_out): Likewise.
2163
d0ddfe27
AK
21642012-02-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2165
2166 * elf32-s390.c (elf_s390_relocate_section): Support basr in the
2167 GD->LE and LD->LE optimizations.
2168
eb8c5f3f
AM
21692012-02-16 Alan Modra <amodra@gmail.com>
2170
2171 PR binutils/13355
2172 * elf32-rx.c (elf32_rx_relax_section): Correct width check.
2173
e1741a1e
RH
21742012-02-13 Richard Henderson <rth@redhat.com>
2175
2176 PR ld/13621
2177 * linker.c (fix_syms): Force symbols outside any section into
2178 bfd_abs_section_ptr.
2179
5efbbc43
AM
21802012-02-13 Alan Modra <amodra@gmail.com>
2181
2182 * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function.
2183 * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare.
2184 * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define.
2185 * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define.
2186
3e3c397d
JK
21872012-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
2188 Nick Clifton <nickc@redhat.com>
2189
2190 * oasys.c (oasys_write_header): Fix compilation warning on zero-sized
2191 memset.
2192
09903f4b
IS
21932012-02-10 Iain Sandoe <idsandoe@googlemail.com>
2194
2195 * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section
2196 vma additions in their logical, rather than physical order.
2197
632039e0
IS
21982012-02-10 Iain Sandoe <idsandoe@googlemail.com>
2199
2200 * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section
2201 parameters.
2202 * mach-o-x86-64.c (text_section_names_xlat): New.
2203 (mach_o_x86_64_segsec_names_xlat): New.
2204 (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat.
2205 * mach-o-i386.c (text_section_names_xlat): Correct section parameters.
2206
565a6476
TG
22072012-02-10 Tristan Gingold <gingold@adacore.com>
2208
2209 * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator
2210 to avoid infinite loop. Add comments.
2211
923f257f
L
22122012-02-09 H.J. Lu <hongjiu.lu@intel.com>
2213
2214 PR ld/13675
2215 * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte
2216 nop instructions.
2217 (bfd_arch_i386_short_nop_fill): New.
2218 (bfd_arch_i386_long_nop_fill): Likewise.
2219 Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info
2220 initializers. Use bfd_arch_i386_long_nop_fill on 64bit
2221 bfd_arch_info initializers.
2222
2223 * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ...
2224 (bfd_arch_i386_short_nop_fill): This.
2225 Update bfd_arch_info initializers.
2226 * cpu-l1om.c: Likewise.
2227
4e6b54a6
AM
22282012-02-08 Alan Modra <amodra@gmail.com>
2229
2230 * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too.
2231 (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear
2232 the correct h->u.weakdef.
2233
ff9e0f5b
AM
22342012-02-07 Alan Modra <amodra@gmail.com>
2235
2236 * elf.c (elf_find_function): Don't use internal_elf_sym.
2237 (_bfd_elf_maybe_function_sym): Likewise. Replace elf_symbol_type
2238 parameter with asymbol.
2239 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
2240 * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype.
2241 (struct elf_backend_data <maybe_function_sym>): Likewise.
2242
526f25b2
EW
22432012-02-02 Vidya Praveen (vidya.praveen@atmel.com)
2244
2245 PR bfd/13410
8b127cbc 2246 * elf32-avr.c (elf32_avr_relax_section): Correct the
526f25b2
EW
2247 condition that qualifies the candidates for relaxation.
2248
7c4f9963
TG
22492012-02-02 Tristan Gingold <gingold@adacore.com>
2250
2251 * bfdio.c (real_fopen): Remove unused vms_modes variable.
2252
facf03f2
TG
22532012-02-02 Tristan Gingold <gingold@adacore.com>
2254
2255 * mach-o.c (bfd_mach_o_read_header): Silent uninitialized
2256 variable warning.
2257
cd99171c
TG
22582012-02-02 Tristan Gingold <gingold@adacore.com>
2259
2260 * archive.c (bfd_slurp_armap): Fix thinko in cast.
2261
b7761f11
L
22622012-01-31 H.J. Lu <hongjiu.lu@intel.com>
2263
2264 PR ld/13616
2265 * archures.c (bfd_arch_info): Add fill.
2266 (bfd_default_arch_struct): Add bfd_arch_default_fill.
2267 (bfd_arch_default_fill): New.
2268
2269 * configure.in: Set bfd version to 2.22.52.
2270 * configure: Regenerated.
2271
2272 * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info
2273 initializer.
2274 * cpu-arc.c: Likewise.
2275 * cpu-arm.c: Likewise.
2276 * cpu-avr.c: Likewise.
2277 * cpu-bfin.c: Likewise.
2278 * cpu-cr16.c: Likewise.
2279 * cpu-cr16c.c: Likewise.
2280 * cpu-cris.c: Likewise.
2281 * cpu-crx.c: Likewise.
2282 * cpu-d10v.c: Likewise.
2283 * cpu-d30v.c: Likewise.
2284 * cpu-dlx.c: Likewise.
2285 * cpu-epiphany.c: Likewise.
2286 * cpu-fr30.c: Likewise.
2287 * cpu-frv.c: Likewise.
2288 * cpu-h8300.c: Likewise.
2289 * cpu-h8500.c: Likewise.
2290 * cpu-hppa.c: Likewise.
2291 * cpu-i370.c: Likewise.
2292 * cpu-i860.c: Likewise.
2293 * cpu-i960.c: Likewise.
2294 * cpu-ia64.c: Likewise.
2295 * cpu-ip2k.c: Likewise.
2296 * cpu-iq2000.c: Likewise.
2297 * cpu-lm32.c: Likewise.
2298 * cpu-m10200.c: Likewise.
2299 * cpu-m10300.c: Likewise.
2300 * cpu-m32c.c: Likewise.
2301 * cpu-m32r.c: Likewise.
2302 * cpu-m68hc11.c: Likewise.
2303 * cpu-m68hc12.c: Likewise.
2304 * cpu-m68k.c: Likewise.
2305 * cpu-m88k.c: Likewise.
2306 * cpu-mcore.c: Likewise.
2307 * cpu-mep.c: Likewise.
2308 * cpu-microblaze.c: Likewise.
2309 * cpu-mips.c: Likewise.
2310 * cpu-mmix.c: Likewise.
2311 * cpu-moxie.c: Likewise.
2312 * cpu-msp430.c: Likewise.
2313 * cpu-mt.c: Likewise.
2314 * cpu-ns32k.c: Likewise.
2315 * cpu-openrisc.c: Likewise.
2316 * cpu-or32.c: Likewise.
2317 * cpu-pdp11.c: Likewise.
2318 * cpu-pj.c: Likewise.
2319 * cpu-plugin.c: Likewise.
2320 * cpu-powerpc.c: Likewise.
2321 * cpu-rl78.c: Likewise.
2322 * cpu-rs6000.c: Likewise.
2323 * cpu-rx.c: Likewise.
2324 * cpu-s390.c: Likewise.
2325 * cpu-score.c: Likewise.
2326 * cpu-sh.c: Likewise.
2327 * cpu-sparc.c: Likewise.
2328 * cpu-spu.c: Likewise.
2329 * cpu-tic30.c: Likewise.
2330 * cpu-tic4x.c: Likewise.
2331 * cpu-tic54x.c: Likewise.
2332 * cpu-tic6x.c: Likewise.
2333 * cpu-tic80.c: Likewise.
2334 * cpu-tilegx.c: Likewise.
2335 * cpu-tilepro.c: Likewise.
2336 * cpu-v850.c: Likewise.
2337 * cpu-vax.c: Likewise.
2338 * cpu-w65.c: Likewise.
2339 * cpu-we32k.c: Likewise.
2340 * cpu-xc16x.c: Likewise.
2341 * cpu-xstormy16.c: Likewise.
2342 * cpu-xtensa.c: Likewise.
2343 * cpu-z80.c: Likewise.
2344 * cpu-z8k.c: Likewise.
2345
2346 * cpu-i386.c: Include "libiberty.h".
ff9e0f5b 2347 (bfd_arch_i386_fill): New.
b7761f11
L
2348 Add bfd_arch_i386_fill to bfd_arch_info initializer.
2349
2350 * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer.
2351 * cpu-l1om.c: Likewise.
2352
ff9e0f5b 2353 * linker.c (default_data_link_order): Call abfd->arch_info->fill
b7761f11
L
2354 if fill size is 0.
2355
2356 * bfd-in2.h: Regenerated.
2357
0d048da3
ME
23582012-01-27 Michael Eager <eager@eagercon.com>
2359
8b127cbc 2360 * elf32-microblaze.c (create_got_section):
0d048da3
ME
2361 Reuse existing .rela.got section.
2362
9f296da3
AM
23632012-01-23 Alan Modra <amodra@gmail.com>
2364
2365 * elf-bfd.h: Formatting.
2366 (struct elf_backend_data): Add "maybe_function_sym".
2367 (_bfd_elf_maybe_function_sym): Declare.
2368 * elfxx-target.h (elf_backend_maybe_function_sym): Define.
2369 (elfNN_bed): Init new field.
2370 * elf.c (elf_find_function): Use maybe_function_sym.
2371 (_bfd_elf_maybe_function_sym): New function.
2372 * elf64-ppc.c (elf_backend_maybe_function_sym): Define.
2373 (ppc64_elf_maybe_function_sym): New function.
2374
f1bb16f8
NC
23752012-01-20 Francois Gouget <fgouget@codeweavers.com>
2376
2377 PR binutils/13534
2378 * archive.c (_bfd_ar_sizepad): New function. Correctly install and
2379 pad the size field in an archive header.
2380 (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan
2381 function for the archive size field.
2382 (bfd_generic_openr_next_archived_file): Likewise.
2383 (do_slurp_coff_armap): Likewise.
2384 (_bfd_write_archive_contents): Likewise.
2385 (_bfd_bsd44_write_ar_hdr): Use the new function.
2386 (bfd_ar_hdr_from_filesystem): Likewise.
2387 (_bfd_write_archive_contents): Likewise.
2388 (bsd_write_armap): Likewise.
2389 (coff_write_armap): Likewise.
2390 * archive64.c (bfd_elf64_archive_write_armap): Likewise.
2391 * bfdio.c (bfd_bread): Use correct type for archive element
2392 sizes.
2393 * ar.c (open_inarch): Likewise.
2394 (extract_file): Likewise.
2395 * libbfd-in.h (struct areltdata): Use correct types for
2396 parsed_size and extra_size fields.
2397 Prototype _bfd_ar_sizepad function.
2398 * libbfd.h: Regenerate.
2399
1f20dca5
UW
24002012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2401
2402 * elf.c (elfcore_write_prpsinfo): Provide unconditionally.
2403 Return NULL if core file generation is unsupported.
2404 (elfcore_write_prstatus): Likewise.
2405 * elf32-arm.c (elf32_arm_nabi_write_core_note): New function.
2406 (elf_backend_write_core_note): Define.
2407
100fc767
TG
24082012-01-19 Tristan Gingold <gingold@adacore.com>
2409
2410 * pef.c: Add a comment.
2411 * xsym.c: Likewise.
2412
75cd47ed
AM
24132012-01-17 Alan Modra <amodra@gmail.com>
2414
2415 * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
2416 trailing garbage in the note.
2417 * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
2418
8a5dcf53
AM
24192012-01-16 Daniel Green <venix1@gmail.com>
2420
2421 PR ld/13491
2422 * coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
2423 h->root.type not h->type.
2424 * coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
2425
bb76d940
IS
24262012-01-13 Iain Sandoe <idsandoe@googlemail.com>
2427
8a5dcf53
AM
2428 * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
2429 indirect symbols.
687be931
IS
2430
24312012-01-13 Iain Sandoe <idsandoe@googlemail.com>
2432
2433 * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file
bb76d940
IS
2434 position from here... to (bfd_mach_o_build_seg_command): Here.
2435
50d10658
IS
24362012-01-12 Iain Sandoe <idsandoe@googlemail.com>
2437
2438 * mach-o.c (bfd_mach_o_count_indirect_symbols): New.
2439 (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
2440 * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
2441 file. (bfd_mach_o_section): Add indirect_syms field.
2442
e5081f2f
IS
24432012-01-11 Iain Sandoe <idsandoe@googlemail.com>
2444
2445 * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of
2446 vmsize from filesize. Don't compute offsets or file sizes for
2447 zerofill sections.
2448
bbd56171
IS
24492012-01-11 Iain Sandoe <idsandoe@googlemail.com>
2450
2451 * mach-o.c (bfd_mach_o_build_commands): Make the building of each
2452 command type independent.
2453
794e51c0
AM
24542012-01-11 Alan Modra <amodra@gmail.com>
2455
2456 * elf64-ppc.c: Define more insns used in plt call stubs.
2457 (ppc64_elf_brtaken_reloc): Assume isa version 2 or above.
2458 (ppc64_elf_relocate_section): Likewise.
2459 (enum ppc_stub_type): Add ppc_stub_plt_call_r2save.
2460 (struct ppc_link_hash_table): Increase size of stub_count array.
2461 Add plt_stub_align and plt_thread_safe.
2462 (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define.
2463 (plt_stub_size, plt_stub_pad): New functions.
2464 (build_plt_stub): Emit barriers for power7 thread safety. Don't
2465 emit needless save of r2.
2466 (build_tls_get_addr_stub): Adjust params.
2467 (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning
2468 plt stubs. Adjust build_*plt_stub calls.
2469 (ppc_size_one_stub): Similarly.
2470 (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align
2471 params. Choose default for plt_thread_safe based on existence of
2472 calls to thread creation functions. Modify plt_call to
2473 plt_call_r2save when no tocsave reloc found. Align tail of stub
2474 sections.
2475 (ppc64_elf_build_stubs): Align tail of stub sections. Adjust
2476 output of stub statistics.
2477 (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save.
2478 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
2479
df4f9443
L
24802012-01-10 H.J. Lu <hongjiu.lu@intel.com>
2481
2482 PR ld/13581
2483 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P
2484 check on R_X86_64_PCXX.
2485
2a65a88e
TG
24862012-01-10 Tristan Gingold <gingold@adacore.com>
2487
2488 * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
2489 warning.
2490
660722b0
TG
24912012-01-10 Tristan Gingold <gingold@adacore.com>
2492
2493 * bfdio.c (bfd_tell): Handle nested archives.
2494 (bfd_seek): Ditto.
2495 * cache.c (bfd_cache_lookup_worker): Ditto.
2496 * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with
2497 nested archives.
2498 (bfd_generic_openr_next_archived_file): Likewise.
2499
b22161d6
IS
25002012-01-09 Iain Sandoe <idsandoe@googlemail.com>
2501
2502 * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
2503 (bfd_mach_o_write_symtab): Remove handling for indirect syms.
2504 (bfd_mach_o_primary_symbol_sort_key): Likewise.
2505 (bfd_mach_o_cf_symbols): Likewise.
2506 (bfd_mach_o_sort_symbol_table): Remove.
2507 (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
2508 for indirect and dysymtab counts. Do the symbol sorting here.
2509 (bfd_mach_o_build_dysymtab_command): Count the symbol types here.
2510 Make the indirect symbols a TODO.
2511 (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
2512 (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
2513 a non-zero value.
2514 (bfd_mach_o_read_symtab_symbol): Record the symbol index.
2515 (bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
2516 * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
2517 (IS_MACHO_INDIRECT): Remove.
2518 (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.
2519
28a1b4f8
NC
25202012-01-06 Nick Clifton <nickc@redhat.com>
2521
2522 PR binutils/13121
2523 * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
2524 'flaginfo' to avoid conflicts with AIX system headers.
2525
36f0a48f
TG
25262012-01-06 Tristan Gingold <gingold@adacore.com>
2527
2528 * bfdio.c (bfd_bread): Use arelt_size macro.
2529
76d4c1cb
TG
25302012-01-06 Tristan Gingold <gingold@adacore.com>
2531
2532 * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.
2533
a1c7aafb
NC
25342012-01-05 Nick Clifton <nickc@redhat.com>
2535
2536 PR ld/12161
2537 * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
2538 necessary.
2539
e85c6a70
JK
25402012-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2541
2542 Fix zero registers core files when built by gcc-4.7.
2543 * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
2544 size. Call elfcore_write_note for the local variables. Remove the
2545 final elfcore_write_note call. Add NOTREACHED comments.
2546
15bbba8d
TG
25472012-01-04 Tristan Gingold <gingold@adacore.com>
2548
2549 * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function.
2550 (bfd_mach_o_generic_stat_arch_elt): Adjust.
2551
a4e241ca
TG
25522012-01-04 Tristan Gingold <gingold@adacore.com>
2553
2554 * mach-o.c (bfd_mach_o_fat_member_init): New function.
2555 (bfd_mach_o_openr_next_archived_file): Reindent.
2556 Adjust to call bfd_mach_o_fat_member_init.
2557 (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init.
2558
71141310
TG
25592012-01-04 Tristan Gingold <gingold@adacore.com>
2560
2561 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle
2562 BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1,
2563 BFD_RELOC_MACH_O_X86_64_PCREL32_2,
2564 BFD_RELOC_MACH_O_X86_64_PCREL32_4,
2565 BFD_RELOC_MACH_O_X86_64_BRANCH32,
2566 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
2567 BFD_RELOC_MACH_O_X86_64_GOT.
2568
9f4a5bd1
TG
25692012-01-04 Tristan Gingold <gingold@adacore.com>
2570
2571 * mach-o.h (bfd_mach_o_fvmlib_command): New structure.
2572 (bfd_mach_o_load_command): Add fvmlib field.
2573
2574 * mach-o.c (bfd_mach_o_read_fvmlib): New function.
2575 (bfd_mach_o_read_command): Handle fvmlib.
2576
0b2de107
TG
25772012-01-04 Tristan Gingold <gingold@adacore.com>
2578
2579 * mach-o.c (bfd_mach_o_convert_architecture): Reindent.
2580 Decode msubtype for ARM.
2581
aeefa1c9
TG
25822012-01-04 Tristan Gingold <gingold@adacore.com>
2583
2584 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments.
2585
fc55a902
TG
25862012-01-04 Tristan Gingold <gingold@adacore.com>
2587
2588 * mach-o.h: Reindent header.
2589 (bfd_mach_o_encryption_info_command): New structure.
2590 (bfd_mach_o_load_command): Add encryption_info field.
2591
2592 * mach-o.c (bfd_mach_o_read_encryption_info): New function.
2593 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
2594 (bfd_mach_o_read_command): Adjust error message.
2595
2ca7691a
TG
25962012-01-04 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
2597
2598 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part
2599 which reads DWARF2 and stores in stash from find_line.
2600 (find_line) Call _bfd_dwarf2_slurp_debug_info.
2601 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration.
2602 * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate.
2603 * mach-o.c (dsym_subdir): The name of subdir where debug
2604 information may be stored.
2605 (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose
2606 type is UUID.
2607 (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is
2608 corresponding to the executable.
2609 (bfd_mach_o_find_dsym): New. Find a debug information BFD in the
2610 specified binary file.
2611 (bfd_mach_o_follow_dsym): New. Find a debug information BFD for
2612 the original BFD.
2613 (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O
2614 executables, dylibs, and bundles.
2615 (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file.
2616 * mach-o.h (dsym_bfd): The BFD of the dSYM file.
2617
68588f95
IS
26182012-01-03 Iain Sandoe <idsandoe@googlemail.com>
2619
2620 * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index
2621 for stabd symbols.
2622 (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs.
2623 (bfd_mach_o_cf_symbols): Likewise.
2624
f2b324f1
IS
26252012-01-03 Iain Sandoe <idsandoe@googlemail.com>
2626
2627 * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo.
2628
7f307238
IS
26292012-01-03 Iain Sandoe <idsandoe@googlemail.com>
2630
2631 * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
2632 as the value of an indirect symbol. Keep the string table index in
2633 non-indirect syms for reference.
2634 (bfd_mach_o_write_dysymtab): New.
2635 (bfd_mach_o_primary_symbol_sort_key): New.
2636 (bfd_mach_o_cf_symbols): New.
2637 (bfd_mach_o_sort_symbol_table): New.
2638 (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols.
2639 If we are emitting a dysymtab, process indirect symbols and count the
2640 number of each other kind.
2641 (bfd_mach_o_mangle_sections): New.
2642 (bfd_mach_o_write_contents): Split out some pre-requisite code into
2643 the command builder. Write dysymtab if the command is present.
2644 (bfd_mach_o_count_sections_for_seg): New.
2645 (bfd_mach_o_build_seg_command): New.
2646 (bfd_mach_o_build_dysymtab_command): New.
2647 (bfd_mach_o_build_commands): Reorganize to support the fact that some
2648 commands are optional and should not be emitted if there are no
2649 sections or symbols.
2650 (bfd_mach_o_set_section_contents): Amend comment.
23e1d329 2651 * mach-o.h: Amend and add to comments.
7f307238
IS
2652 (mach_o_data_struct): Add fields for dysymtab symbols counts and a
2653 pointer to the indirects, when present.
2654 (bfd_mach_o_should_emit_dysymtab): New macro.
2655 (IS_MACHO_INDIRECT): Likewise.
2656
23e1d329 2657For older changes see ChangeLog-2011
56882138
AM
2658\f
2659Local Variables:
2660mode: change-log
2661left-margin: 8
2662fill-column: 74
2663version-control: never
2664End:
This page took 0.88259 seconds and 4 git commands to generate.