BrianSidebotham/arm-tutorial-rpi

Setting MAXPAGESIZE instead of changing linker script (BMC Part 2 - The C Runtime)

Closed this issue · 1 comments

First off, absolutely love this tutorial!

Not sure this is a huge deal, but in part 2 you adjust the linked script to get rid of an odd page-alignment behavior. This behavior is governed by the PAGESIZE linker constant that can be controlled by a linked '-z max-page-size=' CLI option, which is also described here.
I tried this and the page size was reduced accordingly, yielding a smaller image once the .data section is aligned to the new size.
Perhaps a note in the README would be appropriate?

I compile with a '-c' on arm-none-eabi-gcc and then use the '-z' with arm-none-eabi-ld

@eyalabraham Looks like great info. Haven't seen that option. I'll introduce it at the end of Part-2. I think we remove the customer linker script at the end of part 2 anyway.

Thanks for the heads up.