Who is responsible for Newlib/vbcc ?

Have a question about our Software Developer Kit? Ask them here.

Who is responsible for Newlib/vbcc ?

Postby phx » Sat Apr 23, 2016 7:07 pm

I'm receiving bug reports that some dynamically linked Newlib programs, compiled with vbcc, write the following messages into the serial debug log:
Code: Select all
[elf] .sdata 0x7fd55440-0x7fd55440
Projektit:Ohjelmointi/ScoreGen/ScoreGen/ScoreGen (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)

In my opinion the reason for it is that SDK/newlib/lib/startup.o doesn't include an .sdata section, although _SDA_BASE_ is referenced. Which means, when there is no small data in the main program, then vlink is forced to generate a dummy .sdata section to define _SDA_BASE_, as in the following fragment of Newlib's vbcc linker script:
Code: Select all
  .sdata          : {
    _LinkerDB = . + 0x8000;
    _SDA_BASE_ = . + 0x8000;
    *(.sdata .sdata.* .tocd)
  }

Unfortunately this dummy section is read-only, which causes the warning when the dynamic linker links a real read-write .sdata section to it.

It should be fixed in Newlib's startup.o or vbcc.ldscript. But both are not under my control. Can the responsible person please contact me by email to find a solution? Thanks in advance.
phx
 
Posts: 10
Joined: Sun Jul 17, 2011 8:55 pm

Re: Who is responsible for Newlib/vbcc ?

Postby blmara » Thu May 05, 2016 5:34 pm

*bump*

Really, are there people developing newlib.library? I have reported this problem to Frank Wille of VBCC. The error message comes up (captured with Sashimi) when starting or even C:Version-ing AmigaOS 4.1 FE version of AmiPDF (v. 1.25):

Code: Select all
[elf] .gcc_except_table 0x57296f14-0x5729a2b4 System:Utilities/AmiPDF/AmiPDF (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)


Here is another example using C:Version with MindSpace2_v.0.06, yes I know it's very early release:

Code: Select all
elf] .hash 0x7fb3b000-0x7fb3b4cc System:SObjs/libgcc.so (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)
[elf] .dynsym 0x7fb3b4cc-0x7fb3bfac System:SObjs/libgcc.so (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)
[elf] .dynstr 0x7fb3bfac-0x7fb3c78a System:SObjs/libgcc.so (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)
[elf] .rela.data 0x7fb3c78c-0x7fb3c7a4 System:SObjs/libgcc.so (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)
[elf] .rela.dyn 0x7fb3c7a4-0x7fb3cb1c System:SObjs/libgcc.so (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)
[elf] .rela.plt 0x7fb3cb1c-0x7fb3cc9c System:SObjs/libgcc.so (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)
DOS] ERROR: During ElfLoadSeg(); Elf32_Error=10; File="work:MindSpace2_v0.06/MindSpace2"


Marko
blmara
 
Posts: 60
Joined: Thu Jun 23, 2011 10:03 am

Re: Who is responsible for Newlib/vbcc ?

Postby broadblues » Fri May 06, 2016 10:33 am

What system are you guys using?

FE or Update 6?

which machine

I don't see these messages on FE: on my x1k nor on my SAM 440
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 461
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

Re: Who is responsible for Newlib/vbcc ?

Postby tonyw » Fri May 06, 2016 1:08 pm

I remember that error message from years ago. It was harmless as I recall, just a message to the effect that an elf section was R/W instead of RO, or something like that.

So what's the problem?
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1236
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: Who is responsible for Newlib/vbcc ?

Postby blmara » Sat May 07, 2016 9:38 am

broadblues wrote:What system are you guys using?

FE or Update 6?

which machine

I don't see these messages on FE: on my x1k nor on my SAM 440


AmigaOS 4.1 FE on a X1000.

I remember that error message from years ago. It was harmless as I recall, just a message to the effect that an elf section was R/W instead of RO, or something like that.

So what's the problem?


Harmless maybe, but showing that there's a bug, somewhere. And cluttering Sashimi output.

Marko
blmara
 
Posts: 60
Joined: Thu Jun 23, 2011 10:03 am

Re: Who is responsible for Newlib/vbcc ?

Postby blmara » Mon May 23, 2016 12:08 am

So, could the newlib maintainer address this problem?

Marko
blmara
 
Posts: 60
Joined: Thu Jun 23, 2011 10:03 am

Re: Who is responsible for Newlib/vbcc ?

Postby tonyw » Mon May 23, 2016 1:19 am

AFAIR, it wasn't a newlib issue, but in adtools. Newlib has not been changed for a couple of years (newlib.library 53.30 (12/02/2014)).

Again IIRC, I think it went away with a later build of adtools/gcc. Are you sure you have the latest SDK?

We don't maintain this stuff and we don't have people to take off more important projects.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1236
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: Who is responsible for Newlib/vbcc ?

Postby zzd10h » Mon May 23, 2016 8:49 am

No problem for me but I have the same output with one of my program, aTunes.

In Sashimi, a lot of :
[elf] .hash 0x7f5cf000-0x7f5cf4cc OS4_FE:SObjs/libgcc.so (sh_flags 0x02)
has read-only flag in section header
but is located in a read-write section of the program header
(linker (script) error?)

Recompiled with current public SDK/FE (the same problem with previous one/4.1.6)
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
zzd10h
 
Posts: 544
Joined: Sun Sep 16, 2012 6:40 am
Location: France

Re: Who is responsible for Newlib/vbcc ?

Postby tonyw » Mon May 23, 2016 3:35 pm

I just checked my clean Final Edition partition and I get no such error messages there.

Nor do I on the beta partition with all the latest beta components. I really don't remember how long ago it happened, but I'm pretty sure that it was fixed years ago.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1236
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: Who is responsible for Newlib/vbcc ?

Postby xenic » Mon May 23, 2016 4:32 pm

Since VBCC hasn't been included in the OS4 SDK since SDK v53.15 (2009), I'm guessing that VBCC is no longer supported by the OS4 dev team. You should probably switch to GCC.
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
 
Posts: 1017
Joined: Sun Jun 19, 2011 1:06 am

Next

Return to SDK Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron