summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/verdef-defaultver.s
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-readobj] - Always print "Predecessors" for version definition sections.Georgii Rymar2019-11-271-0/+3
| | | | | | | | | | | | | This is a follow-up discussed in D70495 thread. The current logic is unusual for llvm-readobj. It doesn't print predecessors list when it is empty. This is not good for machine parsers. D70495 had to add this condition during refactoring to reduce amount of changes, in tests, because the original code also had a similar logic. Now seems it is time to get rid of it. This patch does it. Differential revision: https://reviews.llvm.org/D70717
* [llvm-readobj/llvm-readelf] - Improve dumping of versioning sections.Georgii Rymar2019-11-201-5/+11
| | | | | | | | | | | | | Our elf-versioninfo.test is not perfect. It does not properly test how flags are dumped and also we have a bug: they are dumped as enums in LLVM style now, i.e not dumped properly. GNU style uses a `versionFlagToString` method to build a string from flags which seems is consistent with GNU readelf. In this patch I fixed the issues mentioned. Differential revision: https://reviews.llvm.org/D70399
* [LLD][ELF] - Update test cases after llvm-readobj output format change.George Rimar2019-10-171-8/+8
| | | | | | | | | | | The change was: SHT_GNU_verdef { -> VersionDefinitions [ SHT_GNU_verneed { -> VersionRequirements [ Version symbols [ -> VersionSymbols [ EH_FRAME Header [ -> EHFrameHeader { llvm-svn: 375096
* [LLD][ELF] - Update test cases after llvm-readobj change.George Rimar2019-10-111-52/+40
| | | | | | https://reviews.llvm.org/D68704 changed the output format. llvm-svn: 374542
* [ELF][X86] Allow PT_LOAD to have overlapping p_offset ranges on EM_X86_64Fangrui Song2019-09-161-7/+7
| | | | | | | | Port the D64906 technique to EM_X86_64. Differential Revision: https://reviews.llvm.org/D67482 llvm-svn: 371958
* [test] Change llvm-readobj -long-option to --long-option or well-known short ↵Fangrui Song2019-05-011-2/+2
| | | | | | | | | | | | 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
* [llvm-readobj] Should declare `ListScope` for `verneed` entries.Xing GUO2019-04-101-12/+14
| | | | | | | | | | | | | | | | Summary: YAML mappings require keys to be unique. See: https://yaml.org/spec/1.2/spec.html#id2764652 Reviewers: jhenderson, grimar, rupprecht, espindola, ruiu Reviewed By: ruiu Subscribers: ruiu, emaste, arichardson, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60438 llvm-svn: 358078
* [ELF] Split RW PT_LOAD on the PT_GNU_RELRO boundaryFangrui Song2019-03-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Based on Peter Collingbourne's suggestion in D56828. Before D56828: PT_LOAD(.data PT_GNU_RELRO(.data.rel.ro .bss.rel.ro) .bss) Old: PT_LOAD(PT_GNU_RELRO(.data.rel.ro .bss.rel.ro) .data .bss) New: PT_LOAD(PT_GNU_RELRO(.data.rel.ro .bss.rel.ro)) PT_LOAD(.data. .bss) The new layout reflects the runtime memory mappings. By having two PT_LOAD segments, we can utilize the NOBITS part of the first PT_LOAD and save bytes for .bss.rel.ro. .bss.rel.ro is currently small and only used by copy relocations of symbols in read-only segments, but it can be used for other purposes in the future, e.g. if a relro section's statically relocated data is all zeros, we can move it to .bss.rel.ro. Reviewers: espindola, ruiu, pcc Reviewed By: ruiu Subscribers: nemanjai, jvesely, nhaehnle, javed.absar, kbarton, emaste, arichardson, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58892 llvm-svn: 356226
* [ELF] Remove checking for spurious '@' at the end of dynamic sym namesJames Henderson2019-01-081-4/+4
| | | | | | | | | | | | llvm-readobj currently has a bug (see PR40097) where it prints '@' at the end of unversioned dynamic symbols. This bug will be fixed in a separate later commit, but these tests need fixing first. Reviewed by: ruiu, Higuoxing Differential Revision: https://reviews.llvm.org/D56388 llvm-svn: 350614
* [ELF] Make non-writable non-executable PROGBITS sections closer to .textFangrui Song2018-06-261-4/+4
| | | | | | | | | | | | This generalizes the old heuristic placing SHT_DYNSYM SHT_DYNSTR first in the readonly SHF_ALLOC segment. Reviewers: espindola Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D48406 llvm-svn: 335674
* [lld] Mitigate relocation overflow [part 1 of 2].Han Shen2018-05-151-4/+4
| | | | | | | | | | | This CL places .dynsym and .dynstr at the beginning of SHF_ALLOC sections. We do this to mitigate the possibility that huge .dynsym and .dynstr sections placed between ro-data and text sections cause relocation overflow. Differential Revision: https://reviews.llvm.org/D45788 llvm-svn: 332374
* [ELF] - Revert of: r332038, r332054, r332060, r332061, r332062, r332063George Rimar2018-05-111-4/+4
| | | | | | | | | | | This reverts "Mitigate relocation overflow [part 1 of 2]." and the following commits which were trying to fix the bots. At the moment of r332082, bots are still failing and we need to find the reason of test case breakages first of all. http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/17042/steps/test/logs/stdio http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/29845/steps/test/logs/stdio llvm-svn: 332085
* Mitigate relocation overflow [part 1 of 2].Han Shen2018-05-101-4/+4
| | | | | | | | | | | | This CL is to mitigate R_X86_64_PC32 relocation overflow problems for huge binaries that has near 4G allocated sections. By examining those binaries, there're 2 issues contributes to the problem: 1). huge ".dynsym" and ".dynstr" stands in the way between .rodata and .text 2). _init_array_start/end are placed at 0 if no ".init_array" presents, this causes .text relocation against them become more prone to overflow. This CL addresses 1st problem (the 2nd will be addressed in another CL.) by assigning a smaller sortrank to .dynsym and .dynstr thus they no longer stand in between. llvm-svn: 332038
* Don't depend on "call foo" producing a X86_64_PC32.Rafael Espindola2018-02-161-3/+3
| | | | | | | | | | Newer versions of the gnu assembler produce a X86_64_PLT32 for calls. There is a change under review in llvm to do the same, so update the tests to not depend on it. We can still produce a R_X86_64_PC32 with ".long foo - .". llvm-svn: 325379
* [ELF] - Do --hash-style=both by default.George Rimar2017-10-061-2/+2
| | | | | | | | | | | | | | Its PR34712, GNU linkers recently changed default values to "both" of "sysv". Patch do the same for all targets except MIPS, where .gnu.hash section is not yet supported. Code suggested by Rui Ueyama. Differential revision: https://reviews.llvm.org/D38407 llvm-svn: 315051
* lld: Default image base address to 0x200000 on x86-64Ed Maste2016-11-231-4/+4
| | | | | | | | | Align to the large page size (known as a superpage or huge page). FreeBSD automatically promotes large, superpage-aligned allocations. Differential Revision: https://reviews.llvm.org/D27042 llvm-svn: 287782
* Better formatting.Rui Ueyama2016-11-231-28/+24
| | | | | | If a line is too long, its error message becomes hard to read. llvm-svn: 287739
* Handle versioned symbols efficiently.Rui Ueyama2016-07-171-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Versions can be assigned to symbols in two different ways. One is the usual version scripts, and the other is special symbol suffix '@'. If a symbol contains '@', the string after that is considered to specify a version name. Previously, we look for '@' for all symbols. Anything that works on every symbol can be expensive because the linker has to handle a lot of symbols. The search for '@' was not an exception. In this patch, I made two optimizations. The first optimization is to handle '@' only when at least one version is defined. If no versions are defined, no versions can be assigned to any symbols, so it's waste of time to search for '@'. The second optimization is to scan only suffixes of symbol names instead of entire symbol names. Symbol names can be very long, but symbol versions are usually short, so scanning entire symbol names is waste of time, too. There are some error cases which we no longer be able to detect with this patch. I don't think it's a major drawback because they are minor errors. Speed is more important. This change improves LLD with debug info self-link time from 6.6993 seconds to 6.3426 seconds (or -5.3%). Differential Revision: https://reviews.llvm.org/D22433 llvm-svn: 275711
* [ELF] - Depricate version references.George Rimar2016-07-011-1/+0
| | | | | | | | | | | | | | | | This is PR28358 According to https://www.akkadia.org/drepper/dsohowto.pdf "The fourth point, the VERS 1.0 version being referred to in the VERS 2.0 definition, is not really important in symbol versioning. It marks the predecessor relationship of the two versions and it is done to maintain the similar- ities with Solaris’ internal versioning. It does not cause any problem it might in fact be useful to a human reader so predecessors should always be mentioned." Patch partially reverts 273423 "[ELF] - Implemented version script hierarchies.", version references are just ignored now. Differential revision: http://reviews.llvm.org/D21888 llvm-svn: 274345
* [ELF] - Implemented support of default/non-default symbols versionsGeorge Rimar2016-06-281-0/+210
t is possible to create new version of symbol instead of depricated one using combination of version script and asm commands. For example: __asm__(".symver b_1,b@LIBSAMPLE_1.0"); int b_1() { return 10; } __asm__(".symver b_2,b@@LIBSAMPLE_2.0"); int b_2() { return 20; } This code makes b_2() to be default implementation for b(). b_1() is used for compatibility with binaries compiled against library of older version LIBSAMPLE_1.0. This patch implements support for above functionality in lld. Differential revision: http://reviews.llvm.org/D21681 llvm-svn: 274002
OpenPOWER on IntegriCloud