Skip to content

Add functionality that returns correct reflection section name for different object files (Mach-O, ELF, COFF) #33358

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

Merged

Conversation

augusto2112
Copy link
Contributor

This is used by swiftlang/llvm-project#1608 in order to get the correct reflection section name.

@adrian-prantl @vedantk

@adrian-prantl
Copy link
Contributor

Thanks! This was long overdue.

@augusto2112 augusto2112 force-pushed the reflection-section-constants branch from 5dc3bc9 to 27a3e3f Compare August 7, 2020 19:43
@augusto2112
Copy link
Contributor Author

@adrian-prantl Do you have any suggestions for the naming ReflectionSectionIdentifier? I don't really like it, but couldn't come up with something better. I meant "Identifier" as a verb, but re-reading it now it's probably easy for someone to read it as a noun.

@adrian-prantl
Copy link
Contributor

@adrian-prantl Do you have any suggestions for the naming ReflectionSectionIdentifier? I don't really like it, but couldn't come up with something better. I meant "Identifier" as a verb, but re-reading it now it's probably easy for someone to read it as a noun.

Perhaps

SwiftObjectFileFormat, SwiftObjectFileFormatELF, ...

at the call site that would look like:

SwiftObjectFileFormatELF::getSectionName(SwiftObjectFileFormat::SectionKind::typeref)

?

@adrian-prantl
Copy link
Contributor

@swift-ci smoke test

@adrian-prantl
Copy link
Contributor

@augusto2112 are you planning to rename this still?

@augusto2112
Copy link
Contributor Author

augusto2112 commented Aug 8, 2020

@adrian-prantl I am! It looks like something here, together with the other patch, is causing some bug that makes the test fail (the other patch by itself works though). I'm trying to understand what's happening before pushing the changes.

@augusto2112 augusto2112 force-pushed the reflection-section-constants branch from 27a3e3f to 70d002f Compare August 8, 2020 00:50
@augusto2112
Copy link
Contributor Author

@adrian-prantl Found it. Could you re-start the tests? They were going to fail for sure with the previous commit.

@adrian-prantl
Copy link
Contributor

@swift-ci smoke test

@adrian-prantl
Copy link
Contributor

@swift-ci smoke test

@augusto2112
Copy link
Contributor Author

@adrian-prantl don't merge yet please, I haven't renamed the enum yet.

I'm also surprised the tests passed this time, since I didn't commit anything between the smoke tests.

@augusto2112
Copy link
Contributor Author

@adrian-prantl Ok, done!

@augusto2112 augusto2112 force-pushed the reflection-section-constants branch from 70d002f to 34c55e2 Compare August 10, 2020 20:21
@adrian-prantl
Copy link
Contributor

@swift-ci smoke test

1 similar comment
@adrian-prantl
Copy link
Contributor

@swift-ci smoke test

@augusto2112
Copy link
Contributor Author

Linux error seems unrelated (SwiftPM error):
<unknown>:0: error: cannot load underlying module for 'Dispatch'

@adrian-prantl
Copy link
Contributor

@swift-ci smoke test

@adrian-prantl
Copy link
Contributor

@augusto2112 Can you cherry-pick this to master-next, too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants