pkarashchenko commented on code in PR #11281: URL: https://github.com/apache/nuttx/pull/11281#discussion_r1408273255
########## libs/libc/machine/arm/armv6-m/arch_elf.c: ########## @@ -185,15 +175,29 @@ int up_relocate(const Elf32_Rel *rel, const Elf32_Sym *sym, uintptr_t addr) case R_ARM_ABS32: case R_ARM_TARGET1: /* New ABI: TARGET1 always treated as ABS32 */ { - binfo("Performing ABS32 link at addr=%08lx [%08lx] " - "to sym=%p st_value=%08lx\n", - (long)addr, (long)(*(uint32_t *)addr), sym, - (long)sym->st_value); + binfo("Performing ABS32 link " + "at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", Review Comment: Why not `"0x08"PRIx32`? ########## libs/libc/machine/arm/armv6-m/arch_elf.c: ########## @@ -216,12 +220,12 @@ int up_relocate(const Elf32_Rel *rel, const Elf32_Sym *sym, uintptr_t addr) * lower_insn: * * 1 1 1 1 1 1 - * 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 Instructions + * 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 Instructions * +---+------------------------------------------------+ * |OP | | 32-Bit * +---+--+---+---+---+---------------------------------+ - * |1 1 |J1 | 1 |J2 | imm11 | BL - * +------+---+---+---+---------------------------------+ + * |1 1 |J1 | 1 |J2 | imm11 | BL + * +------+---+---+---+--------------------------------+ Review Comment: GitHub preview shows that `-` is needed here. Please make sure that it is well aligned ########## libs/libc/machine/arm/armv6-m/arch_elf.c: ########## @@ -351,10 +357,10 @@ int up_relocate(const Elf32_Rel *rel, const Elf32_Sym *sym, uintptr_t addr) case R_ARM_MOVW_ABS_NC: case R_ARM_MOVT_ABS: { - binfo("Performing MOVx_ABS [%d] link " + binfo("Performing MOVx_ABS [%" PRId32 "] link " "at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", Review Comment: same ########## libs/libc/machine/arm/armv6-m/arch_elf.c: ########## @@ -185,15 +175,29 @@ int up_relocate(const Elf32_Rel *rel, const Elf32_Sym *sym, uintptr_t addr) case R_ARM_ABS32: case R_ARM_TARGET1: /* New ABI: TARGET1 always treated as ABS32 */ { - binfo("Performing ABS32 link at addr=%08lx [%08lx] " - "to sym=%p st_value=%08lx\n", - (long)addr, (long)(*(uint32_t *)addr), sym, - (long)sym->st_value); + binfo("Performing ABS32 link " + "at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + (long)addr, (long)(*(uint32_t *)addr), + sym, (long)sym->st_value); *(uint32_t *)addr += sym->st_value; } break; +#ifdef CONFIG_ARMV7M_TARGET2_PREL + case R_ARM_TARGET2: /* TARGET2 is a platform-specific relocation: gcc-arm-none-eabi + * performs a self relocation */ + { + binfo("Performing TARGET2 link " + "at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", Review Comment: same -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org