-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for compiling to binary object #3232
Conversation
I should probably find how to display relocation after the opcode hex value instead of before. |
4f13edd
to
faf233e
Compare
faf233e
to
c186cc1
Compare
I'll probably add some filters to hide/show relocations. |
7abfa55
to
2a5b892
Compare
2a5b892
to
4444d65
Compare
4444d65
to
a9f189a
Compare
So far I like where this code is going. What do you want it to feature next? |
Sorry for being (very) silent lately, have been busy with other things. I think the prototype is mostly OK, but I would like to:
I'm planning on reviving it, it's next in my todo list. It's not a dead PR :) |
a9f189a
to
1d15d60
Compare
1d15d60
to
d9f6848
Compare
e48eada
to
97922c1
Compare
97922c1
to
14cc1d5
Compare
Do let us know if we can help with anything! |
14cc1d5
to
c5e225f
Compare
The objdump/parser changes will require changes to https://github.com/compiler-explorer/asm-parser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some early comments: will take a look properly tomorrow! Thanks so much for this!!
THanks for the review, will respin this later tonight! |
const relocdata = match.groups.relocdata; | ||
// value/addend matched but not used yet. | ||
const match_value = relocdata.match(this.relocDataSymNameRe); | ||
asm.push({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@partouf does that look the correct way to have the relocation displayed? I remember that when starting this I thought of having a dedicated structure for relocations... But then kept things simple like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so. You could add the label/symbolname that's used (with https://github.com/compiler-explorer/compiler-explorer/blob/main/types/asmresult/asmresult.interfaces.ts#L31), but since it probably doesn't actually exist, it wouldn't be used anyway. So I think it's good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok! So will replicate this in asm-parser
Hopefully done in compiler-explorer/asm-parser#31 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Pending the merge and build of the asm-parser too (which I'm not sure how to do)
@@ -65,6 +65,7 @@ To specify a compilation request as a JSON document, post it as the appropriate | |||
}, | |||
"filters": { | |||
"binary": false, | |||
"binaryObject": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍🏻
https://github.com/compiler-explorer/infra/blob/main/bin/yaml/tools.yaml#L66 I believe it's merge the PR in |
Oh, I'm wrong, it might also require making a release here https://github.com/compiler-explorer/asm-parser/releases |
With the merge of #3232, we need to distinguish "compile to binary object" (compiler + assembler) and "compile to binary" (compiler + assembler + linker). Renaming "compile to binary" as "link to binary" is a more correct in this context and less confusing. We don't rename the internal field (kept as 'binary') because it's part of the API and we can't break it. Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
this is now live |
Condition was badly changed in #3232 (compiling to binary objects)
Condition was badly changed in #3232 (compiling to binary objects)
Condition was badly changed in #3232 (compiling to binary objects)
Support for compiling until assembler, before invoking the linker (eg. gcc -c).
Basic support for displaying relocation information.
Currently only used in c/c++/d/ada/rust and may/will propagate to other lang/compilers later.
fixes #3222
Signed-off-by: Marc Poulhiès dkm@kataplop.net