diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-05-07 14:12:59 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-05-07 14:12:59 +0000 |
commit | 310fd250b9bdab1eae5303f363577e30b2932a77 (patch) | |
tree | 728a50e468368a77342a5f692954d19fc0c938d6 /bfd/bfd-in2.h | |
parent | 70778fc76803fd416f0bb898773811f12baa0714 (diff) | |
download | gdb-310fd250b9bdab1eae5303f363577e30b2932a77.zip gdb-310fd250b9bdab1eae5303f363577e30b2932a77.tar.gz gdb-310fd250b9bdab1eae5303f363577e30b2932a77.tar.bz2 |
Reverse copy .ctors/.dtors sections if needed.
bfd/
2011-05-07 H.J. Lu <hongjiu.lu@intel.com>
PR ld/12730
* elf.c (_bfd_elf_section_offset): Check SEC_ELF_REVERSE_COPY.
* elflink.c (elf_link_input_bfd): Reverse copy .ctors/.dtors
sections if needed.
* section.c (SEC_ELF_REVERSE_COPY): New.
* bfd-in2.h: Regenerated.
ld/testsuite/
2011-05-07 H.J. Lu <hongjiu.lu@intel.com>
PR ld/12730
* ld-elf/elf.exp (array_tests): Add "pr12730".
(array_tests_pie): New.
(array_tests_static): Add -static for "static init array mixed".
Add "static pr12730". Run array_tests_pie for Linux.
* ld-elf/init-mixed.c (ctor1007): Renamed to ...
(ctor1007a): This.
(ctor1007b): New.
(ctors1007): Remove ctor1007. Add ctor1007b and ctor1007a.
(dtor1007): Renamed to ...
(dtor1007a): This.
(dtor1007b): New.
(dtors1007): Remove dtor1007. Add dtor1007b and dtor1007a.
(ctor65535): Renamed to ...
(ctor65535a): This.
(ctor65535b): New.
(ctors65535): Remove ctor65535. Add ctor65535b and ctor65535a.
(dtor65535): Renamed to ...
(dtor65535a): This.
(dtor65535b): New.
(dtors65535): Remove dtor65535. Add dtor65535b and dtor65535a.
* ld-elf/pr12730.cc: New.
* ld-elf/pr12730.out: Likewise.
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r-- | bfd/bfd-in2.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index aa12c8a..5076ccf 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1320,6 +1320,11 @@ typedef struct bfd_section sections. */ #define SEC_COFF_SHARED_LIBRARY 0x4000000 + /* This input section should be copied to output in reverse order + as an array of pointers. This is for ELF linker internal use + only. */ +#define SEC_ELF_REVERSE_COPY 0x4000000 + /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ #define SEC_COFF_SHARED 0x8000000 |