3d312a1 BaseTools GenFw: Fix the issue to update the wrong size as SectionSize

Authored and Committed by Liming Gao 4 years ago
    BaseTools GenFw: Fix the issue to update the wrong size as SectionSize
    
    BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1603
    CLANG9 generated PE image exposes below two issues.
    1. SectionSize is used to copy PE section data. It should be smaller than
    section raw size.
    2. The real data is required to be copied. So, copy the min size of
    VirtualSize and SizeOfRawData.
    
    Signed-off-by: Liming Gao <liming.gao@intel.com>
    Cc: Bob Feng <bob.c.feng@intel.com>
    Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>