<commit_before>VERS_1.0 {
  # Export vendor delegate symbol only.
  global:
    TFL_TheStableDelegate;

  # Hide everything else.
  local:
    *;
};
<commit_msg>Add new and delete operators to the stable delegate linker script.<commit_after>VERS_1.0 {
  # Export the stable delegate API.
  global:
    # Export stable delegate symbol.
    extern "C" {
      TFL_TheStableDelegate;
    };

    # Export operator new/delete.  These are defined as weak symbols and we need to keep these
    # symbols to ensure that if the main binary overrides these, we use the same version in the
    # stable delegate, since data that is allocated by stable delegate may be deallocated elsewhere.
    extern "C++" {
      # The syntax here is a bit awkward.  Here we want to match against a demangled symbol name
      # that contains spaces, but we also want to use glob-style pattern matching.
      # The linker script syntax doesn't allow spaces in symbol names unless quoted;
      # but if you do quote the symbol name, then it doesn't do glob-style pattern matching.
      # So we can't use quotes.  Instead we just use the wildcard character "?" to match space,
      # which is not ideal, since it would also match any other character.  But these patterns
      # are nevertheless sufficiently unique that they are unlikely to match any symbols other
      # than the overloaded global ::operator new and ::operator delete functions.
      operator?new*;
      operator?delete*;

      # Currently the demangler doesn't output the leading "::" for global symbols.
      # But just in case a future symbol demangler outputs the leading "::",
      # we also export those names too...
      ::operator?new*;
      ::operator?delete*;
    };

  # Hide everything else.
  local:
    *;
};

{'fraction_non_alphanumeric': 0.06692913385826772, 'fraction_numerical': 0.0022497187851518562, 'mean_word_length': 2.970982142857143, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4158250', 'n_tokens_mistral': 469, 'n_tokens_neox': 448, 'n_words': 228}