Skip to content
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

use linker generated section brackets #5047

Merged
merged 1 commit into from
Sep 7, 2015

Conversation

MartinNowak
Copy link
Member

  • rename sections to "minfo" and "deh"
  • use hidden undefined __start/stop_minfo/deh
    to get start and end of sections
  • linker will define those symbols
    (see http://www.airs.com/blog/archives/56)

@MartinNowak
Copy link
Member Author

Requires dlang/druntime#1379

@@ -463,13 +462,15 @@ static IDXSTR elf_addmangled(Symbol *s)
* sz = symbol size
* typ = symbol type
* bind = symbol binding
* segidx = segment index for segment where symbol is defined
* sec = index of section where symbol is defined
* vsblty = visibility of symbol
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hate to complain about names, but why not just call it visibility?

Also, what is visibility of names? You could add STV_xxxx to the explanatory comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@WalterBright
Copy link
Member

Nice. I wish I'd known about that linker feature sooner!

- rename sections to "minfo" and "deh"
- use hidden undefined __start/stop_minfo/deh
  to get start and end of sections
- linker will define those symbols
  (see http://www.airs.com/blog/archives/56)
- drop _Dmodule_ref initializers
@MartinNowak
Copy link
Member Author

I want to use this to add a separate section for ptrdata so that the GC needs to scan less roots.
Issue 14472 – add separate ptr data section, ptr data section on Active | Trello.
But it seems I'd have to change dt generation quite a lot to achieve this.

@MartinNowak
Copy link
Member Author

@rainers
Copy link
Member

rainers commented Sep 6, 2015

I want to use this to add a separate section for ptrdata so that the GC needs to scan less roots.

Here is a commit with a similar functionality for the precise GC presented at DConf2013: rainers@e6a3d17

It wrote (address,TypeInfo) pairs, but just emitting pointers to pointers sounds simpler.

WalterBright added a commit that referenced this pull request Sep 7, 2015
use linker generated section brackets
@WalterBright WalterBright merged commit c6b9895 into dlang:master Sep 7, 2015
@MartinNowak MartinNowak deleted the sections branch September 7, 2015 15:42
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.

3 participants