Apparently gcc 4 aligns the input .ctors sections on 4 byte boundaries,

which could cause the __ctor_list pointer to be off.

PS: We can get rid of most of the ld scripts. ATM only kernel.ld,
boot_loader.ld, and add-on.ld are still in use. The latter one probably
unnecessarily.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14905 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2005-11-13 21:08:15 +00:00
parent 466871cc93
commit 22671ef7cf
3 changed files with 3 additions and 0 deletions

View File

@ -44,6 +44,7 @@ SECTIONS
__data_start = .;
.data : { *(.data .gnu.linkonce.d.*) }
. = ALIGN(0x4);
__ctor_list = .;
.ctors : { *(.ctors) }
__ctor_end = .;

View File

@ -9,6 +9,7 @@ SECTIONS
/* text/read-only data */
.text : { *(.text .gnu.linkonce.t.*) }
. = ALIGN(0x4);
__ctor_list = .;
.ctors : { *(.ctors) }
__ctor_end = .;

View File

@ -44,6 +44,7 @@ SECTIONS
__data_start = .;
.data : { *(.data .gnu.linkonce.d.*) }
. = ALIGN(0x4);
__ctor_list = .;
.ctors : { *(.ctors) }
__ctor_end = .;