{"action":"created","comment":{"url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/comments/57299055","id":57299055,"diff_hunk":"@@ -0,0 +1,193 @@\n+/**\n+ * Written in the D programming language.\n+ * This module provides OS X x86-64 specific support for sections.\n+ *\n+ * Copyright: Copyright Digital Mars 2016.\n+ * License: Distributed under the\n+ *      $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).\n+ *    (See accompanying file LICENSE)\n+ * Authors: Jacob Carlborg\n+ * Source: $(DRUNTIMESRC src/rt/_sections_osx_x86_64.d)\n+ */\n+module rt.sections_osx_x86_64;\n+\n+version(OSX):\n+version(X86_64):\n+\n+// debug = PRINTF;\n+import core.stdc.stdio;\n+import core.stdc.string, core.stdc.stdlib;\n+import core.sys.posix.pthread;\n+import core.sys.osx.mach.dyld;\n+import core.sys.osx.mach.getsect;\n+import rt.deh, rt.minfo;\n+import rt.util.container.array;\n+\n+struct SectionGroup\n+{\n+    static int opApply(scope int delegate(ref SectionGroup) dg)\n+    {\n+        return dg(_sections);\n+    }\n+\n+    static int opApplyReverse(scope int delegate(ref SectionGroup) dg)\n+    {\n+        return dg(_sections);\n+    }\n+\n+    @property immutable(ModuleInfo*)[] modules() const\n+    {\n+        return _moduleGroup.modules;\n+    }\n+\n+    @property ref inout(ModuleGroup) moduleGroup() inout\n+    {\n+        return _moduleGroup;\n+    }\n+\n+    @property inout(void[])[] gcRanges() inout\n+    {\n+        return _gcRanges[];\n+    }\n+\n+    @property immutable(FuncTable)[] ehTables() const\n+    {\n+        return _ehTables[];\n+    }\n+\n+private:\n+    immutable(FuncTable)[] _ehTables;\n+    ModuleGroup _moduleGroup;\n+    Array!(void[]) _gcRanges;\n+    immutable(void)[][2] _tlsImage;\n+}\n+\n+/****\n+ * Boolean flag set to true while the runtime is initialized.\n+ */\n+__gshared bool _isRuntimeInitialized;\n+\n+/****\n+ * Gets called on program startup just before GC is initialized.\n+ */\n+void initSections()\n+{\n+    _dyld_register_func_for_add_image(&sections_osx_onAddImage);","path":"src/rt/sections_osx_x86_64.d","position":75,"original_position":75,"commit_id":"37dca9c87fcabdef1361d3d12f37620030b77795","original_commit_id":"b56ff538c152bd75a79e67ef7be718b6896c8fe8","user":{"login":"jacob-carlborg","id":306980,"avatar_url":"https://avatars.githubusercontent.com/u/306980?v=3","gravatar_id":"","url":"https://api.github.com/users/jacob-carlborg","html_url":"https://github.com/jacob-carlborg","followers_url":"https://api.github.com/users/jacob-carlborg/followers","following_url":"https://api.github.com/users/jacob-carlborg/following{/other_user}","gists_url":"https://api.github.com/users/jacob-carlborg/gists{/gist_id}","starred_url":"https://api.github.com/users/jacob-carlborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacob-carlborg/subscriptions","organizations_url":"https://api.github.com/users/jacob-carlborg/orgs","repos_url":"https://api.github.com/users/jacob-carlborg/repos","events_url":"https://api.github.com/users/jacob-carlborg/events{/privacy}","received_events_url":"https://api.github.com/users/jacob-carlborg/received_events","type":"User","site_admin":false},"body":"Master is using `_dyld_register_func_for_add_image`, this change is still using `_dyld_register_func_for_add_image `. Please explain how this change breaks the shared libraries?","created_at":"2016-03-24T10:37:15Z","updated_at":"2016-03-24T10:37:15Z","html_url":"https://github.com/D-Programming-Language/druntime/pull/1461#discussion_r57299055","pull_request_url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1461","_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/comments/57299055"},"html":{"href":"https://github.com/D-Programming-Language/druntime/pull/1461#discussion_r57299055"},"pull_request":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1461"}}},"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1461","id":55573903,"html_url":"https://github.com/D-Programming-Language/druntime/pull/1461","diff_url":"https://github.com/D-Programming-Language/druntime/pull/1461.diff","patch_url":"https://github.com/D-Programming-Language/druntime/pull/1461.patch","issue_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1461","number":1461,"state":"closed","locked":false,"title":"Add support for native TLS on OS X","user":{"login":"jacob-carlborg","id":306980,"avatar_url":"https://avatars.githubusercontent.com/u/306980?v=3","gravatar_id":"","url":"https://api.github.com/users/jacob-carlborg","html_url":"https://github.com/jacob-carlborg","followers_url":"https://api.github.com/users/jacob-carlborg/followers","following_url":"https://api.github.com/users/jacob-carlborg/following{/other_user}","gists_url":"https://api.github.com/users/jacob-carlborg/gists{/gist_id}","starred_url":"https://api.github.com/users/jacob-carlborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacob-carlborg/subscriptions","organizations_url":"https://api.github.com/users/jacob-carlborg/orgs","repos_url":"https://api.github.com/users/jacob-carlborg/repos","events_url":"https://api.github.com/users/jacob-carlborg/events{/privacy}","received_events_url":"https://api.github.com/users/jacob-carlborg/received_events","type":"User","site_admin":false},"body":"Runtime part of https://github.com/D-Programming-Language/dmd/pull/5346.","created_at":"2016-01-10T20:48:39Z","updated_at":"2016-03-24T10:37:15Z","closed_at":"2016-03-24T02:11:32Z","merged_at":"2016-03-24T02:11:32Z","merge_commit_sha":"1bb9ef012633b11164152fc30cbf43f4cb3456d2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1461/commits","review_comments_url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1461/comments","review_comment_url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/comments{/number}","comments_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1461/comments","statuses_url":"https://api.github.com/repos/D-Programming-Language/druntime/statuses/37dca9c87fcabdef1361d3d12f37620030b77795","head":{"label":"jacob-carlborg:native_tls","ref":"native_tls","sha":"37dca9c87fcabdef1361d3d12f37620030b77795","user":{"login":"jacob-carlborg","id":306980,"avatar_url":"https://avatars.githubusercontent.com/u/306980?v=3","gravatar_id":"","url":"https://api.github.com/users/jacob-carlborg","html_url":"https://github.com/jacob-carlborg","followers_url":"https://api.github.com/users/jacob-carlborg/followers","following_url":"https://api.github.com/users/jacob-carlborg/following{/other_user}","gists_url":"https://api.github.com/users/jacob-carlborg/gists{/gist_id}","starred_url":"https://api.github.com/users/jacob-carlborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacob-carlborg/subscriptions","organizations_url":"https://api.github.com/users/jacob-carlborg/orgs","repos_url":"https://api.github.com/users/jacob-carlborg/repos","events_url":"https://api.github.com/users/jacob-carlborg/events{/privacy}","received_events_url":"https://api.github.com/users/jacob-carlborg/received_events","type":"User","site_admin":false},"repo":{"id":3755842,"name":"druntime","full_name":"jacob-carlborg/druntime","owner":{"login":"jacob-carlborg","id":306980,"avatar_url":"https://avatars.githubusercontent.com/u/306980?v=3","gravatar_id":"","url":"https://api.github.com/users/jacob-carlborg","html_url":"https://github.com/jacob-carlborg","followers_url":"https://api.github.com/users/jacob-carlborg/followers","following_url":"https://api.github.com/users/jacob-carlborg/following{/other_user}","gists_url":"https://api.github.com/users/jacob-carlborg/gists{/gist_id}","starred_url":"https://api.github.com/users/jacob-carlborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacob-carlborg/subscriptions","organizations_url":"https://api.github.com/users/jacob-carlborg/orgs","repos_url":"https://api.github.com/users/jacob-carlborg/repos","events_url":"https://api.github.com/users/jacob-carlborg/events{/privacy}","received_events_url":"https://api.github.com/users/jacob-carlborg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jacob-carlborg/druntime","description":"Low level runtime library for the D programming language","fork":true,"url":"https://api.github.com/repos/jacob-carlborg/druntime","forks_url":"https://api.github.com/repos/jacob-carlborg/druntime/forks","keys_url":"https://api.github.com/repos/jacob-carlborg/druntime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jacob-carlborg/druntime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jacob-carlborg/druntime/teams","hooks_url":"https://api.github.com/repos/jacob-carlborg/druntime/hooks","issue_events_url":"https://api.github.com/repos/jacob-carlborg/druntime/issues/events{/number}","events_url":"https://api.github.com/repos/jacob-carlborg/druntime/events","assignees_url":"https://api.github.com/repos/jacob-carlborg/druntime/assignees{/user}","branches_url":"https://api.github.com/repos/jacob-carlborg/druntime/branches{/branch}","tags_url":"https://api.github.com/repos/jacob-carlborg/druntime/tags","blobs_url":"https://api.github.com/repos/jacob-carlborg/druntime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jacob-carlborg/druntime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jacob-carlborg/druntime/git/refs{/sha}","trees_url":"https://api.github.com/repos/jacob-carlborg/druntime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jacob-carlborg/druntime/statuses/{sha}","languages_url":"https://api.github.com/repos/jacob-carlborg/druntime/languages","stargazers_url":"https://api.github.com/repos/jacob-carlborg/druntime/stargazers","contributors_url":"https://api.github.com/repos/jacob-carlborg/druntime/contributors","subscribers_url":"https://api.github.com/repos/jacob-carlborg/druntime/subscribers","subscription_url":"https://api.github.com/repos/jacob-carlborg/druntime/subscription","commits_url":"https://api.github.com/repos/jacob-carlborg/druntime/commits{/sha}","git_commits_url":"https://api.github.com/repos/jacob-carlborg/druntime/git/commits{/sha}","comments_url":"https://api.github.com/repos/jacob-carlborg/druntime/comments{/number}","issue_comment_url":"https://api.github.com/repos/jacob-carlborg/druntime/issues/comments{/number}","contents_url":"https://api.github.com/repos/jacob-carlborg/druntime/contents/{+path}","compare_url":"https://api.github.com/repos/jacob-carlborg/druntime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jacob-carlborg/druntime/merges","archive_url":"https://api.github.com/repos/jacob-carlborg/druntime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jacob-carlborg/druntime/downloads","issues_url":"https://api.github.com/repos/jacob-carlborg/druntime/issues{/number}","pulls_url":"https://api.github.com/repos/jacob-carlborg/druntime/pulls{/number}","milestones_url":"https://api.github.com/repos/jacob-carlborg/druntime/milestones{/number}","notifications_url":"https://api.github.com/repos/jacob-carlborg/druntime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jacob-carlborg/druntime/labels{/name}","releases_url":"https://api.github.com/repos/jacob-carlborg/druntime/releases{/id}","deployments_url":"https://api.github.com/repos/jacob-carlborg/druntime/deployments","created_at":"2012-03-18T15:37:06Z","updated_at":"2014-09-25T09:30:27Z","pushed_at":"2016-03-18T20:38:33Z","git_url":"git://github.com/jacob-carlborg/druntime.git","ssh_url":"git@github.com:jacob-carlborg/druntime.git","clone_url":"https://github.com/jacob-carlborg/druntime.git","svn_url":"https://github.com/jacob-carlborg/druntime","homepage":"d-programming-language.org","size":12236,"stargazers_count":2,"watchers_count":2,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"D-Programming-Language:master","ref":"master","sha":"15a227477a344583c4748d95492703901417f4f8","user":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"repo":{"id":1257087,"name":"druntime","full_name":"D-Programming-Language/druntime","owner":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/D-Programming-Language/druntime","description":"Low level runtime library for the D programming language","fork":false,"url":"https://api.github.com/repos/D-Programming-Language/druntime","forks_url":"https://api.github.com/repos/D-Programming-Language/druntime/forks","keys_url":"https://api.github.com/repos/D-Programming-Language/druntime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/D-Programming-Language/druntime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/D-Programming-Language/druntime/teams","hooks_url":"https://api.github.com/repos/D-Programming-Language/druntime/hooks","issue_events_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/events{/number}","events_url":"https://api.github.com/repos/D-Programming-Language/druntime/events","assignees_url":"https://api.github.com/repos/D-Programming-Language/druntime/assignees{/user}","branches_url":"https://api.github.com/repos/D-Programming-Language/druntime/branches{/branch}","tags_url":"https://api.github.com/repos/D-Programming-Language/druntime/tags","blobs_url":"https://api.github.com/repos/D-Programming-Language/druntime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/D-Programming-Language/druntime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/D-Programming-Language/druntime/git/refs{/sha}","trees_url":"https://api.github.com/repos/D-Programming-Language/druntime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/D-Programming-Language/druntime/statuses/{sha}","languages_url":"https://api.github.com/repos/D-Programming-Language/druntime/languages","stargazers_url":"https://api.github.com/repos/D-Programming-Language/druntime/stargazers","contributors_url":"https://api.github.com/repos/D-Programming-Language/druntime/contributors","subscribers_url":"https://api.github.com/repos/D-Programming-Language/druntime/subscribers","subscription_url":"https://api.github.com/repos/D-Programming-Language/druntime/subscription","commits_url":"https://api.github.com/repos/D-Programming-Language/druntime/commits{/sha}","git_commits_url":"https://api.github.com/repos/D-Programming-Language/druntime/git/commits{/sha}","comments_url":"https://api.github.com/repos/D-Programming-Language/druntime/comments{/number}","issue_comment_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/comments{/number}","contents_url":"https://api.github.com/repos/D-Programming-Language/druntime/contents/{+path}","compare_url":"https://api.github.com/repos/D-Programming-Language/druntime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/D-Programming-Language/druntime/merges","archive_url":"https://api.github.com/repos/D-Programming-Language/druntime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/D-Programming-Language/druntime/downloads","issues_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues{/number}","pulls_url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls{/number}","milestones_url":"https://api.github.com/repos/D-Programming-Language/druntime/milestones{/number}","notifications_url":"https://api.github.com/repos/D-Programming-Language/druntime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/D-Programming-Language/druntime/labels{/name}","releases_url":"https://api.github.com/repos/D-Programming-Language/druntime/releases{/id}","deployments_url":"https://api.github.com/repos/D-Programming-Language/druntime/deployments","created_at":"2011-01-15T07:01:38Z","updated_at":"2016-03-21T15:32:13Z","pushed_at":"2016-03-24T07:09:50Z","git_url":"git://github.com/D-Programming-Language/druntime.git","ssh_url":"git@github.com:D-Programming-Language/druntime.git","clone_url":"https://github.com/D-Programming-Language/druntime.git","svn_url":"https://github.com/D-Programming-Language/druntime","homepage":"dlang.org","size":15669,"stargazers_count":392,"watchers_count":392,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":279,"mirror_url":null,"open_issues_count":34,"forks":279,"open_issues":34,"watchers":392,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1461"},"html":{"href":"https://github.com/D-Programming-Language/druntime/pull/1461"},"issue":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1461"},"comments":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1461/comments"},"review_comments":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1461/comments"},"review_comment":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1461/commits"},"statuses":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/statuses/37dca9c87fcabdef1361d3d12f37620030b77795"}}}}