summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object/archive-symtab.test
Commit message (Collapse)AuthorAgeFilesLines
* [llvm\test\Object] - An initial step to cleanup the test cases.George Rimar2019-07-081-168/+216
| | | | | | | | | | | | This patch removes trivial-object-test.elf-i386, trivial-object-test.elf-x86-64 and trivial-object-test2.elf-x86-64 precompiled objects from test/Object/Inputs folder. I adjusted the existent test cases to use YAML instead. Differential revision: https://reviews.llvm.org/D64206 llvm-svn: 365348
* llvm-ar: Darwin archive format fixes.James Y Knight2018-10-101-0/+28
| | | | | | | | | | | | | * Support writing the DARWIN64 symbol table format. * In darwin archives, emit a symbol table whenever requested, even when there are no members, as the apple linker will abort if given an archive without a symbol table. Added tests for same, and also simplified and moved the GNU 64-bit symbol table test into archive-symtab.test. llvm-svn: 344183
* llvm-ar: align the first archive member consistently.Rafael Espindola2017-09-221-1/+9
| | | | | | | Before we were aligning the member after the symbol table to 4 but other members to 8. llvm-svn: 314010
* llvm-ar: Don't add an unnecessary alignment in gnu mode.Rafael Espindola2017-09-221-0/+8
| | | | | | | This is mostly for getting stricter testing in preparation for future changes. llvm-svn: 314000
* Add support for Darwin’s static library table of contents with 64-bit ↵Kevin Enderby2016-06-171-0/+6
| | | | | | | | | | | | | | offsets to the archive members. Darwin added support in its Xcode 8.0 tools (released in the beta) for static library table of contents with 64-bit offsets to the archive members. The change is very straight forward. The table of contents member is named ___.SYMDEF_64 or "___.SYMDEF_64 SORTED" and same layout is used but with fields using 64 bit values instead of 32 bit values. rdar://26869808 llvm-svn: 273058
* Tests: be slightly more specific to avoid conflict with path.Tim Northover2015-10-261-1/+1
| | | | llvm-svn: 251290
* Object: Fix COFF import file's symbols.Rui Ueyama2015-09-011-3/+3
| | | | | | | If a symbol is marked as "data", the symbol should be exported with __imp_ prefix. Previously, the symbol was exported as-is. llvm-svn: 246532
* Re-apply r246276 - Object: Teach llvm-ar to create symbol table for COFF ↵Rui Ueyama2015-08-281-0/+10
| | | | | | | | | | | short import files This patch includes a fix for a llvm-readobj test. With this patch, the tool does no longer print out COFF headers for the short import file, but that's probably desirable because the header for the short import file is dummy. llvm-svn: 246283
* Rollback r246276 - Object: Teach llvm-ar to create symbol table for COFF ↵Rui Ueyama2015-08-281-10/+0
| | | | | | | | short import files This change caused a test for llvm-readobj to fail. llvm-svn: 246277
* Object: Teach llvm-ar to create symbol table for COFF short import files.Rui Ueyama2015-08-281-0/+10
| | | | | | | | | | | | | COFF short import files are special kind of files that contains only DLL-exported symbol names. That's different from object files because it has no data except symbol names. This change implements a SymbolicFile interface for the short import files so that symbol names can be accessed through that interface. llvm-ar is now able to read the file and create symbol table entries for short import files. llvm-svn: 246276
* Force the gnu archive format to fix the test on darwin.Rafael Espindola2015-07-221-1/+1
| | | | llvm-svn: 242949
* Fix fetching the symbol table of a thin archive.Rafael Espindola2015-07-221-0/+11
| | | | | | We were trying to read it as an external file. llvm-svn: 242926
* Add support deterministic output in llvm-ar and make it the default.Rafael Espindola2015-07-131-5/+5
| | | | llvm-svn: 242061
* llvm-ar: Pad the symbol table to 4 bytes.Rafael Espindola2015-07-091-0/+8
| | | | | | | It looks like ld64 requires it. With this we seem to be able to bootstrap using llvm-ar+/usr/bin/true instead of ar+ranlib (currently on stage2). llvm-svn: 241842
* Basic support for BSD symbol tables in archives.Rafael Espindola2015-07-091-0/+21
| | | | | | | This could be optimized and for now we only produce __.SYMDEF and not "__.SYMDEF SORTED". llvm-svn: 241814
* Object, support both mach-o archive t.o.c file namesNick Kledzik2014-11-121-0/+1
| | | | | | | | | | For historical reasons archives on mach-o have two possible names for the file containing the table of contents for the archive: "__.SYMDEF SORTED" and "__.SYMDEF". But the libObject archive reader only supported the former. This patch fixes llvm::object::Archive to support both names. llvm-svn: 221747
* Changed the lvm-nm alias "-s" for -print-armap to "-M".Kevin Enderby2014-07-081-8/+8
| | | | | | | | | | This will allow the "-s" flag to implemented in the future as it is in darwin’s nm(1) to list symbols only in the specified section. Given a LGTM by Shankar Easwaran who originally implemented the support for lvm-nm’s -print-armap and archive map symbols. llvm-svn: 212576
* Add support for BSD format Archive map symbols (aka the table of contentsKevin Enderby2014-07-081-0/+6
| | | | | | from a __.SYMDEF or "__.SYMDEF SORTED" archive member). llvm-svn: 212568
* Fix some double printing of filenames for archives in llvm-nm whenKevin Enderby2014-06-201-2/+4
| | | | | | | | the tool is given multiple files. Also fix the same issue with Mach-O universal files. And fix the newline spacing to separate the output in these cases. llvm-svn: 211405
* Fix llvm-nm to print the full 64-bit address for symbols in 64-bit object files.Kevin Enderby2014-05-091-12/+12
| | | | | | | | | | | | | | The implementation might be better to have a method is64Bit() in the class SymbolicFile instead of having the static routine isSymbolList64Bit() in llvm-nm.cpp . But this is very much in the sprit of isObject() and getNMTypeChar() in llvm-nm.cpp that has a series of if else statements based on the specific class of the SymbolicFile. I can update this if folks would like. Also the tests were updated to be explicit about checking the address for 64-bits or 32-bits from object files. llvm-svn: 208463
* Add a minimal implementation of ranlib.Rafael Espindola2013-08-281-0/+9
| | | | | | | | | | | | This is just enough to get "llvm-ranlib foo.a" working and tested. Making llvm-ranlib a symbolic link to llvm-ar doesn't work so well with llvm's option parsing, but ar's option parsing is mostly custom anyway. This patch also removes the -X32_64 option. Looks like it was just added in r10297 as part of implementing the current command line parsing. I can add it back (with a test) if someone really has AIX portability problems without it. llvm-svn: 189489
* Add support for the 's' operation to llvm-ar.Rafael Espindola2013-07-291-0/+32
| | | | | | | | | | | | If no other operation is specified, 's' becomes an operation instead of an modifier. The s operation just creates a symbol table. It is the same as running ranlib. We assume the archive was created by a sane ar (like llvm-ar or gnu ar) and if the symbol table is present, then it is current. We use that to optimize the most common case: a broken build system that thinks it has to run ranlib. llvm-svn: 187353
* Add an initial implementation of archive symbol table generation.Rafael Espindola2013-07-231-0/+18
The symbol table has forward references in the file. Instead of allocating a temporary buffer or counting the size and then writing, this implementation writes a dummy value first and patches it once the final value is known. There is room for performance improvement. I will implement them as soon as I get some other features (like a ranlib mode) in. llvm-svn: 186934
OpenPOWER on IntegriCloud