public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc error: /usr/bin/ld: cannot open crt1.o: No such file or directory
@ 2003-07-23 17:20 Navtej Buttar
  2003-07-23 18:08 ` Rupert Wood
  0 siblings, 1 reply; 6+ messages in thread
From: Navtej Buttar @ 2003-07-23 17:20 UTC (permalink / raw)
  To: gcc-help

hellooo everyone here

i am using RH 7.3 and installed gcc that comes bundled with this 
distro...........

#gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)


the problem i am facing is when ever i want to compile a program i get an 
error message

#gcc a.c
/usr/bin/ld: cannot open crt1.o: No such file or directory
collect2: ld returned 1 exit status

i am unable to degbug it. Someone helping told me to install yacc and 
lex...i installed byacc and flex....still the problem exists..

actually i need to install a package from source.....when i run
#./configure

it gives an output that c compiler doesnt produce an executble...

well for this i am looking for help @ gcc community.

i am thankful to all who took a pledge to have a look @ mail.

but pls dont advice me a reinstalltion.....i cant afford to do that et 
all.....i have installed some other systems from same source CD and on other 
systems gcc worx fine...

pls do help me.

_________________________________________________________________
They are beautiful. They are in danger. 
http://server1.msn.co.in/Slideshow/BeautyoftheBeast/index.asp Our 
four-legged friends.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: gcc error: /usr/bin/ld: cannot open crt1.o: No such file or directory
  2003-07-23 17:20 gcc error: /usr/bin/ld: cannot open crt1.o: No such file or directory Navtej Buttar
@ 2003-07-23 18:08 ` Rupert Wood
  2003-07-23 18:44   ` memory location zippo
  0 siblings, 1 reply; 6+ messages in thread
From: Rupert Wood @ 2003-07-23 18:08 UTC (permalink / raw)
  To: 'Navtej Buttar'; +Cc: gcc-help

Navtej Buttar wrote: 

> the problem i am facing is when ever i want to compile a program I
> get an error message
>
> #gcc a.c
> /usr/bin/ld: cannot open crt1.o: No such file or directory
> collect2: ld returned 1 exit status
> 
> i am unable to degbug it.

You debug this by adding '-v' to the gcc command line. This will show you
the commands that the GCC front-end is passing to ld, including the path
where it expects to find crt1.o.

Chances are that crt1.o is in another RPM that you haven't installed. But
I've never tried to administer a Red Hat machine - I always install the dev
stuff at the start - and I don't have one handy to look at. See if there's a
glibc-dev RPM or similar and try installing that. On the other hand I'd have
expected that'd be a prerequisite for the GCC RPM.

Good luck,
Rup.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* memory location
  2003-07-23 18:08 ` Rupert Wood
@ 2003-07-23 18:44   ` zippo
  2003-07-23 20:38     ` Eljay Love-Jensen
  2003-07-23 23:06     ` Status indecation zippo
  0 siblings, 2 replies; 6+ messages in thread
From: zippo @ 2003-07-23 18:44 UTC (permalink / raw)
  To: gcc-help

I am trying to write a program and i need to be able to view the bios information in memory, "capslock numlock shit etc" how ever i do not know the code to read raw from a specific memory location, any help and i will be greatful.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: memory location
  2003-07-23 18:44   ` memory location zippo
@ 2003-07-23 20:38     ` Eljay Love-Jensen
  2003-07-23 23:06     ` Status indecation zippo
  1 sibling, 0 replies; 6+ messages in thread
From: Eljay Love-Jensen @ 2003-07-23 20:38 UTC (permalink / raw)
  To: zippo, gcc-help

Hi Zippo,

>I am trying to write a program and i need to be able to view the bios information in memory, "capslock numlock shit etc" how ever i do not know the code to read raw from a specific memory location, any help and i will be greatful.

Do this:

#include <stdio.h>
typedef volatile char byte;
int main() {
  byte* ptr = (byte*)0xC0000000;
  printf("%02x\n", *ptr &0xFF);
}

That's a raw read of the byte at memory location C0000000.

