sd-boot: Fix PE section parsing

We only need the PE header offset from the DOS header, not
its size. Previously, the section table could be cut off in the middle.

While we are at it, also modernize the remaining code.
This commit is contained in:
Jan Janssen
2021-08-16 10:49:12 +02:00
parent 8908ceb7a8
commit 1328150d85
10 changed files with 152 additions and 104 deletions
-1
View File
@@ -20,7 +20,6 @@
#define _sentinel_ __attribute__((__sentinel__))
#define _destructor_ __attribute__((__destructor__))
#define _deprecated_ __attribute__((__deprecated__))
#define _packed_ __attribute__((__packed__))
#define _malloc_ __attribute__((__malloc__))
#define _weak_ __attribute__((__weak__))
#define _public_ __attribute__((__visibility__("default")))