diff options
| author | Shankar Easwaran <shankare@codeaurora.org> | 2015-02-01 03:21:57 +0000 |
|---|---|---|
| committer | Shankar Easwaran <shankare@codeaurora.org> | 2015-02-01 03:21:57 +0000 |
| commit | 0f011fdcdf3a3e03c3d75f6df0176e58d2dfab97 (patch) | |
| tree | d84a443ea64778fd38b59029a5a19728b52861db | |
| parent | 0a13acfa8b6f4a2cef8706b7506f9c50f1448ba4 (diff) | |
| download | bcm5719-llvm-0f011fdcdf3a3e03c3d75f6df0176e58d2dfab97.tar.gz bcm5719-llvm-0f011fdcdf3a3e03c3d75f6df0176e58d2dfab97.zip | |
[ELF] Set order of ctors/dtors section
llvm-svn: 227707
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/DefaultLayout.h | 2 | ||||
| -rw-r--r-- | lld/test/elf/Mips/ctors-order.test | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/ELF/DefaultLayout.h b/lld/lib/ReaderWriter/ELF/DefaultLayout.h index 9ebcf24db38..efd173c0dbf 100644 --- a/lld/lib/ReaderWriter/ELF/DefaultLayout.h +++ b/lld/lib/ReaderWriter/ELF/DefaultLayout.h @@ -363,6 +363,8 @@ Layout::SectionOrder DefaultLayout<ELFT>::getSectionOrder( .StartsWith(".init_array", ORDER_INIT_ARRAY) .StartsWith(".fini_array", ORDER_FINI_ARRAY) .StartsWith(".dynamic", ORDER_DYNAMIC) + .StartsWith(".ctors", ORDER_CTORS) + .StartsWith(".dtors", ORDER_DTORS) .Default(ORDER_DATA); case DefinedAtom::typeZeroFill: diff --git a/lld/test/elf/Mips/ctors-order.test b/lld/test/elf/Mips/ctors-order.test index 9c2d0d12d1e..344dcd5fc51 100644 --- a/lld/test/elf/Mips/ctors-order.test +++ b/lld/test/elf/Mips/ctors-order.test @@ -51,7 +51,7 @@ # CHECK-NEXT: section-name: .ctors # RAW: Contents of section .ctors: -# RAW-NEXT: 2000 ffffffff 11111111 22222222 00000000 +# RAW-NEXT: 1000 ffffffff 11111111 22222222 00000000 # crtbeginS.o --- FileHeader: |

