diff options
-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 = .; } |