OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:43 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Linking with an odd setup via a linker script assistance
PostPosted: Wed Nov 17, 2021 10:32 am 
Offline

Joined: Tue Nov 09, 2021 11:40 am
Posts: 18
@Octocontrabass

This still seems to be an issue. I can't get it to link properly for whatever reason, it's highly bizarre.


Top
 Profile  
 
 Post subject: Re: Linking with an odd setup via a linker script assistance
PostPosted: Thu Nov 18, 2021 4:20 pm 
Offline
Member
Member
User avatar

Joined: Sun Feb 18, 2007 7:28 pm
Posts: 1564
Hi,

Can't really address the LD side just wanted to comment that it doesnt make sense to attempt to link a boot sector given it lacks any symbolic information (has nothing that can be linked). Our boot loader core is also at 64k however we keep things separate as they are all separate programs.

_________________
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}


Top
 Profile  
 
 Post subject: Re: Linking with an odd setup via a linker script assistance
PostPosted: Thu Nov 18, 2021 10:49 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
amyipdev wrote:
@Octocontrabass

This still seems to be an issue. I can't get it to link properly for whatever reason, it's highly bizarre.

Unfortunately, I wasn't able to reproduce the issue with the information you've posted so far. Can you upload the files you're currently using and the exact commands you run to get the broken binary?

neon wrote:
it doesnt make sense to attempt to link a boot sector given it lacks any symbolic information

You just have to tell your compiler or assembler to produce an object file that contains symbols so the linker will have something to work with.


Top
 Profile  
 
 Post subject: Re: Linking with an odd setup via a linker script assistance
PostPosted: Fri Nov 19, 2021 10:33 am 
Offline

Joined: Tue Nov 09, 2021 11:40 am
Posts: 18
@Octocontrabass

I've reuploaded the files for you here.


Attachments:
linker.ld [155 Bytes]
Downloaded 17 times
entry.s [678 Bytes]
Downloaded 16 times
global.s [2.64 KiB]
Downloaded 17 times
Top
 Profile  
 
 Post subject: Re: Linking with an odd setup via a linker script assistance
PostPosted: Fri Nov 19, 2021 3:45 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
What commands are you running to get a binary out of those files?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: Amazonbot [bot], Bing [Bot], Majestic-12 [Bot], SemrushBot [Bot] and 55 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group