Added support for macro emission in dwarf (supporting DWARF version 4). Differential Revision: http://reviews.llvm.org/D15495 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257060 91177308-0d34-0410-b5e6-96231b3b80d8
[MC] Fix file name in file header git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256749 91177308-0d34-0410-b5e6-96231b3b80d8
[MC] Don't use the architecture to govern which object file format to use InitMCObjectFileInfo was trying to override the triple in awkward ways. For example, a triple specifying COFF but not Windows was forced as ELF. This makes it easy for internal invariants to get violated, such as those which triggered PR25912. This fixes PR25912. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256226 91177308-0d34-0410-b5e6-96231b3b80d8
[llvm-dwp] Support debug_tu_index git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254827 91177308-0d34-0410-b5e6-96231b3b80d8
[llvm-dwp] Emit a rather fictional debug_cu_index This is very rudimentary support for debug_cu_index, but it is enough to allow llvm-dwarfdump to find the offsets for contributions and correctly dump debug_info. It will need to actually find the real signature of the unit and build the real hash table with the right number of buckets, as per the DWP specification. It will also need to be expanded to cover the tu_index as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254489 91177308-0d34-0410-b5e6-96231b3b80d8
Stop producing .data.rel sections. If a section is rw, it is irrelevant if the dynamic linker will write to it or not. It looks like llvm implemented this because gcc was doing it. It looks like gcc implemented this in the hope that it would put all the relocated items close together and speed up the dynamic linker. There are two problem with this: * It doesn't work. Both bfd and gold will map .data.rel to .data and concatenate the input sections in the order they are seen. * If we want a feature like that, it can be implemented directly in the linker since it knowns where the dynamic relocations are. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253436 91177308-0d34-0410-b5e6-96231b3b80d8
Drop prelink support. The way prelink used to work was * The compiler decides if a given section only has relocations that are know to point to the same DSO. If so, it names it .data.rel.ro.local<something>. * The static linker puts all of these together. * The prelinker program assigns addresses to each library and resolves the local relocations. There are many problems with this: * It is incompatible with address space randomization. * The information passed by the compiler is redundant. The linker knows if a given relocation is in the same DSO or not. If could sort by that if so desired. * There are newer ways of speeding up DSO (gnu hash for example). * Even if we want to implement this again in the compiler, the previous implementation is pretty broken. It talks about relocations that are "resolved by the static linker". If they are resolved, there are none left for the prelinker. What one needs to track is if an expression will require only dynamic relocations that point to the same DSO. At this point it looks like the prelinker is an historical curiosity. For example, fedora has retired it because it failed to build for two releases (http://pkgs.fedoraproject.org/cgit/prelink.git/commit/?id=eb43100a8331d91c801ee3dcdb0a0bb9babfdc1f) This patch removes support for it. That is, it stops printing the ".local" sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253280 91177308-0d34-0410-b5e6-96231b3b80d8
Bring r252305 back with a test fix. We now create the .eh_frame section early, just like every other special section. This means that the special flags are visible in code that explicitly asks for ".eh_frame". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252313 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Simplify the creation of .eh_frame/.debug_frame sections." This reverts commit r252305. Investigating a test failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252306 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify the creation of .eh_frame/.debug_frame sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252305 91177308-0d34-0410-b5e6-96231b3b80d8
Use SHT_X86_64_UNWIND on every OS. That is the ABI required type. Linkers still check the section name, so everything should still work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252300 91177308-0d34-0410-b5e6-96231b3b80d8
ARM: add support for WatchOS's compact unwind information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251573 91177308-0d34-0410-b5e6-96231b3b80d8
[MachO] Stop generating *coal* sections. Recommit r250342: move coal-sections-powerpc.s to subdirectory for powerpc. Some background on why we don't have to use *coal* sections anymore: Long ago when C++ was new and "weak" had not been standardized, an attempt was made in cctools to support C++ inlines that can be coalesced by putting them into their own section (TEXT/textcoal_nt instead of TEXT/text). The current macho linker supports the weak-def bit on any symbol to allow it to be coalesced, but the compiler still puts weak-def functions/data into alternate section names, which the linker must map back to the base section name. This patch makes changes that are necessary to prevent the compiler from using the "coal" sections and have it use the non-coal sections instead when the target architecture is not powerpc: TEXT/textcoal_nt instead use TEXT/text TEXT/const_coal instead use TEXT/const DATA/datacoal_nt instead use DATA/data If the target is powerpc, we continue to use the *coal* sections since anyone targeting powerpc is probably using an old linker that doesn't have support for the weak-def bits. Also, have the assembler issue a warning if it encounters a *coal* section in the assembly file and inform the users to use the non-coal sections instead. rdar://problem/14265330 Differential Revision: http://reviews.llvm.org/D13188 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250370 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r250349. Test case coal-sections-powerpc.s is still failing on some buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250351 91177308-0d34-0410-b5e6-96231b3b80d8
[MachO] Stop generating *coal* sections. Recommit r250342: add -arch=ppc32 to the RUN lines of powerpc tests. Some background on why we don't have to use *coal* sections anymore: Long ago when C++ was new and "weak" had not been standardized, an attempt was made in cctools to support C++ inlines that can be coalesced by putting them into their own section (TEXT/textcoal_nt instead of TEXT/text). The current macho linker supports the weak-def bit on any symbol to allow it to be coalesced, but the compiler still puts weak-def functions/data into alternate section names, which the linker must map back to the base section name. This patch makes changes that are necessary to prevent the compiler from using the "coal" sections and have it use the non-coal sections instead when the target architecture is not powerpc: TEXT/textcoal_nt instead use TEXT/text TEXT/const_coal instead use TEXT/const DATA/datacoal_nt instead use DATA/data If the target is powerpc, we continue to use the *coal* sections since anyone targeting powerpc is probably using an old linker that doesn't have support for the weak-def bits. Also, have the assembler issue a warning if it encounters a *coal* section in the assembly file and inform the users to use the non-coal sections instead. rdar://problem/14265330 Differential Revision: http://reviews.llvm.org/D13188 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250349 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r250342. Investigate why coal-sections-powerpc.s is failing on some buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250346 91177308-0d34-0410-b5e6-96231b3b80d8
[MachO] Stop generating *coal* sections. Some background on why we don't have to use *coal* sections anymore: Long ago when C++ was new and "weak" had not been standardized, an attempt was made in cctools to support C++ inlines that can be coalesced by putting them into their own section (TEXT/textcoal_nt instead of TEXT/text). The current macho linker supports the weak-def bit on any symbol to allow it to be coalesced, but the compiler still puts weak-def functions/data into alternate section names, which the linker must map back to the base section name. This patch makes changes that are necessary to prevent the compiler from using the "coal" sections and have it use the non-coal sections instead when the target architecture is not powerpc: TEXT/textcoal_nt instead use TEXT/text TEXT/const_coal instead use TEXT/const DATA/datacoal_nt instead use DATA/data If the target is powerpc, we continue to use the *coal* sections since anyone targeting powerpc is probably using an old linker that doesn't have support for the weak-def bits. Also, have the assembler issue a warning if it encounters a *coal* section in the assembly file and inform the users to use the non-coal sections instead. rdar://problem/14265330 Differential Revision: http://reviews.llvm.org/D13188 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250342 91177308-0d34-0410-b5e6-96231b3b80d8
Fix Clang-tidy modernize-use-nullptr warnings in source directories and generated files; other minor cleanups. Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13321 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249482 91177308-0d34-0410-b5e6-96231b3b80d8
Untabify. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248264 91177308-0d34-0410-b5e6-96231b3b80d8
Reformat blank lines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248263 91177308-0d34-0410-b5e6-96231b3b80d8