| #
de5943f9 |
| 31-Jan-2025 |
Olivier Deprez <olivier.deprez@arm.com> |
Merge changes from topic "Id18b0341353ffc00e44e2d3c643ccdd05cc20c4f" into integration
* changes: fix(rk3399): fix unquoted .incbin for clang fix(rk3399): mark INCBIN-generated sections as SHF_AL
Merge changes from topic "Id18b0341353ffc00e44e2d3c643ccdd05cc20c4f" into integration
* changes: fix(rk3399): fix unquoted .incbin for clang fix(rk3399): mark INCBIN-generated sections as SHF_ALLOC
show more ...
|
| #
ddd70f19 |
| 04-Nov-2024 |
Quentin Schulz <quentin.schulz@cherry.de> |
fix(rk3399): fix unquoted .incbin for clang
While GCC doesn't complain about anything for .incbin, clang does: """ <instantiation>:6:10: error: expected string in '.incbin' directive .incbin /build
fix(rk3399): fix unquoted .incbin for clang
While GCC doesn't complain about anything for .incbin, clang does: """ <instantiation>:6:10: error: expected string in '.incbin' directive .incbin /build/rk3399/release/m0/rk3399m0.bin ^ plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:20:1: note: while in macro instantiation INCBIN """/build/rk3399/release/m0/rk3399m0.bin""", "rk3399m0_bin", ".sram.incbin" ^ <instantiation>:6:10: error: expected string in '.incbin' directive .incbin /build/rk3399/release/m0/rk3399m0pmu.bin ^ plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:21:1: note: while in macro instantiation INCBIN """/build/rk3399/release/m0/rk3399m0pmu.bin""", "rk3399m0pmu_bin", ".pmusram.incbin" ^ """
Adding quotes around \file in .incbin fixes the clang issue but GCC now complains: """ plat/rockchip/rk3399/drivers/pmu/pmu_fw.S: Assembler messages: plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:14: Error: junk at end of line, first unrecognized character is `/' plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:20: Info: macro invoked from here plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:14: Error: unable to include `./' plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:20: Info: macro invoked from here plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:14: Error: junk at end of line, first unrecognized character is `/' plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:21: Info: macro invoked from here plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:14: Error: unable to include `./' plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:21: Info: macro invoked from here """
Considering that the symbol is defined with escaped quotes, it is probably safe to remove the double quotes around the INBCIN macro parameter, so let's do that to make both compilers happy.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Change-Id: Id18b0341353ffc00e44e2d3c643ccdd05cc20c4f
show more ...
|
| #
279cad8e |
| 04-Nov-2024 |
Chris Kay <chris.kay@arm.com> |
fix(rk3399): mark INCBIN-generated sections as SHF_ALLOC
When assembling with Clang, sections generated via the `INCBIN` macro are not assigned the `SHF_ALLOC` attribute, and the linker therefore do
fix(rk3399): mark INCBIN-generated sections as SHF_ALLOC
When assembling with Clang, sections generated via the `INCBIN` macro are not assigned the `SHF_ALLOC` attribute, and the linker therefore does not know to include them in the binary.
This change is simple: explicitly tell the assembler that the section should have the `SHF_ALLOC` attribute.
For reference: https://man7.org/linux/man-pages/man5/elf.5.html
> SHF_ALLOC > This section occupies memory during process execution. Some > control sections do not reside in the memory image of an object > file. This attribute is off for those sections.
Change-Id: I626162eae9030b5ffbd03af2be76f89a248af9ca Signed-off-by: Chris Kay <chris.kay@arm.com> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
show more ...
|
| #
9a79c9e4 |
| 04-Mar-2024 |
Bipin Ravi <bipin.ravi@arm.com> |
Merge changes from topic "fix-lto-build-all" into integration
* changes: build(fpga): correctly handle gcc as linker for LTO fix(build): enforce single partition for LTO build fix(rockchip): a
Merge changes from topic "fix-lto-build-all" into integration
* changes: build(fpga): correctly handle gcc as linker for LTO fix(build): enforce single partition for LTO build fix(rockchip): add support for building with LTO enabled
show more ...
|
| #
e5e9ccdb |
| 08-Dec-2023 |
Andrey Skvortsov <andrej.skvortzov@gmail.com> |
fix(rockchip): add support for building with LTO enabled
Using the asm .incbin statement in C sources breaks gcc wrapper. Build fails with a following errors: /tmp/ccRXHTU4.s: Assembler messages:
fix(rockchip): add support for building with LTO enabled
Using the asm .incbin statement in C sources breaks gcc wrapper. Build fails with a following errors: /tmp/ccRXHTU4.s: Assembler messages: /tmp/ccRXHTU4.s:34: Warning: dwarf line number information for .pmusram.incbin ignored ... /tmp/ccRXHTU4.s:2119: Warning: dwarf line number information for .pmusram.incbin ignored /tmp/ccRXHTU4.s:112497: Error: leb128 operand is an undefined symbol: .LVU5 /tmp/ccRXHTU4.s:112498: Error: leb128 operand is an undefined symbol: .LVU6 /tmp/ccRXHTU4.s:112507: Error: leb128 operand is an undefined symbol: .LVU9 ... /tmp/ccRXHTU4.s:115407: Error: leb128 operand is an undefined symbol: .LVU668 /tmp/ccRXHTU4.s:115408: Error: leb128 operand is an undefined symbol: .LVU710 /tmp/ccRXHTU4.s:115409: Error: leb128 operand is an undefined symbol: .LVU713 lto-wrapper: fatal error: aarch64-none-elf-gcc returned 1 exit status compilation terminated. aarch64-none-elf/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status
Fix it in a similar way to what the Linux kernel does, see commit 919aa45e43a84d40c27c83f6117cfa6542cee14e (MODSIGN: Avoid using .incbin in C source). [1]
1. https://lkml.org/lkml/2012/12/4/136
Change-Id: Iecc19729ce59e8c3b3c30fa37b1fddef95e83c96 Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
show more ...
|