This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

.rodata alignment

I'm using gcc on 64-bit Raspberry Pi OS. It gives me doubleword alignment for text strings:

        .text
        .section        .rodata
        .align  3
.LC0:
        .string "Enter one character: "
        .align  3
.LC1:
        .string "You entered: "
        .text
        .align  2
        .global main
        .type   main, %function
main:
I understand the reason for word alignment for the .text. But the documentation says that pointer alignment should be that of the element. The element of a text string is a byte, so why are they using doubleword alignment?