1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
Commit Graph

4194 Commits

Author SHA1 Message Date
Sean Silva
e9371a8a2c Remove unused parameter.
Not sure why we weren't catching this with -Wunused-parameter...

Spotted by inspection.

llvm-svn: 184271
2013-06-19 01:10:11 +00:00
Sean Silva
a39ac0fdeb [yaml2obj][ELF] Support ELFOSABI_* enum.
llvm-svn: 184268
2013-06-19 00:55:28 +00:00
Sean Silva
5b5567b80b There is no ELF ABI version enum.
llvm-svn: 184267
2013-06-19 00:55:23 +00:00
Sean Silva
c7a5f8cb18 [yaml2obj][ELF] Support st_info through Binding and Type YAML keys.
llvm-svn: 184263
2013-06-19 00:11:59 +00:00
Sean Silva
af68c9e26b [yaml2obj][ELF] Don't monkeypatch the YAML sections.
Previously, we would monkeypatch the vector of YAML::Section's in order
to ensure that the SHT_NULL entry is present. Now we just add it
unconditionally.

The proliferation of small numerical adjustments is beginning to
frighten me, but I can't think of a way having a single point of truth
for them without introducing a whole new layer  of data structures (i.e.
lots of code and complexity) between the YAML and binary ELF formats.

llvm-svn: 184260
2013-06-18 23:37:23 +00:00
Sean Silva
3fd655ca4d [yaml2obj][ELF] Ensure STN_UNDEF entry is present.
llvm-svn: 184258
2013-06-18 23:19:17 +00:00
Sean Silva
beed0c8948 [yaml2obj][ELF] Rudimentary symbol table support.
Currently, we only output the name.

llvm-svn: 184255
2013-06-18 23:14:03 +00:00
Sean Silva
396d02068a [yaml2obj][ELF] Add dummy .strtab section.
This will be needed later for holding symbol names, due to the libObject
issue mentioned in the commit message of r184161.

llvm-svn: 184242
2013-06-18 21:37:50 +00:00
Rafael Espindola
7f5c2666a5 Convert most uses of PathV1.h in ToolRunner.cpp.
llvm-svn: 184210
2013-06-18 17:20:08 +00:00
Rafael Espindola
18bf1abdc7 Add a version of unique_file that return just the file name.
llvm-svn: 184206
2013-06-18 17:01:00 +00:00
Rafael Espindola
ba9d8abd28 Return a std::string from PrependMainExecutablePath.
llvm-svn: 184204
2013-06-18 16:47:55 +00:00
Rafael Espindola
45e04133bf Remove PathV1.h use from BugDriver.cpp.
llvm-svn: 184203
2013-06-18 16:21:54 +00:00
Rafael Espindola
14b5a763c3 Remove use of PathV1.h from ExecutionDriver.cpp.
llvm-svn: 184202
2013-06-18 16:14:09 +00:00
Rafael Espindola
8e7f40cca7 Remove usage of PathV1.h from OptimizerDriver.cpp.
llvm-svn: 184198
2013-06-18 15:54:13 +00:00
Rafael Espindola
3fc12d72c3 Convert some uses of eraseFromDisk.
llvm-svn: 184196
2013-06-18 15:33:18 +00:00
Rafael Espindola
8cdee56810 Don't use PathV1.h in tools/bugpoint/Miscompilation.cpp.
llvm-svn: 184193
2013-06-18 15:29:32 +00:00
Alexey Samsonov
50c414e3d0 Basic support for parsing Mach-O universal binaries in LLVMObject library
llvm-svn: 184191
2013-06-18 15:03:28 +00:00
Bill Wendling
49ef14ef73 Use pointers to the MCAsmInfo and MCRegInfo.
Someone may want to do something crazy, like replace these objects if they
change or something.

No functionality change intended.

