llvm-mirror/tools/obj2yaml
Rafael Espindola 0b8bd66167 obj2yaml: Print unique section names.
Without this patch passing a .o file with multiple sections with the
same name to obj2yaml produces a yaml file that yaml2obj cannot
handle. This is pr34162.

The problem is that when specifying, for example, the section of a
symbol, we get only

Section: foo

and don't know which of the sections whose name is foo we have to use.

One alternative would be to use section numbers. This would work, but
the output from obj2yaml would be very inconvenient to edit as
deleting a section would invalidate all indexes.

Another alternative would be to invent a unique section id that would
exist only on yaml. This would work, but seems a bit heavy handed. We
could make the id optional and default it to the section name.

Since in the last alternative the id is basically what this patch uses
as a name, it can be implemented as a followup patch if needed.

llvm-svn: 312585
2017-09-05 22:30:00 +00:00
..
CMakeLists.txt Resubmit "[codeview] Make obj2yaml/yaml2obj support .debug$S..." 2017-06-14 15:59:27 +00:00
coff2yaml.cpp Resubmit "[codeview] Make obj2yaml/yaml2obj support .debug$S..." 2017-06-14 15:59:27 +00:00
dwarf2yaml.cpp Use delegation instead of inheritance. 2017-07-19 22:27:28 +00:00
elf2yaml.cpp obj2yaml: Print unique section names. 2017-09-05 22:30:00 +00:00
Error.cpp
Error.h
macho2yaml.cpp Use delegation instead of inheritance. 2017-07-19 22:27:28 +00:00
obj2yaml.cpp obj2yaml: Improve error reporting 2017-06-16 23:29:54 +00:00
obj2yaml.h Use delegation instead of inheritance. 2017-07-19 22:27:28 +00:00
wasm2yaml.cpp [WebAssembly] Expose the offset of each data segment 2017-07-12 00:24:54 +00:00