assembly - GNU Assembler adds uncessary padding to the end of the section -


consider following assembler code snipper gnu assembler:

.section .text .align 4 .string "text" 

without padding, result in section of 5 bytes alignment of 2^4 = 16. however, verified gnu assembler (arm target) adds padding end of section such section's length multiple of 16. seems unnecessary alignment guarantee beginning of section, not end. why assembler add padding @ end? can disabled?

put above assembler snipper in file called test.s , run following:

arm-none-eabi-gcc -c -o test.o test.s arm-none-eabi-objdump -x test.o 

observe alignment of text section 2^4=16 requested , size of .text section 0x10 instead of 5.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -