Groups | Search | Server Info | Login | Register


Groups > de.comp.lang.c > #10533

Re: Apropos Libraries

From Helmut Schellong <rip@schellong.biz>
Newsgroups de.comp.lang.c
Subject Re: Apropos Libraries
Date 2023-06-16 23:23 +0200
Message-ID <u6ijsd$1bunt$1@solani.org> (permalink)
References (3 earlier) <u6fock$3rdtq$1@starfleet.inka.de> <u6haf9$1d1ap$1@solani.org> <u6hjrk$3u38m$1@starfleet.inka.de> <u6i019$1bl90$1@solani.org> <u6ic1j.3f8.1@stefan.msgid.phost.de>

Show all headers | View raw


On 06/16/2023 19:09, Stefan Reuther wrote:
> Am 16.06.2023 um 17:44 schrieb Helmut Schellong:
>> On 06/16/2023 14:16, Enrik Berkhan wrote:
>>> Helmut Schellong <rip@schellong.biz> wrote:
>>>> Im C-Standard ist das Wort 'Library' ungefähr 500-mal enthalten.
>>>> Der Standard beschreibt sogar konkret vorherige Translationsphasen
>>>> mit Hilfe
>>>> von Einzelobjekten oder zusammengefaßt in Libraries, um schließlich
>>>> eine ausführbare Datei produziert zu haben, per externem Linken.
>>>
>>> Und was steht da zu shared objects? In deinem Ursprungsposting ging es
>>> WIMRE um eine libc++.so.1. Das ist keine Library.
>>
>> Das ist irrelevant. Der Standard nennt selbstverständlich nicht den
>> Namen 'libc++.so.1', sondern er beschreibt allgemein, wie ich es oben
>> schrieb.
> 
> Der Standard bezeichnet als "Library" eine Menge von Funktionen u.a.,
> die "linked" werden können.

Ja, das ist der weit überwiegende Teil.

> Er trifft keine Aussage darüber, wie diese
> Library physisch abgelegt ist, ob das Objektdateien sind, Archive (*.a,
> *.lib) oder Shared Libraries (*.so, *.dll), oder ob der Übersetzer sie
> einfach bei Bedarf direkt einsetzt.

Doch, er trifft hierzu Aussagen, wie ich es schrieb.

5.1.1.1 - Aus einem Draft für C23:
A C program need not all be translated at the same time. The text of the program is kept in units
called source files, (or preprocessing files) in this document. A source file together with all the headers
and source files included via the preprocessing directive #include is known as a preprocessing
translation unit. After preprocessing, a preprocessing translation unit is called a translation unit.
Previously translated translation units may be preserved individually or in libraries. The separate
translation units of a program communicate by (for example) calls to functions whose identifiers have
external linkage, manipulation of objects whose identifiers have external linkage, or manipulation
of data files. Translation units may be separately translated and then later linked to produce an
executable program.

Beispielsweise:  "units may be preserved individually or in libraries".

Damit sind beispielsweise foo.o und libfu.a gemeint.


> Und schon gar nicht trifft er eine Aussage darüber, was der Name
> "libc++.so.1" bedeutet.
> 
>>> Um "konzeptionell fehlerhaftes Verhalten" aufzeigen zu können, sollte
>>> man das Konzept zuvor verstanden haben.
>>
>> Richtig - ich habe das verstanden, schon in den 1980ern.
> 
> Die Welt dreht sich weiter.
> 
>> /lib:/usr/lib:/usr/lib/compat:/usr/local/lib:...
>>
>> Vorstehend der Suchpfad für Libraries.
>> Alle Verlinkungen 'libc++' wurden per /usr/lib/libc++.so.1 vorgenommen.
>> Es gibt dann keinen Grund mehr, eine weitere libc++.so.1 in
>> /usr/local/lib zu öffnen.
> 
> Zum einen ist deine Fehlerbeschreibung absolut konfus - sie sagt weder,
> welches Symbol bemeckert wurde, in welcher Library es zu finden gewesen
> wäre, und welche stattdessen benutzt wurde.

Doch, das habe ich gepostet.
Das Symbol 'FBSD_1.5' in /usr/local/lib/libc++.so.1 wurde als unbekannt angemeckert.
Ich schrieb das mehrfach (von Anfang an).
/usr/lib/libc++.so.1 (Symbol FBSD_1.3) wird nicht angemeckert.

> Zum anderen gibt es seit längerer Zeit nun schon die Möglichkeit, dass
> eine Library einen eigenen Suchpfad für weitere Libraries mitbringt, und

Das weiß ich auch schon lange, weil Fehlermeldungen entsprechend lauten.
Beispielsweise wird libc.so.7 gefordert.
Habe ich das erfüllt, wird etwas Fehlendes für ein Objekt _in_ dieser Lib gefordert.
Habe ich das erfüllt, wird eine falsche Relokationsart angemosert.
Und da hatte ich genug, und ließ diesen Ansatz fallen.

> dieser Suchpfad darf auch relativ sein (RPATH, RUNPATH, $ORIGIN). Weiß
> man natürlich nicht, wenn man seit 1985 nicht mehr in die Doku geschaut hat.
> 
> Und schlussendlich ist der erste Schritt, sowas zu debuggen, das
> ldd-Kommando bzw. die LD_TRACE_LOADED_OBJECTS-Umgebungsvariable, ggf.
> noch in Verbindung mit LD_BIND_NOW.
> 
> Mit C hat das aber alles nichts zu tun.

Ja, deshalb habe ich auch zu Werkzeugen, wie nm, objdump, etc., nichts gesagt.
Das läßt schließlich auch der Standard außen vor.
Grundlegende Konzepte nennt er aber doch.


-- 
Mit freundlichen Grüßen
Helmut Schellong   var@schellong.biz
http://www.schellong.de/c.htm  http://www.schellong.de/c2x.htm  http://www.schellong.de/c_padding_bits.htm
http://www.schellong.de/htm/bishmnk.htm  http://www.schellong.de/htm/rpar.bish.html  http://www.schellong.de/htm/sieger.bish.html
http://www.schellong.de/htm/audio_proj.htm  http://www.schellong.de/htm/audio_unsinn.htm  http://www.schellong.de/htm/tuner.htm
http://www.schellong.de/htm/string.htm  http://www.schellong.de/htm/string.c.html  http://www.schellong.de/htm/deutsche_bahn.htm
http://www.schellong.de/htm/schaltungen.htm  http://www.schellong.de/htm/math87.htm  http://www.schellong.de/htm/dragon.c.html

Back to de.comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Apropos Libraries Helmut Schellong <rip@schellong.biz> - 2023-06-15 11:12 +0200
  Re: Apropos Libraries Bonita Montero <Bonita.Montero@gmail.com> - 2023-06-15 18:50 +0200
    Re: Apropos Libraries Helmut Schellong <rip@schellong.biz> - 2023-06-15 20:14 +0200
      Re: Apropos Libraries Enrik Berkhan <Enrik.Berkhan@inka.de> - 2023-06-15 19:21 +0000
        Re: Apropos Libraries Helmut Schellong <rip@schellong.biz> - 2023-06-16 11:36 +0200
          Re: Apropos Libraries Enrik Berkhan <Enrik.Berkhan@inka.de> - 2023-06-16 12:16 +0000
            Re: Apropos Libraries Helmut Schellong <rip@schellong.biz> - 2023-06-16 17:44 +0200
              Re: Apropos Libraries Stefan Reuther <stefan.news@arcor.de> - 2023-06-16 19:09 +0200
                Re: Apropos Libraries Helmut Schellong <rip@schellong.biz> - 2023-06-16 23:23 +0200
                Re: Apropos Libraries Stefan Reuther <stefan.news@arcor.de> - 2023-06-17 15:26 +0200
                Re: Apropos Libraries Helmut Schellong <rip@schellong.biz> - 2023-06-17 19:01 +0200
                Re: Apropos Libraries Stefan Reuther <stefan.news@arcor.de> - 2023-06-18 10:47 +0200
                Re: Apropos Libraries Helmut Schellong <rip@schellong.biz> - 2023-06-18 12:50 +0200
                Re: Apropos Libraries felix@palmen-it.de (Felix Palmen) - 2023-06-18 13:52 +0200
                Re: Apropos Libraries Helmut Schellong <rip@schellong.biz> - 2023-06-18 20:51 +0200
                Re: Apropos Libraries felix@palmen-it.de (Felix Palmen) - 2023-06-19 07:48 +0200
                Re: Apropos Libraries Bonita Montero <Bonita.Montero@gmail.com> - 2023-06-19 15:01 +0200
                Re: Apropos Libraries Helmut Schellong <rip@schellong.biz> - 2023-06-19 18:54 +0200
                Re: Apropos Libraries Claus Reibenstein <creibens@gmail.com> - 2023-06-19 18:38 +0200
                Re: Apropos Libraries Helmut Schellong <rip@schellong.biz> - 2023-06-19 18:57 +0200
                Re: Apropos Libraries Claus Reibenstein <creibens@gmail.com> - 2023-06-19 19:07 +0200
                Re: Apropos Libraries felix@palmen-it.de (Felix Palmen) - 2023-06-19 19:44 +0200
                Re: Apropos Libraries Bonita Montero <Bonita.Montero@gmail.com> - 2023-06-19 20:21 +0200
                Re: Apropos Libraries felix@palmen-it.de (Felix Palmen) - 2023-06-19 20:28 +0200
                Re: Apropos Libraries Bonita Montero <Bonita.Montero@gmail.com> - 2023-06-19 21:02 +0200
                Re: Apropos Libraries "Peter J. Holzer" <hjp-usenet3@hjp.at> - 2023-06-19 21:31 +0200
                Re: Apropos Libraries Bonita Montero <Bonita.Montero@gmail.com> - 2023-06-19 21:38 +0200
          Re: Apropos Libraries Thomas Klix <wotokl@web.de> - 2023-06-16 18:57 +0200
            Re: Apropos Libraries Helmut Schellong <rip@schellong.biz> - 2023-06-16 22:45 +0200
      Re: Apropos Libraries Bonita Montero <Bonita.Montero@gmail.com> - 2023-06-16 14:21 +0200
        Re: Apropos Libraries Helmut Schellong <rip@schellong.biz> - 2023-06-16 15:34 +0200
          Re: Apropos Libraries Bonita Montero <Bonita.Montero@gmail.com> - 2023-06-16 16:08 +0200
            Re: Apropos Libraries Helmut Schellong <rip@schellong.biz> - 2023-06-16 17:51 +0200

csiph-web