{"action":"created","issue":{"url":"https://api.github.com/repos/foss-for-synopsys-dwc-arc-processors/gcc/issues/51","repository_url":"https://api.github.com/repos/foss-for-synopsys-dwc-arc-processors/gcc","labels_url":"https://api.github.com/repos/foss-for-synopsys-dwc-arc-processors/gcc/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/foss-for-synopsys-dwc-arc-processors/gcc/issues/51/comments","events_url":"https://api.github.com/repos/foss-for-synopsys-dwc-arc-processors/gcc/issues/51/events","html_url":"https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/pull/51","id":165653524,"number":51,"title":"JLI Support","user":{"login":"jm4rtin","id":20426677,"avatar_url":"https://avatars.githubusercontent.com/u/20426677?v=3","gravatar_id":"","url":"https://api.github.com/users/jm4rtin","html_url":"https://github.com/jm4rtin","followers_url":"https://api.github.com/users/jm4rtin/followers","following_url":"https://api.github.com/users/jm4rtin/following{/other_user}","gists_url":"https://api.github.com/users/jm4rtin/gists{/gist_id}","starred_url":"https://api.github.com/users/jm4rtin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jm4rtin/subscriptions","organizations_url":"https://api.github.com/users/jm4rtin/orgs","repos_url":"https://api.github.com/users/jm4rtin/repos","events_url":"https://api.github.com/users/jm4rtin/events{/privacy}","received_events_url":"https://api.github.com/users/jm4rtin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/foss-for-synopsys-dwc-arc-processors/gcc/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"claziss","id":2761368,"avatar_url":"https://avatars.githubusercontent.com/u/2761368?v=3","gravatar_id":"","url":"https://api.github.com/users/claziss","html_url":"https://github.com/claziss","followers_url":"https://api.github.com/users/claziss/followers","following_url":"https://api.github.com/users/claziss/following{/other_user}","gists_url":"https://api.github.com/users/claziss/gists{/gist_id}","starred_url":"https://api.github.com/users/claziss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claziss/subscriptions","organizations_url":"https://api.github.com/users/claziss/orgs","repos_url":"https://api.github.com/users/claziss/repos","events_url":"https://api.github.com/users/claziss/events{/privacy}","received_events_url":"https://api.github.com/users/claziss/received_events","type":"User","site_admin":false},"assignees":[{"login":"claziss","id":2761368,"avatar_url":"https://avatars.githubusercontent.com/u/2761368?v=3","gravatar_id":"","url":"https://api.github.com/users/claziss","html_url":"https://github.com/claziss","followers_url":"https://api.github.com/users/claziss/followers","following_url":"https://api.github.com/users/claziss/following{/other_user}","gists_url":"https://api.github.com/users/claziss/gists{/gist_id}","starred_url":"https://api.github.com/users/claziss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claziss/subscriptions","organizations_url":"https://api.github.com/users/claziss/orgs","repos_url":"https://api.github.com/users/claziss/repos","events_url":"https://api.github.com/users/claziss/events{/privacy}","received_events_url":"https://api.github.com/users/claziss/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-07-14T20:40:09Z","updated_at":"2016-07-15T15:14:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/foss-for-synopsys-dwc-arc-processors/gcc/pulls/51","html_url":"https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/pull/51","diff_url":"https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/pull/51.diff","patch_url":"https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/pull/51.patch"},"body":"This change adds JLI support to GCC. This will accept the jli_call_fixed and jli_call_always pragmas used by Metaware. This implementation should be binary compatible with Metaware (if using the default option -mjli-func-addr=compat).\r\n\r\nThere are three approaches to obtaining the address of a function inside the JLI table:\r\n\r\n1. -mjli-func-addr=compat will use a Metaware compatible mode. When using jli_call_fixed this will use the address of the function originally placed into the table at compile time. When using jli_call_always this will use the address of the JLI entry. The JLI table may not be moved when using jli_call_always with this method.\r\n2. -mjli-func-addr=init will read the jli_base AUX register and offset it to determine the address of the JLI entry. This address will be stored in the desired variable. If the variable is constant or otherwise ends up in the .rodata section, the address of the .jlitab section will be used in place of the jli_base AUX register. This will emit an ARC_32_JLI relocation entry that may be used to perform the proper relocation utilizing the jli_base AUX register during loading. This method requires the call be made in kernel mode (because of the AUX register read).\r\n3. -mjli-func-addr=always will create a stub function that reads the jli_base AUX register and offset to determine the address of the JLI entry. The address of the stub function will be stored in the desired variable so the JLI table may be moved after the variable has been set with the function address. This method requires the call be made in kernel mode (because of the AUX register read).\r\n\r\nThe following relocation types were added to GCC/binutils:\r\n\r\n1. ARC_JLI_SECTOFF is a relocation type in Metaware that is now used by GCC as well to adjust the index of function calls to functions defined with #pragma jli_call_always during linking.\r\n2. ARC_JLI_SECTOFF_SIMM12 is used to add the appropriate offset to the address when using -mjli-func-addr=init to get an address for a function in the JLI table during code execution.\r\n3. ARC_JLI_32 is used to add the appropriate offset to the address when using -mjli-func-addr=init to get an address for a function in the JLI table during program load.\r\n\r\nThis implementation of the JLI feature will allow the use of both jli_call_fixed and jli_call_always as long as all jli_call_fixed functions are using the continuous block starting at index 0 and are linked before all other JLI entries. This can be done with the default linker script if the object file that contains the jli_call_fixed entries matches the object filename pattern \"jlitab*.o\"."},"comment":{"url":"https://api.github.com/repos/foss-for-synopsys-dwc-arc-processors/gcc/issues/comments/232980107","html_url":"https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/pull/51#issuecomment-232980107","issue_url":"https://api.github.com/repos/foss-for-synopsys-dwc-arc-processors/gcc/issues/51","id":232980107,"user":{"login":"claziss","id":2761368,"avatar_url":"https://avatars.githubusercontent.com/u/2761368?v=3","gravatar_id":"","url":"https://api.github.com/users/claziss","html_url":"https://github.com/claziss","followers_url":"https://api.github.com/users/claziss/followers","following_url":"https://api.github.com/users/claziss/following{/other_user}","gists_url":"https://api.github.com/users/claziss/gists{/gist_id}","starred_url":"https://api.github.com/users/claziss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claziss/subscriptions","organizations_url":"https://api.github.com/users/claziss/orgs","repos_url":"https://api.github.com/users/claziss/repos","events_url":"https://api.github.com/users/claziss/events{/privacy}","received_events_url":"https://api.github.com/users/claziss/received_events","type":"User","site_admin":false},"created_at":"2016-07-15T15:14:58Z","updated_at":"2016-07-15T15:14:58Z","body":"Thank you for ur contribution. I will make a first review using your commits. Please let us know if you would like to take those in or you would like us to clean it up."}}
{"actor":{"display_login":"claziss"}}