Currently there''s one bug in tools/firmware/vmxassist/vmxassist.ld. It intends to put all uninitialized globe variables in object files into between _bbss and _ebss. In head.S, it sets memory between _bbss and _ebss to 0. But for gcc, compiler will put uninitialized globe variables (e.g: int a;) into a section called COMMON, rather than .bss, and linker collects variables in COMMON section of all objects and puts them in .bss. So it results in uninitialized globe variables are behind _ebss, rather than in front of it, which will not be set to 0. This patch fixes it. Thanks, Xiaowei _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 14/8/06 7:56 am, "Yang, Xiaowei" <xiaowei.yang@intel.com> wrote:> Currently there''s one bug in tools/firmware/vmxassist/vmxassist.ld. It > intends to put all uninitialized globe variables in object files into > between _bbss and _ebss. In head.S, it sets memory between _bbss and > _ebss to 0. But for gcc, compiler will put uninitialized globe variables > (e.g: int a;) into a section called COMMON, rather than .bss, and linker > collects variables in COMMON section of all objects and puts them in > .bss. So it results in uninitialized globe variables are behind _ebss, > rather than in front of it, which will not be set to 0. This patch fixes > it.Usual way around this is to define the start/end labels outside the .section{} region. This is what the Xen and Linux linker scripts do, so it''s the fix I checked in for this issue. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
>> Currently there''s one bug in tools/firmware/vmxassist/vmxassist.ld.It>> intends to put all uninitialized globe variables in object files into >> between _bbss and _ebss. In head.S, it sets memory between _bbss and >> _ebss to 0. But for gcc, compiler will put uninitialized globevariables>> (e.g: int a;) into a section called COMMON, rather than .bss, andlinker>> collects variables in COMMON section of all objects and puts them in >> .bss. So it results in uninitialized globe variables are behind_ebss,>> rather than in front of it, which will not be set to 0. This patchfixes>> it. > >Usual way around this is to define the start/end labels outside the >.section{} region. This is what the Xen and Linux linker scripts do, soit''s>the fix I checked in for this issue. >Yes, this is a more general solution! Thanks, -Xiaowei _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel