diff options
author | Simon Glass | 2022-12-21 16:08:22 -0700 |
---|---|---|
committer | Simon Glass | 2023-01-18 11:49:13 -0700 |
commit | bebc1410ca79f5b8b33ca86b18bd55fd45d13185 (patch) | |
tree | 083fa5914a06f10327bcce78d73a3fd5c2ec4289 /lib | |
parent | 9557592edc82cc690db2e81ef249a772f60078cb (diff) |
trace: Move trace pointer to data section
This can be written before relocation. Move it to the data section, since
accessing BSS before relocation is not permitted.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/trace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/trace.c b/lib/trace.c index 880d90ebd5c..b9dc6d2e4b5 100644 --- a/lib/trace.c +++ b/lib/trace.c @@ -40,7 +40,8 @@ struct trace_hdr { int max_depth; }; -static struct trace_hdr *hdr; /* Pointer to start of trace buffer */ +/* Pointer to start of trace buffer */ +static struct trace_hdr *hdr __section(".data"); static inline uintptr_t __attribute__((no_instrument_function)) func_ptr_to_num(void *func_ptr) |