llvm-svn: 184175
2013-06-18 07:20:20 +00:00
Sean Silva
2bfc77ced4 [yaml2obj][ELF] Factor out string table section creation.
llvm-svn: 184162
2013-06-18 01:11:27 +00:00
Sean Silva
034418b820 [yaml2obj][ELF] Refer specifically to the section header string table.
A bug in libObject will cause it to assert() if a symbol table's string
table and the section header string table are the same section, so we
need to ensure that we emit two different string tables (among other
things). The problematic code is the hardcoded usage of ".strtab"
(`dot_strtab_sec`) for looking up symbol names in
ELFObjectFile<ELFT>::getSymbolName.

I discussed this with Michael, and he has some local improvements to the
ELF code in libObject that, among other things, should fix our handling
of this scenario.

llvm-svn: 184161
2013-06-18 01:11:24 +00:00
Sean Silva
5a0f79505b [yaml2obj][ELF] Ensure more fields are zero'd.
I was spotting garbage in the output. I'd like to just zero the entire
ELFYAML::Section to be sure, but it contains non-POD types. (I'm also
trying to avoid bloating the ELFYAML::Foo classes with a bunch of
constructor code).

No test, since this is by its very nature unpredictable. I'm pretty sure
that one of the sanitizers would catch it immediately though.

llvm-svn: 184160
2013-06-18 01:11:21 +00:00
Rafael Espindola
6a0b079beb Fix the build with gcc 4.7 and -std=c++11.
The error message was:

/home/espindola/llvm/llvm/tools/gold/gold-plugin.cpp: In function ‘ld_plugin_status cleanup_hook()’:
/home/espindola/llvm/llvm/tools/gold/gold-plugin.cpp:461:30: error: cannot pass objects of non-trivially-copyable type ‘std::string {aka class std::basic_string<char>}’ through ‘...’

I will check if this was a clang or gcc issue.

llvm-svn: 184138
2013-06-17 22:24:06 +00:00
Rafael Espindola
6a07fa8287 Convert two uses of eraseFromDisk.
llvm-svn: 184136
2013-06-17 21:50:28 +00:00
Rafael Espindola
f67941b9b1 Remove usage of PathV1.h in FindBugs.cpp.
llvm-svn: 184122
2013-06-17 20:48:36 +00:00
Sean Silva
914b2119ec [yaml2obj][ELF] Exit with error status on error.
llvm-svn: 184115
2013-06-17 20:14:59 +00:00
Rafael Espindola
95d3811592 Don't use PathV1.h in CrashDebugger.cpp.
llvm-svn: 184109
2013-06-17 19:33:18 +00:00
Rafael Espindola
fcae6ace8a Don't use PathV1.h in ToolRunner.h.
llvm-svn: 184107
2013-06-17 19:21:38 +00:00
Rafael Espindola
dc36acbad8 Remove CBE related code.
llvm-svn: 184106
2013-06-17 19:03:02 +00:00
Rafael Espindola
777fff797b Don't use PathV1.h in ExtractFunction.cpp.
llvm-svn: 184102
2013-06-17 18:48:59 +00:00
Rafael Espindola
90268d76aa Don't use PathV1.h in tools/gold/gold-plugin.cpp.
llvm-svn: 184099
2013-06-17 18:38:18 +00:00
Rafael Espindola
2b411d1243 Don't use PathV1.h in LTOCodeGenerator.cpp
This patch also adds a simpler version of sys::fs::remove and a tool_output_file
constructor for when we already have an open file.

llvm-svn: 184095
2013-06-17 18:05:35 +00:00
Rafael Espindola
ab943cbd48 Don't use PathV1.h in llvm-link.
llvm-svn: 184092
2013-06-17 17:32:19 +00:00
Rafael Espindola
845bfd3735 Move lib/Archive to tools/llvm-ar.
llvm-ar is the only tool that needs to write archive files. Every other tool
should be able to use the lib/Object interface.

