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