Linux-Development-Sys Digest #426, Volume #8 Wed, 17 Jan 01 16:13:17 EST
Contents:
linux+fortran : segmentation fault ("Estelle LEFRANCOIS")
Re: double to byte stream convert ("O.Petzold")
Re: PATH for cooperating executables? (John Reiser)
Linua and Ethernet card (Fernando Alfonso Villanueva)
Problems with EXPORT_SYMBOLS() (Michael Palme)
Problems with EXPORT_SYMBOLS() (Michael Palme)
Re: linux+fortran : segmentation fault (Michel Talon)
Re: Running MSC6/MSC7 under linux? (bgeer)
Re: system halts at exchange with ISA (Lucia Rotger)
Re: Can't boot suse linux 7.0 on a scsi hdd (scsi-controller: ncr 53c8x) (Bill
Anderson)
Re: 2.4.0 ISDN Problems (Konstantinos Agouros)
Re: Running MSC6/MSC7 under linux? (Grant Edwards)
----------------------------------------------------------------------------
From: "Estelle LEFRANCOIS" <[EMAIL PROTECTED]>
Subject: linux+fortran : segmentation fault
Date: Wed, 17 Jan 2001 16:23:02 +0100
Hi,
Running a well known fortran program (perfectly working on other machines !)
under linux (Redhat 6.2), I've got a kind of random error occuring. My
program crashes leading to the message :
Segmentation fault (core dumped)
My question is : What does it mean and why I've got such a random error ?
Could it be a hardware problem ?
Thanks.
------------------------------
From: "O.Petzold" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: double to byte stream convert
Date: Wed, 17 Jan 2001 18:19:53 +0100
> Thanks to all who got an answer to me. Unfurtuneally the problems
> are going on. As I can read in the RPC 1832 /XDR. I have to
> bit shift the neg., exp., und mat. and I'm not a expert for this.
[...]
> My first try looks like this:
shit [snip]
> No idea if this is working in the correct manner. I assume using a char[]
> isn't very usefull, uint would be better but, how can I catch up the right
> Byte of the unit ?
> Who can help to encode and decode this to the XDR Standard ?
> Another question to the NBO. Why does exist only htonl/htons (long int
> and short int) and no "normally" 4Byte int ? Does the XDR independens
> from the NBO ? Regarding the Answers, I should use these functions so
> I assume these functions are much more low level as XDR. Well, how can
> I implement the NBO per hand, is there an example ? The Problem is
> I'm on an embedded system, where I don't have to much libs.
Well, here is the 2nd try. Maybee someone has some improvements for
fastness and portability ?? or simple hints ? The problem with XDR is still
here.
#include <cstdio>
#include <cstring>
#include <ieee754.h>
#include <limits.h>
#include <cmath>
using namespace std;
#define TEST_BIT(a, n) (((a)[(n) / CHAR_BIT] & (unsigned char)(1U << ((n) %
CHAR_BIT))) ? 1 : 0)
void print_bits(unsigned char *s, size_t len, const char* delim=" ")
{
for(size_t i = 0; i < len; i++) {
for(size_t j = 0; j < CHAR_BIT; j++) {
printf("%d", TEST_BIT(s, i * CHAR_BIT + j) ? 1 : 0);
}
printf(delim);
}
printf("\n");
}
int main()
{
double fp = sin(-0.2345);
union ieee754_double fp_in, fp_out;
fp_out.d = fp;
unsigned int negative = fp_out.ieee.negative;
unsigned int exponent = fp_out.ieee.exponent;
unsigned int mantissa0 = fp_out.ieee.mantissa0;
unsigned int mantissa1 = fp_out.ieee.mantissa1;
printf("negative: %d\t\t", negative);
print_bits((unsigned char*)&negative, sizeof(negative));
printf("exponent: %d\t\t", exponent);
print_bits((unsigned char*)&exponent, sizeof(exponent));
printf("mantissa0: %d\t", mantissa0);
print_bits((unsigned char*)&mantissa0, sizeof(mantissa0));
printf("mantissa1: %d\t", mantissa1);
print_bits((unsigned char*)&mantissa1, sizeof(mantissa1));
printf("out_fp = %f\n\n", fp_out.d);
unsigned long long fp_bs = 0; // bitstream
fp_bs = mantissa1;
fp_bs = fp_bs << 32;
fp_bs |= (mantissa0 << 12);
fp_bs |= (exponent << 1);
fp_bs |= (negative & 0x01);
printf("out_bs = ");
print_bits((unsigned char*)&fp_bs, sizeof(fp_bs));
printf("\n");
mantissa1 = fp_bs >> 32;
mantissa0 = (fp_bs >> 12) & 0xFFFFF;
exponent = (fp_bs >> 1) & 0x7FF;
negative = fp_bs & 0x01;
fp_in.ieee.negative = negative;
fp_in.ieee.exponent = exponent;
fp_in.ieee.mantissa0 = mantissa0;
fp_in.ieee.mantissa1 = mantissa1;
printf("negative: %d\t\t", negative);
print_bits((unsigned char*)&negative, sizeof(negative));
printf("exponent: %d\t\t", exponent);
print_bits((unsigned char*)&exponent, sizeof(exponent));
printf("mantissa0: %d\t", mantissa0);
print_bits((unsigned char*)&mantissa0, sizeof(mantissa0));
printf("mantissa1: %d\t", mantissa1);
print_bits((unsigned char*)&mantissa1, sizeof(mantissa1));
printf("in_fp = %f\n", fp_in.d);
}
------------------------------
From: John Reiser <[EMAIL PROTECTED]>
Subject: Re: PATH for cooperating executables?
Date: Wed, 17 Jan 2001 09:43:40 -0800
Kasper Dupont wrote:
>
> Kaelin Colclasure wrote:
> >
> > I have an executable which needs to fork/exec a `helper' program that's
> > part of the same package. Is there an idiomatic way to determine the
> > path to the helper executable based on the parent process? Do people
> > just examine argv[0] for this sort of thing? I'd prefer to not have to
> > rely on the PATH environment if possible. [But I'd also prefer that the
> > program/helper work if the user decides to try them out from the build
> > tree, so capturing --exec-prefix at compile-time is not sufficient.]
> >
> > -- Kaelin
>
> Often argv[0] does not contain the path but only the filename,
> in such a case you would have to use the PATH environment or
> current working directory to find the file. You should also
> consider what would happen if some user tries to fool you by
> lying about argv[0] or PATH. For some applications there could
> be some security issues, in particular if setuid programs are
> involved.
>
> Another posibility is to use readlink on /proc/self/exe. To
> the best of my knowledge that will always give you the full
> path. But unfortunately that is not portable, it only works
> on Linux.
>
> --
> Kasper Dupont
Some Linux systems do not have /proc (it is an optional feature
of the kernel) or do not have it mounted (using it is an administrative
option, too), but in fs/binfmt_elf.c, Linux always stores the
complete pathname at the time of exec as a character string at
[almost] the highest possible address in the address space of the
process. To be precise: from the top down, there is one 32-bit
word of zero, one 8-bit byte of zero (the terminating byte of the
pathname), the pathname, and another 8-bit byte of zero (so you can
tell where the pathname begins). Below that are auxv_t entries
(see <elf.h>), the strings for environment variables, the strings
for command line arguments, the pointers for envp, the pointers
for argv, argc, and the rest of the stack. One way to find the
highest address is to take the maximum address of a character
in an environment string (usually from the last environment variable),
then round up to the next higher page boundary. Use the original
environment, before any calls to putenv() which might erase the clues.
--
John Reiser, voice/fax +1 503 297 3754, [EMAIL PROTECTED]
------------------------------
From: Fernando Alfonso Villanueva <[EMAIL PROTECTED]>
Subject: Linua and Ethernet card
Date: Wed, 17 Jan 2001 18:45:44 +0100
Hi everybody
I've got a Pentium II, 233 Mhz and 64 MB RAM with dual boot Red Hat
Linux 7.0 and Windows 98. I have a problem with an ethernet card on the
PC. The card is a 3com 3c509B-TPO and it seems it is not detected on
Linux because during Linux installation process the network
configuration step is omitted as if there was no network card. First,
the ethernet card was configured Plug&Play, but as this produced
problems even on Windows, with a 3com utility we disabled the Plug&Play
ability of the card. I thought, Plug&Play ability could be the reason
why the card was not detected the first time I installed Linux so I
tried to do the installation again and the results were the same: the
network configuration is omitted again.
I downloaded from www.scyld.com a driver for the card and I compilled it
according to the instructions in the driver, but compillation produced
several errors.
I don't know if it suposes a problem, but on the same PC I've got an ATM
network adapter card
What do you think I can do with the ethernet card?
Any help will be wellcome
------------------------------
From: Michael Palme <[EMAIL PROTECTED]>
Subject: Problems with EXPORT_SYMBOLS()
Date: Wed, 17 Jan 2001 17:58:19 GMT
hello...
ive got a problem with the EXPORT_SYMBOL() macro. i have 2 modules. one
of them uses functions which the other module exports . everything
works fine as long as i leave the symbols global which i want to export
in the exporting module. i want to use EXPORT_SYMBOL() for this task,
so that i can use global symbols without them beeing exported to the
kernel symbol table (i cant use static declaration cause i need some
global vars). now when i try to use it this way (compile is a success)
the other module cant find the external references anymore.
EXPORT_SYMBOL_NOVERS() works.
=====can be ignored ======
i think it has something to do with the version information on
symbols . i havent declared MODVERSIONS or included
linux/modversions.h. if i use "nm" on the module object file i get the
right name for the symbols like:
000000 D symbol_exported
but after insmoding it and trying "ksyms" it is reported as:
d801e0dc symbol_exported_R__symbol_exported
when i use global symbols or EXPORT_SYMBOLS_NOVERS() it is normal:
d801e0dc symol_exported
i think this _R__xxx could be the reason that the other module cant
find the symbol ??? But i also read insmod manpage and they said if
modules are compiled without versioning the CRC information on symbols
will be ignored ??? ok it is no real CRC info in this case but i think
the whole string after_R will be ignored ??? i also read
linux/modules.h and i wondered about the way EXPORT_SYMBOLS is handled
if no versioning is used. for this case i would have expected that its
behaviour is like EXPORT_SYMBOLS_NOVERS.
=========================
i really want to get EXPORT_SYMBOLS working.
Could somebody help me please!!!!!!!!
Thanks in advance...Michael Palme
im sorry when suggestions are wrong but i havent much knowledge off the
internals.
P.S.: I ran kernel 2.2.14, 2.2.16, 2.2.18, 2.4.0 (i tried kernels with
and without version information on modules) and tested modutils 2.3.19
and 2.4.1; gcc is 2.95.2 machine x86
Sent via Deja.com
http://www.deja.com/
------------------------------
From: Michael Palme <[EMAIL PROTECTED]>
Subject: Problems with EXPORT_SYMBOLS()
Date: Wed, 17 Jan 2001 17:58:34 GMT
hello...
ive got a problem with the EXPORT_SYMBOL() macro. i have 2 modules. one
of them uses functions which the other module exports . everything
works fine as long as i leave the symbols global which i want to export
in the exporting module. i want to use EXPORT_SYMBOL() for this task,
so that i can use global symbols without them beeing exported to the
kernel symbol table (i cant use static declaration cause i need some
global vars). now when i try to use it this way (compile is a success)
the other module cant find the external references anymore.
EXPORT_SYMBOL_NOVERS() works.
=====can be ignored ======
i think it has something to do with the version information on
symbols . i havent declared MODVERSIONS or included
linux/modversions.h. if i use "nm" on the module object file i get the
right name for the symbols like:
000000 D symbol_exported
but after insmoding it and trying "ksyms" it is reported as:
d801e0dc symbol_exported_R__symbol_exported
when i use global symbols or EXPORT_SYMBOLS_NOVERS() it is normal:
d801e0dc symol_exported
i think this _R__xxx could be the reason that the other module cant
find the symbol ??? But i also read insmod manpage and they said if
modules are compiled without versioning the CRC information on symbols
will be ignored ??? ok it is no real CRC info in this case but i think
the whole string after_R will be ignored ??? i also read
linux/modules.h and i wondered about the way EXPORT_SYMBOLS is handled
if no versioning is used. for this case i would have expected that its
behaviour is like EXPORT_SYMBOLS_NOVERS.
=========================
i really want to get EXPORT_SYMBOLS working.
Could somebody help me please!!!!!!!!
Thanks in advance...Michael Palme
im sorry when suggestions are wrong but i havent much knowledge off the
internals.
P.S.: I ran kernel 2.2.14, 2.2.16, 2.2.18, 2.4.0 (i tried kernels with
and without version information on modules) and tested modutils 2.3.19
and 2.4.1; gcc is 2.95.2 machine x86
Sent via Deja.com
http://www.deja.com/
------------------------------
From: Michel Talon <[EMAIL PROTECTED]>
Subject: Re: linux+fortran : segmentation fault
Date: Wed, 17 Jan 2001 19:01:28 +0100
Estelle LEFRANCOIS <[EMAIL PROTECTED]> wrote:
> Hi,
> Running a well known fortran program (perfectly working on other machines !)
> under linux (Redhat 6.2), I've got a kind of random error occuring. My
> program crashes leading to the message :
> Segmentation fault (core dumped)
> My question is : What does it mean and why I've got such a random error ?
> Could it be a hardware problem ?
> Thanks.
Do you have some divide by zeroes in your program? This may occur easily in
Fortran. Then depending on the OS this may rise an exception or not and
then lead to an out of bound access, so a segmantation fault.
--
Michel Talon
------------------------------
From: [EMAIL PROTECTED] (bgeer)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Running MSC6/MSC7 under linux?
Date: 17 Jan 2001 12:07:17 -0700
"Jeff D. Hamann" <[EMAIL PROTECTED]> writes:
>As horrid as this sounds...
>I have to develop applications (binary compatible applications) that will
>run on a DOS 5 binary compatible data recorder. I'm tired of trying to find
>an old DOS machine, load the required MS 6 C compiler, building the tiny
>app, then shelving the machine for another 6 months to a year, only to
>repeat the cycle. My questions are:
>Can I run MSC 6/7 under linux somehow and build apps that are binary
>compatible with early versions of DOS?
Why not find a used (or cheap new) disk drive, install DOS & MSC, then
set up dual boot or better yet boot DOS from floppy to maintain your
app?
--
<> Robert Geer & Donna Tomky | |||| |||| <>
<> [EMAIL PROTECTED] | == == Suddenly, == == <>
<> [EMAIL PROTECTED] | == == We feel enchanted! == == <>
<> Albuquerque, NM USA | |||| |||| <>
------------------------------
From: Lucia Rotger <[EMAIL PROTECTED]>
Subject: Re: system halts at exchange with ISA
Crossposted-To: comp.os.linux.hardware
Date: Wed, 17 Jan 2001 19:29:52 GMT
You cannot always exchange motherboards safely. The PPro should be=20
compatible with the PIII but your problem may be at the motherboard.=20
To be safe you should recompile your Kernel at the new machine, then=20
see if it boots. If so, you can transfer from the old system and keep=20
working. Also check first that your new board/memory/etc are OK
Lucia
>>>>>>>>>>>>>>>>>> Mensaje original <<<<<<<<<<<<<<<<<<
El 1/16/01, 11:13:49 AM, salikova <[EMAIL PROTECTED]> escribi=F3 sobre=
=20
el tema system halts at exchange with ISA:
> Dear Madam/Sir,
> Please, help my with following problem.
> What is happen, if I change old ASER AP65 mother board with Pentium=20
Pro
> by new ASUS P2-99 mother board, that contains Pentium III? Old system=
> with Pentium Pro and ISA device works successful, new system at=20
Pentium
> III halts, then process works with old ISA device.
> Best Regards,
> Tatiana
> ------------------------------------
> Budker Institute of Nuclear Physics
> prospekt Lavrentev 11
> 630090, Novosibirsk, RUSSIA
> fax +7 3832 342163
> phone +7 3832 394977
> e-mail: [EMAIL PROTECTED]
------------------------------
Date: Wed, 17 Jan 2001 05:15:34 -0700
From: Bill Anderson <[EMAIL PROTECTED]>
Subject: Re: Can't boot suse linux 7.0 on a scsi hdd (scsi-controller: ncr 53c8x)
"Marcus J�ger" wrote:
>
> i did run "make bzlilo"
> that is correct, or not?
ONLY IF you have an image section that points to the new kernel.
It should point to /vmlinuz for bzlilo compiled kernels (unless you
change the kernel Makefile, which I doubt).
Try the SUSE docuemntation, I believe they have asection on how to
rebuild kernels on their system.
man lilo.conf
--
Bill Anderson Linux Specialist
Modular Network Storage R&D
Random Quote:
Portable: survives system reboot.
------------------------------
From: [EMAIL PROTECTED] (Konstantinos Agouros)
Subject: Re: 2.4.0 ISDN Problems
Date: 17 Jan 2001 07:45:43 +0100
In <941i0b$6hd$[EMAIL PROTECTED]> "Morten B�hmer" <[EMAIL PROTECTED]> writes:
>I'm experiencing problems with the 2.4 release of the linux kernel. After
>compiling my kernel configuration, and recompiling the other packages
>(isdn4kutils etc.). When I connect one isdn line i works ok, but when i
>disconnect the machine freezes!!!
>Does anyone have a solution to this problem?
Kind of... when I use the extra compression module included in ipppcomp I
get freezes, when some compression-error occurs (at least that's the last
thing I saw in syslog).
Konstantin
--
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: [EMAIL PROTECTED]
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
============================================================================
"Captain, this ship will not sustain the forming of the cosmos." B'Elana Torres
------------------------------
From: [EMAIL PROTECTED] (Grant Edwards)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Running MSC6/MSC7 under linux?
Date: Wed, 17 Jan 2001 20:52:22 GMT
In article <944qh5$qdv$[EMAIL PROTECTED]>, bgeer wrote:
>"Jeff D. Hamann" <[EMAIL PROTECTED]> writes:
>
> >As horrid as this sounds...
>
> >I have to develop applications (binary compatible applications)
> >that will run on a DOS 5 binary compatible data recorder. I'm
> >tired of trying to find an old DOS machine, load the required
> >MS 6 C compiler, building the tiny app, then shelving the
> >machine for another 6 months to a year, only to repeat the
> >cycle. My questions are:
>
> >Can I run MSC 6/7 under linux somehow and build apps that are
> >binary compatible with early versions of DOS?
>
>Why not find a used (or cheap new) disk drive, install DOS &
>MSC, then set up dual boot or better yet boot DOS from floppy
>to maintain your app?
I often had better luck running DOS apps under DOSEMU than I
did on a "real" DOS machine. I used to run a DOS-based
user-interface for a 68HC11 in-circuit emulator under DOSEMU,
and it was far more stable than it was on a regular DOS
machine.
--
Grant Edwards grante Yow! .. I have a
at VISION! It's a RANCID
visi.com double-FISHWICH on an
ENRICHED BUN!!
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list by posting to the
comp.os.linux.development.system newsgroup.
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************