cbfstool: Remove location pointer from parse_elf_to_stage()
The *location argument to parse_elf_to_stage() is a relic from code all the way back to 2009 where this function was still used to parse XIP stages. Nowadays we have a separate parse_elf_to_xip_stage() for that, so there is no need to heed XIP concerns here. Having a pointer to represent the location in flash is absolutely irrelevant to a non-XIP stage, and it is used incorrectly -- we just get lucky that no code path in cbfstool can currently lead to that value being anything other than 0, otherwise the adjustment of data_start to be no lower than *location could easily screw things up. This patch removes it. Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: Ia7f850c0edd7536ed3bef643efaae7271599313d Reviewed-on: https://review.coreboot.org/c/coreboot/+/49369 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
@@ -174,8 +174,7 @@ int parse_flat_binary_to_payload(const struct buffer *input,
|
||||
enum cbfs_compression algo);
|
||||
/* cbfs-mkstage.c */
|
||||
int parse_elf_to_stage(const struct buffer *input, struct buffer *output,
|
||||
enum cbfs_compression algo, uint32_t *location,
|
||||
const char *ignore_section);
|
||||
enum cbfs_compression algo, const char *ignore_section);
|
||||
/* location is TOP aligned. */
|
||||
int parse_elf_to_xip_stage(const struct buffer *input, struct buffer *output,
|
||||
uint32_t *location, const char *ignore_section);
|
||||
|
Reference in New Issue
Block a user