mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
f2c83d2f67
This commit extracts a plain `struct` from the `MetaAddress` class. This enables us to use `MetaAddress` from C and therefore, runtime. The definition of such `struct`, `PlainMetaAddress`, is in `PlainMetaAddress.h`, which is included by `early-linked.c`. A function to print the content of a `PlainMetaAddress` has also been introduced. Also, anticipating the linkage of `early-linked.c` triggered a superflous assertion in `CPUStateAccessAnalysis`. This commit removes it.
19 lines
478 B
C
19 lines
478 B
C
/*
|
|
* This file is distributed under the MIT License. See LICENSE.md for details.
|
|
*/
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "revng/Runtime/PlainMetaAddress.h"
|
|
|
|
#include "support.h"
|
|
|
|
PlainMetaAddress metaaddress_type_holder;
|
|
|
|
// The only purpose of this function is keeping alive the references to some
|
|
// symbols that are needed by revng
|
|
intptr_t ignore(void) {
|
|
return (intptr_t) &saved_registers + (intptr_t) &setjmp
|
|
+ (intptr_t) &jmp_buffer + (intptr_t) &is_executable;
|
|
}
|