Andrew:
   This patch is good. Reviewed-by: Gao, Liming <[email protected]>

From: Andrew Fish [mailto:[email protected]]
Sent: Saturday, November 08, 2014 9:10 AM
To: [email protected]
Subject: Re: [edk2] MdePkg patches to fix Xcode dead stripping issues.

Liming,

Here is the updated patch for the MdePkg, one patch per lib.

~/work/src/edk2(ASM_FUNCTION_REMOVE_IF_UNREFERENCED)>find MdePkg  -iname '*.S' 
-exec grep -L ASM_FUNCTION_REMOVE_IF_UNREFERENCED  {} \; | grep Ia32
~/work/src/edk2(ASM_FUNCTION_REMOVE_IF_UNREFERENCED)>find MdePkg  -iname '*.S' 
-exec grep -L ASM_FUNCTION_REMOVE_IF_UNREFERENCED  {} \; | grep X64
~/work/src/edk2(ASM_FUNCTION_REMOVE_IF_UNREFERENCED)>

Thanks,

Andrew Fish



On Nov 7, 2014, at 2:30 AM, Andrew Fish 
<[email protected]<mailto:[email protected]>> wrote:


On Nov 6, 2014, at 9:23 PM, Gao, Liming 
<[email protected]<mailto:[email protected]>> wrote:

Andrew:
  Is this a full list? I find some missing .S files in MdePkg, such as 
BaseCpuLib/X64/CpuSleep.S, BaseMemoryLibSse2/X64/ScanMem8.S.


Liming,

I might have missed some, as initially I was looking at the build output map 
files to target the fixes. I write a script to scan the .S files, and update 
the patchs.

Thanks,

Andrew Fish


Thanks
Liming
From: Andrew Fish [mailto:[email protected]]
Sent: Friday, November 07, 2014 3:15 AM
To: [email protected]<mailto:[email protected]>
Subject: [edk2] MdePkg patches to fix Xcode dead stripping issues.

For an assembly function to be stripped by the Xcode linker the .S file must 
contain the .subsections_via_symbols directive. The edk2 abstracts this away 
via ASM_FUNCTION_REMOVE_IF_UNREFERENCED.

If the .S does not contain a ASM_FUNCTION_REMOVE_IF_UNREFERENCED, then when 
this library is included those assemble functions always end up in the final 
image even if they are not called. If there are unreferenced intermediate 
symbols that do not start with L, that are not accessed then the the code from 
that label to the next label will be removed. Thus multiple assembly functions 
can be in a single file and each one gets dead stripped independent.

The patch should be low risk as ASM_FUNCTION_REMOVE_IF_UNREFERENCED is mapped 
to nothing on assemblers other than Xcode.

Thanks,

Andrew Fish

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to