| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
This is a small difference I noticed to gold and bfd. When given
--print-gc-sections, we print sections a linkerscript marks
DISCARD. The other linkers don't.
llvm-svn: 295467
|
|
|
|
|
|
|
| |
I cannot reproduce the issue locally, but for some reason some bots
want to instantiate this from the header.
llvm-svn: 295365
|
|
|
|
|
|
|
| |
We can do this now that the linker script and the writer agree on
which sections should be combined.
llvm-svn: 295341
|
|
|
|
|
|
|
| |
The code to handle the input SHT_REL/SHT_RELA sections was getting
confused with the linker generated relocation sections.
llvm-svn: 295322
|
|
|
|
|
|
|
|
| |
This is still not sufficient for lld to handle its own output when a
fde points to a discarded section. I am investigating if it is better
to change the -r output or make lld able to read the current version.
llvm-svn: 295141
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--gc-section case, no /DISCARD/ support) #3"
with temporarily file name fix in testcase.
Original commit message:
-q, --emit-relocs - Generate relocations in output
Simplest implementation:
* no GC case,
* no "/DISCARD/" linkerscript command support.
This patch is extracted from D28612 / D29636,
Relative to PR31579.
Differential revision: https://reviews.llvm.org/D29663
llvm-svn: 294469
|
|
|
|
|
|
|
|
|
| |
--gc-section case, no /DISCARD/ support) #3"
Broked build bot:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/5835/steps/test/logs/stdio
llvm-svn: 294466
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/DISCARD/ support) #3
-q, --emit-relocs - Generate relocations in output
Simplest implementation:
* no GC case,
* no "/DISCARD/" linkerscript command support.
This patch is extracted from D28612 / D29636,
Relative to PR31579.
Differential revision: https://reviews.llvm.org/D29663
llvm-svn: 294464
|
|
|
|
|
|
|
| |
This reverts commit r294346. Looks like it regressed the build of
magenta.
llvm-svn: 294460
|
|
|
|
|
|
|
| |
We now just keep the address the section would have if it was
allocatable. Only the writer ignores it at the very end.
llvm-svn: 294346
|
|
|
|
| |
llvm-svn: 294057
|
|
|
|
|
|
|
| |
Now that we combine multiple synthetic merge section into one output
section there is no point in trying to propagate a value.
llvm-svn: 294048
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With a synthetic merge section we can have, for example, a single
.rodata section with stings, fixed sized constants and non merge
constants.
I can be simplified further by not setting Entsize, but that is
probably better done is a followup patch.
This should allow some cleanup in the linker script code now that
every output section command maps to just one output section.
llvm-svn: 294005
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D29278
llvm-svn: 293613
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ELF] Fixed formatting. NFC
and
[ELF] Bypass section type check
Differential revision: https://reviews.llvm.org/D28761
They do the opposite of what was asked for in the code review.
llvm-svn: 293320
|
|
|
|
| |
llvm-svn: 293278
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D28761
llvm-svn: 293276
|
|
|
|
|
|
|
| |
The format is not exactly the same as the one in bfd since bfd always
follows a linker script and prints it along.
llvm-svn: 291958
|
|
|
|
|
|
|
|
|
| |
The effect is that the nobits section gets space allocated on disk.
Both bfd and gold allow this with linker scripts. To try to keep
things simple in lld, always allow it for now.
llvm-svn: 291795
|
|
|
|
| |
llvm-svn: 291113
|
|
|
|
| |
llvm-svn: 291110
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After Mark's patch I was wondering what was the rationale for the ELF
spec requiring us to merge only sections with matching flags and
types. I tried emailing
https://groups.google.com/forum/#!forum/generic-abi, but looks like my
emails are not being posted (the list is probably moderated). I
emailed Cary Coutant instead.
Cary pointed out that the section was a late addition and didn't got
the scrutiny it deserved. Given that and the problems found by
implementing the letter of the standard, I propose changing lld to
merge all sections with the same name and issue errors if the types or
some critical flags are different.
This should allow an unmodified firefox linked with lld to run.
This also merges some code with the linkerscript path.
llvm-svn: 291107
|
|
|
|
|
|
|
|
|
|
|
| |
That variable was of type DenseMap<StringRef, unsigned>, but the
unsigned numbers needed to be monotonicly increasing numbers because
the implementation that used the variable depended on that fact.
That was an implementation detail and shouldn't have leaked into Config.
This patch simplifies its type to std::vector<StringRef>.
llvm-svn: 290151
|
|
|
|
|
|
|
|
|
|
|
|
| |
I thought for a while about how to remove it, but it looks like we
can just copy the file for now. Of course I'm not happy about that,
but it's just less than 50 lines of code, and we already have
duplicate code in Error.h and some other places. I want to solve
them all at once later.
Differential Revision: https://reviews.llvm.org/D27819
llvm-svn: 290062
|
|
|
|
| |
llvm-svn: 289084
|
|
|
|
| |
llvm-svn: 288599
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D27097
llvm-svn: 288114
|
|
|
|
| |
llvm-svn: 287977
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D27098
llvm-svn: 287914
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The .ARM.exidx table has an entry for each function with the first entry
giving the start address of the function, the table is sorted in ascending
order of function address. Given a PC value, the unwinder will search the
table for the entry that contains the PC value.
If the table entry happens to be the last, the range of the addresses that
the final unwinding table describes will extend to the end of the address
space. To prevent an incorrect address outside the address range of the
program matching the last entry we follow ld.bfd's example and add a
sentinel EXIDX_CANTUNWIND entry at the end of the table. This gives the
final real table entry an upper bound.
In addition the llvm libunwind unwinder currently depends on the presence
of a sentinel entry (PR31091).
Differential revision: https://reviews.llvm.org/D26977
llvm-svn: 287869
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D26914
llvm-svn: 287750
|
|
|
|
|
|
| |
This should have been moved along with r287554.
llvm-svn: 287564
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D26918
llvm-svn: 287554
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D26906
llvm-svn: 287549
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D26854
llvm-svn: 287526
|
|
|
|
| |
llvm-svn: 287467
|
|
|
|
|
|
|
| |
Filler expressions in linker script "=fillexp" are always handled
as 32-bit integers. Thus the new type is more natural.
llvm-svn: 287445
|
|
|
|
| |
llvm-svn: 287372
|
|
|
|
|
|
|
| |
It seems a lot simpler to just sort the sections and let the
relocations do the rest.
llvm-svn: 287365
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D26842
llvm-svn: 287346
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D26834
llvm-svn: 287326
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D26792
llvm-svn: 287322
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MergeOutputSection class was a bit hard to use because it provdes
a series of finalize functions that have to be called in a right way
at a right time. It also intereacted with MergeInputSection, and the
logic was somewhat entangled between the two classes.
This patch simplifies it by providing only one finalize function.
Now, all you have to do is to call MergeOutputSection::finalize
when you have added all sections to the output section. Then, it
internally merges strings and initliazes StringPiece objects.
I think this is much easier to understand.
This patch also adds comments.
llvm-svn: 287314
|
|
|
|
| |
llvm-svn: 287297
|
|
|
|
| |
llvm-svn: 287296
|
|
|
|
|
|
|
|
| |
Since the output has a section table too, it is meaningful to compute
the sh_link. In a more practical note, the binutils' strip crashes if
sh_link is not set for SHT_ARM_EXIDX.
llvm-svn: 287280
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D26740
llvm-svn: 287216
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D26669
llvm-svn: 287092
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces the following changes:
- DynamicSection now inherits InputSection<ELFT> and was moved
to SyntheticSections.h/.cpp.
- Link and Entsize fields of DynamicSection are propagated to
its output section
- In<ELFT>::SyntheticSections was removed.
- Finalization of synthetic sections was removed from
OutputSection<ELFT>::finalize. Now finalizeSyntheticSections is
used instead.
Differential revision: https://reviews.llvm.org/D26603
llvm-svn: 286950
|
|
|
|
| |
llvm-svn: 286805
|