summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/ELF/merge.s
Commit message (Collapse)AuthorAgeFilesLines
* Revert r240302 ("Bring r240130 back.").Daniel Jasper2015-06-231-2/+2
| | | | | | | | | | | | | This causes errors like: ld: error: blah.o: requires dynamic R_X86_64_PC32 reloc against '' which may overflow at runtime; recompile with -fPIC blah.cc:function f(): error: undefined reference to '' blah.o:g(): error: undefined reference to '' I have not yet come up with an appropriate reproduction. llvm-svn: 240394
* Bring r240130 back.Rafael Espindola2015-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | Now that pr23900 is fixed, we can bring it back with no changes. Original message: Make all temporary symbols unnamed. What this does is make all symbols that would otherwise start with a .L (or L on MachO) unnamed. Some of these symbols still show up in the symbol table, but we can just make them unnamed. In order to make sure we produce identical results when going thought assembly, all .L (not just the compiler produced ones), are now unnamed. Running llc on llvm-as.opt.bc, the peak memory usage goes from 208.24MB to 205.57MB. llvm-svn: 240302
* Revert 240130, it caused crashes (repro in PR23900).Nico Weber2015-06-191-2/+2
| | | | llvm-svn: 240193
* Make all temporary symbols unnamed.Rafael Espindola2015-06-191-2/+2
| | | | | | | | | | | | | | | | What this does is make all symbols that would otherwise start with a .L (or L on MachO) unnamed. Some of these symbols still show up in the symbol table, but we can just make them unnamed. In order to make sure we produce identical results when going thought assembly, all .L (not just the compiler produced ones), are now unnamed. Running llc on llvm-as.opt.bc, the peak memory usage goes from 208.24MB to 205.57MB. llvm-svn: 240130
* Update tests to not be as dependent on section numbers.Rafael Espindola2015-04-151-1/+1
| | | | | | | | Many of these predate llvm-readobj. With elf-dump we had to match a relocation to symbol number and symbol number to symbol name or section number. llvm-svn: 235015
* Completely rewrite ELFObjectWriter::RecordRelocation.Rafael Espindola2014-03-291-5/+4
| | | | | | | | | | | | | | | | | | | I started trying to fix a small issue, but this code has seen a small fix too many. The old code was fairly convoluted. Some of the issues it had: * It failed to check if a symbol difference was in the some section when converting a relocation to pcrel. * It failed to check if the relocation was already pcrel. * The pcrel value computation was wrong in some cases (relocation-pc.s) * It was missing quiet a few cases where it should not convert symbol relocations to section relocations, leaving the backends to patch it up. * It would not propagate the fact that it had changed a relocation to pcrel, requiring a quiet nasty work around in ARM. * It was missing comments. llvm-svn: 205076
* Change how we iterate over relocations on ELF.Rafael Espindola2013-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | For COFF and MachO, sections semantically have relocations that apply to them. That is not the case on ELF. In relocatable objects (.o), a section with relocations in ELF has offsets to another section where the relocations should be applied. In dynamic objects and executables, relocations don't have an offset, they have a virtual address. The section sh_info may or may not point to another section, but that is not actually used for resolving the relocations. This patch exposes that in the ObjectFile API. It has the following advantages: * Most (all?) clients can handle this more efficiently. They will normally walk all relocations, so doing an effort to iterate in a particular order doesn't save time. * llvm-readobj now prints relocations in the same way the native readelf does. * probably most important, relocations that don't point to any section are now visible. This is the case of relocations in the rela.dyn section. See the updated relocation-executable.test for example. llvm-svn: 182908
* Replace coff-/elf-dump with llvm-readobjNico Rieck2013-04-121-74/+11
| | | | llvm-svn: 179361
* Fix the bitwidth of the remaining fields.Rafael Espindola2011-08-041-1/+1
| | | | llvm-svn: 136884
* print st_shndx with the correct number of bits.Rafael Espindola2011-08-041-1/+1
| | | | llvm-svn: 136880
* print st_other with the correct number of bits.Rafael Espindola2011-08-041-1/+1
| | | | llvm-svn: 136877
* print st_type with the correct number of bits.Rafael Espindola2011-08-041-1/+1
| | | | llvm-svn: 136875
* Print st_bind with the correct number of bits.Rafael Espindola2011-08-041-1/+1
| | | | llvm-svn: 136874
* Another counter goes decimal.Rafael Espindola2011-08-041-4/+4
| | | | llvm-svn: 136871
* Change anther counter to decimal.Rafael Espindola2011-08-041-5/+5
| | | | llvm-svn: 136870
* Don't print a counter in hex.Rafael Espindola2011-08-041-1/+1
| | | | llvm-svn: 136869
* Print all the bits in the addend.Rafael Espindola2011-08-041-1/+1
| | | | llvm-svn: 136867
* Update testsRafael Espindola2011-04-071-1/+1
| | | | llvm-svn: 129116
* Write the section table and the section data in the same order thatRafael Espindola2011-03-201-24/+24
| | | | | | | gun as does. This makes it a lot easier to compare the output of both as the addresses are now a lot closer. llvm-svn: 127972
* Fixing r116753 r116756 r116777Jason W Kim2010-10-191-33/+33
| | | | | | | | | | | | | | | | | | | The failures in r116753 r116756 were caused by a python issue - Python likes to append 'L' suffix to stringified numbers if the number is larger than a machine int. Unfortunately, this causes a divergence of behavior between 32 and 64 bit python versions. I re-crafted elf-dump/common_dump to take care of these issues by: 1. always printing 0x (makes for easy sed/regex) 2. always print fixed length (exactly 2 + numBits/4 digits long) by mod ((2^numBits) - 1) 3. left-padded with '0' There is a residual common routine that is also used by macho-dump (dataToHex) , so I left the 'section_data' test values alone. llvm-svn: 116823
* Speculatively revert 116753 and 116756 to attempt to fix the bots.Eric Christopher2010-10-191-33/+33
| | | | llvm-svn: 116777
* Changed elf-dump to output hex format by default.Jason W Kim2010-10-181-33/+33
| | | | | | Also updated tests. llvm-svn: 116753
* If a symbol is global, reloc against it even if it is in a mergeable section.Rafael Espindola2010-10-061-0/+15
| | | | llvm-svn: 115817
* Correctly handle GOTPCREL relocations.Rafael Espindola2010-10-061-0/+9
| | | | llvm-svn: 115793
* Use a relocation against the symbol if it is a PLT and the symbol is in anotherRafael Espindola2010-10-051-4/+20
| | | | | | section. Common because of linkonce sections. llvm-svn: 115718
* Tests that now pass.Rafael Espindola2010-10-051-6/+37
| | | | llvm-svn: 115622
* Write relocations in the end of the file. This matches what gas does andRafael Espindola2010-09-271-5/+5
| | | | | | makes files easier to diff. llvm-svn: 114898
* Move ELF to HasReliableSymbolDifference=true. Also take the opportunity to putRafael Espindola2010-09-251-0/+26
symbols defined in merge sections in independent atoms. llvm-svn: 114786
OpenPOWER on IntegriCloud