summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object
Commit message (Collapse)AuthorAgeFilesLines
* Tests: be slightly more specific to avoid conflict with path.Tim Northover2015-10-261-1/+1
| | | | llvm-svn: 251290
* [AVR] Add ELF constants to headersDylan McKay2015-10-232-0/+62
| | | | | | | | Also adds a 'trivial' ELF file. This was generated by assembling and linking a file with the symbol main which contains a single return instruction. llvm-svn: 251096
* Fix printing of 64 bit values and make test more strict.Rafael Espindola2015-10-011-12/+26
| | | | llvm-svn: 249043
* Avoid SEGFAULT if a requested symbol section is absent.Rafael Espindola2015-09-211-0/+2
| | | | | | Patch by Igor Kudrin! llvm-svn: 248194
* Fixup r248096, commit the *correct* test.Davide Italiano2015-09-191-2/+2
| | | | llvm-svn: 248097
* [obj2yaml] Fix "time of check to time of use" bug. Add a test.Davide Italiano2015-09-191-0/+3
| | | | llvm-svn: 248096
* [opaque pointer type] Add textual IR support for explicit type parameter for ↵David Blaikie2015-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | global aliases update.py: import fileinput import sys import re alias_match_prefix = r"(.*(?:=|:|^)\s*(?:external |)(?:(?:private|internal|linkonce|linkonce_odr|weak|weak_odr|common|appending|extern_weak|available_externally) )?(?:default |hidden |protected )?(?:dllimport |dllexport )?(?:unnamed_addr |)(?:thread_local(?:\([a-z]*\))? )?alias" plain = re.compile(alias_match_prefix + r" (.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|addrspacecast|\[\[[a-zA-Z]|\{\{).*$)") cast = re.compile(alias_match_prefix + r") ((?:bitcast|inttoptr|addrspacecast)\s*\(.* to (.*?)(| addrspace\(\d+\) *)\*\)\s*(?:;.*)?$)") gep = re.compile(alias_match_prefix + r") ((?:getelementptr)\s*(?:inbounds)?\s*\((?P<type>.*), (?P=type)(?:\s*addrspace\(\d+\)\s*)?\* .*\)\s*(?:;.*)?$)") def conv(line): m = re.match(cast, line) if m: return m.group(1) + " " + m.group(3) + ", " + m.group(2) m = re.match(gep, line) if m: return m.group(1) + " " + m.group(3) + ", " + m.group(2) m = re.match(plain, line) if m: return m.group(1) + ", " + m.group(2) + m.group(3) + "*" + m.group(4) + "\n" return line for line in sys.stdin: sys.stdout.write(conv(line)) apply.sh: for name in "$@" do python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name" rm -f "$name.tmp" done The actual commands: From llvm/src: find test/ -name *.ll | xargs ./apply.sh From llvm/src/tools/clang: find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}" From llvm/src/tools/polly: find test/ -name *.ll | xargs ./apply.sh llvm-svn: 247378
* 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-283-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-283-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-283-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
* Report an error if a SHT_SYMTAB_SHNDX section has the wrong size.Rafael Espindola2015-08-242-0/+4
| | | | llvm-svn: 245873
* Add a test showing that objdump (and so ObjectFIle) can handle shndx.Rafael Espindola2015-08-102-0/+8
| | | | | | It was already passing, we were just not testing the code. llvm-svn: 244504
* add missing tests filesRafael Espindola2015-08-071-0/+0
| | | | llvm-svn: 244323
* Add dynamic_table iterators back to ELF.h.Rafael Espindola2015-08-072-0/+14
| | | | | | | | | In tree they are only used by llvm-readobj, but it is also used by https://github.com/mono/CppSharp. While at it, add some missing error checking. llvm-svn: 244320
* Move to llvm-readobj code that is only used there.Rafael Espindola2015-08-061-1/+1
| | | | | | | | | | lld might end up using a small part of this, but it will be in a much refactored form. For now this unblocks avoiding the full section scan in the ELFFile constructor. This also has a (very small) error handling improvement. llvm-svn: 244282
* Update comments.Rui Ueyama2015-08-061-2/+2
| | | | llvm-svn: 244259
* [COFF] Return symbol VAs instead of RVAs for PE filesReid Kleckner2015-07-313-0/+31
| | | | | | | | This makes llvm-nm consistent with binutils nm on executables and DLLs. For a vanilla hello world executable, the address of main should include the default image base of 0x400000. llvm-svn: 243755
* ELFYAML: Enable parsing of EM_AMDGPUTom Stellard2015-07-311-0/+12
| | | | | | | | Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11263 llvm-svn: 243724
* Support printing relocations in files with no section table.Rafael Espindola2015-07-232-0/+12
| | | | llvm-svn: 242998
* Refactor duplicated code and check for invalid symbol table size.Rafael Espindola2015-07-232-0/+4
| | | | llvm-svn: 242981
* 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
* Identify thin archives as archives.Rafael Espindola2015-07-221-0/+9
| | | | llvm-svn: 242921
* [Object][ELF] Handle files with no section header string table.Michael J. Spencer2015-07-212-0/+10
| | | | llvm-svn: 242839
* Simplify iterating over the dynamic section and report broken ones.Rafael Espindola2015-07-202-0/+6
| | | | llvm-svn: 242712
* Remove Elf_Rela_Iter and Elf_Rel_Iter.Rafael Espindola2015-07-202-0/+7
| | | | | | Use just the pointers and check for invalid relocation sections. llvm-svn: 242700
* Report errors an invalid virtual addresses.Rafael Espindola2015-07-202-0/+6
| | | | llvm-svn: 242676
* Simplify iterating over program headers and detect corrupt ones.Rafael Espindola2015-07-202-0/+6
| | | | | | We now use a simple pointer and have range loops. llvm-svn: 242669
* llvm-readobj: Handle invalid references to the string table.Rafael Espindola2015-07-202-0/+7
| | | | llvm-svn: 242658
* Move CHECKs closer to the RUN line.Rafael Espindola2015-07-201-6/+9
| | | | llvm-svn: 242657
* llvm-readobj: call exit(1) on error.Rafael Espindola2015-07-201-1/+0
| | | | | | | | | llvm-readobj exists for testing llvm. We can safely stop the program the first time we know the input in corrupted. This is in preparation for making it handle a few more broken files. llvm-svn: 242656
* Trying to fix the windows bots.Rafael Espindola2015-07-161-4/+4
| | | | llvm-svn: 242367
* Fix handling of relative paths in thin archives.Rafael Espindola2015-07-161-3/+18
| | | | | | The member has to end up with a path relative to the archive. llvm-svn: 242362
* llvm-ar: Don't write the directory in the string table.Rafael Espindola2015-07-151-3/+12
| | | | | | | We were already doing the right thing for short file names, but not long ones. llvm-svn: 242354
* Handle the error of trying to convert a regular archive to a thin one.Rafael Espindola2015-07-151-0/+14
| | | | | | While at it, test that we can add to a thin archive. llvm-svn: 242330
* Initial support for writing thin archives.Rafael Espindola2015-07-151-0/+11
| | | | llvm-svn: 242269
* Accept lower case to handle windows error messages.Rafael Espindola2015-07-141-1/+1
| | | | llvm-svn: 242236
* Add support for reading members out of thin archives.Rafael Espindola2015-07-141-0/+6
| | | | | | | | | | For now the Archive owns the buffers of the thin archive members. This makes for a simple API, but all the buffers are destructed only when the archive is destructed. This should be fine since we close the files after mmap so we should not hit an open file limit. llvm-svn: 242215
* llvm-ar: Don't try to extract from thin archives.Rafael Espindola2015-07-141-0/+3
| | | | | | This matches the gnu ar behavior. llvm-svn: 242162
* Sleep for 2.1 seconds to see if that makes the test stable on windows.Rafael Espindola2015-07-141-2/+3
| | | | | | Might fix pr24106. llvm-svn: 242158
* llvm-ar: print an error when the requested member is not found.Rafael Espindola2015-07-141-0/+4
| | | | llvm-svn: 242156
* Rename a test. NFC.Rafael Espindola2015-07-141-2/+0
| | | | llvm-svn: 242151
* Add missing file.Rafael Espindola2015-07-131-0/+0
| | | | | | Sorry about that. llvm-svn: 242083
* Fix reading archive members with / in the name.Rafael Espindola2015-07-131-0/+6
| | | | | | This is important for thin archives. llvm-svn: 242082
* Add support deterministic output in llvm-ar and make it the default.Rafael Espindola2015-07-134-20/+20
| | | | llvm-svn: 242061
* [Object][ELF] Handle the dynamic string table in files without a section table.Michael J. Spencer2015-07-101-1/+29
| | | | llvm-svn: 241937
* [Object][ELF] Support dumping hash-tables from files with no section table.Michael J. Spencer2015-07-092-0/+8
| | | | | | This time without breaking the bots. llvm-svn: 241869
* Create BSD archives by default on OS X.Rafael Espindola2015-07-091-1/+1
| | | | | | | | | They should probably be created on anything that is not windows or linux, but I will test on freebsd before changing that. With this it is possible to bootstrap with llvm-ar instead of ar+ranlib on OS X. llvm-svn: 241849
* 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
OpenPOWER on IntegriCloud