Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
150 user(s) are online (82 user(s) are browsing Forums)

Members: 0
Guests: 150

more...

Headlines

Forum Index


Board index » All Posts (elfpipe)




Re: Qt 6 progress
Just can't stay away
Just can't stay away


@elfpipe

After having stashed my old Qt6 install on the (failing?) hd, I managed to run the test app with a fresh install.

I can get as far as this with https download :

Quote:
qt.network.ssl: No functional TLS backend was found
qt.network.ssl: No functional TLS backend was found
qt.network.ssl: No TLS backend is available
qt.network.ssl: No functional TLS backend was found
qt.network.ssl: No functional TLS backend was found
qt.network.ssl: No functional TLS backend was found
qt.network.ssl: No functional TLS backend was found
qt.network.ssl: No TLS backend is available
qt.network.ssl: No functional TLS backend was found
qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
[### ] 0.0 bytes/sec
Failed: TLS initialization failed


Any cues/clues?

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@pjs

Quote:
You're having problems with your Amiga drives?


I had a drive, that came with the machine, and it grew tired after an intense session of repeated copying. I didn't know at the time, that the drive could get tired from this, so I ran an intense network test over the weekend, which would just repeatedly bang loads of data on it. Alas, the network algorithm passed the test, but the drive had to be changed.

So I bought a fresh drive, got it up and running with the os and all my old data on it. And then I knocked the machine over in an intense frenzy of going back and forth with a usb drive... It seemed to survive, but apparently it has started to allocate blocks, that might have failures. If I am lucky, I can have it live with a fresh hd. I would be rather grumpy having to buy another machine.

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


Does anyone know, if the openssl port on os4depot is supposed to work? Here I only get a full deadlock during runtime link. And this is with any version of elf.library counting from v53.27.

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@pjs

Sadly smartctrl doesn't seem to communicate with my p5020sata.device. :(

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@afxgroup

I found smartmontools on os4depot. But I don't know how to use it.

EDIT: Both my work: partition and usb drive is acting up. Perhaps virus?

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


I have a problem with my HD. I might need to buy a new one.

EDIT: Are there any good disk health programs out there?

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@afxgroup

I have sent you a PM.

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@afxgroup

Maybe in one hour? I need to install Discord on my laptop and a few other things first.

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@afxgroup

Well, since constructors using .ctors now work just fine with newlib, it is definitely an issue with the specs, since (I am assuming) the compiler is the same.

Would it help you in any way, if I did the init_array implementation in elf.library real quick?

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@afxgroup

The .init_array code still needs to be implemented in elf.library for shared objects. This is probably quite easy, but atm I'm occupied with another elf issue.

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@thread

Thanks to all for the recommendations. I am looking forward to doing some more work on the Qt port soon.

@noXLar

It could be very easy. But as far as I remember, it uses a custom library, that needs to be ported. So it will not be enough to just use Qt6Network.

@afxgroup

If you are using latest elf.library, then be aware, that the startup code is never called. So support for init_array needs to be added to elf.library internally.

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


This is the current situation :

Qt6 with Dynamic Link

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@joerg

I agree, that there is an issue with order when using the (section) attribute.

If, say, the startup code is modified along the lines you suggest - what would happen if a sameness of priority was to occur?

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@joerg

Quote:
Unfortunately I currently can't test anything myself, but in #291 you still have
static void (*ctors_section[0])(void) __attribute__((section(".ctors")));
which is uninitialized, random data.


No, it is not. It is a valid entry in the .ctors section of size zero. BUT there is no guarantee, that it is going to be the beginning of the section.

If I switch the order of foobar like this:

int foobar[] __attribute__((section(".foobar"))) = { 123};

int foobar_section[0__attribute__((section(".foobar")));


to

int foobar_section[0__attribute__((section(".foobar")));

int foobar[] __attribute__((section(".foobar"))) = { 123};



...then I get a valid pointer (foobar_section) to the beginning of the section. I can now read the values 1, 2, 3 (,0).

So the problem seems to be, that the __CTOR_LIST__ entry at the beginning of shcrtbegin.c is not guaranteed to be inserted at the beginning of the section.

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@joerg

Quote:
What you are doing instead is using a local (static) __CTOR_LIST__[], which is empty. The GCC code generator prefers using local (static) data/pointers over external ones and you always get the wrong pointer as long as you have a local (with or without "static") variable with the same name.


Which is of course not what I wanted (although it still worked). I have changed the name of the variable in #291. Now it should be clear what I want to do.

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@joerg

But I want to access the section data? How can I do this, if I don't have a variable, that is initialized to point to the section?

Look at the code again, I updated the example slightly. NOTE: It functions correctly with the ctors_section variable now. It contains two pointers, foo and bar.

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@joerg

I am beginning to see the picture.

This is the current test :

#include "lib.h"

void foo(void__attribute__((constructor));
void bar(void__attribute__((constructor));

static 
void (*ctors_section[0])(void__attribute__((section(".ctors")));

void foo() {
    
printf("foo\n");
}

void bar() {
    
printf("bar\n");
}

int foobar[] __attribute__((section(".foobar"))) = { 123};

int foobar_section[0__attribute__((section(".foobar")));

int function(int f)
{
    
// extern void (*__CTOR_LIST__[])(void);
    
int i 0;
    
int flag 0;

    while (
ctors_section[i] || flag)
    {
        
printf("Constructor function : 0x%x\n", (void*)ctors_section[i]);
        
i++;
        if(
flagflag--;
    }

    
// extern int foobar[];
    
int j 0;

    while (
foobar_section[j])
    {
        
printf("foobar : %d\n"foobar_section[j]);
        
j++;
    }

    return 
f;
}


So apparently giving a size to the variable with the __attribute((section(".somesection")) adds space to the section. I was looking for a way to reference the section (I could have called it anything appart from __CTOR_LIST__) without adding elements. This seems to be possible with the array [], setting it to [0]. If I give it a value of [4] in the current test, the flag variable will enable me to read the full section, if I set flag=4.

In the current test, if I reference the foobar_section variable, then of course I get the right result. BUT the test above, where I try and access the section from another variable fails. It will just give random numbers. This seems to indicate, that the section is not properly loaded/initialized.

To further comment on the .ctors variable : If I run with elf.library v 53.27, it will now crash in the startup code, because the section is not relocated, and the startup code will try and execute a function pointer, that is unrelocated.

So I think it is safe to say, that currently the sections referenced by __attribute((section)) in the code are not, by default, initialized with the proper data. Currently, with elf.library 53.37, the .ctors section variable gives the right result, but that is only due to the fact, that a relocator is called explicitly on the .ctors section from within the elf.library startup code. A generic loading of sections is simply missing.

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@joerg

Quote:
I don't have access to the newlib sources any more, but there is a problem with your code:
static void (*__CTOR_LIST__[4])(void) __attribute__((section(".ctors"))); isn't initialized anywhere, and I don't understand what it's supposed to be used for.


This is the way the reference is made inside shcrtbegin.c. If it is wrong here, it also is there.

Q: If I remove it, how will I access the elements in .ctors? I have to make a reference somehow to be able to loop in function().

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@kas1e

Quote:
I asked Sebastian about the same year ago when meet with this error , and he says it wasn't implemented, but it should be "easy", like a matter to wrote gthr file for.


If this could be produced, it would save me a lot of headache.

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@joerg

Quote:
To check if it still works use something like
__attribute__((section("foobar"))) int foobar = 1;


I am not sure if I am doing things correctly here, so please elaborate, if there is something, that should be handled differently.

My test so far looks like this :

//lib.h
#include <stdio.h>
extern int function(int f);


//lib.c
#include "lib.h"
void foo(void__attribute__((constructor));
void bar(void__attribute__((constructor));

void foo() {
    
printf("foo\n");
}

void bar() {
    
printf("bar\n");
}

static 
void (*__CTOR_LIST__[4])(void__attribute__((section(".ctors")));

__attribute__((section(".foobar"))) int a 1;
__attribute__((section(".foobar"))) int b 2;
__attribute__((section(".foobar"))) int c 3;
__attribute__((section(".foobar"))) int d 0;

static 
int foobar[4__attribute__((section(".foobar")));

int function(int f)
{
    
extern void (*__CTOR_LIST__[])(void);
    
int i 0;
    
int flag 1;

    while (
__CTOR_LIST__[i] || flag)
    {
        
printf("Constructor function : 0x%x\n", (void*)__CTOR_LIST__[i]);
        
i++;
        
flag 0;
    }

    
extern int foobar[];
    
int j 0;
    
int flag2 1;

    while (
foobar[i] || flag2)
    {
        
printf("foobar : %d\n"foobar[j]);
        
j++;
        
flag2 0;
    }

    return 
f;
}


//main.c
#include "lib.h"
int main()
{
    
printf("result: %d\n", function(123));
    return 
0;
}


//Makefile
all:
    
ppc-amigaos-gcc -c lib.-fPIC -o lib.o
    ppc
-amigaos-gcc -shared lib.-o libs.so
    ppc
-amigaos-gcc -use-dynld -athread=single main.-L. -ls -o test


Depending on the version of elf.library, that you are using, you are going to get something like this:

Quote:
11.STICK:section_test> test
bar
foo
Constructor function : 0x0
foobar : 0
result: 123
11.STICK:section_test>


Which apparently means, that both the .ctors and .foobar sections are empty.

Go to top



TopTop
« 1 (2) 3 4 5 ... 74 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project