X-Git-Url: http://akaros.cs.berkeley.edu/gitweb/?p=akaros.git;a=blobdiff_plain;f=kern%2Flinker_tables.ld;h=f0bef9b37b7e66e5a7e45d3a1ad9b4fe4d6a1f58;hp=87011790d319d781d3814b404c3ac8d468255a2e;hb=190c1a792c1baa3b6545d0454bd3543e712586c1;hpb=874a278e574e9014092468c0908525bc14459940 diff --git a/kern/linker_tables.ld b/kern/linker_tables.ld index 8701179..f0bef9b 100644 --- a/kern/linker_tables.ld +++ b/kern/linker_tables.ld @@ -1,42 +1,46 @@ /* this is INCLUDEd into the arch-specific ld scripts */ - /* Linker-made tables. Our tables (e.g. devtab) are 2^5 aligned, + /* Linker-made tables. Our tables (e.g. devtab) are 2^6 aligned, * independently of us aligning '.'. We align '.' to get the right start, * e.g. __devtabstart. */ - . = ALIGN(32); + . = ALIGN(64); /* We shouldn't have to use PROVIDE, but if we don't, we get the wrong * value for '.'. And items with empty tables get the KLA (basically 0) */ - PROVIDE(__devtabstart = .); - PROVIDE(devtab = .); .devtab : { + PROVIDE(__devtabstart = .); + PROVIDE(devtab = .); *(.devtab) + PROVIDE(__devtabend = .); } - PROVIDE(__devtabend = .); - . = ALIGN(32); - PROVIDE(__linkerfunc1start = .); + /* Not sure if these need to be aligned to 64 bytes or not. We had to + * change the alignment above for the devtab, so we just changed it here + * too, but it's unclear if this is 100% necessary. In any event, it + * doesn't hurt anything, it just wastes some bytes in our binary. */ + . = ALIGN(64); .linkerfunc1 : { + PROVIDE(__linkerfunc1start = .); *(.linkerfunc1) + PROVIDE(__linkerfunc1end = .); } - PROVIDE(__linkerfunc1end = .); - . = ALIGN(32); - PROVIDE(__linkerfunc2start = .); + . = ALIGN(64); .linkerfunc2 : { + PROVIDE(__linkerfunc2start = .); *(.linkerfunc2) + PROVIDE(__linkerfunc2end = .); } - PROVIDE(__linkerfunc2end = .); - . = ALIGN(32); - PROVIDE(__linkerfunc3start = .); + . = ALIGN(64); .linkerfunc3 : { + PROVIDE(__linkerfunc3start = .); *(.linkerfunc3) + PROVIDE(__linkerfunc3end = .); } - PROVIDE(__linkerfunc3end = .); - . = ALIGN(32); - PROVIDE(__linkerfunc4start = .); + . = ALIGN(64); .linkerfunc4 : { + PROVIDE(__linkerfunc4start = .); *(.linkerfunc4) + PROVIDE(__linkerfunc4end = .); } - PROVIDE(__linkerfunc4end = .);