Unless you are running DOS (MS-DOS, PC-DOS, DR-DOS, et al), old Amiga OS, or old Mac OS, this will be utterly useless.  Most personal computer operating systems since, oh, 1983, have operating system application program interface (API) calls that perform the kind of functionality you are looking for.

Intel architecture also supports IO at the instruction level.  The above only works for reading the bytes in memory, or memory mapped registers.  It doesn't work for inp and outp types of data transfer, nor for DMA data transfer.

If you are running DOS, get the "PC Interrupts" (2nd ed) by Brown and Kyle.  Addison-Wesley, ISBN 0-201-62485-0.  If you are running old Amiga OS, get the RKM.  If you are running old Mac OS, get the Mac "rainbow" suite of technical books.

HTH,
--Eljay


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Status indecation
  2003-07-23 18:44   ` memory location zippo
  2003-07-23 20:38     ` Eljay Love-Jensen
@ 2003-07-23 23:06     ` zippo
  1 sibling, 0 replies; 6+ messages in thread
From: zippo @ 2003-07-23 23:06 UTC (permalink / raw)
  To: gcc-help

On Wed, 23 Jul 2003 10:28:33 -0400
zippo <zippo752001@comcast.net> wrote:

> I am trying to write a program and i need to be able to view the bios information in memory, "capslock numlock shift etc" how ever i do not know the code to read raw from a specific memory location, any help and i will be greatful.

>> maybe there is a easier way todo what i am trying todo. All i am trying todo is read weather capslock numlock and scrolllock are on and then return a value "boolean" i tried 


#include <stdio.h>
typedef volatile char byte;
int main() {
	byte* ptr = (byte*)0xC000000;
	printf("%20x\n", *ptr &0xFF);
}

it compiled but when run gave me a Segmentation Fault
I was told about (API) calls but need somemore information. Thanks for any and all your help, zippo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Status indecation
@ 2003-07-24  9:33 Nigel Murphy
  0 siblings, 0 replies; 6+ messages in thread
From: Nigel Murphy @ 2003-07-24  9:33 UTC (permalink / raw)
  To: 'zippo'; +Cc: gcc-help

Hi Zippo, I'm not sure if this is of help,

 Int 16,2 (int 16, AH=2)

This function returns the state of various keys on the PC keyboard in the 
al register.
The values returned are as follows:

Bit Meaning
7 Insert state (toggle by pressing INS key)
6 Caps lock (1=capslock on)
5 Num lock (1=numlock on)
4 Scroll lock (1=scroll lock on)
3 Alt (1=Alt key currently down)
2 Ctrl (1=Ctrl key currently down)
1 Left shift (1=left shift key down)
0 Right shift (1=right shift key down)

This is the old DOS way of doing things using the BIOS.

You also got a segmentation fault due to acessing a peice of protected 
memory (i.e. outside of your program), you probably running in Protected 
Mode.

-----Original Message-----
From:	zippo [SMTP:zippo752001@comcast.net]
Sent:	23 July 2003 22:10
To:	gcc-help@gcc.gnu.org
Subject:	Status indecation

On Wed, 23 Jul 2003 10:28:33 -0400
zippo <zippo752001@comcast.net> wrote:

> I am trying to write a program and i need to be able to view the bios 
information in memory, "capslock numlock shift etc" how ever i do not know 
the code to read raw from a specific memory location, any help and i will 
be greatful.

>> maybe there is a easier way todo what i am trying todo. All i am trying 
todo is read weather capslock numlock and scrolllock are on and then return 
a value "boolean" i tried


#include <stdio.h>
typedef volatile char byte;
int main() {
	byte* ptr = (byte*)0xC000000;
	printf("%20x\n", *ptr &0xFF);
}

it compiled but when run gave me a Segmentation Fault
I was told about (API) calls but need somemore information. Thanks for any 
and all your help, zippo

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-07-24  9:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-23 17:20 gcc error: /usr/bin/ld: cannot open crt1.o: No such file or directory Navtej Buttar
2003-07-23 18:08 ` Rupert Wood
2003-07-23 18:44   ` memory location zippo
2003-07-23 20:38     ` Eljay Love-Jensen
2003-07-23 23:06     ` Status indecation zippo
2003-07-24  9:33 Nigel Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).