On 07.07.18 15:36, Heinrich Schuchardt wrote:
> The function crc32() is needed by the EFI subsystem at runtime. So it has
> to be linked into the runtime section together with all dependencies.
> 
> Eliminate empty define ZEXPORT.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de>
> ---
> v3
>       new patch
> ---
>  lib/crc32.c | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/crc32.c b/lib/crc32.c
> index 7f545fde4a..bcb140ba06 100644
> --- a/lib/crc32.c
> +++ b/lib/crc32.c
> @@ -12,6 +12,7 @@
>  #include <arpa/inet.h>
>  #else
>  #include <common.h>
> +#include <efi_loader.h>
>  #endif
>  #include <compiler.h>
>  #include <u-boot/crc.h>
> @@ -21,8 +22,11 @@
>  #endif
>  #include "u-boot/zlib.h"
>  
> -#define local static
> -#define ZEXPORT      /* empty */
> +#ifdef USE_HOSTCC
> +#define __efi_runtime
> +#define __efi_runtime_data
> +#endif
> +#define local static __efi_runtime_data

This pushes functions into the data section - which is probably not what
we want. Eventually we may want to have NX protection, so we need to
separate code and data as well as we can.


Alex
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to