This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Max pagesize differences between gold and bfd


I'm seeing a massive increase in file size for using a large (512M) max page size with gold versus bfd:

$ cat empty.c
int main() {}
$ gcc -Wl,-zmax-page-size=0x20000000,-Ttext-segment=0x20000000 empty.c -o a.out.bfd
$ gcc -Wl,-zmax-page-size=0x20000000,-Ttext-segment=0x20000000 -fuse-ld=gold empty.c -o a.out.gold
$ ls -lh a.out.*
-rwxr-xr-x 1 $USER $GROUP  12K Mar 11 15:01 a.out.bfd
-rwxr-xr-x 1 $USER $GROUP 513M Mar 11 15:01 a.out.gold

Looking at the output files, it looks like gold is inserting a lot of unnecessary padding.  Is this intentional?  If so, is there any way to avoid that padding and get output similar to that produced by the bfd linker?

Steven Vormwald

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]