| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 251290
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 249043
|
|
|
|
|
|
| |
Patch by Igor Kudrin!
llvm-svn: 248194
|
|
|
|
| |
llvm-svn: 248097
|
|
|
|
| |
llvm-svn: 248096
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
short import files
This change caused a test for llvm-readobj to fail.
llvm-svn: 246277
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 245873
|
|
|
|
|
|
| |
It was already passing, we were just not testing the code.
llvm-svn: 244504
|
|
|
|
| |
llvm-svn: 244323
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 244259
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11263
llvm-svn: 243724
|
|
|
|
| |
llvm-svn: 242998
|
|
|
|
| |
llvm-svn: 242981
|
|
|
|
| |
llvm-svn: 242949
|
|
|
|
|
|
| |
We were trying to read it as an external file.
llvm-svn: 242926
|
|
|
|
| |
llvm-svn: 242921
|
|
|
|
| |
llvm-svn: 242839
|
|
|
|
| |
llvm-svn: 242712
|
|
|
|
|
|
| |
Use just the pointers and check for invalid relocation sections.
llvm-svn: 242700
|
|
|
|
| |
llvm-svn: 242676
|
|
|
|
|
|
| |
We now use a simple pointer and have range loops.
llvm-svn: 242669
|
|
|
|
| |
llvm-svn: 242658
|
|
|
|
| |
llvm-svn: 242657
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 242367
|
|
|
|
|
|
| |
The member has to end up with a path relative to the archive.
llvm-svn: 242362
|
|
|
|
|
|
|
| |
We were already doing the right thing for short file names, but not long
ones.
llvm-svn: 242354
|
|
|
|
|
|
| |
While at it, test that we can add to a thin archive.
llvm-svn: 242330
|
|
|
|
| |
llvm-svn: 242269
|
|
|
|
| |
llvm-svn: 242236
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This matches the gnu ar behavior.
llvm-svn: 242162
|
|
|
|
|
|
| |
Might fix pr24106.
llvm-svn: 242158
|
|
|
|
| |
llvm-svn: 242156
|
|
|
|
| |
llvm-svn: 242151
|
|
|
|
|
|
| |
Sorry about that.
llvm-svn: 242083
|
|
|
|
|
|
| |
This is important for thin archives.
llvm-svn: 242082
|
|
|
|
| |
llvm-svn: 242061
|
|
|
|
| |
llvm-svn: 241937
|
|
|
|
|
|
| |
This time without breaking the bots.
llvm-svn: 241869
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|