> On Nov 6, 2014, at 9:23 PM, Gao, Liming <liming....@intel.com> 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:af...@apple.com <mailto:af...@apple.com>] 
> Sent: Friday, November 07, 2014 3:15 AM
> To: edk2-devel@lists.sourceforge.net <mailto:edk2-devel@lists.sourceforge.net>
> 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
> edk2-devel@lists.sourceforge.net <mailto:edk2-devel@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/edk2-devel 
> <https://lists.sourceforge.net/lists/listinfo/edk2-devel>

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to