diff --git a/subprojects/blob-object-elf/src/main.c b/subprojects/blob-object-elf/src/main.c index 9f65226..17eb0fc 100644 --- a/subprojects/blob-object-elf/src/main.c +++ b/subprojects/blob-object-elf/src/main.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #ifndef align_up @@ -64,8 +65,13 @@ int main(int argc, char** argv) { close(blob_fd); - // only write is needed, but mmap requires O_RDWR - int output_fd = open(output_file_name, O_RDWR | O_CREAT | O_TRUNC); + int output_fd = + open( + output_file_name, + // only write is needed, but mmap requires O_RDWR + O_RDWR | O_CREAT | O_TRUNC, + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH + ); if (output_fd < 0) { fprintf( stderr,