If you get this build error "unresolved external _memset in aLibrary.lib
(aSource.obj)"
It takes a bit of time to solve because the build log doesn't provide a
detailed clue. One way the issue can show up is when you are looping over an
array and setting the array item to 0. The compiler decides to use its
intrinsic function _memset to set the array memory block to 0 instead of
setting each item to 0.
Offending code
Corrected code
MyMemSet((UINT8 *) &myarray, 0, sizeof(myarray));
for (x = 0; x < MAX_X; x++) {
for (y = 0; y < MAX_Y; y++) {
myarray[x][y] = 0;
} // y loop
} // x loop
You can track down the issue if you modify the library INF and add /FAcs build
flag, e.g.
[BuildOptions.common]
MSFT:*_*_*_CC_FLAGS = /FAcs
You can find where the compiler used its intrinsic function _memset as
disassembly mixed with source code. View the file
Build\YourPkg\<target>_<toolchain>\aPkg\Library\aLibrary\aLibrary\aSource.cod
and search for _memset. The .cod file lists source line numbers to enable you
to find where _memset is being used.
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel