This is the mail archive of the binutils@sourceware.org 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] |
Hey, This patch adds a new ALIGNTOATLEAST linker script directive. This simplifies some of our linker scripts, and makes them a lot easier to read. I've added a new test, updated the documentation, and checked that there are no test regressions for i686-pc-linux-gnu. Here's the extract from the documentation: --- `ALIGNTOATLEAST(ADDRESS,ALIGN)' If the absolute location counter (.) is less than ADDRESS, then returns ADDRESS aligned to the next ALIGN boundary. If the absolute location counter (.) is greater than ADDRESS, then returns the absolute location counter (.) aligned to the next ALIGN boundary. Here is an example which aligns the start of the output `.dmem' section to at least the address `0x40000000 + 256k', aligned to the next `4' byte boundary. SECTIONS { ... .dmem 0x40000000: { *(.dmem) . = ALIGNTOATLEAST(0x40000000 + 256K, 4); } ... } --- Is that ok? It's my first attempt at submitting a patch, so I also don't have write access. Thanks, Dave.
Attachment:
aligntoatleast.patch
Description: aligntoatleast.patch
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |