Skip to content
Commit 0d25da8e authored by Bjorn Andersson's avatar Bjorn Andersson Committed by Bjorn Andersson
Browse files

soc: qcom: mdt_loader: Fix split image detection



The enhanced detection introduced in commit '210d12c8 ("soc: qcom:
mdt_loader: Enhance split binary detection")' requires that all segments
lies within the file on disk.

But the Qualcomm firmware files consistently has a BSS-like segment at
the end, with a p_offset aligned to the next 4k boundary. As the p_size
is 0 and there's nothing to load, the image is not padded to cover this
(empty) segment.

Ignore zero-sized segments when determining if the image is split, to
avoid this problem.

Fixes: 210d12c8 ("soc: qcom: mdt_loader: Enhance split binary detection")
Signed-off-by: default avatarBjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # qrb5165-rb5
Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230612215804.1883458-1-quic_bjorande@quicinc.com
parent e81a16e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment