From b07cebffb28e63b067d22dc6b7f4863bf7225591 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Mon, 10 Jun 2013 22:09:21 +0000 Subject: [PATCH] [PECOFF] Add comments for symbols. llvm-svn: 183700 --- lld/include/lld/Core/DefinedAtom.h | 5 +++++ lld/include/lld/Core/SharedLibraryAtom.h | 1 + lld/include/lld/Core/UndefinedAtom.h | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lld/include/lld/Core/DefinedAtom.h b/lld/include/lld/Core/DefinedAtom.h index 80e0eb4eab32..e855d6a457e4 100644 --- a/lld/include/lld/Core/DefinedAtom.h +++ b/lld/include/lld/Core/DefinedAtom.h @@ -196,6 +196,11 @@ public: /// /// This is used by the linker to order the layout of Atoms so that the /// resulting image is stable and reproducible. + /// + /// Note that this should not be confused with ordinals of exported symbols in + /// Windows DLLs. In Windows terminology, ordinals are symbols' export table + /// indices (small integers) which can be used instead of symbol names to + /// refer items in a DLL. virtual uint64_t ordinal() const = 0; /// \brief the number of bytes of space this atom's content will occupy in the diff --git a/lld/include/lld/Core/SharedLibraryAtom.h b/lld/include/lld/Core/SharedLibraryAtom.h index d2194cfab3f2..74c4c4fa64ba 100644 --- a/lld/include/lld/Core/SharedLibraryAtom.h +++ b/lld/include/lld/Core/SharedLibraryAtom.h @@ -25,6 +25,7 @@ public: /// Returns shared library name used to load it at runtime. /// On linux that is the DT_NEEDED name. /// On Darwin it is the LC_DYLIB_LOAD dylib name. + /// On Windows it is the DLL name that to be referred from .idata section. virtual StringRef loadName() const = 0; /// Returns if shared library symbol can be missing at runtime and if diff --git a/lld/include/lld/Core/UndefinedAtom.h b/lld/include/lld/Core/UndefinedAtom.h index 638c1eefc443..eec131c92086 100644 --- a/lld/include/lld/Core/UndefinedAtom.h +++ b/lld/include/lld/Core/UndefinedAtom.h @@ -35,15 +35,15 @@ public: /// __attribute__((weak_import)). /// On linux this is generated using a function prototype with /// __attribute__((weak)). + /// On Windows this feature is not supported. canBeNullAtRuntime, - /// This symbol can be missing at build time. /// That is, the static linker will not error if a definition for /// this symbol is not found at build time. Instead, the linker /// will build an executable that lets the dynamic loader find the /// symbol at runtime. - /// This feature is not supported on Darwin. + /// This feature is not supported on Darwin nor Windows. /// On linux this is generated using a function prototype with /// __attribute__((weak)). canBeNullAtBuildtime