Message ID | CAKv+Gu_LN5AfFpgzm-0VXiT57wdD0Q4Ho4L2zzAAvUbNjTstfA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On 1 August 2016 at 16:49, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote: > On 1 August 2016 at 16:18, Gao, Liming <liming.gao@intel.com> wrote: >> Ard: >> I don't think it is good way to define GCC_VISIBILITY_PROTECTED and apply it in EntryPointLib. We only need to expose _ModuleEntryPoint. It has been specified in LINK_FLAGS in tools_def.txt. Could we also specify its attribute in CC_FLAGS or LINK_FLAGS in tools_def.txt? >> > > It seems this does the trick as well > > diff --git a/BaseTools/Scripts/GccBase.lds b/BaseTools/Scripts/GccBase.lds > index 281af8a9bd33..02387d4f8d6f 100644 > --- a/BaseTools/Scripts/GccBase.lds > +++ b/BaseTools/Scripts/GccBase.lds > @@ -80,3 +80,7 @@ SECTIONS { > *(COMMON) > } > } > + > +VERSION { > + { global: _ModuleEntryPoint*; }; > +}; > > > Note that * at the end: this is necessary since _ModuleEntryPoint will > be called _ModuleEntryPoint.lto_priv.xxx in the LTO objects. > Hmm, looks like I spoke too soon. I don't know what I did wrong, but this does not actually work. -- Ard. _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
On 1 August 2016 at 16:56, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote: > On 1 August 2016 at 16:49, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote: >> On 1 August 2016 at 16:18, Gao, Liming <liming.gao@intel.com> wrote: >>> Ard: >>> I don't think it is good way to define GCC_VISIBILITY_PROTECTED and apply it in EntryPointLib. We only need to expose _ModuleEntryPoint. It has been specified in LINK_FLAGS in tools_def.txt. Could we also specify its attribute in CC_FLAGS or LINK_FLAGS in tools_def.txt? >>> >> >> It seems this does the trick as well >> >> diff --git a/BaseTools/Scripts/GccBase.lds b/BaseTools/Scripts/GccBase.lds >> index 281af8a9bd33..02387d4f8d6f 100644 >> --- a/BaseTools/Scripts/GccBase.lds >> +++ b/BaseTools/Scripts/GccBase.lds >> @@ -80,3 +80,7 @@ SECTIONS { >> *(COMMON) >> } >> } >> + >> +VERSION { >> + { global: _ModuleEntryPoint*; }; >> +}; >> >> >> Note that * at the end: this is necessary since _ModuleEntryPoint will >> be called _ModuleEntryPoint.lto_priv.xxx in the LTO objects. >> > > Hmm, looks like I spoke too soon. I don't know what I did wrong, but > this does not actually work. > The only alternative I can think of is to add a static non-lto object to the tree that refers to _ModuleEntryPoint, similar to the way I handle the ARM intrinsics in patch #5 Which one do you hate the least? :-) _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
diff --git a/BaseTools/Scripts/GccBase.lds b/BaseTools/Scripts/GccBase.lds index 281af8a9bd33..02387d4f8d6f 100644 --- a/BaseTools/Scripts/GccBase.lds +++ b/BaseTools/Scripts/GccBase.lds @@ -80,3 +80,7 @@ SECTIONS { *(COMMON) } } + +VERSION { + { global: _ModuleEntryPoint*; }; +};