Linux.com

macaswell

macaswell

  • Linux.com Member
  • Posts: 14
  • Member Since: 13 Sep 10
  • Last Logged In: 28 Apr 11

Latest Posts

Posted by
Topic
Post Preview
Posted
  • macaswell
    ld: not enough room for program headers ...
    Okay, this isn't really software, it's virtual firmware, but I find this is a common problem... I receive this error with LD (and it's quite annoying): [code] root@##-systems$ ld link.ld -o vfirmA01.bin setup.o _globl.o panic.o stage1.o vga.o loader.o ld: vfirmA02.bin: not enough room for program headers (allocated 2, need 3) ld: final link failed: Bad value [/code] That error makes no sense (I know exactly what it means, I've done my research. You'll see why in just a second). Here's my linker script (link.ld): [code] OUTPUT_FORMAT("binary") /* Binary, not elf */ ENTRY(_start) phys = 0x00100000; SECTIONS { .text phys : AT(phys) { code = .; *(.text) *(.rodata) . = ALIGN(4096); } data = .; /* This is here because of some buggy versions of ld */ .data : AT(phys + (data - code)) { *(.data) . = ALIGN(4096); } .bss : AT(phys + (bss - code)) { bss = .; *(.bss) . = ALIGN(4096); } end = .; } [/code] The output("binary") is why I don't understand the error, as that error is with the elf linker script! Please help, I've begun to eat myself over this. [edit] When I say 'binary' I mean a flat binary (aout) without the elf formatting.
    Link to this post 28 Mar 11

    Okay, this isn't really software, it's virtual firmware, but I find this is a common problem...

    I receive this error with LD (and it's quite annoying):


    root@##-systems$ ld link.ld -o vfirmA01.bin setup.o _globl.o panic.o stage1.o vga.o loader.o
    ld: vfirmA02.bin: not enough room for program headers (allocated 2, need 3)
    ld: final link failed: Bad value

    That error makes no sense (I know exactly what it means, I've done my research. You'll see why in just a second).

    Here's my linker script (link.ld):


    OUTPUT_FORMAT("binary") /* Binary, not elf */
    ENTRY(_start)
    phys = 0x00100000;

    SECTIONS
    {
    .text phys : AT(phys) {
    code = .;
    *(.text)
    *(.rodata)
    . = ALIGN(4096);
    }
    data = .; /* This is here because of some buggy versions of ld */
    .data : AT(phys + (data - code))
    {
    *(.data)
    . = ALIGN(4096);
    }
    .bss : AT(phys + (bss - code))
    {
    bss = .;
    *(.bss)
    . = ALIGN(4096);
    }
    end = .;
    }

    The output("binary") is why I don't understand the error, as that error is with the elf linker script! Please help, I've begun to eat myself over this.

    [edit]
    When I say 'binary' I mean a flat binary (aout) without the elf formatting.

  • macaswell
    Change console font and/or size?
    I've been wondering how to do this for a while. Because I'm running SuSE 8.1 on a machine from 1998, it's super slow to use XWindows, so I boot into safe mode usually, which is just the console. On start up, it does a 'Loading console font Latin.psfu ... ' routine, and the font changes from the default BIOS font to a more type-writer-ish font. How do I change the font of my console? I have setfont on my machine,but I don't know what directory to put knew fonts in for this command (/etc/rc.d/rc.d doesn't exist on my machine). So 1) Where/how do I change my console font? and 2) What sites are there that share *free* console fonts? 3) How do I change font height? 4) How do I change font width? On MS-DOS I've been able to change the font with specific *.com files, and in *nix you can use commands. Please do not tell me this cannot be done, because I know (from experience) that the font on a unix/linux machine can be changed (the boot up of my laptop is an example).
    Link to this post 26 Dec 10

    I've been wondering how to do this for a while. Because I'm running SuSE 8.1 on a machine from 1998, it's super slow to use XWindows, so I boot into safe mode usually, which is just the console. On start up, it does a 'Loading console font Latin.psfu ... ' routine, and the font changes from the default BIOS font to a more type-writer-ish font. How do I change the font of my console?

    I have setfont on my machine,but I don't know what directory to put knew fonts in for this command (/etc/rc.d/rc.d doesn't exist on my machine).

    So
    1) Where/how do I change my console font?
    and
    2) What sites are there that share *free* console fonts?

    3) How do I change font height?

    4) How do I change font width?

    On MS-DOS I've been able to change the font with specific *.com files, and in *nix you can use commands.

    Please do not tell me this cannot be done, because I know (from experience) that the font on a unix/linux machine can be changed (the boot up of my laptop is an example).

  • macaswell
    Filesystem refresh/reload
    Hi, I'm developing an OS out of assembly, Casnix (http://casnix.sourceforge.net). I do most of the development with cygwin, on my usb flash drive. But when I write to the disk image, I need a linux machine for the loopback device from the kernel. Earlier, I had to rebuild the kernel because the kernel source folder was corrupted, but when I mounted my usb on my linux machine (Damn Small Linux), I can't see the new files, nor does linux see them. Cygwin: $ ls kernel.asm //new kernel.bin //new caswellboot.bin //new casnix-1.0.1.flp //old kernel/ programs/ docs/ boot/ after_compile/ On DSL: $ ls casnix-1.0.1.flp kernel/ programs/ docs/ boot/ after_compile/ How do I refresh the filesystem without loosing time by rebooting my machine? I don't know if this post makes sense, and I'm assuming it's a software problem.
    Link to this post 14 Nov 10

    Hi, I'm developing an OS out of assembly, Casnix (http://casnix.sourceforge.net).

    I do most of the development with cygwin, on my usb flash drive. But when I write to the disk image, I need a linux machine for the loopback device from the kernel.

    Earlier, I had to rebuild the kernel because the kernel source folder was corrupted, but when I mounted my usb on my linux machine (Damn Small Linux), I can't see the new files, nor does linux see them.

    Cygwin:

    $ ls
    kernel.asm //new
    kernel.bin //new
    caswellboot.bin //new
    casnix-1.0.1.flp //old
    kernel/
    programs/
    docs/
    boot/
    after_compile/

    On DSL:
    $ ls
    casnix-1.0.1.flp
    kernel/
    programs/
    docs/
    boot/
    after_compile/

    How do I refresh the filesystem without loosing time by rebooting my machine?

    I don't know if this post makes sense, and I'm assuming it's a software problem.

  • macaswell
    Have an old PC, which linux distro?
    I have an old gaming pc running MS windoze 98 gold (not too different than the first edition, idk the difference, but it says gold edition at boot) that is pretty much broken (don't like it anyway). It has a Pentium III processor, at 550 MHz, and (i think) 256mb of ram. I would like a modern linux distro. I know about Fedora, but I don't have enough ram. Not Ubuntu. I've used Puppy Linux before, and I am thinking about TEENpup Legacy 2009, but hoping for better options. DSL doesn't work (Something with the XWindow config that I cant change). Blueflops is too basic. Anybody got any other ideas? Links to lists are appreciated, too.
    Link to this post 29 Sep 10

    I have an old gaming pc running MS windoze 98 gold (not too different than the first edition, idk the difference, but it says gold edition at boot) that is pretty much broken (don't like it anyway). It has a Pentium III processor, at 550 MHz, and (i think) 256mb of ram. I would like a modern linux distro.

    I know about Fedora, but I don't have enough ram.

    Not Ubuntu.

    I've used Puppy Linux before, and I am thinking about TEENpup Legacy 2009, but hoping for better options.

    DSL doesn't work (Something with the XWindow config that I cant change).

    Blueflops is too basic.

    Anybody got any other ideas? Links to lists are appreciated, too.

  • macaswell
    RE: How to create a kb driver for my C Kernel?
    All right. Unfortunately, I have to put my kernel on hold because I've accepted an offer for a webmaster position, and I've got high school stuff. Thank you, though. I'll be back to this forum soon.
    Link to this post 25 Sep 10

    All right. Unfortunately, I have to put my kernel on hold because I've accepted an offer for a webmaster position, and I've got high school stuff. Thank you, though. I'll be back to this forum soon.

  • macaswell
    RE: How to create a kb driver for my C Kernel?
    it says i cannot post new forum topics/posts. Should I create a new account instead of using LDAP?
    Link to this post 17 Sep 10

    it says i cannot post new forum topics/posts. Should I create a new account instead of using LDAP?

  • macaswell
    RE: How to create a kb driver for my C Kernel?
    thanks
    Link to this post 17 Sep 10

    thanks

  • macaswell
    RE: How to create a kb driver for my C Kernel?
    okay, so maybe someone could suggest a tutorial?
    Link to this post 17 Sep 10

    okay, so maybe someone could suggest a tutorial?

  • macaswell
    RE: Linking Error
    what's your code? Is 'main' an external function? If your code is something like this (i'm not sure which syntax this is, but their similar, and here it doesn't matter, cause this is universal): [code] [global start] [extern _main] ; .data sections or whatev's .start: ; this may be section 'start:' instead of '.start:' ; code... call _main ; code ... [/code] Change the _main references to main (extern main, and call main), and (if you can) compile as elf, or you might get a different link error about linking PE to non PE objects... Still, show me your code, cause it may be something completely different.
    Link to this post 15 Sep 10

    what's your code? Is 'main' an external function?

    If your code is something like this (i'm not sure which syntax this is, but their similar, and here it doesn't matter, cause this is universal):


    [global start]
    [extern _main]

    ; .data sections or whatev's

    .start: ; this may be section 'start:' instead of '.start:'

    ; code...

    call _main

    ; code ...

    Change the _main references to main (extern main, and call main), and (if you can) compile as elf, or you might get a different link error about linking PE to non PE objects...

    Still, show me your code, cause it may be something completely different.

  • macaswell
    How to create a kb driver for my C Kernel?
    I was wondering if someone could tell/help me write a kb driver for my kernel? I know that there are tutorials out there (lots and lots of 'em), but I prefer being able to ask questions and getting walked through by a human, differently than a tutorial can (even if it's written by a human). Not to mention, i'm sure there's more I need to initialize before a keyboard driver(?) Please don't remind me of the rules about posting something that's already been answered, or is in a tutorial (reasons explained above). Does the driver have to be a module?
    Link to this post 15 Sep 10

    I was wondering if someone could tell/help me write a kb driver for my kernel? I know that there are tutorials out there (lots and lots of 'em), but I prefer being able to ask questions and getting walked through by a human, differently than a tutorial can (even if it's written by a human). Not to mention, i'm sure there's more I need to initialize before a keyboard driver(?)
    Please don't remind me of the rules about posting something that's already been answered, or is in a tutorial (reasons explained above). Does the driver have to be a module?

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board