1/* 2 * Copyright 2020 The Pigweed Authors 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 * use this file except in compliance with the License. You may obtain a copy of 6 * the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 * License for the specific language governing permissions and limitations under 14 * the License. 15 */ 16 17/* 18 * This file is separate from pw_tokenizer_linker_sections.ld because Zephyr 19 * already defines the top level SECTIONS label and requires new linker 20 * scripts to only add the individual sections. 21 */ 22 23/* 24 * This section stores metadata that may be used during tokenized string 25 * decoding. This metadata describes properties that may affect how the 26 * tokenized string is encoded or decoded -- the maximum length of the hash 27 * function and the sizes of certain integer types. 28 * 29 * Metadata is declared as key-value pairs. See the metadata variable in 30 * tokenize.cc for further details. 31 */ 32.pw_tokenizer.info 0x0 (INFO) : 33{ 34 KEEP(*(.pw_tokenizer.info)) 35} 36 37/* 38 * Tokenized string entries are stored in this section. Each entry contains 39 * the original string literal and the calculated token that represents it. In 40 * the compiled code, the token and a compact argument list encoded in a 41 * uint32_t are used in place of the format string. The compiled code 42 * contains no references to the tokenized string entries in this section. 43 * 44 * The tokenized string entry format is specified by the 45 * pw::tokenizer::internal::Entry class in 46 * pw_tokenizer/public/pw_tokenizer/internal/tokenize_string.h. 47 * 48 * The section contents are declared with KEEP so that they are not removed 49 * from the ELF. These are never emitted in the final binary or loaded into 50 * memory. 51 */ 52.pw_tokenizer.entries 0x0 (INFO) : 53{ 54 KEEP(*(.pw_tokenizer.entries.*)) 55} 56