OSDN Git Service

Add support for emitting the symbol table (and its string table) of the
authorChris Lattner <sabre@nondot.org>
Thu, 7 Jul 2005 07:02:20 +0000 (07:02 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 7 Jul 2005 07:02:20 +0000 (07:02 +0000)
commit80ed8faaea095ec269a06d97f1de1f04474bea66
treec9163222c919ceac36d67eedc935b1c206a80e81
parente578ab938bf148beeed34cab276df8a9da5b8919
Add support for emitting the symbol table (and its string table) of the
module to the ELF file.  Test it by adding support for emitting common
symbols.  This allows us to compile this:

%X = weak global int 0
%Y = weak global int 0
%Z = weak global int 0

to an elf file that 'readelf's this:

Symbol table '.symtab' contains 4 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 00000004     4 OBJECT  GLOBAL DEFAULT  COM X
     2: 00000004     4 OBJECT  GLOBAL DEFAULT  COM Y
     3: 00000004     4 OBJECT  GLOBAL DEFAULT  COM Z

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22343 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/ELFWriter.cpp