Skip to content
Commit 12c6dda9 authored by Peter Marheine's avatar Peter Marheine Committed by Carles Cufí
Browse files

gen_relocate_app: restrict relocations to listed files



When using code_data_relocation the script identifies sections that
should be relocated, but cannot guarantee that section names are unique
across all linked files. If a section name is not unique then matching
all sections with that name across all input files will relocate more
data than intended.

As a simple example, if both file1 and file2 contain .rodata.strings
sections, then if gen_relocate_app inspects only file1 it will generate
a linker script fragment `*(.rodata.strings)` that matches both object
files.

This commit changes gen_relocate_app to make the linker match on object
files as well (`*file1.o(.rodata.strings)`) to ensure unwanted sections
don't get relocated.

Signed-off-by: default avatarPeter Marheine <pmarheine@chromium.org>
parent ba66f41e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment