summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/mips-64-got.s
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-objdump] Further rearrange llvm-objdump sections for compatabilityJordan Rupprecht2019-10-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more. I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump: * Archive headers * File headers * Section headers * Symbol table * Dwarf debugging * Relocations (if `--disassemble` is not used) * Section contents * Disassembly Reviewers: jhenderson, justice_adams, grimar, ychen, espindola Reviewed By: jhenderson Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay Tags: #llvm Differential Revision: https://reviews.llvm.org/D68066 llvm-svn: 373671
* [mips] Use llvm-readobj `-A` flag in test cases. NFCSimon Atanasyan2019-10-031-1/+1
| | | | llvm-svn: 373589
* [mips] Make another set of test cases more tolerant to exact symbol ↵Simon Atanasyan2019-09-061-23/+27
| | | | | | addresses. NFC llvm-svn: 371174
* [ELF][MIPS] Improve testsFangrui Song2019-07-251-7/+7
| | | | | | | | | | * Add --no-show-raw-insn to llvm-objdump -d tests * When linking an executable with %t.so, the path %t.so will be recorded in the DT_NEEDED entry if %t.so doesn't have DT_SONAME. .dynstr will have varying lengths on different systems. Add -soname to make tests more robust. llvm-svn: 366988
* [mips] Use GNU-style output to make tests smaller. NFCSimon Atanasyan2019-05-221-54/+20
| | | | llvm-svn: 361394
* [test] Change llvm-readobj -long-option to --long-option or well-known short ↵Fangrui Song2019-05-011-1/+1
| | | | | | | | | | | | options. NFC Also change some options that have different semantics (cause confusion) in llvm-readelf mode: -s => -S -t => --symbols -sd => --section-data llvm-svn: 359651
* [ELF] Move `# REQUIRES:` line to the topFangrui Song2018-06-261-2/+1
| | | | llvm-svn: 335625
* [ELF][MIPS] Remove redundant checkings from test cases. NFCSimon Atanasyan2017-01-161-9/+8
| | | | llvm-svn: 292160
* ELF: Place relro sections after non-relro sections in r/w segment.Peter Collingbourne2017-01-101-9/+9
| | | | | | | | | | | | This is in preparation for my next change, which will introduce a relro nobits section. That requires that relro sections appear at the end of the progbits part of the r/w segment so that the relro nobits section can appear contiguously. Because of the amount of churn required in the test suite, I'm making this change separately. llvm-svn: 291523
* [ELF][MIPS] Make _gp, _gp_disp, __gnu_local_gp global symbolsSimon Atanasyan2016-12-081-1/+1
| | | | | | | | | | | | | | These MIPS specific symbols should be global because in general they can have an arbitrary value. By default this value is a fixed offset from .got section. This patch adds more checks to the mips-gp-local.s test case but marks it as XFAIL because LLD does not allow redefinition of absolute symbols value by a linker script. This should be fixed by D27276. Differential revision: https://reviews.llvm.org/D27524 llvm-svn: 289025
* [ELF][MIPS] Do not change MipsGotSection state in the getPageEntryOffset methodSimon Atanasyan2016-11-291-1/+1
| | | | | | | | | | | | | | The MipsGotSection::getPageEntryOffset calculates index of GOT entry with a "page" address. Previously this method changes the state of MipsGotSection because it modifies PageIndexMap field. That leads to the unpredictable results if getPageEntryOffset called from multiple threads. The patch makes getPageEntryOffset constant. To do so it calculates GOT entry index but does not update PageIndexMap field. Later in the MipsGotSection::writeTo method linker calculates "page" addresses and writes them to the output. llvm-svn: 288129
* [ELF][MIPS] Fix calculation of GOT "page address" entries numberSimon Atanasyan2016-11-291-6/+11
| | | | | | | | | | | | | | | | | If output section which referenced by R_MIPS_GOT_PAGE or R_MIPS_GOT16 relocations is small (less that 0x10000 bytes) and occupies two adjacent 0xffff-bytes pages, current formula gives incorrect number of required "page" GOT entries. The problem is that in time of calculation we do not know the section address and so we cannot calculate number of 0xffff-bytes pages exactly. This patch fix the formula. Now it gives a correct number of pages in the worst case when "small" section intersects 0xffff-bytes page boundary. From the other side, sometimes it adds one more redundant GOT entry for each output section. But usually number of output sections referenced by GOT relocations is small. llvm-svn: 288127
* [ELF][MIPS] Support GOT entries for non-preemptible symbols with different ↵Simon Atanasyan2016-06-191-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | addends There are two motivations for this patch. The first one is a preparation for support MIPS TLS relocations. It might sound like a joke but for GOT entries related to TLS relocations MIPS ABI uses almost regular approach with creation of dynamic relocations for each GOT enty etc. But we need to separate these 'regular' TLS related entries from MIPS specific local and global parts of GOT. ABI declare simple solution - all TLS related entries allocated at the end of GOT after local/global parts. The second motivation it to support GOT relocations for non-preemptible symbols with addends. If we have more than one GOT relocations against symbol S with different addends we need to create GOT entries for each unique Symbol/Addend pairs. So we store all MIPS GOT entries in separate containers. For non-preemptible symbols we have to maintain two data structures. The first one is MipsLocal vector. Each entry corresponds to the GOT entry from the 'local' part of the GOT contains the symbol's address plus addend. The second one is MipsLocalMap. It is a map from Symbol/Addend pair to the GOT index. Differential Revision: http://reviews.llvm.org/D21297 llvm-svn: 273127
* [ELF][MIPS] R_MIPS_GOT_DISP, R_MIPS_GOT_PAGE, R_MIPS_GOT_OFST relocations ↵Simon Atanasyan2016-05-041-0/+80
support These relocations introduced by MIPS N64 ABI. R_MIPS_GOT_DISP references GOT entry with full symbol's address, R_MIPS_GOT_PAGE creates GOT entry with address of memory page which includes symbol's address, R_MIPS_GOT_OFST used together with R_MIPS_GOT_PAGE. This relocation calculates offset from beginning of memory page to the symbol address. llvm-svn: 268525
OpenPOWER on IntegriCloud