User Details
- User Since
- Mar 16 2022, 11:17 AM (15 w, 12 h)
Sun, Jun 26
Thu, Jun 23
Hot code will always be placed together, so where it starts impact how many pages it will occupy. Moving it towards the beginning of the output section increases the possibility that one less page will be taken.
I am not sure this is true.
For -z separate-code layout, PT_LOAD program header has an aligned start address. I agree that placing hot code at the start may potentially remove one hot page.
For -z noseparate-code layout, I think we can construct a case that placing hot code at the start may use one more page.This is to follow what ordering implies. For CISC machine target the linker won't do anything but just strictly follow the specified order.
Another way to look at the logic in this code is that, if no branch thunk is required, then to symbol ordering there is no difference between targeting RISC machine and CISC machine. While for CISC machine we just simply follow what ordering says, we should do the same for RISC machine as well.
Wed, Jun 22
Rewrite the test cases using the split-file feature
Add a test case to verify the behavior when branch thunk might be needed
Address review feedback