diff options
author | Amaury Pouly <pamaury@rockbox.org> | 2011-10-20 10:14:50 +0000 |
---|---|---|
committer | Amaury Pouly <pamaury@rockbox.org> | 2011-10-20 10:14:50 +0000 |
commit | f4a1501d4aa4c62458b310fde20cd49082127c6e (patch) | |
tree | c1e5c3655f4e71336b5dcb499d9fabefdec010bc | |
parent | b458d331900638f10b55a12661eaac3eb8c2e423 (diff) | |
download | rockbox-f4a1501d4aa4c62458b310fde20cd49082127c6e.tar.gz rockbox-f4a1501d4aa4c62458b310fde20cd49082127c6e.zip |
sbtools: fix sbtoelf to handle files with more than one hundred commands
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30810 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | utils/sbtools/elf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/sbtools/elf.c b/utils/sbtools/elf.c index 80bff01c4c..896c9cb1c0 100644 --- a/utils/sbtools/elf.c +++ b/utils/sbtools/elf.c | |||
@@ -272,10 +272,10 @@ void elf_write_file(struct elf_params_t *params, elf_write_fn_t write, void *use | |||
272 | 272 | ||
273 | /* allocate enough size to hold any combinaison of .text/.bss in the string table: | 273 | /* allocate enough size to hold any combinaison of .text/.bss in the string table: |
274 | * - one empty name ("\0") | 274 | * - one empty name ("\0") |
275 | * - at most N names of the form ".textXX\0" or ".bssXX\0" | 275 | * - at most N names of the form ".textXXXX\0" or ".bssXXXX\0" |
276 | * - one name ".shstrtab\0" */ | 276 | * - one name ".shstrtab\0" */ |
277 | char *strtbl_content = malloc(1 + strlen(".shstrtab") + 1 + | 277 | char *strtbl_content = malloc(1 + strlen(".shstrtab") + 1 + |
278 | phnum * (strlen(".textXX") + 1)); | 278 | phnum * (strlen(".textXXXX") + 1)); |
279 | 279 | ||
280 | strtbl_content[0] = '\0'; | 280 | strtbl_content[0] = '\0'; |
281 | strcpy(&strtbl_content[1], ".shstrtab"); | 281 | strcpy(&strtbl_content[1], ".shstrtab"); |