2

昨天我创建了自己的 u-boot 模块,并希望将文本基地址设置为 0xd0020010。但是编译后,在链接器生成的.map文件中显示是这样的

inker script and memory map

                0x00000000                . = 0x0
                0x00000000                . = ALIGN (0x4)

.text           0xd0020010      0x1f0
                0xd0020010                __image_copy_start = .
 *(.vectors)
 *fill*         0xd0020010       0x10 00
 .vectors       0xd0020020       0x60 arch/arm/lib/built-in.o
                0xd0020020                _start
                0xd0020044                _undefined_instruction
                0xd0020048                _software_interrupt
                0xd002004c                _prefetch_abort
                0xd0020050                _data_abort
                0xd0020054                _not_used
                0xd0020058                _irq
                0xd002005c                _fiq

您可以在 .vectors 部分上方看到,有 16 个字节的 0x00,其名称为“*fill*”。

我的链接脚本是这样的

    SECTIONS
    {
        . = 0x00000000;

        . = ALIGN(4);
        .text :
        {
            __image_copy_start = .;
            *(.vectors)
            CPUDIR/start.o (.text*)
            *(.text*)
        }
      .........

我试图删除 ALIGH(4),但它静止不动。0xd0020010 是对齐地址吗?所以它应该与“ALIGH”无关

虽然这 16 字节的内存被 0x00 填充,这是nop指令,但我仍然想知道为什么会有一个“*fill*”部分。

4

0 回答 0