This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Is it normal that ld promote a section size

Hi there,

In assembly code, I have below two sections generated with gcc lto:

        .section        .bss.usb_qh,"aw",%nobits
        .align  11
        .set    .LANCHOR8,. + 0
        .type   usb_qh, %object
        .size   usb_qh, 768
        .space  768
        .section        .bss.USB_EpStatus,"aw",%nobits
        .align  1
        .set    .LANCHOR3,. + 0
        .type   USB_EpStatus, %object
        .size   USB_EpStatus, 2
        .space  2

Then after link, in final map file, I got:

                0x2000e9aa        0x1 airspy_m0.elf.ltrans1.ltrans.o
 *fill*         0x2000e9ab      0x655
 .bss.usb_qh    0x2000f000      0x800 airspy_m0.elf.ltrans1.ltrans.o
                0x2000f000                usb_qh
                0x2000f800        0x2 airspy_m0.elf.ltrans1.ltrans.o

It looks to me that the size of usb_qh is promoted from 0x300(768)
bytes to 0x800(2048) bytes. The section .bss.UBS_EpStatus can prove
this. IMHO this section should start from 0x2000f300 rather than
0x2000f800. This causes waste of space. Is this normal?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]