Commit Graph

10014 Commits

Author SHA1 Message Date
Alan Modra
2461266c18 daily update 2012-10-25 23:00:04 +00:00
H.J. Lu
9d4b2dba0e Replace _GLOBAL_OFFSET_TABLE_ lookup with htab->elf.hgot
* elf32-i386.c (elf_i386_size_dynamic_sections): Replace
	_GLOBAL_OFFSET_TABLE_ lookup with htab->elf.hgot.
	* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
2012-10-25 13:36:08 +00:00
Alan Modra
4902650971 daily update 2012-10-24 23:00:06 +00:00
H.J. Lu
64f401629b Don't decompress the section in bfd_is_section_compressed
* compress.c (bfd_is_section_compressed): Don't decompress the
	section.
2012-10-24 21:36:50 +00:00
Alan Modra
3258d498f4 daily update 2012-10-23 23:00:04 +00:00
Nathan Sidwell
04c3a75556 bfd/
* bfd-in.h (bfd_elf_stack_segment_size): Declare.
	* bfd-in2.h: Rebuilt.
	* elfxx-target.h (elf_backend_stack_align): New.
	(elfNN_bed): Add it.
	* elf-bfd.h (struct elf_backend_data): Add stack_align field.
	* elf.c (bfd_elf_map_sections_to_segments): Pay attention to
	stack_align and stacksize for PT_GNU_STACK segment.
	(assign_file_positions_for_non_load_sections): Set p_memsz for
	PT_GNU_STACK segment.
	(copy_elf_program_header): Copy PT_GNU_STACK size.
	* elflink.c (bfd_elf_stack_segment_size): New function, taken from
	uclinux backends.
	(bfd_elf_size_dynamic_sections): Determine
	PT_GNU_STACK requirements after calling backend.  Pay attention to
	stacksize.
	* elf32-bfin.c (elf32_bfinfdpic_always_size_sections): Call
	bfd_elf_stack_segment_size.
	(elf32_bfinfdpic_modify_program_headers): Delete.
	(elf32_bfingfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
	here.
	(elf_backend_stack_align): Override.
	(elf_backend_modify_program_headers): Don't override.
	* elf32-frv.c (frvfdpic_always_size_sections): Call
	bfd_elf_stack_segment_size.
	(elf32_frvfdpic_modify_program_headers): Delete.
	(elf32_frvfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
	here.
	(elf_backend_stack_align): Override.
	(elf_backend_modify_program_headers): Don't override.
	* elf32-lm32.c (lm32_elf_always_size_sections): Leave
	PT_GNU_STACK creation to underlying elf support.  Check
	__stacksize here for backwards compatibility, and set it if
	needed.
	(lm32_elf_modify_segment_map): Delete.
	(lm32_elf_modify_program_headers): Delete.
	(elf_backend_stack_align): Override.
	(elf_backend_modify_segment_map): Don't override.
	(elf_backend_modify_program_headers): Don't override.
	* elf32-sh.c (sh_elf_always_size_sections): Call
	bfd_elf_stack_segment_size.
	(sh_elf_modify_program_headers): Delete.
	(sh_elf_copy_private_data): Don't copy PT_GNU_STACK
	here.
	(elf_backend_stack_align): Override.
	(elf_backend_modify_program_headers): Don't override.
	* elf32-tic6x.c (elf32_tic6x_always_size_sections): Call
	bfd_elf_stack_segment_size.
	(elf32_tic6x_modify_program_headers): Delete.
	(elf32_tic6x_copy_private_data): Delete.
	(elf_backend_stack_align): Override.
	(bfd_elf32_bfd_copy_private_bfd_data): Don't override.
	(elf_backend_modify_program_headers): Don't override.

	include/
	* bfdlink.h (struct bfd_link_info): Add stacksize option.

	ld/
	* ld.texinfo (stack-size): New option.
	* emultempl/elf32.em: Add stack-size option.

	ld/testsuite/
	* ld-elf/binutils.exp: Add -z stack-size=0.
	* ld-elf/elf.exp: Add stack-exec and stack-size tests.
	* ld-elf/orphan-region.d: Add stack-size option. Remove xfail.
	* ld-elf/stack-exec.rd: New.
	* ld-elf/stack-size.rd: New.
	* ld-elf/stack.s: New.
	* ld-scripts/empty-aligned.d: Add stack-size option.
	* ld-sh/fdpic-stack-set.d: New.
	* ld-tic6x/shlib-1.rd: Remove __stacksize symbol.
	* ld-tic6x/shlib-1b.rd: Likewise.
	* ld-tic6x/shlib-1r.rd: Likewise.
	* ld-tic6x/shlib-1rb.rd: Likewise.
	* ld-tic6x/shlib-app-1.rd: Likewise.
	* ld-tic6x/shlib-app-1b.rd: Likewise.
	* ld-tic6x/shlib-app-1r.rd: Likewise.
	* ld-tic6x/shlib-app-1rb.rd: Likewise.
	* ld-tic6x/shlib-noindex.rd: Likewise.
	* ld-tic6x/static-app-1.rd: Likewise.
	* ld-tic6x/static-app-1b.rd: Likewise.
	* ld-tic6x/static-app-1r.rd: Likewise.
	* ld-tic6x/static-app-1rb.rd: Likewise.
2012-10-23 09:33:56 +00:00
Alan Modra
e4c4c631c4 daily update 2012-10-22 23:00:04 +00:00
Alan Modra
eac3aa9e9a * cache.c (cache_bmmap): Don't use void* arithmetic. 2012-10-22 04:51:52 +00:00
Alan Modra
379b38338d daily update 2012-10-21 23:00:04 +00:00
Alan Modra
8a72cc6e7e bfd/
* compress.c (bfd_cache_section_contents): New function.
	* bfd-in2.h: Regenerate.
binutils/
	* objdump.c (load_specific_debug_section): Use
	bfd_cache_section_contents.
2012-10-21 09:06:07 +00:00
Hans-Peter Nilsson
1e9d6fc263 Correct last entry 2012-10-21 03:25:02 +00:00
Hans-Peter Nilsson
d3a65d4dea * linker.c (_bfd_generic_link_output_symbols): Handle a
no-longer-global symbol entered as a BFD_PLUGIN.
2012-10-21 03:23:37 +00:00
Alan Modra
c2762effd9 daily update 2012-10-20 23:00:05 +00:00
Alan Modra
38b774d28c * compress.c: Reinstate 2012-10-19 change.
(bfd_get_full_section_contents): Don't free unless we alloc.
	Use proper decompress size.  Delete some vars, rename others.
2012-10-20 08:27:13 +00:00
Alan Modra
d8551d25f7 daily update 2012-10-19 23:00:05 +00:00
Tom Tromey
67d004eb5f * compress.c: Revert previous patch. 2012-10-19 16:59:57 +00:00
Tom Tromey
06c2e2c12c * compress.c (bfd_get_full_section_contents): Don't cache
decompressed contents.
2012-10-19 15:51:53 +00:00
Alan Modra
5cb3f7f4d9 daily update 2012-10-18 23:00:04 +00:00
Kai Tietz
a29a8af823 ChangeLog bfd
2012-10-18  Kai Tietz  <ktietz@redhat.com>

	PR binutils/14067
	* coff-i386.c (bfd_target): Add section flag SEC_EXCLUDE.
	Allow BFD_COMPRESS and BFD_DECOMPRESS flags.
	* coff-x86_64.c: Likewise.
	* coffcode.h (DOT_ZDEBUG): New define.
	(sec_to_styp_flags): Check for .zdebug.
	(styp_to_sec_flags): Likewise.
	* coffgen.c (make_a_section): Handle .debug_* section
	compression/decompression flags.
	* cofflink.c (mark_relocs): Ignore relocations
	for a section, which isn't marked as used.
	(_bfd_coff_link_input_bfd): Add support of compressed
	debug sections.
	* compress.c (decompress_contents): Loop as long
	as there is input available and there is room for
	output.
	* bfd/pe-arm.c: Add .zdebug_ partial match entry.
	* pe-i386.c: Likewise.
	* pe-x86_64.c: Likewise.
	* peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't clear all
	data-directories as this might destroy content.

        * coff-i386.c (_bfd_generic_find_nearest_line_discriminator):
        define as coff_find_nearest_line_discriminator.
        * libcoff-in.h (coff_find_nearest_line_discriminator): New
        * libcoff.h: Regenerated.
        * coff-x86_64.c: Likewise.
        * coffgen.c (coff_find_nearest_line_discriminator): New function.
        prototype.

ChangeLog binutils

2012-10-18  Kai Tietz  <ktietz@redhat.com>

	* objdump.c (dump_bfd): Call dump headers after
	call of slurp_symtab.

ChangeLog ld

2012-10-18  Kai Tietz  <ktietz@redhat.com>

	PR binutils/14067
	* NEWS: Menition new feature.
	* scripttempl/pep.sc: Add zdebug sections.
	* scripttempl/pe.sc: L
2012-10-18 17:42:29 +00:00
Alan Modra
f8bfb3c5e1 daily update 2012-10-17 23:00:03 +00:00
Alan Modra
617a460292 daily update 2012-10-16 23:00:04 +00:00
Joel Brobecker
1239a68ada Add missing ChangeLog entry for previous commit:
2012-10-16  Joel Brobecker  <brobecker@adacore.com>

       * coff64-rs6000.c (rs6000coff64_vec): Set _close_and_cleanup
       field to _bfd_archive_close_and_cleanup.
       (aix5coff64_vec): Likewise.
2012-10-16 22:57:50 +00:00
Joel Brobecker
329e5cac87 dangling pointer in coff64-rs6000 archive cache.
bfd/ChangeLog:

        * coff64-rs6000.c (rs6000coff64_vec): Set _close_and_cleanup
        field to _bfd_archive_close_and_cleanup.
        (aix5coff64_vec): Likewise.
2012-10-16 22:56:55 +00:00
Joel Brobecker
e3f9f6d818 Dangling bfd pointer in archive cache.
This dandling pointer eventually leads to a crash when trying to run
on ppc-aix a program using threading...

bfd/ChangeLog:

        * coff-rs6000.c (rs6000coff_vec): Set _close_and_cleanup
        field to _bfd_archive_close_and_cleanup.
        (pmac_xcoff_vec): Likewise.
2012-10-16 22:47:03 +00:00
Yufeng Zhang
bb3f9ed8ba Fixed AArch64 TLS relocation resolution.
bfd/

	* elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for
	R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2,
	R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
	R_AARCH64_TLSLE_ADD_TPREL_HI12.
	(elf64_aarch64_tlsdesc_howto_table): Fix shift value for
	R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1.
	(elf64_aarch64_final_link_relocate): Add signed_addend when resolving
	AARCH64_TLSLE_*_TPREL_* relocations.

	ld/testsuite/

	* ld-aarch64/tlsle-symbol-offset.s: New file.
	* ld-aarch64/tlsle-symbol-offset.d: New file.
	* ld-aarch64/aarch64-elf.exp: Add tlsle-symbol-offset test.
2012-10-16 16:36:50 +00:00
Alan Modra
65e911f9f0 * elf32-xtensa.c (free_section_cache): Renamed from
clear_section_cache.  Don't zero cache.
	(section_cache_section): Remove ineffectual zero of cache.
	Call init_section_cache instead.
2012-10-16 01:42:42 +00:00
Alan Modra
60151bd509 daily update 2012-10-15 23:00:04 +00:00
Doug Evans
a9a72a6552 * elf.c (special_sections_d): Add comment. 2012-10-15 20:36:12 +00:00
Alan Modra
5a6c2d4f39 daily update 2012-10-14 23:00:04 +00:00
Alan Modra
499a7a6c74 daily update 2012-10-13 23:00:04 +00:00
H.J. Lu
3cf9e6c408 Replace -ldl with @lt_cv_dlopen_libs@
* Makefile.am (LIBDL): Replace -ldl with @lt_cv_dlopen_libs@.
	* configure.in (lt_cv_dlopen_libs): AC_SUBST.
	* Makefile.in: Regenerated.
	* configure: Likewise.
2012-10-13 14:17:14 +00:00
Alan Modra
5491ebdaa6 daily update 2012-10-12 23:00:05 +00:00
Alan Modra
0b901e182f daily update 2012-10-11 23:00:05 +00:00
Alan Modra
0a2244151b daily update 2012-10-10 23:00:05 +00:00
Alan Modra
45321653b1 daily update 2012-10-09 23:00:05 +00:00
Alan Modra
427a6345b7 daily update 2012-10-08 23:00:05 +00:00
Alan Modra
f073ced36d PR binutils/14662
* elf.c (_bfd_elf_make_section_from_shdr): Treat .gdb_index as
	SEC_DEBUGGING.
2012-10-07 23:59:26 +00:00
Alan Modra
0f4058b697 daily update 2012-10-07 23:00:05 +00:00
Alan Modra
706c84260e daily update 2012-10-06 23:00:05 +00:00
Alan Modra
39dc86500a daily update 2012-10-06 00:00:04 +00:00
Alan Modra
fda1189bbc daily update 2012-10-05 00:00:04 +00:00
Alan Modra
e1a5fb8d37 daily update 2012-10-04 00:00:04 +00:00
Alan Modra
a330419054 daily update 2012-10-03 00:00:04 +00:00
Alan Modra
38981e1608 daily update 2012-10-02 00:00:04 +00:00
Alan Modra
ed8960ecbc daily update 2012-10-01 00:00:04 +00:00
Alan Modra
0b9b36904a daily update 2012-09-30 00:00:04 +00:00
Alan Modra
f49004d3f0 daily update 2012-09-29 00:00:04 +00:00
Alan Modra
9782f08bbd daily update 2012-09-28 00:00:04 +00:00
Alan Modra
ce14842f78 daily update 2012-09-27 00:00:04 +00:00
Alan Modra
60958081ea daily update 2012-09-26 00:00:04 +00:00