[ELF] Add comment for preemptible and fix typo. NFC

Subscribers: emaste, arichardson, llvm-commits

Differential Revision: https://reviews.llvm.org/D43642

llvm-svn: 325855
This commit is contained in:
Fangrui Song 2018-02-23 02:05:48 +00:00
parent 9ff1bfe480
commit 9cd5df0e15
4 changed files with 8 additions and 7 deletions

View File

@ -508,7 +508,7 @@ static OutputSection *addInputSec(StringMap<OutputSection *> &Map,
// ignored. We should not have two output .text sections just because one was
// in a group and another was not for example.
//
// It also seems that that wording was a late addition and didn't get the
// It also seems that wording was a late addition and didn't get the
// necessary scrutiny.
//
// Merging sections with different flags is expected by some users. One

View File

@ -864,7 +864,7 @@ static RelExpr processRelocAux(InputSectionBase &Sec, RelExpr Expr,
// use that as the function value.
//
// For the static linking part, we just return a plt expr and everything
// else will use the the PLT entry as the address.
// else will use the PLT entry as the address.
//
// The remaining problem is making sure pointer equality still works. We
// need the help of the dynamic linker for that. We let it know that we have

View File

@ -99,10 +99,10 @@ public:
return SymbolKind == LazyArchiveKind || SymbolKind == LazyObjectKind;
}
// True is this is an undefined weak symbol. This only works once
// True if this is an undefined weak symbol. This only works once
// all input files have been added.
bool isUndefWeak() const {
// See comment on Lazy the details.
// See comment on Lazy for details.
return isWeak() && (isUndefined() || isLazy());
}
@ -154,6 +154,7 @@ public:
// True if this symbol is in the Igot sub-section of the .got.plt or .got.
unsigned IsInIgot : 1;
// True if this symbol is preemptible at link or load time.
unsigned IsPreemptible : 1;
// True if an undefined or shared symbol is used from a live section.

View File

@ -1170,7 +1170,7 @@ template <class ELFT> void Writer<ELFT>::sortSections() {
// The way we define an order then is:
// * Sort only the orphan sections. They are in the end right now.
// * Move each orphan section to its preferred position. We try
// to put each section in the last position where it it can share
// to put each section in the last position where it can share
// a PT_LOAD.
//
// There is some ambiguity as to where exactly a new entry should be
@ -1557,7 +1557,7 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() {
// Some architectures need to generate content that depends on the address
// of InputSections. For example some architectures use small displacements
// for jump instructions that is is the linker's responsibility for creating
// for jump instructions that is the linker's responsibility for creating
// range extension thunks for. As the generation of the content may also
// alter InputSection addresses we must converge to a fixed point.
if (Target->NeedsThunks || Config->AndroidPackDynRelocs) {
@ -2017,7 +2017,7 @@ template <class ELFT> void Writer<ELFT>::checkNoOverlappingSections() {
return;
// Checking for overlapping virtual and load addresses only needs to take
// into account SHF_ALLOC sections since since others will not be loaded.
// into account SHF_ALLOC sections since others will not be loaded.
// Furthermore, we also need to skip SHF_TLS sections since these will be
// mapped to other addresses at runtime and can therefore have overlapping
// ranges in the file.