llvm-svn: 184083
2013-06-17 15:47:20 +00:00
Rafael Espindola
cf72593c14 Don't link with the archive library programs that don't use it.
llvm-svn: 184081
2013-06-17 15:29:46 +00:00
Sean Silva
2b8e17f6e5 [yaml2obj] Move some classes into anonymous namespaces.
llvm-svn: 184025
2013-06-15 00:31:46 +00:00
Sean Silva
7dafd05c2e [yaml2obj] Add support for sh_link via Link key.
llvm-svn: 184022
2013-06-15 00:25:26 +00:00
Rafael Espindola
daa7f712a2 Remove the LLVM specific archive index.
Archive files (.a) can have a symbol table indicating which object
files in them define which symbols. The purpose of this symbol table
is to speed up linking by allowing the linker the read only the .o
files it is actually going to use instead of having to parse every
object's symbol table.

LLVM's archive library currently supports a LLVM specific format for
such table. It is hard to see any value in that now that llvm-ld is
gone:

* System linkers don't use it: GNU ar uses the same plugin as the
linker to create archive files with a regular index. The OS X ar
creates no symbol table for IL files, I assume the linker just parses
all IL files.

* It doesn't interact well with archives having both IL and native objects.

* We probably don't want to be responsible for yet another archive
format variant.

This patch then:

* Removes support for creating and reading such index from lib/Archive.
* Remove llvm-ranlib, since there is nothing left for it to do.

We should in the future add support for regular indexes to llvm-ar for
both native and IL objects. When we do that, llvm-ranlib should be
reimplemented as a symlink to llvm-ar, as it is equivalent to "ar s".

llvm-svn: 184019
2013-06-14 23:25:53 +00:00
Rafael Espindola
703b03a992 Move PrependMainExecutablePath next to its only user.
llvm-svn: 183980
2013-06-14 15:12:13 +00:00
Rafael Espindola
2a0ba502c3 Remove unused header.
llvm-svn: 183968
2013-06-14 04:31:19 +00:00
Sean Silva
221b8835d3 [yaml2obj] Add support for sh_addralign via AddressAlign key.
For consistency, change the address in the test case from 0xDEADBEEF to
0xCAFEBABE since 0xCAFEBABE that actually has a 2-byte alignment.

llvm-svn: 183962
2013-06-14 00:38:02 +00:00
Sean Silva
51f6318c1e [yaml2obj] Add support for specifying raw section content.
llvm-svn: 183955
2013-06-13 22:20:01 +00:00
Sean Silva
a31cf66d83 [yaml2obj] Add sh_addr via Address key.
llvm-svn: 183954
2013-06-13 22:19:54 +00:00
Sean Silva
c72d9620ea [yaml2obj] Initial ELF section support.
The current functionality is extremely basic and a bit rough around the
edges, but it will flesh out in future commits.

llvm-svn: 183953
2013-06-13 22:19:48 +00:00
Rafael Espindola
6c0ca078e2 Don't use PathV1.h in Signals.h.
llvm-svn: 183947
2013-06-13 21:16:58 +00:00
Rafael Espindola
1cc376fe6a Don't use PathV1.h in FileUtilities.h.
llvm-svn: 183941
2013-06-13 20:41:00 +00:00
Rafael Espindola
ef0d0d8b0b Avoid using PathV1.h in Program.h.
llvm-svn: 183940
2013-06-13 20:25:38 +00:00
Rafael Espindola
332b3ad6f7 Have sys::FindProgramByName return a std::string.
llvm-svn: 183928
2013-06-13 19:25:37 +00:00
Rafael Espindola
c51837d177 Further reduce usage of sys::Path in bugpoint.
llvm-svn: 183912
2013-06-13 16:22:26 +00:00
Rafael Espindola
c4e0e0cdcd Try to fix the build with libstdc++ 4.4.
llvm-svn: 183909
2013-06-13 15:52:54 +00:00
Rafael Espindola
953c89b054 Reduce sys::Path usage in bugpoint.
llvm-svn: 183908
2013-06-13 15:47:11 +00:00