| delorie.com/archives/browse.cgi | search | 
| From: | Martin Str|mberg <ams AT speedy DOT ludd DOT luth DOT se> | 
| Subject: | Specific file after * in linker scripts | 
| Newsgroups: | comp.os.msdos.djgpp | 
| User-Agent: | tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (NetBSD/1.5_BETA (alpha)) | 
| Message-ID: | <1024240310.653374@queeg.ludd.luth.se> | 
| Cache-Post-Path: | queeg.ludd.luth.se!unknown AT speedy DOT ludd DOT luth DOT se | 
| X-Cache: | nntpcache 2.4.0b5 (see http://www.nntpcache.org/) | 
| Date: | 16 Jun 2002 15:11:51 GMT | 
| Lines: | 42 | 
| NNTP-Posting-Date: | 16 Jun 2002 15:11:51 GMT | 
| NNTP-Posting-Host: | queeg.ludd.luth.se | 
| X-Trace: | 1024240311 news.luth.se 285 130.240.16.109 | 
| To: | djgpp AT delorie DOT com | 
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp | 
| Reply-To: | djgpp AT delorie DOT com | 
I want to fill my .bss section with the .bss parts from my object
files. BUT I want to have a specific file (pages.o below) last in the
.bss and page aligned.
I've tried:
  .bss  SIZEOF(.data) + ADDR(.data) :
  {
    _object.2 = . ;
    . += 24 ;
    *(.bss)
    *(COMMON)
     . = ALIGN(0x1000);
    pages.o(.bss)
     end = . ; _end = .;
  }
and
  .bss  SIZEOF(.data) + ADDR(.data) :
  {
    _object.2 = . ;
    . += 24 ;
    *(.bss)
    *(COMMON)
     . = ALIGN(0x1000);
    pages.*(.bss)
     end = . ; _end = .;
  }
But the "*(.bss)" part seems to gobble it up anyway. Probably because
that's how it's designed.
So, short of listing all my files except pages.o instead of "*" in
"*(.bss)", is there another way? (The other files are quite many and
I'd prefer not to have to edit the linker script when I add yet
another one.)
Right,
						MartinS
| webmaster | delorie software privacy | 
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |