Page MenuHomePhabricator

psmith (Peter Smith)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 17 2015, 9:03 AM (256 w, 1 d)

Recent Activity

Today

psmith accepted D84001: [ELF] Allow mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER sections and sort within InputSectionDescription.

Given that it is possible to write a linker script that does work with *(pattern1 pattern2) then I don't have any objections. I've tentatively approved as it looks like was the most cautious here.

Fri, Aug 14, 5:47 AM · Restricted Project
psmith accepted D85867: [ELF] Assign file offsets of non-SHF_ALLOC after SHF_ALLOC and set sh_addr=0 to non-SHF_ALLOC.

Thanks for the update. I'm happy with the changes. I've tentatively approved, James/Edd please shout if you have any objections?

Fri, Aug 14, 5:38 AM · Restricted Project
psmith added a comment to D85056: [ELF] Add --keep-section to expose linkerscript KEEP directive as a linker flag.

I do have some sympathy with wanting to use a command line option to keep an individual section from the command line as it has been useful in Arm's proprietary linker, although this is mainly due to the convenience of not having to create or modify another file.

One observation I'd make about the proposed implementation is that it looks like it only implements a subset of the Linker Script KEEP command that supports precise matches of a section name. Quoting from the GNU linker manual:

When link-time garbage collection is in use (`--gc-sections'), it is often useful to mark sections that should not be eliminated. This is accomplished by surrounding an input section's wildcard entry with KEEP(), as in KEEP(*(.init)) or KEEP(SORT_BY_NAME(*)(.ctors)).

That permits the full power of the input section description to discriminate via object, as there can be many sections with the same name. Wildcards can sometimes be useful too.

I think it would be worth considering a richer interface for keep-sections. In Arm's proprietary linker we permitted a similar syntax as for the equivalent linker script. This did mean quoting or escaping parentheses but did provide equivalence in what could be achieved.

Having a non-INSERT-AFTER/BEFORE SECTIONS command is considered an external linker script and can change the default layout decisions. I can also feel sympathy with the users but I am also wary of adding these non-orthogonal features. The recent D76482 (__build_id_start = .) and this patch make me think of output section descriptions (a fragment of a SECTIONS command) which do not affect section layout.

@psmith @grimar I think we probably should start a conversation with binutils about such a feature. If they find needs as well, we will have a common ground, it'd be great. They need to be given the decision making opportunity to reduce the risk they create a similar but incompatible feature in the future.

One idea is:

OVERRIDE SECTIONS {
  .foo : { KEEP(*(.foo)) }
  .bar : { KEEP(*(.bar)) }
  sym = .;   // symbol assignments are disallowed
}

The output section descriptions will override .foo & .bar in the external linker script. If the external linker script does not describe .foo or .bar, the command will change the orphan sections.

Another syntax:

SECTIONS {
  .foo : { KEEP(*(.foo)) }
  .bar : { KEEP(*(.bar)) }
} REPLACE .foo;
Fri, Aug 14, 5:28 AM · Restricted Project

Yesterday

psmith added a comment to D85867: [ELF] Assign file offsets of non-SHF_ALLOC after SHF_ALLOC and set sh_addr=0 to non-SHF_ALLOC.

Just to check I understand.

Thu, Aug 13, 12:49 AM · Restricted Project

Wed, Aug 12

psmith added a comment to D85785: [ELF] -r: allow SHT_X86_64_UNWIND to be merged into SHT_PROGBITS.

I think this should be ok for .ARM.exidx sections as they have a SHF_LINK_ORDER dependency which prevents them from being merged in relocatable links.

Wed, Aug 12, 1:32 AM · Restricted Project

Tue, Aug 11

psmith accepted D85651: [LLD][ELF] - Do not produce an invalid dynamic relocation order with --shuffle-sections..

Looks good to me. Will be worth seeing if MaskRay has any comments.

Tue, Aug 11, 1:09 AM

Mon, Aug 10

psmith added a comment to D85618: [ELF] Move the outSecOff addend from relocAlloc/relocNonAlloc/... to InputSectionBase::relocate.

Thanks for the update, I'm happy when George is.

Mon, Aug 10, 10:02 AM · Restricted Project
psmith accepted D85661: [ELF] Avoid creating a 2.1GB output file in arm-exidx-range.s.

Thanks for spotting that. I'd personally prefer to fix in the linker script, rather than make the code RW but I don't have a strong preference.

Mon, Aug 10, 10:00 AM · Restricted Project
psmith added a comment to D85618: [ELF] Move the outSecOff addend from relocAlloc/relocNonAlloc/... to InputSectionBase::relocate.

Simplification looks good to me. I'm not sure about the test changes as I would have expected the change to be NFC. If these are test improvements it will be worth altering separately.

Mon, Aug 10, 12:59 AM · Restricted Project

Thu, Aug 6

psmith added a comment to D85239: [DOCS] Add more detail to stack protector documentation.

I agree it's not what I'd like. I'm not sure how to react to MaskRays comment. The top of the ClangCommandLineReference.rst says:

-------------------------------------------------------------------
NOTE: This file is automatically generated by running clang-tblgen
-gen-opt-docs. Do not edit this file by hand!!
-------------------------------------------------------------------

This uses Options.td to generate the file. I don't know how true this is anymore given that both files are checked in. They may have been separated. I've seen at least one instance in the log where the whole file has been regenerated.

Thu, Aug 6, 11:27 AM · Restricted Project
psmith committed rG839d974ee0e4: [DOCS] Add more detail to stack protector documentation (authored by psmith).
[DOCS] Add more detail to stack protector documentation
Thu, Aug 6, 5:59 AM
psmith closed D85239: [DOCS] Add more detail to stack protector documentation.
Thu, Aug 6, 5:59 AM · Restricted Project

Wed, Aug 5

psmith abandoned D75347: [MC][ELF][ARM] Add relocations for some ARM pc-relative fixups..

Yes. I think the consensus was to match the GCC behaviour, I'll abandon the revision.

Wed, Aug 5, 8:20 AM · Restricted Project
psmith added a comment to D85100: [ELF] Allow sections after a non-SHF_ALLOC section to be covered by PT_LOAD.

FWIW this looks good to me too.

Wed, Aug 5, 8:19 AM · Restricted Project, Restricted Project
psmith added a comment to D85086: [ELF] --oformat=binary: use LMA to compute file offsets.

No objections from me either. I guess LGTM if George's last comment can be resolved.

Wed, Aug 5, 8:08 AM · Restricted Project
psmith added inline comments to D85239: [DOCS] Add more detail to stack protector documentation.
Wed, Aug 5, 4:57 AM · Restricted Project
psmith updated the diff for D85239: [DOCS] Add more detail to stack protector documentation.

uploaded diff with both Options.td and ClangCommandLineReference.rst

Wed, Aug 5, 4:57 AM · Restricted Project
psmith added a comment to D85239: [DOCS] Add more detail to stack protector documentation.

This file is auto generated. The real documentation should go to clang/include/clang/Driver/Options.td

Wed, Aug 5, 4:56 AM · Restricted Project
psmith added a comment to D84610: [ELF] --icf: don't fold text sections with LSDA.

I agree I think it is best to err on the side of correctness. As I understand it we could do better (merge more sections) but this would involve pulling apart .eh_frame sections to show equivalence. I think that could come later.

Wed, Aug 5, 1:17 AM · Restricted Project
psmith added a comment to D84825: [ELF] Change tombstone values to (.debug_ranges/.debug_loc) 1 and (other .debug_*) 0.

My apologies for not commenting earlier. I haven't had a lot of spare time and I only have a weak opinion, certainly far weaker than the other commenters.

Wed, Aug 5, 1:12 AM · Restricted Project

Tue, Aug 4

psmith requested review of D85239: [DOCS] Add more detail to stack protector documentation.
Tue, Aug 4, 12:34 PM · Restricted Project
psmith added a comment to D85086: [ELF] --oformat=binary: use LMA to compute file offsets.

I agree with MaskRay that if we do support the feature then we should make sure it works or document its limitations, even if our limitations are "Implemented to the degree that it supports the FreeBSD Kernel, we recommend producing an ELF file and using llvm-objcopy --output-target=binary."

Tue, Aug 4, 1:09 AM · Restricted Project

Sat, Aug 1

psmith added a comment to D85056: [ELF] Add --keep-section to expose linkerscript KEEP directive as a linker flag.

I do have some sympathy with wanting to use a command line option to keep an individual section from the command line as it has been useful in Arm's proprietary linker, although this is mainly due to the convenience of not having to create or modify another file.

Sat, Aug 1, 5:30 AM · Restricted Project

Fri, Jul 31

psmith added a comment to D76482: [lld][ELF] Provide optional hidden symbols for build ID.

It is a pity that the section name is not a valid C identifier otherwise start_ and stop_ would have been generated automatically.

Fri, Jul 31, 5:50 AM · Restricted Project

Wed, Jul 29

psmith added a comment to D82014: [compiler-rt] Replaced __SOFT_FP__ with __SOFTFP__.

Ping @kamleshbhalui

I hope your or some reviewer can test the buildability on ARM.

Wed, Jul 29, 9:47 AM · Restricted Project, Restricted Project

Mon, Jul 20

psmith accepted D84129: [ELF] -r: rewrite SHT_GROUP content if some members are combined or discarded.

This looks good to me. Regardless of whether we allow --gc-sections it will be worth getting this right for /DISCARD/. Will be worth waiting to see if there are any further comments from other reviewers.

Mon, Jul 20, 2:58 AM · Restricted Project
psmith added a comment to D84131: [ELF] Support -r --gc-sections.

I guess if the use case for -r is a kernel module then garbage collection can make sense as the "object" is not relinked. What happens when there is no GC root? I think it will be worth detecting that and turning GC off as otherwise everything will get removed which is unlikely to be what was wanted.

Mon, Jul 20, 2:48 AM · Restricted Project

Sat, Jul 18

psmith added a comment to D72904: [ELF] Allow SHF_LINK_ORDER sections to have sh_link=0.

Whilst the actual change seems fine, in that it does what it sets out to do, I believe, I'm struggling to follow why a SHF_LINK_ORDER section should have a sh_link of 0 at all. Surely the section should just then not have SHF_LINK_ORDER? What sections actually have sh_link=0 and SHF_LINK_ORDER?

Sat, Jul 18, 1:58 PM · Restricted Project
psmith added inline comments to D84001: [ELF] Allow mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER sections and sort within InputSectionDescription.
Sat, Jul 18, 1:52 PM · Restricted Project

Fri, Jul 17

psmith added a comment to D84001: [ELF] Allow mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER sections and sort within InputSectionDescription.

I'll take a look over the weekend, also at D72904, apologies won't be able to get to it today.

Fri, Jul 17, 12:41 AM · Restricted Project

Jul 13 2020

psmith added a comment to D83655: [AsmPrinter] Split up .gcc_except_table.

What would happen if there was a single .text section containing multiple functions, would that produce multiple .gcc_except_table sections each with a SHF_LINK_ORDER dependency on the single .text section? I think that this is OK as there are no other sections that refer to .gcc_except_table and there doesn't need to be a total order. Ideally we could have one .gcc_except_table section per associated .text section.

Jul 13 2020, 1:04 PM · Restricted Project

Jul 8 2020

psmith added inline comments to D83243: [ELF] Rename canRelax to toExecRelax. NFC.
Jul 8 2020, 12:59 AM · Restricted Project

Jul 7 2020

psmith added a comment to D83264: [ELF] Add -z dead-reloc-in-nonalloc=<section_glob>=<value>.

I think an option makes sense. I have a small reservation about making users order their matches on the command line. We should make it more explicit in the help and the manual, or try and sort the matches using a heuristic order of specificity, for example no wildcards is more specific than wildcards, longer text is more specific than shorter. Other than that I think it looks OK.

Jul 7 2020, 2:09 AM · Restricted Project
psmith accepted D83243: [ELF] Rename canRelax to toExecRelax. NFC.

LGTM it looks like a good simplification. Worth waiting a little bit to see if there are any objections.

Jul 7 2020, 1:33 AM · Restricted Project

Jul 6 2020

psmith accepted D83138: [ELF][ARM] Represent R_ARM_LDO32 as R_DTPREL instead of R_ABS.

LGTM, it looks like it is difficult to generate local dynamic from clang, although it is possible with GCC. I was able to make a test application, that also had the advantage of working for shared libraries and PIE as R_ABS does not in that case.

Jul 6 2020, 2:06 AM · Restricted Project

Jul 3 2020

psmith added a comment to D83138: [ELF][ARM] Represent R_ARM_LDO32 as R_DTPREL instead of R_ABS.

Thanks, will take a look over the weekend. Would like to make sure all is well running some TLS test cases on a native Arm machine, fully expect it to be OK.

Jul 3 2020, 10:44 AM · Restricted Project
psmith added a comment to D82899: [ELF] Resolve R_DTPREL in .debug_* referencing discarded symbols to -1.

I'm ok with this as is. I'll need to check over what should be happening on Arm, but I think that can be done in a separate change.

Jul 3 2020, 5:53 AM · Restricted Project

Jul 1 2020

psmith added inline comments to D82899: [ELF] Resolve R_DTPREL in .debug_* referencing discarded symbols to -1.
Jul 1 2020, 2:04 PM · Restricted Project
psmith added a comment to D82567: [LLD][ELF][Windows] Allow LLD to overwrite existing output files that are in use.

This looks OK to me, happy for George to approve . I'm not a Windows filesystem expert by any means, it seems like the rename then delete follows the pattern in https://boostgsoc13.github.io/boost.afio/doc/html/afio/FAQ/deleting_open_files.html though.

Jul 1 2020, 1:32 PM · Restricted Project

Jun 24 2020

psmith accepted D82433: [ELF] -r: don't parse @ (symbol versioning) for .symver inline asm in bitcode.

Looks good to me. Agree that symbol versioning should be passed through in a relocatable link.

Jun 24 2020, 1:02 AM · Restricted Project

Jun 23 2020

psmith added a comment to D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.

Thanks for the update, I don't have any more comments. Happy when MaskRay is happy.

Jun 23 2020, 1:59 PM · Restricted Project

Jun 19 2020

psmith added inline comments to D70326: [docs] LLVM Security Group and Process.
Jun 19 2020, 2:07 AM · Restricted Project

Jun 18 2020

psmith added a comment to D82014: [compiler-rt] Replaced __SOFT_FP__ with __SOFTFP__.

I think that this is highly likely to be a typo, it looks like it dates to the contribution of compiler-rt so there isn't any history we can use. I believe that compiler-rt builtins originated in Apple so there is a possibility that SOFTFP was used in the compiler at contribution time. If you wanted to be safe you could support both SOFTFP and SOFT_FP but I don't think that is necessary. I would like to think that for a soft-fp target the tests for these functions fail or are at least xfailed at the moment. Are you able to compile the tests for a soft-fp target to check?

Jun 18 2020, 11:26 AM · Restricted Project, Restricted Project

Jun 16 2020

psmith added a comment to D81784: [ELF] Resolve relocations in .debug_* referencing (discarded symbols or ICF folded section symbols) to tombstone values.

I only partially followed the discussion on llvm-dev. The resolution sounds sensible to me. Will be good to get someone involved in the upstream discussion to check it over.

Jun 16 2020, 12:39 PM · Restricted Project

Jun 12 2020

psmith added a comment to D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.

Looking good so far. Would be good to add a range extension thunk test case. For example:

 .section .text.1, "ax", %progbits
 .global _start
 .type _start, %function
_start: .word callee@PLT - .
Jun 12 2020, 6:26 AM · Restricted Project

Jun 10 2020

psmith committed rG60f5b0ec7ce2: [ELF][AArch64] Correct relocation codes for R_<CLS>_PLT32 (authored by psmith).
[ELF][AArch64] Correct relocation codes for R_<CLS>_PLT32
Jun 10 2020, 6:34 AM
psmith closed D81410: [ELF][AArch64] Correct relocation codes for R_<CLS>_PLT32.
Jun 10 2020, 6:34 AM · Restricted Project
psmith accepted D81446: [llvm][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.

That looks good to me too. Thanks for the updates.

Jun 10 2020, 6:31 AM · Restricted Project

Jun 9 2020

psmith updated the diff for D81410: [ELF][AArch64] Correct relocation codes for R_<CLS>_PLT32.

I've moved the codes below the block of relocations representing TLS.

Jun 9 2020, 8:12 AM · Restricted Project

Jun 8 2020

psmith accepted D79300: [ELF] Demote lazy symbols relative to a discarded section to Undefined.

LGTM, I don't have a better idea.

Jun 8 2020, 2:58 PM · Restricted Project
psmith added a comment to D81410: [ELF][AArch64] Correct relocation codes for R_<CLS>_PLT32.

Thanks for the comments. When I made the change I looked at:

Static relocation codes for ELF64 object files begin at (257); dynamic ones at (1024). Both (0) and (256) should be accepted as values of R_AARCH64_NONE, the null relocation.
Static relocation codes for ELF32 object files begin at [1]; dynamic ones at [180].

I couldn't find anything about a TLS range, but it looks like there is one being observed even if it isn't explicitly called out. Let me know if you've spotted it?

Jun 8 2020, 11:35 AM · Restricted Project
psmith created D81410: [ELF][AArch64] Correct relocation codes for R_<CLS>_PLT32.
Jun 8 2020, 10:29 AM · Restricted Project

Jun 5 2020

psmith accepted D81052: [ELF] Handle -u before input files.

Thanks for the update. I don't have any more comments. Looks good to me.

Jun 5 2020, 1:36 AM · Restricted Project

Jun 4 2020

psmith added a comment to D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.

I'm not sure unconditionally changing .word foo - . to use R_AARCH64_PLT32 is the appropriate change. Note that x86 R_X86_64_PC32 doesn't do this.
.word foo@plt - . would probably make more sense. For one reason, R_AARCH64_PLT32 is not supported by binutils, unconditionally using it can break -fno-integrated-as.
There is also no need to special case on visiblity: (ElfSym.getVisibility() == llvm::ELF::STV_HIDDEN) ? R_CLS(PREL32) : R_CLS(PLT32);, you can entirely defer the handling to the linker

Additionally, the lld changes should probably be moved to a separate patch. It is not tightly coupled with MC. The tests are also inadequate - you'd need a range extension thunk test. I can do this part if you don't mind.

Jun 4 2020, 3:29 PM · Restricted Project

Jun 3 2020

psmith added a comment to D81052: [ELF] Handle -u before input files.

Looks sensible to me. A couple of comment suggestions only.

Jun 3 2020, 8:12 AM · Restricted Project

Jun 2 2020

psmith accepted D81028: [ELF] Append " [--no-allow-shlib-undefined]" to the corresponding diagnostics.

LGTM, looks like a good idea. We may find other places where this form will be useful.

Jun 2 2020, 2:15 PM · Restricted Project
psmith accepted D80828: [Clang][A32/T32][Linux] -O1 implies -fomit-frame-pointer.

LGTM from an Arm person now that the Android changes have been made.

Jun 2 2020, 2:15 PM · Restricted Project, Restricted Project

Jun 1 2020

psmith accepted D80872: [ELF] Set DF_1_PIE for -pie.

LGTM too, makes sense to keep as compatible with binutils as possible.

Jun 1 2020, 2:37 AM · Restricted Project
psmith added a comment to D80828: [Clang][A32/T32][Linux] -O1 implies -fomit-frame-pointer.

FWIW I'm happy for Clang to match GCC behaviour for Linux (non-Android) targets with respect to the frame pointer. Outside of Android I would expect most developers of linux applications to build with both GCC and clang so they should already have the -fno-omit-frame-pointer if they are using it.

Jun 1 2020, 2:37 AM · Restricted Project, Restricted Project

May 27 2020

psmith accepted D80487: [ELF] Refine --export-dynamic-symbol semantics to be compatible GNU ld 2.35.

Thanks for the update. I'm happy with the changes.

May 27 2020, 11:23 AM · Restricted Project
psmith added a comment to D80487: [ELF] Refine --export-dynamic-symbol semantics to be compatible GNU ld 2.35.

Looks reasonable to me. Our documentation and help for dynamic-list is a bit sparse, it may be worth emphasising that it implies -bsymbolic (if I've understood correctly).

May 27 2020, 8:38 AM · Restricted Project

May 19 2020

psmith accepted D80143: [ELF] Make --trace-symbol track preempted shared definitions.

LGTM.

May 19 2020, 1:03 AM · Restricted Project

May 18 2020

psmith added a comment to D80059: [ELF] Parse SHT_GNU_verneed and respect versioned undefined symbols in shared objects.

Just thinking if it would be possible to resolve this without having to read the verneed section of shared objects. I've not checked to see if this would make a simpler implementation though.

May 18 2020, 5:52 AM · Restricted Project

May 15 2020

psmith added a comment to D79982: [ELF] Use namespace qualifiers (lld:: or elf::) instead of `namespace lld { namespace elf {`.

No objections from me, this does seem to be more consistent with the Coding Standards.

May 15 2020, 12:52 AM · Restricted Project

May 13 2020

psmith added a comment to D79300: [ELF] Demote lazy symbols relative to a discarded section to Undefined.

Thanks for the updates, I don't have any more comments. Happy if George is happy.

May 13 2020, 12:31 PM · Restricted Project
psmith added inline comments to D79300: [ELF] Demote lazy symbols relative to a discarded section to Undefined.
May 13 2020, 4:16 AM · Restricted Project

May 12 2020

psmith accepted D79774: [ARM] Add big-endian version of pcrel fixups for adr instructions.

Looks good to me. The intention is that the little and big-endian table flags match, only the Offset is expected to change for big-endian, and this change does make sure that the flags match. Will be worth waiting a day or so to see if there are any further comments.

May 12 2020, 8:01 AM · Restricted Project
psmith added a comment to D79600: [TargetLoweringObjectFileImpl] Produce .text.hot. instead of .text.hot for -fno-unique-section-names.

I don't have a lot to add. I think this change will work with LLD and the GNU tools, no objections to this change. Having LLD not recognise the section names without a suffix may become a problem if GNU tools still output them. My guess is that LLD is still most used with clang at the moment, but this may change over time.

May 12 2020, 5:52 AM · Restricted Project

May 11 2020

psmith committed rG0ae7990b6071: [ELF][ARM] Support /DISCARD/ of subset of .ARM.exidx sections (authored by psmith).
[ELF][ARM] Support /DISCARD/ of subset of .ARM.exidx sections
May 11 2020, 6:57 AM
psmith closed D79687: [LLD][ELF][ARM] Support /DISCARD/ of subset of .ARM.exidx sections.
May 11 2020, 6:56 AM · Restricted Project
psmith added a comment to D79687: [LLD][ELF][ARM] Support /DISCARD/ of subset of .ARM.exidx sections.

Thanks for the review. I've applied the suggestion to remove the function.

May 11 2020, 6:56 AM · Restricted Project

May 10 2020

psmith created D79687: [LLD][ELF][ARM] Support /DISCARD/ of subset of .ARM.exidx sections.
May 10 2020, 4:15 AM · Restricted Project

May 8 2020

psmith accepted D79371: [ELF] Add convenience TableGen classes to enforce two dashes for options not supported by GNU ld.

LGTM too. Thanks for the update.

May 8 2020, 3:11 AM · Restricted Project

May 6 2020

psmith added a comment to D79371: [ELF] Add convenience TableGen classes to enforce two dashes for options not supported by GNU ld.

I definitely think we should do this for all new options. I agree that -o magic ought to be changed as I can see that happening in practice. The chance that someone intending -t hinlto-index-only rather than -thinlto-index-only is much lower. I'll defer to the users of thin-lto whether they think this is important.

May 6 2020, 12:30 AM · Restricted Project

May 5 2020

psmith committed rG48aebfc908ba: [ELF][ARM] Do not create .ARM.exidx sections for out of range inputs (authored by psmith).
[ELF][ARM] Do not create .ARM.exidx sections for out of range inputs
May 5 2020, 2:07 AM
psmith closed D79289: [LLD][ELF][ARM] Do not create .ARM.exidx sections for out of range inputs.
May 5 2020, 2:06 AM · Restricted Project

May 4 2020

psmith added a comment to D79309: [llvm-objdump] -d: delete spaces among raw instruction bytes.

I don't have a strong opinion here, the spaced bytes more closely match the output of the llvm-mc which can make disassembler tests easier to write. On the other hand it can be useful to see the structure of the disassembly of instructions when the mapping symbols exist.
Arm GNU objdump does the following:

address: 12345678 <spaces> <disassembly of arm instruction
address: 1234 5678 <spaces> for 32-bit Thumb instruction made up of two half words
address: 1234 <spaces> for 16-bit Thumb instruction made up a half word
address: 12345678 <spaces> for .word 0x12345678

I don't have a lot of experience of non Arm RISC architectures though so I don't know what looks reasonable for them.

May 4 2020, 8:32 AM · Restricted Project
psmith committed rG3834385f27ae: [ELF] Move SHF_LINK_ORDER till OutputSection addresses are known (authored by psmith).
[ELF] Move SHF_LINK_ORDER till OutputSection addresses are known
May 4 2020, 6:55 AM
psmith closed D79286: [ELF] Move SHF_LINK_ORDER till OutputSection addresses are known.
May 4 2020, 6:54 AM · Restricted Project
psmith updated the diff for D79289: [LLD][ELF][ARM] Do not create .ARM.exidx sections for out of range inputs.

Applied previous review comments. Added missing REQUIRES, added CHECK-NOT and simplified range checking code.

May 4 2020, 6:54 AM · Restricted Project
psmith added a comment to D79289: [LLD][ELF][ARM] Do not create .ARM.exidx sections for out of range inputs.

Thanks for the comments, will update diff shortly.

May 4 2020, 6:54 AM · Restricted Project
psmith added a comment to D79286: [ELF] Move SHF_LINK_ORDER till OutputSection addresses are known.

Thanks for the comments. I've updated the patch prior to commit.

May 4 2020, 6:54 AM · Restricted Project

May 2 2020

psmith created D79289: [LLD][ELF][ARM] Do not create .ARM.exidx sections for out of range inputs.
May 2 2020, 5:16 AM · Restricted Project
psmith updated the diff for D79286: [ELF] Move SHF_LINK_ORDER till OutputSection addresses are known.

Add context to diff

May 2 2020, 5:16 AM · Restricted Project
psmith created D79286: [ELF] Move SHF_LINK_ORDER till OutputSection addresses are known.
May 2 2020, 3:40 AM · Restricted Project
psmith accepted D79254: [ELF] Don't advance sh_offset for an empty section whose PT_LOAD is removed (due to p_memsz=0).

Thanks for following this up. This looks good to me, will be worth waiting till Monday to see if there are comments throughout the working day.

May 2 2020, 2:05 AM · Restricted Project

Apr 27 2020

psmith accepted D78820: [LLD][ELF] Eliminate symbols of merged .ARM.exidx sections..

Thanks for the update, I'm happy with that. Will be worth seeing if MaskRay or George have any final comments.

Apr 27 2020, 10:11 AM · Restricted Project, lld

Apr 25 2020

psmith added a comment to D78820: [LLD][ELF] Eliminate symbols of merged .ARM.exidx sections..

Thanks for the patch. I think what you have looks like it will work.

Apr 25 2020, 9:00 AM · Restricted Project, lld

Apr 24 2020

psmith committed rG3b1622d63a9c: [LLD][ELF][ARM] recommit Fix ARM Exidx order for non monotonic section order (authored by psmith).
[LLD][ELF][ARM] recommit Fix ARM Exidx order for non monotonic section order
Apr 24 2020, 5:55 AM
psmith added a comment to D78422: [LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order.

I had to revert due to an msan build bot failure. I don't fully understand it yet http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/40693/steps/check-lld%20msan/logs/stdio as I can't yet see how script->assignAddresses would not set OutSec->addr. However msan is more likely to be right than me.

Apr 24 2020, 3:45 AM · Restricted Project

Apr 23 2020

psmith committed rG1ca16fc4f514: Revert "[LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order" (authored by psmith).
Revert "[LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order"
Apr 23 2020, 9:44 AM
psmith added a reverting change for rGf969c2aa657e: [LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order: rG1ca16fc4f514: Revert "[LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order".
Apr 23 2020, 9:44 AM
psmith added a comment to D78422: [LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order.

I had to revert due to an msan build bot failure. I don't fully understand it yet http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/40693/steps/check-lld%20msan/logs/stdio as I can't yet see how script->assignAddresses would not set OutSec->addr. However msan is more likely to be right than me.

Apr 23 2020, 9:43 AM · Restricted Project
psmith committed rGf969c2aa657e: [LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order (authored by psmith).
[LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order
Apr 23 2020, 8:06 AM
psmith closed D78422: [LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order.
Apr 23 2020, 8:05 AM · Restricted Project

Apr 22 2020

psmith updated the diff for D78422: [LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order.

Added additional detail in comment and fix up spacing in tests.

Apr 22 2020, 2:09 PM · Restricted Project
psmith added a comment to D78422: [LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order.

Thanks, and apologies for forgetting George's comment request. I'll upload a new version and commit tomorrow.

Apr 22 2020, 2:09 PM · Restricted Project
psmith updated the diff for D78422: [LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order.

I've updated the tests to address review comments, and have made the addresses increase in LMA. I've got a follow up patch that I can send for SHF_LINK_ORDER as I can reproduce a problem with a similar test case.

Apr 22 2020, 1:03 PM · Restricted Project
psmith accepted D77779: [ELF] For relative paths in INPUT() and GROUP(), search the directory of the current linker script before searching other paths.

LGTM. Thanks for the updates and congratulations on getting the binutils patch accepted.

Apr 22 2020, 11:58 AM · Restricted Project
psmith added a comment to D77330: Consider increasing the default ARM32 max page size to 64k..

Hmm...seems to have regressed ARMv5 Linux kernel boots according to a bisection from @nathanchance (https://groups.google.com/g/clang-built-linux/c/aKDK-N6JN4g)

I don't think that URL is publicly visible.

I don't know why that started happening :/

In theory increasing the max page size shouldn't have changed anything significant, especially given that ld.bfd defaults to the same page size, it may have flushed out another bug though. Would it be possible to raise a PR with a reproducer?

Done: https://bugs.llvm.org/show_bug.cgi?id=45632

Feel free to ping me for more information/debugging as needed.

Apr 22 2020, 9:46 AM · Restricted Project, lld