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

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 13:04:01 PST 2018


LGTM

Thanks!

Fangrui Song via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> writes:

> MaskRay updated this revision to Diff 135505.
> MaskRay added a comment.
>
> repeated word typo
>
>
> Repository:
>   rLLD LLVM Linker
>
> https://reviews.llvm.org/D43642
>
> Files:
>   ELF/LinkerScript.cpp
>   ELF/Relocations.cpp
>   ELF/Symbols.h
>   ELF/Writer.cpp
>
>
> Index: ELF/Writer.cpp
> ===================================================================
> --- ELF/Writer.cpp
> +++ ELF/Writer.cpp
> @@ -1170,7 +1170,7 @@
>    // 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 @@
>  
>    // 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 @@
>      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.
> Index: ELF/Symbols.h
> ===================================================================
> --- ELF/Symbols.h
> +++ ELF/Symbols.h
> @@ -99,10 +99,10 @@
>      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 @@
>    // 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.
> Index: ELF/Relocations.cpp
> ===================================================================
> --- ELF/Relocations.cpp
> +++ ELF/Relocations.cpp
> @@ -864,7 +864,7 @@
>      // 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
> Index: ELF/LinkerScript.cpp
> ===================================================================
> --- ELF/LinkerScript.cpp
> +++ ELF/LinkerScript.cpp
> @@ -508,7 +508,7 @@
>    // 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
>
>
> Index: ELF/Writer.cpp
> ===================================================================
> --- ELF/Writer.cpp
> +++ ELF/Writer.cpp
> @@ -1170,7 +1170,7 @@
>    // 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 @@
>  
>    // 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 @@
>      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.
> Index: ELF/Symbols.h
> ===================================================================
> --- ELF/Symbols.h
> +++ ELF/Symbols.h
> @@ -99,10 +99,10 @@
>      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 @@
>    // 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.
> Index: ELF/Relocations.cpp
> ===================================================================
> --- ELF/Relocations.cpp
> +++ ELF/Relocations.cpp
> @@ -864,7 +864,7 @@
>      // 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
> Index: ELF/LinkerScript.cpp
> ===================================================================
> --- ELF/LinkerScript.cpp
> +++ ELF/LinkerScript.cpp
> @@ -508,7 +508,7 @@
>    // 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
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list