|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH v2 2/6] plat: Replace 0x1000 / 4096 with __PAGE_SIZE
This patch seems ok.
Reviewed-by: Costin Lupu <costin.lupu@xxxxxxxxx>
On 5/24/19 3:11 PM, Florian Schmidt wrote:
> Now that we have preprocessor support, we can use it to make some of
> these numbers more expressive.
>
> Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>
> ---
> plat/kvm/x86/link64.lds.S | 9 +++++----
> plat/xen/arm/link32.lds.S | 6 +++---
> plat/xen/x86/link64.lds.S | 7 ++++---
> 3 files changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/plat/kvm/x86/link64.lds.S b/plat/kvm/x86/link64.lds.S
> index 5c63e4af..011e6232 100644
> --- a/plat/kvm/x86/link64.lds.S
> +++ b/plat/kvm/x86/link64.lds.S
> @@ -23,6 +23,7 @@
> * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> */
>
> +#include <uk/arch/limits.h> /* for __PAGE_SIZE */
> #include <common.lds.h>
>
> ENTRY(_libkvmplat_entry)
> @@ -48,7 +49,7 @@ SECTIONS
> CTORTAB_SECTION
>
> /* Read-only data */
> - . = ALIGN(0x1000);
> + . = ALIGN(__PAGE_SIZE);
> _rodata = .;
> .rodata :
> {
> @@ -76,7 +77,7 @@ SECTIONS
> _ectors = .;
>
> /* Read-write data (initialized) */
> - . = ALIGN(0x1000);
> + . = ALIGN(__PAGE_SIZE);
> _data = .;
> .data :
> {
> @@ -86,14 +87,14 @@ SECTIONS
> _edata = .;
>
> /* Read-write data (uninitialized) */
> - . = ALIGN(0x1000);
> + . = ALIGN(__PAGE_SIZE);
> __bss_start = .;
> .bss :
> {
> *(.bss)
> *(.bss.*)
> *(COMMON)
> - . = ALIGN(0x1000);
> + . = ALIGN(__PAGE_SIZE);
> }
>
> _end = .;
> diff --git a/plat/xen/arm/link32.lds.S b/plat/xen/arm/link32.lds.S
> index 8bbefa64..642b5eb3 100644
> --- a/plat/xen/arm/link32.lds.S
> +++ b/plat/xen/arm/link32.lds.S
> @@ -58,7 +58,7 @@ SECTIONS
> *(.rodata)
> *(.rodata.*)
> }
> - . = ALIGN(4096);
> + . = ALIGN(__PAGE_SIZE);
> _erodata = .;
>
> CTORTAB_SECTION
> @@ -78,7 +78,7 @@ SECTIONS
> KEEP (*(.init_array .ctors))
> PROVIDE_HIDDEN (__init_array_end = .);
> }
> - . = ALIGN(4096);
> + . = ALIGN(__PAGE_SIZE);
> _ectors = .;
>
> /* Data */
> @@ -99,7 +99,7 @@ SECTIONS
> *(.bss)
> *(.bss.*)
> }
> - . = ALIGN(4096);
> + . = ALIGN(__PAGE_SIZE);
> _end = . ;
>
>
> diff --git a/plat/xen/x86/link64.lds.S b/plat/xen/x86/link64.lds.S
> index 116a12e8..ff69f830 100644
> --- a/plat/xen/x86/link64.lds.S
> +++ b/plat/xen/x86/link64.lds.S
> @@ -23,6 +23,7 @@
> */
> /* Taken from Mini-OS */
>
> +#include <uk/arch/limits.h> /* for __PAGE_SIZE */
> #include <common.lds.h>
>
> OUTPUT_FORMAT("elf64-x86-64")
> @@ -50,7 +51,7 @@ SECTIONS
> *(.rodata)
> *(.rodata.*)
> }
> - . = ALIGN(4096);
> + . = ALIGN(__PAGE_SIZE);
> _erodata = .;
>
> . = ALIGN(0x8);
> @@ -68,7 +69,7 @@ SECTIONS
> KEEP (*(.init_array .ctors))
> PROVIDE_HIDDEN (__init_array_end = .);
> }
> - . = ALIGN(4096);
> + . = ALIGN(__PAGE_SIZE);
> _ectors = .;
>
> /* Data */
> @@ -89,7 +90,7 @@ SECTIONS
> *(.bss)
> *(.bss.*)
> }
> - . = ALIGN(4096);
> + . = ALIGN(__PAGE_SIZE);
> _end = . ;
>
> /* Sections to be discarded */
>
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |