diff options
| author | Gary Lin <glin@suse.com> | 2021-06-16 16:13:32 +0800 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2021-07-20 09:51:22 -0400 |
| commit | 34e3ef205c5d65139eacba8891fa773c03174679 (patch) | |
| tree | 0c683f95ac56abba5841d499dc80d9ae4a271727 /lib/variables.c | |
| parent | ada7ff69bd8a95614aa63dd618764daf428f235d (diff) | |
| download | efi-boot-shim-34e3ef205c5d65139eacba8891fa773c03174679.tar.gz efi-boot-shim-34e3ef205c5d65139eacba8891fa773c03174679.zip | |
arm/aa64: fix the size of .rela* sections
The previous commit(*) merged .rel* and .dyn* into .rodata, and this
made ld to generate the wrong size for .rela* sections that covered
other unrelated sections. When the EFI image was loaded, _relocate()
went through the unexpected data and may cause unexpected crash.
This commit moves .rel* and .dyn* out of .rodata in the ld script but
also moves the related variables, such as _evrodata, _rodata_size,
and _rodata_vsize, to the end of the new .dyn section, so that the
crafted pe-coff section header for .rodata still covers our new
.rela and .dyn sections.
(*) 212ba30544f ("arm/aa64 targets: put .rel* and .dyn* in .rodata")
Fix issue: https://github.com/rhboot/shim/issues/371
Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'lib/variables.c')
0 files changed, 0 insertions, 0 deletions
