Revision ac7974acef22b357e790be418b750987e86cb386 authored by Elliot Saba on 23 April 2021, 20:59:06 UTC, committed by GitHub on 23 April 2021, 20:59:06 UTC
On ELF platforms, `ld` can print out warnings that certain symbols do not have a type or size annotation. This adds the annotations to the `DEBUGINFO` and `EXPORT` helper macros, which are where this information was put for the windows assembler. With this patch, we should eliminate `ld` warnings such as: ``` warning: type and size of dynamic symbol `jl_symbol' are not defined ```
1 parent d7d2b0c
stringreplace.c
// This file is a part of Julia. License is MIT: https://julialang.org/license
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main( int argc, char ** argv ) {
if( argc < 5 ) {
printf("Usage:\n");
printf(" %s <hex offset> <string to write> <maxlen> <file>\n", argv[0] );
return -1;
}
unsigned long offset = strtoul(argv[1], NULL, 16);
char * replacement = argv[2];
unsigned long maxlen = strtoul(argv[3], NULL, 10);
FILE * f = fopen( argv[4], "r+" );
if( !f ) {
printf( "ERROR: Could not open %s for writing!\n", argv[4] );
return -1;
}
if( strlen(replacement) > maxlen ) {
printf( "ERROR: Replacement string length (%lu) is greater than maxlen! (%lu)\n", strlen(replacement), maxlen );
return -1;
}
fseek( f, offset, SEEK_SET );
fwrite( replacement, strlen(replacement)+1, 1, f );
fclose( f );
return 0;
}
Computing file changes ...