2012-02-15 23:51:16 +00:00
|
|
|
/*
|
|
|
|
* decls for symbols defined in the linker script
|
|
|
|
*
|
|
|
|
* Copyright (c) 2012 The Chromium OS Authors.
|
|
|
|
*
|
|
|
|
* Licensed under the GPL-2 or later.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SANDBOX_SECTIONS_H
|
|
|
|
#define __SANDBOX_SECTIONS_H
|
|
|
|
|
2013-03-05 14:39:37 +00:00
|
|
|
#include <asm-generic/sections.h>
|
|
|
|
|
2013-12-03 23:43:23 +00:00
|
|
|
struct sandbox_cmdline_option;
|
2012-02-15 23:51:16 +00:00
|
|
|
|
2021-05-20 11:24:06 +00:00
|
|
|
static inline struct sandbox_cmdline_option **
|
|
|
|
__u_boot_sandbox_option_start(void)
|
|
|
|
{
|
|
|
|
static char start[0] __aligned(4) __attribute__((unused))
|
2022-05-30 10:00:03 +00:00
|
|
|
__section("_u_boot_sandbox_getopt_start");
|
2021-05-20 11:24:06 +00:00
|
|
|
|
|
|
|
return (struct sandbox_cmdline_option **)&start;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline struct sandbox_cmdline_option **
|
|
|
|
__u_boot_sandbox_option_end(void)
|
|
|
|
{
|
|
|
|
static char end[0] __aligned(4) __attribute__((unused))
|
2022-05-30 10:00:03 +00:00
|
|
|
__section("_u_boot_sandbox_getopt_end");
|
2021-05-20 11:24:06 +00:00
|
|
|
|
|
|
|
return (struct sandbox_cmdline_option **)&end;
|
|
|
|
}
|
2012-02-15 23:51:16 +00:00
|
|
|
|
|
|
|
static inline size_t __u_boot_sandbox_option_count(void)
|
|
|
|
{
|
2021-05-20 11:24:06 +00:00
|
|
|
return __u_boot_sandbox_option_end() - __u_boot_sandbox_option_start();
|
2012-02-15 23:51:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|