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