From: Frank Kotler on
Chuck Crayne wrote:
> On Sun, 06 Apr 2008 00:14:18 GMT
> Frank Kotler <fbkotler(a)verizon.net> wrote:
>
>
>>When/if I find "likely()" and or "unlikely()", I'll run the
>>idea through 'em. :)
>
>
> "likely" and "unlikely" are not functions, but branch prediction macros
> to give hints to the compiler. From the standpoint of figuring out what
> the code is trying to do, they can be (and should be) ignored.

Ah. Okay. I expected macros to be uppercase. I was gonna joke that C had
functions to decide whether to emit a "hint" or not. In that case, the
names *do* make sense! And makes it "unlikely" I'm looking in the right
place... No problem... there are others...

Best,
Frank
From: Herbert Kleebauer on
Frank Kotler wrote:
> Herbert Kleebauer wrote:
> > NASM is the
> > standard assembler for LINUX (for the assembly programmer, not for the
> > C programmer).
>
> Nice of you to say so, but I'm not sure it's really true. I'm still
> seein' (G)as code, not Nasm, in the kernel. AFAIK, most distros include
> Nasm, these days. AFAIK, they *all* include (G)as.

As Betov says, GAS is a C side assembler and therefore surely the
standard assembler for people who do Linux C programming. But on
the other side, GAS is very low level so I suppose that people
who want to write pure assembly programs (if such people exist
at all) will prefer NASM.

> > And I can't believe that there are three kernel versions
> >
> > > Frank, I've tried that source on several machines and it gets killed
> > > on both of them. These include kernel versions:
> > > 2.6.23.9
> > > 2.6.21.5
> > > 2.6.12.4
> >
> > which have this problem (and the OP uses exactly this three versions).
>
> Well... that's what he said... Presumably, intermediate numbers would be
> affected, also(?).

Just booted my Ubuntu and it is version 2.6.17.10. Tonight I will
check the Linspire version (which is older).

> > That's so unlikely, that it's even more
> > probably that it is a virus which has problems to infect such small
> > programs.
>
> That's an interesting theory. This virus can't infect our small
> programs, so we get killed - apparently *before* gdb can load us. What's
> it do to the ones it *can* infect?

Does a virus scanner exist for Linux?


> There are some programs that will run on Win9x, but not on XP. There are
> some programs which will run on XP, but not on 9x. There are some
> programs that will run on both. The latter category meet "extra
> requirements". Unlikely as it may be, I *think* that's what we're up
> against...

But such trivial programs as discussed here will run on any Windows
version (as long as it isn't 16 bit code in 64 bit Windows).
From: Phil Carmody on
Frank Kotler <fbkotler(a)verizon.net> writes:
> Chuck Crayne wrote:
> > On Sun, 06 Apr 2008 00:14:18 GMT
> > Frank Kotler <fbkotler(a)verizon.net> wrote:
> >
> >> When/if I find "likely()" and or "unlikely()", I'll run the idea
> >> through 'em. :)
> > "likely" and "unlikely" are not functions, but branch prediction
> > macros
> > to give hints to the compiler. From the standpoint of figuring out what
> > the code is trying to do, they can be (and should be) ignored.
>
> Ah. Okay. I expected macros to be uppercase. I was gonna joke that C
> had functions to decide whether to emit a "hint" or not. In that case,
> the names *do* make sense! And makes it "unlikely" I'm looking in the
> right place... No problem... there are others...

They're linux specific. They substitute GCC-specific
directives which are lower case and begin with 2
underscores. One of the reasons linux is so tied to
GCC.

Phil
--
Dear aunt, let's set so double the killer delete select all.
-- Microsoft voice recognition live demonstration
From: Frank Kotler on
Herbert Kleebauer wrote:

....
> Just booted my Ubuntu and it is version 2.6.17.10. Tonight I will
> check the Linspire version (which is older).

Well... I just installed Slackware 12.0 to "see for myself". Sure
enough, "Killed". He wasn't bullshittin' us.

The deal seems to be: if you've got a .bss section, you *must* also have
a .data section. Just a .text section seems to be okay, unlike some
earlier kernels.

That's my enlightenment for the day. And it took *all* day! I started
trying a "full" install on a partition that was just too small. Seemed
to go alright, up until the end, when I couldn't install lilo. Retried
without X and some other junk. Still wouldn't install lilo. "By force",
I managed to get it to boot, and did a little testing. Okay, back to a
saner (if "obsolete") kernel... Not so fast! Seems like *every* drive on
my system (switched in bios setup) wants to boot that delightful new
kernel now... and the "support" files aren't right! Fscking fsck first
needs to check /dev/hda because it's been mounted 20 times without
checking, next try, fsck has to check it because it hasn't been checked
for 49710 days. Right.

I think I'm going to be able to restore my system - I've gotten this far
- but I wanted to post the "answer", in case I suicide first.

....
> Does a virus scanner exist for Linux?

Dunno, but I'd keep away from Slackware 12.0. Never had a problem with
Slackware before... 13.0 will probably be fine. This one's not staying
around long... if I can get rid of it!

Best,
Frank

From: Herbert Kleebauer on
Frank Kotler wrote:

> Well... I just installed Slackware 12.0 to "see for myself". Sure
> enough, "Killed". He wasn't bullshittin' us.

What was killed? Could you verify:

Okaay, what is wrong with that:
mov al, 10
This gets the program (another one) killed.
If I change it into this:
mov ax, 10
it is working!



> The deal seems to be: if you've got a .bss section, you *must* also have
> a .data section. Just a .text section seems to be okay, unlike some
> earlier kernels.

As far as I remember, elf doesn't know anything about .text or .bss.
You just specify flags for the included segments. I use two segments,
one for code and constants with the flags:

SEGM00_flags=5 ; PF_R + PF_X (1: execute 2: write 4:read)

and one for initialized and initialized data (.text + .bss) with
the flags:

SEGM01_flags=6 ; PF_R + PF_W (1: execute 2: write 4:read)


> That's my enlightenment for the day. And it took *all* day! I started
> trying a "full" install on a partition that was just too small. Seemed
> to go alright, up until the end, when I couldn't install lilo. Retried
> without X and some other junk. Still wouldn't install lilo. "By force",
> I managed to get it to boot, and did a little testing. Okay, back to a
> saner (if "obsolete") kernel... Not so fast! Seems like *every* drive on
> my system (switched in bios setup) wants to boot that delightful new
> kernel now... and the "support" files aren't right! Fscking fsck first
> needs to check /dev/hda because it's been mounted 20 times without
> checking, next try, fsck has to check it because it hasn't been checked
> for 49710 days. Right.

May be you should start to collect live CD's (which you can start
directly from CD without installing on the disk) of the different
Linux versions.


> > Does a virus scanner exist for Linux?
>
> Dunno, but I'd keep away from Slackware 12.0. Never had a problem with
> Slackware before... 13.0 will probably be fine. This one's not staying
> around long... if I can get rid of it!

Maybe Linux itself is a virus, go back to Windows!
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12
Prev: Sudoku
Next: Linux distro request