Colin Cross | e3fee34 | 2021-06-21 17:28:25 -0700 | [diff] [blame] | 1 | // Copyright 2015 Google Inc. All rights reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package config |
| 16 | |
| 17 | type toolchainBionic struct { |
Colin Cross | fc3b064 | 2022-09-01 11:02:15 -0700 | [diff] [blame] | 18 | toolchainBase |
Colin Cross | e3fee34 | 2021-06-21 17:28:25 -0700 | [diff] [blame] | 19 | } |
| 20 | |
Colin Cross | c854468 | 2021-06-21 17:31:50 -0700 | [diff] [blame] | 21 | var ( |
| 22 | bionicDefaultSharedLibraries = []string{"libc", "libm", "libdl"} |
Colin Cross | d1a2813 | 2021-06-21 17:34:47 -0700 | [diff] [blame] | 23 | |
| 24 | bionicCrtBeginStaticBinary, bionicCrtEndStaticBinary = []string{"crtbegin_static"}, []string{"crtend_android"} |
| 25 | bionicCrtBeginSharedBinary, bionicCrtEndSharedBinary = []string{"crtbegin_dynamic"}, []string{"crtend_android"} |
| 26 | bionicCrtBeginSharedLibrary, bionicCrtEndSharedLibrary = []string{"crtbegin_so"}, []string{"crtend_so"} |
Kalesh Singh | f4ffe0a | 2024-01-29 13:01:51 -0800 | [diff] [blame] | 27 | bionicCrtPadSegmentSharedLibrary = []string{"crt_pad_segment"} |
Colin Cross | c854468 | 2021-06-21 17:31:50 -0700 | [diff] [blame] | 28 | ) |
| 29 | |
Colin Cross | e3fee34 | 2021-06-21 17:28:25 -0700 | [diff] [blame] | 30 | func (toolchainBionic) Bionic() bool { return true } |
Colin Cross | c854468 | 2021-06-21 17:31:50 -0700 | [diff] [blame] | 31 | |
| 32 | func (toolchainBionic) DefaultSharedLibraries() []string { return bionicDefaultSharedLibraries } |
Colin Cross | d1a2813 | 2021-06-21 17:34:47 -0700 | [diff] [blame] | 33 | |
Colin Cross | fc3b064 | 2022-09-01 11:02:15 -0700 | [diff] [blame] | 34 | func (toolchainBionic) ShlibSuffix() string { return ".so" } |
| 35 | |
| 36 | func (toolchainBionic) ExecutableSuffix() string { return "" } |
| 37 | |
| 38 | func (toolchainBionic) AvailableLibraries() []string { return nil } |
| 39 | |
Kalesh Singh | f4ffe0a | 2024-01-29 13:01:51 -0800 | [diff] [blame] | 40 | func (toolchainBionic) CrtBeginStaticBinary() []string { return bionicCrtBeginStaticBinary } |
| 41 | func (toolchainBionic) CrtBeginSharedBinary() []string { return bionicCrtBeginSharedBinary } |
| 42 | func (toolchainBionic) CrtBeginSharedLibrary() []string { return bionicCrtBeginSharedLibrary } |
| 43 | func (toolchainBionic) CrtEndStaticBinary() []string { return bionicCrtEndStaticBinary } |
| 44 | func (toolchainBionic) CrtEndSharedBinary() []string { return bionicCrtEndSharedBinary } |
| 45 | func (toolchainBionic) CrtEndSharedLibrary() []string { return bionicCrtEndSharedLibrary } |
| 46 | func (toolchainBionic) CrtPadSegmentSharedLibrary() []string { return bionicCrtPadSegmentSharedLibrary } |