Bartleby 0.1.0
A symbol renaming toolkit
|
Bartleby C API specification. More...
#include <sys/types.h>
Go to the source code of this file.
Macros | |
#define | SAQ_BARTLEBY_API |
Functions | |
SAQ_BARTLEBY_API struct BartlebyHandle * | saq_bartleby_new (void) |
Allocates a new Bartleby handle. | |
SAQ_BARTLEBY_API void | saq_bartleby_free (struct BartlebyHandle *bh) |
Frees a Bartleby handle. | |
SAQ_BARTLEBY_API int | saq_bartleby_set_prefix (struct BartlebyHandle *bh, const char *prefix) |
Applies a prefix to all global and defined symbols. | |
SAQ_BARTLEBY_API int | saq_bartleby_add_binary (struct BartlebyHandle *bh, const void *s, const size_t n) |
Adds a new binary to Bartleby. | |
SAQ_BARTLEBY_API int | saq_bartleby_build_archive (struct BartlebyHandle *bh, void **s, size_t *n) |
Builds the final archive and writes its content to a buffer. | |
Bartleby C API specification.
#define SAQ_BARTLEBY_API |
Copyright 2023 SandboxAQ
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http: *www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SAQ_BARTLEBY_API int saq_bartleby_add_binary | ( | struct BartlebyHandle * | bh, |
const void * | s, | ||
const size_t | n | ||
) |
Adds a new binary to Bartleby.
bh | Bartleby handle. |
s | Buffer containing the binary. |
n | Size of bin_src . |
Buffer s
is going to be copied, thus it can be freed after.
SAQ_BARTLEBY_API int saq_bartleby_build_archive | ( | struct BartlebyHandle * | bh, |
void ** | s, | ||
size_t * | n | ||
) |
Builds the final archive and writes its content to a buffer.
saq_bartleby_free
after calling saq_bartleby_build_archive
.bh | Bartleby handle. | |
[out] | s | Destination buffer. |
[out] | n | Size of s . |
SAQ_BARTLEBY_API void saq_bartleby_free | ( | struct BartlebyHandle * | bh | ) |
Frees a Bartleby handle.
bh | Bartleby handle to free. A NULL value here is allowed. |
SAQ_BARTLEBY_API struct BartlebyHandle * saq_bartleby_new | ( | void | ) |
Allocates a new Bartleby handle.
SAQ_BARTLEBY_API int saq_bartleby_set_prefix | ( | struct BartlebyHandle * | bh, |
const char * | prefix | ||
) |
Applies a prefix to all global and defined symbols.
bh | Bartleby handle. |
prefix | Prefix to apply. |