flat assembler
Message board for the users of flat assembler.
Index
> High Level Languages > [solved]How to use vs2005 option "linker -> function order"? |
Author |
|
donn 29 Mar 2018, 03:36
Hey, I think the order value is preceded with an @ sign, like so:
Code: /SUBSYSTEM:WINDOWS /ORDER:@"C:\Users\D\Desktop\fOrdering.txt" Visual Studio put this in automatically. Without it, I got the same linker error. With it, you may see something like this, depending if the function is re-orderable (not in this case): Code: C:\Users\D\Desktop\fOrdering.txt : warning LNK4065: 'start' cannot be ordered; ignored I think the preceding underscore can be omitted Quote: unless the name starts with a question mark (?) or at sign (@). Reordering seems tricky to get a proper performance boost from, but also seems very useful, good luck with it...! Quote: The /ORDER compiler option allows you to optimize your program's paging behavior by grouping a function together with the functions it calls. You can also group frequently called functions together. These techniques, known as swap tuning or paging optimization, increase the probability that a called function is in memory when it is needed and does not have to be paged from disk. |
|||
29 Mar 2018, 03:36 |
|
vivik 29 Mar 2018, 05:33
Hell yeah, it worked! Thank you!
I've set "linker -> function order" to @$(ProjectDir)functionorder , and I've set the content of functionorder to this: main WndProc@16 Lineend is unix-style, I guess it can read both windows-style (didn't check) and linux-style. I don't really do this for optimization, it just doesn't make sense to me to NOT have main as the very first function. Intel compiler also allows reordering data, and doing all reordering based on profiling information ( https://software.intel.com/en-us/node/696053 ). I don't think any c compiler allows aligning functions by 1024 bytes. Also, I kinda really need to align some global variables by 4096 bytes... This can wait though, doesn't matter. Fasm can do it. Programming without tech support (or more experienced people) is impossible, I had no chance back in the day. |
|||
29 Mar 2018, 05:33 |
|
vivik 31 Mar 2018, 08:34
Oh, I just got this "cannot be ordered; ignored" too. This is because I tried to compile .cpp code instead of .c code. This compiler is quirky like that.
This thread is all about this issue: https://board.flatassembler.net/topic.php?t=20399 |
|||
31 Mar 2018, 08:34 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.