]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/config/darwin.c
[Darwin] Fix PR71767 - adjust the sections used where necessary.
authoriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Nov 2016 14:34:54 +0000 (14:34 +0000)
committeriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Nov 2016 14:34:54 +0000 (14:34 +0000)
commitf199808c8c581fd0746f70395121783a5cbe1f46
treea16565000a66d13d5da62d9140f1f324951ecbb7
parent6afab66ea6311211e0e82963e372daf7a7e86da8
[Darwin] Fix PR71767 - adjust the sections used where necessary.

 (much) Older Darwin linkers needed separate sections marked "coalesce" to
 allow for weak symbol coalescing.  This has not been needed for some time
 and is now deprecated, newer assemblers warn if the old coalesced sections
 are used.

gcc/

2016-11-27  Iain Sandoe  <iain@codesourcery.com>

PR target/71767
* config/darwin-sections.def (picbase_thunk_section): New.
* config/darwin.c (darwin_init_sections): Set up picbase thunk
section. (darwin_rodata_section, darwin_objc2_section,
machopic_select_section, darwin_asm_declare_constant_name,
darwin_emit_weak_or_comdat, darwin_function_section): Don’t use
coalesced with newer linkers.
(darwin_override_options): Decide on usage of coalesed sections
on the basis of the target linker version.
* config/darwin.h (MIN_LD64_NO_COAL_SECTS): New.
* config/darwin.opt  (mtarget-linker): New.
* config/i386/i386.c (ix86_code_end): Do not force the thunks into
a coalesced section, instead use a thunks section.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242895 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/darwin-sections.def
gcc/config/darwin.c
gcc/config/darwin.h
gcc/config/darwin.opt
gcc/config/i386/i386.c