diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-07-08 16:29:35 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-07-08 16:29:35 -0700 |
commit | 2df91af910aa3f4e127837b907395758c3e5be14 (patch) | |
tree | ea7b39235483905a23692877989909712f6707fd | |
parent | 5e799e1c94d3ce40162636f11741c5c383930edb (diff) | |
download | syslinux-2df91af910aa3f4e127837b907395758c3e5be14.tar.gz |
syslinux.ld: add support for .ctors and .dtors
We're going to need at least constructors when we start linking in
com32 library code in a serious way.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | core/syslinux.ld | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/core/syslinux.ld b/core/syslinux.ld index 23f74b2f..4906ce4a 100644 --- a/core/syslinux.ld +++ b/core/syslinux.ld @@ -240,12 +240,32 @@ SECTIONS . = ALIGN(4); + __ctors_vma = .; + __ctors_lma = __ctors_vma + __text_lma - __text_vma; + .ctors : AT(__ctors_lma) { + __ctors_start = .; + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + __ctors_end = .; + } + + __dtors_vma = .; + __dtors_lma = __dtors_vma + __text_lma - __text_vma; + .dtors : AT(__dtors_lma) { + __dtors_start = .; + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + __dtors_end = .; + } + + . = ALIGN(4); + __got_vma = .; __got_lma = __got_vma + __text_lma - __text_vma; .got : AT(__got_lma) { __got_start = .; - *(.got.plt) - *(.got) + KEEP (*(.got.plt)) + KEEP (*(.got)) __got_end = .; } |