Implement STARTUP linker script command.
Diff Detail
- Build Status
Buildable 1568 Build 1568: arc lint + arc unit
Event Timeline
GNU gold doesn't seem to implement this one, maybe the same effect can be obtained without a linkerscript? What are you planning to use this for?
[davide@cupiditate ~]$ cat script STARTUP(mario) [davide@cupiditate ~]$ ld.gold --script=script ld.gold: error: script:1:1: syntax error, unexpected STARTUP, expecting $end ld.gold: fatal error: unable to parse script file script [davide@cupiditate ~]$ ld --script=script ld: no input files
ELF/Driver.cpp | ||
---|---|---|
695 | Nit: lld not LLD. |
Someone tweeted me that LLD doesn't have STARTUP, so I took it, and after that I realized that gold doesn't support that (funny that gold only recognizes token "STARTUP", so apparently someone tried to support it but didn't actually do anything more than that.)
I won't push it until at least a bug is filed.
I'm not necessarily against this feature, but would like to understand the use-case more. Can you ask them to open a bug on llvm.org for those of us not using twitter?
Apparently Michael chose the name, and it's the one we have in http://lld.llvm.org/
While here, it also feels very weird having lld not respecting acronyms, FWIW (e.g. Lto instead of LTO as it's spelled anywhere else in LLVM). I would like to make this change if you have no objections.
Are you suggesting renaming lld to LLD? I'm not even sure if LLD is an acronym (what is it short for -- maybe LLVM's LD?)
If lld is still an official name, I'd vote for renaming it to LLD. lld is a command name, but as a proper noun, it should be spelled in upper case unelss there's strong reason to not do so.
No, I don't personally want to rename lld to LLD (but I won't object if you want to do so).
I'm pointing that, in the source code, we should rename Lto to LTO (et similia).
I'm not necessarily in favor of it, but this seems the original name we have. What about the proposed rename?
ELF/LinkerScript.cpp | ||
---|---|---|
1249 | May be better to inline this ? | |
test/ELF/linkerscript/startup.s | ||
4 | This creates "startup.s.tmp.dir" folder for me inside tools\lld\test\ELF\linkerscript\Output. Do you plan to do that for all tests ? | |
13 | llvm-objdump -s -section=.text ? | |
16 | I would suggest not to check the address here. Latest changes like max page size shows | |
29 | STARTUP file 'nosuchfile' not found ? |
test/ELF/linkerscript/startup.s | ||
---|---|---|
4 | I think I had to clarify why I noticed that. Usually I use msvs output tab to extract command line with arguments of failing test. When test uses %t (like all out test do), line is something like:
So I can just copy it to MSVS property page to "command arguments" and use it for debugger. This test is different and does not use %t and creates local files in separate folder.
So I also need to set "working directory" property. |
Nit: lld not LLD.