Arm AARCH64 string alignment in .rodata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 64-bit Raspberry Pi OS, gcc aligns strings in the .rodata section on 64-bit boundaries:

       .text
        .section        .rodata
        .align  3
.LC0:
        .string "Enter a number: "
        .align  3
.LC1:
        .string "%i"
        .align  3
.LC2:
        .string "Result: %i\n"
        .text
        .align  2
        .global main
        .type   main, %function
main:

I understand the 32-bit boundary for the .text (32-bit instructions), but the element in a string is a byte. Arm documentation says that array addresses should be aligned at the element size. Why align the first character at a 64-bit boundary? Does this have to do with cache alignment?





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux