bfd/
authorNathan Sidwell <nathan@codesourcery.com>
Tue, 23 Oct 2012 09:33:56 +0000 (09:33 +0000)
committerNathan Sidwell <nathan@codesourcery.com>
Tue, 23 Oct 2012 09:33:56 +0000 (09:33 +0000)
commit04c3a75556c018feb1f609404c627414a7ef672e
tree16a4265a55a0a6827b7315dd44f2ac74c7b2bd93
parentf6fbab7d1b396b1ee576937b53bb0858c8f895d5
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.
39 files changed:
bfd/ChangeLog
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/elf-bfd.h
bfd/elf.c
bfd/elf32-bfin.c
bfd/elf32-frv.c
bfd/elf32-lm32.c
bfd/elf32-sh.c
bfd/elf32-tic6x.c
bfd/elflink.c
bfd/elfxx-target.h
include/ChangeLog
include/bfdlink.h
ld/ChangeLog
ld/emultempl/elf32.em
ld/ld.texinfo
ld/testsuite/ChangeLog
ld/testsuite/ld-elf/binutils.exp
ld/testsuite/ld-elf/elf.exp
ld/testsuite/ld-elf/orphan-region.d
ld/testsuite/ld-elf/stack-exec.rd [new file with mode: 0644]
ld/testsuite/ld-elf/stack-size.rd [new file with mode: 0644]
ld/testsuite/ld-elf/stack.s [new file with mode: 0644]
ld/testsuite/ld-scripts/empty-aligned.d
ld/testsuite/ld-sh/fdpic-stack-set.d [new file with mode: 0644]
ld/testsuite/ld-tic6x/shlib-1.rd
ld/testsuite/ld-tic6x/shlib-1b.rd
ld/testsuite/ld-tic6x/shlib-1r.rd
ld/testsuite/ld-tic6x/shlib-1rb.rd
ld/testsuite/ld-tic6x/shlib-app-1.rd
ld/testsuite/ld-tic6x/shlib-app-1b.rd
ld/testsuite/ld-tic6x/shlib-app-1r.rd
ld/testsuite/ld-tic6x/shlib-app-1rb.rd
ld/testsuite/ld-tic6x/shlib-noindex.rd
ld/testsuite/ld-tic6x/static-app-1.rd
ld/testsuite/ld-tic6x/static-app-1b.rd
ld/testsuite/ld-tic6x/static-app-1r.rd
ld/testsuite/ld-tic6x/static-app-1rb.rd
This page took 0.031864 seconds and 4 git commands to generate.